Go Down

Topic: Measuring inclinations of a moving vehicle with an accelerometer (Read 1 time) previous topic - next topic


I'm developing an application with an accelerometer (ADXL335) to measure inclinations and activate an alarm when a specified angle is exceeded. Up here all right.

I need to measure these inclinations in a vehicle in motion. Problem: When there are sudden accelerations the alarm is activated even though the specified angle isn't reached.

How can I solve this problem?



You are going to need more than one sensor to accomplish this.  At rest, you can easily get an angle from an accelerometer by determine the director of the of vector caused by gravity.  However, for a moving car, there are other accelerations which will interfere with the acceleration due to gravity alone, so you will need another sensor such as a gyro to help determine the real angle.  Using a gyro you can integrate the rotational velocity to get rotational position and apply that to a recently known accelerometer angle data point to get the current angle.  The MPU6050 is a good sensor for this as it has an accelerometer and gyro on it.  It also has a DMP which allows you to directly output euler angles or yaw/pitch/roll values which will save you having to write your own algorithms.  Jeff Rowbergs i2C library will come in very handy if you decide to go this route.  Good luck.


Thank you so much!!

So... using a MPU6050 I can measure the inclination of a moving car and set alarms as a function of the angle of inclination!!

Thanks again  :)


Check oout this application note, an-00mx-012. Also using a thermal MEMS with a natural LPF response will help reject a lot of the out-of-band vibrations.


Even using a gyro,   you are going to have great difficulty distinguishing the actual tilt of the vehicle from the acceleration of the vehicle.   The tiny moving parts of the accelerometer device sense acceleration,    and they fundamentally cannot tell you if that is caused by gravity or by the acceleration or deceleration of the vehicle.    The gyro will tell you if the car is rotating,   but any normal car or vehicle does not rotate much,   and the rotation effect will be difficult to distinguish from noise and from the inherent drift in the gyro.


It's a common misconception that an accelerometer is measuring the force of gravity.  Actually,   the accelerometer is measuring the force of the floor or ground or table pushing on it from underneath, that is preventing the accelerometer from falling into a bottomless pit.


Has anyone used an accelerometer to measure the pitch angle (up and down hill) of a moving vehicle?

I do some trailer towing with a GMC SUV and I would like to build a "Cruise Control" that anticipates hills before the speed actually drops much.  Also data about the incline would possibly inform me that a downshift will be necessary Real Soon Now.

I assume I will need to do signal averaging to get decent data.

Any ideas??

HOW-TO: http://ArduinoInfo.Info

Go Up