Pages: [1]   Go Down
Author Topic: Measuring inclinations of a moving vehicle with an accelerometer  (Read 566 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Russia
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Use gyro instead of accelerometer?..
Logged

Indiana
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley
Logged

Pages: [1]   Go Up
Jump to: