Skip to content
If this is your first visit, please click here to learn about shipping and delivery.
If this is your first visit, please touch here to learn about shipping and delivery.
MMA7361 Analogue Accelerometer Board

Calibrating an Analogue Accelerometer: Turn X, Y and Z Voltages into Useful Motion Data

An analogue accelerometer gives you three voltages, but those voltages are not yet three meaningful acceleration readings. Each axis has an offset, a sensitivity and a direction. The controller's ADC adds its own reference and scaling, while the way the board is mounted determines what X, Y and Z mean in your project.

A few careful bench tests can make the difference between a useful tilt control and a display of unexplained numbers. The MMA7361 analogue accelerometer board is an example with separate axis outputs and selectable sensitivity. The method below also applies to other analogue accelerometers when their own electrical limits and transfer functions are used.

Know what a stationary sensor should report

An accelerometer resting on a desk does not normally report zero on every axis. Gravity provides a reference whose projection changes with orientation. If one axis is aligned vertically, that axis should show approximately one g in magnitude, while axes perpendicular to it should be near zero after calibration.

The sign depends on the sensor's defined axes and which way it faces. Do not assume the Z output must always be the largest positive value. Turn the board over and observe the change. Record an orientation sketch showing positive X, Y and Z relative to the enclosure.

Analog Devices' inclination-sensing application note explains the key limitation: gravity-based tilt calculations assume other acceleration is insignificant. A board moving in a vehicle can report a changed acceleration vector even when its mounting angle has not changed.

Separate board power from chip-level signals

The MMA7361LC datasheet specifies a chip supply range of 2.2–3.6 V. A breakout board may provide a separate input through a regulator, but that does not make every control or output connection 5 V tolerant. The NXP MMA7361LC datasheet is the reference for the sensor itself; the breakout's actual circuit determines how its power pins should be used.

Check which header pin is a regulator input and which connects to the sensor rail. Do not connect both power inputs unless the board documentation explicitly permits it. Use control levels appropriate to the sensor rail, and verify the ADC's allowable input range before joining the axis outputs to a controller.

This is especially relevant to the range-select pin. A catalogue statement that it should be driven “high” is not an instruction to apply an arbitrary host supply voltage. Establish its electrical connection and valid high level first.

Choose range before calibrating

For the MMA7361LC, the available ranges are ±1.5 g and ±6 g. The narrower range gives greater voltage change per g, which is useful for gentle motion and static tilt. The wider range accommodates stronger acceleration but spreads it over less voltage per g. Check the actual device variant and the range-select state.

Use the narrow range only when the expected signal will remain inside it, including gravity and movement together. A large, flat-topped waveform can indicate clipping. Once clipped, the original peak cannot be recovered by averaging or multiplying the readings.

Changing range changes sensitivity, so maintain separate calibration values or repeat the calibration. Save the chosen range with recorded data. An unexplained range change can otherwise resemble a sudden change in the physical experiment.

Calibrate each axis using two orientations

For an initial static calibration, use a rigid support that lets each axis point up and down. Let the board settle at each position and average a short group of readings. Avoid holding it by hand while collecting the final values, because small movements become part of the measurement.

For one axis, record the raw ADC reading when the axis measures approximately +1 g and again at −1 g. Call these values rPlus and rMinus. Calculate:

offset = (rPlus + rMinus) / 2
countsPerG = (rPlus − rMinus) / 2
accelerationG = (raw − offset) / countsPerG

Keep the sign implied by your orientation convention. Repeat for all three axes rather than copying one axis's calibration to the others. Reject a calibration with an implausibly small difference between its two readings; that may indicate a wrong connection, a sleeping sensor or an incorrectly identified axis.

This raw-count method calibrates the sensor and the particular ADC setup together. It is convenient, but the values may no longer apply after changing the ADC reference, resolution, supply conditions or analogue filtering.

Check a third orientation

After calculating the constants, place the axis horizontally and check that its result is near zero. Then rotate the board through several known orientations. NXP's tilt-sensing application note provides the geometric background for interpreting gravity along different axes.

For a stationary, calibrated three-axis sensor, calculate the vector magnitude:

magnitude = sqrt(ax × ax + ay × ay + az × az)

It should be reasonably close to one g under the static test conditions. A significant change with orientation suggests calibration, mounting or cross-axis effects that deserve investigation. Do not use this check as proof of accuracy during motion; dynamic acceleration changes the vector.

Turn readings into a useful application

For a simple orientation detector, begin with calibrated axes and a small set of deliberately chosen thresholds. For example, classify a panel as upright only after the appropriate axis remains within its chosen interval for a specified time. Use separate entry and exit thresholds to avoid flicker near a boundary.

For an inclinometer, define the angle convention before selecting a formula. Which direction is positive, which axis is the hinge, and what happens near a vertical orientation? Test the displayed sign and quadrants with physical positions you can verify rather than assuming an attractive graph is correct.

For movement detection, keep a separate path from the slow tilt estimate. A low-pass filter can make the tilt display steadier while a faster path detects changes. Document the sampling interval and filter settings so measurements from different experiments remain comparable.

Avoid misleading tests

A gentle hand movement is useful for checking that signals change, but it does not establish impact accuracy or free-fall detection performance. Do not drop a populated prototype to prove a software flag works. Use controlled, non-damaging tests and the manufacturer's documented self-test method where appropriate.

Also repeat the stationary test after warm-up and with other project loads active. If readings move when a display or motor starts, examine the sensor supply, ADC reference and return wiring. Mechanical vibration and electrical interference require different fixes.

When comparing analogue accelerometer boards, consider range, output interface, mounting and documentation together. A modest sensor with recorded calibration and sensible tests is more useful than a high-resolution display whose axes and assumptions are unknown.

Previous article Battery Power for Arduino Projects: Voltage Range, Runtime and Regulator Heat