# What is the meaning of output of an accelerometer

I know this question is not fully related to aviation, but I assume the people on this subsection will also have some idea.

Suppose I have an accelerometer resting on a table(flat surface, horizontal). When I look from directly above, I see its reference coordinate system(it is labeled on it) as follows:

(from this site)

When I monitor the accelerometer readings (Ax, Ay, Az) ,

X and Y values are 0 initially(as they should be), and when I push the accelerometer(well, I am pushing the entire breakout board indeed) in the +x direction let's say, there happens an increase first and a decrease when I stop pushing it( I guess because of inertial acceleration ) in the Ax value(in terms of g) which is not surprising. Same for the y axis movements.

So this makes me conclude that the g in here is pure 9.8 m/s^2 without the sign.

But when it comes to z axis I am getting confused. In the above setup - in which positive z axis is pointing through the ground - when horizontal and no external force is applied(other than gravitational); Az value is -1, i.e -g or -9.8 m/s^2.

There the question, what does this accelerometer output actually? In such a standing on a surface scenario, there is only a gravitational force on the device and it is pointing towards +z direction. So should not the sensor give + 1g instead of - 1g ?

I guess I have misunderstood some concepts about these sensors(accelerometers).

• You might be interested in the discussion in comments to David Hammen's answer to Can Voyager still use its thrusters to avoid hazards? on our sister site Space Exploration.
– user
Jul 26, 2019 at 11:45
• @aCVn I will have a look at it, thanks Jul 26, 2019 at 11:48
• Most likely the value is inverted somewhere before it's displayed to you, or the module is not lying upside-down when you measure. Impossible to tell without knowing what software you're using. Also, you were right: this is not an EE question and AEhere was IMO wrong when they suggested to migrate it here. Jul 26, 2019 at 12:44
• @DmitryGrigoryev hey, value is not inverted, it is directly read from the register. I have checked all my drawings and setup because there were so many people said something is wrong. But nothing is inconsisten with my original post. Jul 26, 2019 at 12:57

When the sensor is horizontal (back of the PCB flat on a level table) with the package of the chip "up" (so you can read the printing on the chip) the Z axis should read about +1g and the X and Y should indicate close to zero depending on how close to horizontal the package is.

The X and Y readings are proportional to the cosine of the angle to level. The Z reading is proportional to the sine of the angle to vertical.

It is not possible to distinguish gravity from acceleration (Equivalence Principle).

Edit: An acceleration of 1g upward behaves the same as gravity downward. Imagine you're in an closed room floating in space, and then the room is accelerated upward at +9.8m/s^2, the force you feel inside the room would be the same as the gravity on earth.

• hey, yes if its up portion looks to sky then it reads +1 g. But you actually did not answer my question. I wonder why it is +1 g while the gravity is towards the ground. And if it is because of the g is taken as - 9.8 then why a force in +x direction results in a + multiple of g. Jul 26, 2019 at 12:59
• I should add that "reading the printing" is not a factor to distinguish pcb's orientation because points up or down I can read pins names. Jul 26, 2019 at 13:01
• Reading the printing on the chip. The PCB is of little importance, all the smarts are inside the chip. The chip datasheet should also be your primary reference. Jul 26, 2019 at 13:03
• Hmm I got it what you want to say now. Jul 26, 2019 at 13:05
• Can I also ask you something else? How can I understand the logic behind getting the roll and pitch values from accelerometer readings? Everyone on the internet just uses some formulas they don't also know but don't explain how to modify equations in order to get correct angles according to your own axis choices. Jul 26, 2019 at 13:36

The sensor would only measure zero in the Z direction if it was in free-fall. From the sensor's point of view, the table is pushing on it, accelerating it upward. Described here also: