Search code examples
accelerometer

How to calculate accelerometer sensor rotational speed to KM/H


I am using BMA250E accelerometer and I setting chip is +/- 16G The accelerometer is put on the bicycle wheel hub and each 10ms I read the chip and do these calculate.

3 axis total g force is do these like below:

force = sqrt( ((double)x_g * x_g) + ((double)y_g * y_g) +((double)z_g * z_g) );

I got the accelerometer g force and which is follow the wheel rotation speed up or down. But I don't know how to calculate what the g force I got to KM/H.

Thanks.


Solution

  • To get from measured acceleration to speed you would theoretically have to integrate acclearation over time.
    That would however be at risk of suffering from growing errors, because a bike in constant motion experiences the same acceleration (at e.g. the frame) as a static bike.
    Points on the wheel experience dynamically changing acceleration, which however (while moving constantly) also integrates to zero, 3-dimensionally.

    A different approach is to count cycles/time and multiply by circumference of the wheel the accelerometer is attached to.

    (You already indicated that you did so, this is mostly for getting the question out of the list of unanswered questions.)