2018-05-14 6:01 AM
Hi There,
I am using the STM Accelerometer(LIS2DE12) with STM(stm32l432kb) controller. While getting the readings from the Accelerometer it gives the random value continuously. Even it shows false value at steady position.Here some how I am facing problem and need some idea and suggestion to solve this issue. If some one has the document , relevant data and sample code for it please let me know and help me.
Thanks
2018-05-23 2:21 PM
Velocity is integral of the
https://en.wikipedia.org/wiki/Acceleration
so you have to integrate the acceleration in discrete domain, for example like this:velocity = velocity + acceleration * (1.0f / data_rate_Hz);
The accleration must be in m/s2, it means multiply the acceleration in g by 9.81m/s2.
2018-05-27 11:30 PM
Hi
Batek.Miroslav
,One more question I need to ask that from these velocity = velocity + acceleration * (1.0f / data_rate_Hz) formula, we can measure the decrease in velocity(Deceleration).
2018-05-30 2:14 AM
Hi
Batek.Miroslav
,While making and developing the code to measure the velocity using accelerometer, as per yoursuggested equation
velocity = velocity + acceleration * (1.0f / data_rate_Hz) formula, and at output side i am getting a continuous increment in velocity without moving, i.eat steady position, the accelerometer. Can you let me know and guide me for why i am getting this result of velocity.
If you any other details of inside the code you ask me, I will let know the details
Here I am sharing my small basic sample code for your reference:
acceleration = ax; // ax is acceleration from the X-Axis and acceleration is Multiply by g(9.81) with X-Axis ACC.
initial_velocity = velocity ; // assigning previous velocity to initial velocity ..... v = u +at .... u = v ... after next data velocity = (initial_velocity + (acceleration * (0.005))); // Here i have selected the Data rate(ODR) of ACC. at 200HzKindly update me if there is an issue or any error in calculation ....
Thanks in Advance ...We’re moving the ST Community to a new platform to give you a better and more reliable community experience.