Go Down

Topic: GETTING MOVEMENT ACCELERATION FROM ADXL322 (Read 2 times) previous topic - next topic


Hi everyone! I am new to this forum, but I have been searching on it for information about this topis. The thing is I have programmed an accelerometer reading and I get the values said in
But this values depend on the angles of the sensorbecause they give acceleration including g. My problem is that what I need to measure is only the acceleration of the sensor in movement, and also velocity. I found some information like here:
but I do not understand where do they get those constants. So, basically, I would like to know how can I transfor my accelerometer readings to accelrations in m/s2 and velocity. Thank you very much  XD


Mar 29, 2011, 04:52 pm Last Edit: Mar 29, 2011, 05:05 pm by AWOL Reason: 1
The accelerometer outputs a voltage depending on acceleration.
Because acceleration can be +ve or -ve, the voltage is offset by half the supply voltage, so that voltages cannot go negative.
So if the supply is 3.3V, the 0g output is 1.65V.

The ADC on the Arduino divides whatever voltage is on its reference into 1023 (or 1024 for simplicity) intervals.
So, if the reference is 5V, each increment from the ADC represents about 4.8mV.

Factor in the sensitivity of the accelerometer (expressed in the dataasheet in mV/g or V/g), and you can calculate the acceleration.
Integrate over time for velocity.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


Thank you very much for your fast reply. XD It was really useful.
Anyway, I have some other questions now. Now I get an acceleration value like for example 1g, 0.5g...but of course this is including gravity force, to take it away, is it enough to make -1g?
And also, how can I stabiliza my readings?when I am not moving I do get changes in my values, usually not very significant (like from 510 to 512), but eventually it can make some jumps and be more significant. is there any simple way to calibrate? Thanks again!


One problem you will have is how to remove the gravity vector from the calculation.  If you are moving on a level, flat plane you can just ignore the Z axis.  

Unfortunately, if you are moving in three dimensions and have no other inputs you can't tell the difference between "sitting still on the ground" and "upside-down accelerating toward the ground at 2G's".  You would have to add some kind of orientation sensor like a 3-axis gyroscope.  Then you could tell which way was 'down' and subtract the gravity vector.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e


Thanks again for the reply. You are fast! (good for me, quite stressed by now  :P)
I understand that if I have a 2 axis accelerometer, if I have it in a plain surface, is the same not moving that falling plain. Anyway, I am planing to put my sensor in 3D, but, tipycally it will be with the y axis pointing to the floor and the x asis moving in the horizontal plain. I am not sure to have explain myself properly. the problem is, as you said, that is noot moving in a plain, but in the space, but having these considerations, can anything be done?
I will explain in 2 lines little bit of what I want to achieve, so it may clear something: I want tsomeone to carry the board with the seonsor, and detect when the person falls, so I though a good idea could be to detect sudden changes in (motion) acceleration. Thank you again!

Go Up