Skip to main content

Subsection 12.4.1 What a Stationary Accelerometer Reads

Gravity is itself an acceleration, so an accelerometer that is not moving at all is still measuring something: each axis measures how much of gravity’s 1 g lies along it, and the sensor’s convention is that an axis pointing up reads positive. The units of the sensor’s output are g, where 1 g is the acceleration of gravity, 9.8 m/s², and one milli-g (mg) is a thousandth of that. So with the board lying flat on the table, component side up, z reads approximately +1000 mg and x and y read approximately 0 mg.
Flip the board over and the z reading changes sign, to approximately −1000 mg. Tilt or rotate the board and gravity’s 1000 mg moves between the three axes, and that is what we’ll use on Thursday to measure tilt. A “perfect” value is 1000, but a real board will be off by a few tens of milli-g, because the sensor has a zero-g offset: the LSM303AGR datasheet says a flat, motionless sensor typically reads ±40 mg away from the true value, and its Min and Max columns allow ±80 mg.