I am using ADXL345 to measure tilt angle from -90 to +90 deg.
As I am new to accelerometer , I have some questions.
i.e What is the min and max raw data value to be expected if it is set at sensitivity of 2g (or should i use it 4g, 8g or at 16g for my application.)
what should be the appropriate bandwidth ?
I have observed that value of angle calculated goes erroneous above 50 deg. Any suggestions to correct this.
and finally how to calculate (ALPHA ) value for low pass filter for noise reduction.
If the tilt meter output is erroneous above 50 degrees, there is probably an error in the code. Here is a clear and comprehensive analysis of measuring tilt angles using an accelerometer: http://www.freescale.com/files/sensors/doc/app_note/AN3461.pdf As the document explains, there are some difficulties with angular coordinate systems that need to be understood.
What is the min and max raw data value to be expected if it is set at sensitivity of 2g
Just record the output as a function of different orientations, and it will be obvious.
Consult the data sheet for bandwidth considerations. As for the low pass filter, adjust alpha until the results are satisfactory to you.
My values goes to roughly from -250 to +250 on rotations and to -511 to +511 on sudden waving. Is this behaviour normal or it
should give max value 511 to max rotation.
If the accelerometer is held still, the sensing element reports 1 g due to gravity. "Sudden waving" subjects it to more than 1 g, so it will report higher values.