Skip to main content

Subsection 12.6.5 Calibrating the Zero-g Offset

The datasheet’s sensor-characteristics table (§2.1, Table 3) says a flat, motionless sensor typically reads ±40 mg away from the true value on an axis, and its Min and Max columns allow ±80 mg. The offset is stable for a given board at a given temperature, so you can measure it and subtract it. Read the z axis flat (expect +1000 mg) and flipped (expect −1000 mg); the offset is the average of the two readings, because the true ±1000 cancels in the sum. If a board averages +1032 mg flat and −968 mg flipped, the offset is (1032 + (−968)) / 2 = +32 mg, and future readings are corrected by subtracting 32 mg. This is the two-point calibration of AN-1057 (its Equation 17: the offset is half the sum of the +1 g and −1 g measurements), applied to the z axis.