Can i find the speed of the vehicle using ADXL335?. My idea is to send an email alert if the vehicle speed exceeds the defined limit using raspberry pi. Just like in zoomcar or the other rental cars.

  • \$\begingroup\$ ADXL is an accelerometer, how would you get the speed ? \$\endgroup\$ Apr 2, 2017 at 7:05

1 Answer 1


Short answer: No

To get velocity out of your accelerometer you would need to perform some integration eg:

v_k = v_(k-1) + T*a_k

Where v is the velocity, T is the sample period, a is the measured acceleration and subscript k is the sample number.

This is saying that "velocity is equal to previous velocity, plus the product of measured acceleration and sample period" where you might assume constant acceleration in between samples (k).

Already this is a problem, because we're working in discrete time and acceleration is not constant between samples. To make matters worse, any error (bias, drift) of the accelerometer is integrated as well, which means that after only a few (tens?) of samples your velocity has large error.

The rental cars are probably doing it either with GPS or direct from the speedometer.

  • \$\begingroup\$ What about hall effect speed sensor? \$\endgroup\$ Apr 2, 2017 at 7:16
  • \$\begingroup\$ @gurudattakr, that's what I meant by measuring direct from the speedometer. \$\endgroup\$
    – Michael
    Apr 2, 2017 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.