Go Down

### Topic: Measuring inclinations of a moving vehicle with an accelerometer (Read 3325 times)previous topic - next topic

#### pecege

##### Jun 26, 2013, 10:12 am
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?

#1

#### jjspierx

#2
##### Jun 26, 2013, 07:51 pm
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.

#### pecege

#3
##### Jul 02, 2013, 12:07 pm
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

#### jfennelly

#4
##### May 22, 2014, 03:33 pm
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.

#### michinyon

#5
##### May 22, 2014, 08:30 pm
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.

#### michinyon

#6
##### May 22, 2014, 08:44 pm
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.

#### terryking228

#7
##### May 23, 2014, 03:11 pm
Hi,
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??

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

#### imginit

#8
##### May 09, 2017, 01:43 am
Hi,
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??

Did you or anyone else ever find a solution to finding the pitch of a moving vehicle?

Go Up