

If you ever find yourself thinking that you are the most brilliant person in a situation, you are doing something wrong.  EricVanWyk [more] 



Thread Tools  Rate Thread  Display Modes 
#1




Accelerometer integration
Hey,
Despite this thread, I want to use accelerometers for a bit of navigation this year. In the attached excel spreadsheet, you can see that using the angles 0degrees 45degrees and 90degrees, I have found that the relation between the real acceleration and the output value is non linear and appears to be something like: y=(a^3)/12+500 where a is the real acceleration and y is the sensor value. My questions: 1)How can I convert this to a more linear connection? (do i need to?) 2)How do I integrate the values over time to get speed and more importantly distance? Thanks! Leav Last edited by Leav : 01222006 at 07:14 AM. Reason: added excel file 
#2




Re: Accelerometer integration
Integrating the acceleration is pretty straightforward; dimensional analysis tells you that all you need to do is multiply your acceleration by your time element (if you're in user_routines, that would be 0.0262 seconds) to get velocity, and multiply your velocity by your time element to get your distance.
I would be careful with that, though, I've been having quite a time trying to get the acceleration to integrate accurately. 
#3




Re: Accelerometer integration
to get the real equation you have to remember that acceleration is a vector  it has magnitude and direction
when the bot is not moving the magnitude is 1g, and its pointing straight down when the bot is accelerating forward at 1g on a level surface, the magnitude the sensor will read is (1^2 + 1^2)^ 0.5 = SQRT(2) and the direction will be 45° forward from Z. so the forward magnitude of the robots total acceleration vector should always be = SQRT(sensor^2  1^2) [units = g's]. You must keep track of the direction through the SQ and SQRT calculations. note that 1^2 assumes the sensor reading has been scaled so that 9.8M/S^ = 1g. also, if the robot is not on a level surface you must know the angle that it is tilting to separate out gravity and motor acceleration. 
#4




Re: Accelerometer integration
I may have gotten things all wrong but I was under the impression that the accelerometer tells you the magnitude of acceleration on a given axis.
so if you know how you mounted the accelerometer you would know the acceleration direction relative to the robot (though you would miss any part of the acceleartion perpendicular to the axis that the accelerometer was measuring unless you had two gyros or a dualaxis accelerometer) Leav 
#5




Re: Accelerometer integration
Leav,
you are correct  if the accelerometer is positioned with its axis horizontal, then gravity will not affect the reading, unless the robot tilts (climbs a ramp). For some reason I had tiltsensing on my mind and got the two applications mixed together. I dont understand your original equation at all: a^3 ?! Which accelerometer are you using, I will look up the data sheet and see if I can make sense of this. 
Thread Tools  
Display Modes  Rate This Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Accelerometer Timer Question  psquared  Programming  3  02122005 01:34 AM 
URGENT! We need help with the accelerometer  lkdjm  Electrical  5  02112005 04:42 PM 
Accelerometer Wiring/Input  DAN THE MAN  Control System  1  02062005 08:02 PM 
Accelerometer vs Gear Tooth Sensors  zdeswarte  Electrical  4  01222005 03:35 PM 
Example accelerometer code released.  Kevin Watson  Programming  0  01202005 03:45 AM 