# Accelerometer Pitch and Roll

1. Dec 13, 2010

### josepvr

Hello everyone,
i'm new to this forum and this is my first post.
My question is: how to get pitch and roll of a moving vehicle using an 3-axis accelerometer?
accelerometer values are the same when vehicle is stopped?

2. Dec 13, 2010

### AlephZero

Most accelerometers only measure translational acceleration, not rotations.

If you want to measure a rotation, you need two accelerometers, measuring in the same direction, at different places on the structure, You then get the rotation from the difference in the translations, divided by the distance between the accelerometers.

You can measure pitch and roll with 3 accelerometers at different points on the vehicle, all measuring vertical acceleration, but that is not what a 3-axis accelerometer does.

3. Dec 13, 2010

### josepvr

Thanks AlephZero,
I've another question, if I only want to measure pitch (inclination angle of the vehicle) are 2 accelerometers required?

I explain you what I'm trying to do. My project consists in measure RC car inclinations when is running uphill/downhill.

If an accelerometer isn't the best solution, could you explain what kind of sensor I might use?

4. Dec 13, 2010

### Dr Lots-o'watts

Airplanes will always use gyroscopes for this. Not sure they can be miniaturized for RC cars though.

5. Dec 14, 2010

### josepvr

You mean that inclination only can be measured by accelerometer when vehicle is stoped?

6. Dec 19, 2010

### p1ayaone1

No. Angular rate gyros measure angular acceleration. That is not how fast you are rotating, but how much the rate of rotation changes. If you would like to know the angular position (the inclination) you need to double-integrate.

Integrating the acceleration once gives you the angular rate (degrees per second), and integrating that again gives you the angle.

You need to hold the vehicle still when you calibrate the gyro, otherwise it should work more or less in real-time.

You might look into something like this: http://www.sparkfun.com/products/8955

7. Dec 19, 2010

### p1ayaone1

And accelerometers measure strictly translational motion, not rotational.

8. Dec 24, 2010

### drovosek

josepvr, you have a number of solutions
1. You can use 3-degree or 2-degree accelerometer while vehicle is not moving for attitude detection
2. you can use two GPS recievers: one on the front and one on the back of vehicle, and use it's solution to get a pitch angle
3. you can use information about vehicle speed + barometer input %)
4. One GPS receiver and "inertial measurement unit" (3 accelerometer + 3 gyro). This can give you attitude solution.
5. it can be possible to get pitch angle using current speed, current acceleration (from 1-axis accelerometer) and current gas consumption. This can require some preliminary calibration.

Last edited: Dec 24, 2010
9. Dec 25, 2010