1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

ADXL Accelerometer data to speed

  1. Dec 8, 2009 #1
    I am in need of a little guidance.
    I am trying to calculate the speed of travel using an ADXL330 accelerometer, with values in the X Y and Z directions. I know this isnt a particularly accurate way of calculating the speed of travel but its this is the only component i have at my disposal

    I have been trying different formulas for converting the three output values into a speed in MPH but so far i have been having no look. Is there a generic equation that i am overlooking.

    Any guidance would be greatly appreciated
     
  2. jcsd
  3. Dec 8, 2009 #2
    What type of vehicle are you trying to calculate the speed of?
     
  4. Dec 8, 2009 #3
    Initially a car travelling in a straight line which accelerates from a motionless position to a set speed, and then decelerates back to 0 again.
     
  5. Dec 8, 2009 #4

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    You need to integrate the acceleration to get speed.
    Measure the acceleration regularly in small time increments and multiply by the time

    eg if you measure an acceleration of 2m/s^2 at 1ms then after another 1ms you are going = 2 m s^2 * 0.001 s = 0.002m/s faster

    In practice you need a more complex scheme (like a Kalman filter) to smooth out noise in the data
     
    Last edited: Dec 8, 2009
  6. Dec 8, 2009 #5
    That sounds good but how do i get from 3 accelerations in the three different axis, to one acceleration?
     
  7. Dec 8, 2009 #6

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    sqrt( x^2 + y^2 + z^2) gives you the overall acceleration

    Or you mount the device with one axis (say X) pointing forward and just use that one for the forward speed. If you want accurate speed in corners you will need the x and y, sqrt(x^2 + y^2)
    You probably don't want to include up and down bouncing on the road as part of your 'speed' so ignore Z.
     
  8. Dec 8, 2009 #7
    Thats great, i have been playing around with that equation recently but will have another go tomorrow to see what i can get out of it.
    I have sample data that i know acceleratesd to 60MPH so i will see if i can get some data relatively near that value

    Thanks for you help so far!
     
  9. Dec 9, 2009 #8
    I have been toying with this all day.

    I have some sample data which i collected on a run in the car. The data is accelerometer values from the 3 axis of acceleration for a car journey in a straight line. The car accelerates from a standing start to 60 MPH and then decellerated back to a standing position. No matter what modifications i do to the calculation, it appears that the results tell me that the car is reversing very quickly at the end of the data i collected when i know for a fact the car was stationary.

    If i post my data would anyone be willing to look at it and see if they get the same results i do?

    File has been updated to a working version
     

    Attached Files:

    Last edited: Dec 9, 2009
  10. Dec 9, 2009 #9

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    The file seems to be corrupted
     
  11. Dec 9, 2009 #10
    File has been updated to a working version. Sorry for the problem
     
  12. Dec 9, 2009 #11

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    That looks about normal for accelerometer data.
    Because of the noise and the small values you have to do more than just subtract the value from the previous one - take a look at Kalman filters.
     
  13. Dec 9, 2009 #12
    Ok, il have a look at Kalman filters, thanks for your help
     
  14. Aug 8, 2010 #13
    In file: 0-60 Raw Values.xls
    I don't know why (Convert to G-Forces) = (Remove initial calibration error)/500?
    what is 500?
     
  15. Oct 31, 2011 #14
    Hi..
    I've taken up project on Event data recorder as my final yr project. I want to log in the speed as well as the direction of motion of vehicle into a memory card . Firstly i wanna calculate the vehicle's speed using a 3-axis accelarometer and micro-controller ( interfaced with RTC )& record those values into memory device along with vehicle's path ( left,right,straight ) Could anyone suggest me the proper devices to be used for this project so that i can get the max accuracy in my calculations ?? Please guide me. I request the ones who hav already tried this thing to please give me satisfactory replies.. Hope to hear from you soon
     
  16. Apr 24, 2012 #15
    Hello, any idea how does it work at sea on a vessel? On land, it is relatively easy. But at sea, I found that all 3 axes (x, y and z) show positive and negative accelerations when the vessel is moving and even stationary at terminal.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook