# How does an accelerometer interpret g as ( +9.8 or -9.8 )

I am working with MPU6050 (accelerometer + gyroscope). Concerning about the accelerometer;

Do these sensors(accelerometers in general) uses g as 9.8 m/s^2 or - 9.8 m/s^2 ? (Is there a standard/convention about this)

When I accelerate it in +x direction for example, it gives me a positive multiple of g, so I conclude that g should have be taken as positive.

But wanted to be sure by asking.

You can also clarify for me that whether it measures gravitational acceleration or the acceleration because of the normal force while standing horizontal(xy plane is level) on a flat surface for example.

Thanks.

Edit : I don't think this as a duplicate of my other question, this question focuses on one thing, the accelerometer outputs are designed considering g = + 9.8 m/s^2 or - 9.8 m/s^2.

• At first blush, physics would say that the acceleration is positive as you are in an accelerating frame of reference when standing on the ground. But you should read the documentation, too. Just to be sure. – jonk Jul 27 '19 at 6:22
• @jonk I think from point of physics, gravitational acceleration acting on me is - 9.8 m/s^2 az(unit vector in +z direction) while standing on the earth, If I choose my z axis positive towards the sky. But with same choose of z axis, accelerometer outputs 1g while standing on the surface. So this confuses my mind. – muyustan Jul 27 '19 at 6:26
• @muyustan Everything is relative. You choose your reference. – jonk Jul 27 '19 at 6:45
• Possible duplicate of What is the meaning of output of an accelerometer – pipe Jul 27 '19 at 7:22
• @Sorenp It's still there, and as far as I can see it's basically the same question. IMO asking again isn't helpful so I've flagged it. – pipe Jul 27 '19 at 7:23

Think of the accelerometer as a spring and the displacement as the acceleration value (this is actually how it is done, kind of).

When you accelerate there is a force on the spring and from the displacement you can measure the magnitude of the acceleration. You need three springs, one in each direction to have a 3D accelerometer. Now we just agree that when the acceleration is to +X direction the value is positive and the same for Y and Z. We also agree that +Z direction is towards the sky.

Now lets focus on the Z axis spring. What happens to it when it is on free fall? Only the gravitational force applies, but it has the same affect on each atom of the spring, so the spring is not displaced. What happens when it is in rest? The gravitational force and the counter force, earth pushing upwards, cause a displacement. The displacement is to the same direction as when you accelerate towards the sky, which we agreed to be positive. Thus you get a positive 1g when standing still. In other words, the accelerometer is ignorant to the gravitational force. In rest it can only measure the counter force, which is upwards.

• thanks for the answer, from the interest of the EE.SE this is all I can expect I guess. However I guess I have to ask in physics or somewhere because in free fall case, there actually is a force acting on the body and it is indeed accelerating. I can understand the spring example, yes there will not be any tension on the string but there is actually a pure acceleration of 1g. This blows my mind. – muyustan Jul 27 '19 at 8:01
• Measuring a force with a spring requires a counterforce. You can't apply it in free fall, or it wasn't free fall. – Janka Jul 27 '19 at 8:26
• Yeah, actually it is wrong saying that the gravitational force causes the displacement, it is the counter force. Is there a name for that force? I'll edit my answer – TemeV Jul 27 '19 at 8:33
• @muyustan In the free fall case, the frame of reference is inertial. There's no difference from any frame not under acceleration. So yes, you should ask in the physics group. They can feed you the general and special theories of relativity at length. – jonk Jul 27 '19 at 8:37

There's two ways to look at gravity. Newton's model and Einstein's.

In Newtons model gravity creates a downwards force on everything including the insides of of accelerometer, the accelerometer registers this as an upwards (+Z) acceleration,

In Einstiens model your device, (and the accerometer) is being accelerated upwards by the forces excerted on it by the supporting surface, (but because of the curvature of space-time this acceleration does not cause apparent movement)

• regarding your 2nd paragraph, body also feels a downwards gravity while free-falling but the accelerometer doesn't register an upward acceleration in that case. – muyustan Jul 28 '19 at 17:02

If the +ve $$\z\$$ direction is towards the sky (which actually makes sense, since it's logical to imagine the zero datum for the $$\z\$$ vector at the centre of gravity rather than at some arbitrary point on the Earth's surface) , then +ve velocity will be $$\ \frac{dz}{dt}\$$ towards the sky, and +ve acceleration will be $$\ \frac{d^2z}{dt^2}\$$ towards the sky. Hence +ve acceleration is towards the sky, and $$\ g\$$, being towards the centre of the Earth, is -ve.

• Yes, this is what I also think from a pure physical thinking perspective. But in this case accelerometer outputs the acceleration in z axis as + 1g. Then there the confusion starts. I guess it is a convention that accelerometers will output +1g when aligned with the gravity such that gravity is downwards. – muyustan Jul 27 '19 at 8:11
• Not according to your original post. The image there showed the +ve z direction going from the bottom of the board to to the top. – Chu Jul 27 '19 at 8:15
• If you mention this, - i.stack.imgur.com/b3Ql3.png - then yes, +z axis points into the screen. But when I wrote the above comment I did not use that configuration. It is written assuming +z is pointing through sky. – muyustan Jul 27 '19 at 9:32
• if your putting the axis on the centre of gravity call it "r" not "z", "z" is for cartesian coordinates. – Jasen Jul 28 '19 at 6:25
• I re-read this page and don't think this answer is helpful for the specific question, because I ask "why it outpus +g while In my opinion it should be -g" and you answered saying "it is -g". – muyustan Jul 28 '19 at 17:00