Accelerometers and Gyroscopes: Motion Sensing, Calibration, and Performance

Published November 02, 2026

Accelerometers measure linear acceleration and tilt through gravity sensing, while gyroscopes track angular velocity - but neither works well alone for more than a few seconds. Accelerometers drift when integrated to position, and gyroscopes accumulate angle error from bias offset. Below I'll walk through how these sensors actually behave in real systems, where their specs matter, and how fusion algorithms keep them useful.

Key Takeaways:

  • Accelerometers give you a gravity-referenced tilt angle instantly, but integrating acceleration to velocity doubles your noise and bias error every step.
  • Gyroscopes measure rotation cleanly in the short term, yet even 0.1°/s bias compounds into 6° of drift per minute if left uncorrected.
  • Three-axis alignment is defined inside the die, not by package markings - misreading the datasheet axis diagram will rotate your entire coordinate frame.
  • Calibrating zero-bias at rest is non-negotiable; temperature drift can shift that zero by 10-50 mg (accelerometer) or 0.5-2°/s (gyroscope) across operating range.
  • Sensor fusion isn't optional polish - it's the only reason these devices work beyond lab demos, because it lets the accelerometer correct gyro drift and the gyroscope reject accelerometer noise during motion.

How Accelerometers Measure Motion and Gravity

An accelerometer reports specific force, which includes both real acceleration and the constant 1 g pull from Earth's gravity. That means a stationary accelerometer on a table reads +1 g on its vertical axis, not zero - a detail that trips up every first integration attempt.

You can extract tilt directly from the gravity vector without integration, which is why accelerometers serve as a long-term orientation reference. But if you try to integrate acceleration into velocity and then position, measurement noise and bias compound at every time step. In my experience, even a low-noise MEMS unit (+/- 0.1 mg noise density) will produce several meters of phantom displacement after 10 seconds of integration if you don't fuse it with another reference.

The math looks clean in textbooks: integrate once for velocity, twice for position. In practice, dc bias and 1/f noise wreck that chain within seconds.

Figure 1. Conceptual MEMS accelerometer with suspended proof mass

MEMS Accelerometer Construction

Most accelerometers today use a microscopic proof mass suspended by silicon springs. When the sensor accelerates, the mass lags behind due to inertia, changing the gap in a differential capacitor pair. The capacitance shift converts to voltage through a charge amplifier.

This capacitive sensing is why MEMS accelerometers are sensitive to mechanical stress and package strain - any bending of the substrate shifts the baseline capacitance and shows up as false acceleration. I've seen accelerometers report +50 mg offset just from over-torqued mounting screws on a dense PCB.

The entire structure fits in a square millimeter, which is why 3-axis accelerometers and 3-axis gyroscopes now coexist in a single 3×3 mm package with shared analog front-end and digital interface logic.

Gyroscope Rotation Sensing

A gyroscope outputs angular velocity in degrees per second (or radians per second), not angle. To recover orientation you must integrate that rate over time, which means bias error accumulates linearly into angle drift.

For example, a gyroscope with +0.1°/s constant bias will drift 6° in one minute, 360° in one hour - even while sitting motionless. That's why gyroscopes need frequent correction from an absolute reference like an accelerometer's gravity vector or a magnetometer's north heading.

The strength of a gyroscope is that it responds instantly to rotation and isn't fooled by linear acceleration, vibration, or tilt - problems that wreck accelerometer-only orientation estimates during motion. Gyroscopes give you clean short-term dynamics; accelerometers give you long-term stability. Neither works alone.

Figure 2. Gyroscope angular velocity integration and drift accumulation

Coriolis Effect in MEMS Gyroscopes

MEMS gyroscopes rely on the Coriolis effect: a proof mass is driven into resonant vibration along one axis (the drive axis). When the sensor rotates, Coriolis force deflects the vibrating mass along a perpendicular sense axis. The amplitude of that deflection is proportional to angular velocity.

This design means that MEMS gyroscopes are actually dynamic devices - they need continuous drive oscillation to function. Any mechanical shock or temperature change that shifts the drive resonance will degrade sensitivity until the drive loop re-locks. I've debugged systems where a 20°C temperature swing reduced gyroscope output by 15% because the drive frequency wasn't temperature-compensated.

The Coriolis signal is tiny (often femtofarad-level capacitance changes), so gyroscopes have higher noise floors than accelerometers and are more vulnerable to electromagnetic interference and power supply ripple.

Sensor Axis Definitions and Mounting

Every accelerometer and gyroscope datasheet includes an axis orientation diagram, usually showing X, Y, Z arrows relative to pin 1 or a package edge. That diagram is the truth - ignore the package outline symmetry.

I've seen production firmware rotate all motion data by 90° because the PCB designer assumed the accelerometer axes matched the chip's square outline, when in fact the internal MEMS die was rotated. The result was that "pitch" became "roll" and vice versa, which passed basic power-on checks but failed the moment the device was tilted.

Three-axis sensors measure along orthogonal axes, but those axes are defined by silicon etching, not by how you mount the chip. If your mechanical assembly introduces axis misalignment (for example, mounting a 6-axis IMU at a 5° tilt to save board space), you must apply a rotation matrix in software - or accept 5° of cross-axis error.

Data Interfaces and Signal Path

Most modern accelerometers and gyroscopes output digital data over I²C or SPI. I²C is slower (typically 400 kHz max, which limits sample rate to around 200-400 Hz in practice) but uses only two wires and supports multi-drop. SPI runs faster (10+ MHz, enabling 1+ kHz sample rates) but requires dedicated chip-select and four wires.

Many IMUs (integrated accelerometer + gyroscope) include a FIFO buffer - typically 512 to 1024 samples - so the host processor can read data in bursts rather than polling at the full sample rate. This cuts power and interrupt load, but you must monitor the FIFO watermark or you'll lose samples during buffer overflow.

Some IMUs also offer programmable interrupt pins that assert when motion exceeds a threshold, when the FIFO reaches a certain level, or when the sensor detects freefall or tap events. These features are useful for low-power wake-on-motion designs, but the threshold logic is often too coarse for precision motion capture.

Key Specifications and What They Mean in Practice

Measurement range sets the maximum acceleration or rotation rate the sensor can report before clipping. For accelerometers, common ranges are ±2 g, ±4 g, ±8 g, ±16 g. For gyroscopes, ±250°/s, ±500°/s, ±1000°/s, ±2000°/s. Wider range reduces resolution but prevents saturation during shock or fast rotation.

In a handheld device, ±4 g accelerometer and ±500°/s gyroscope are usually sufficient. In a drone or high-vibration environment, you'll clip at ±4 g during motor start or hard maneuvers, so ±8 g or ±16 g is safer.

Noise density is specified in µg/√Hz (accelerometer) or °/s/√Hz (gyroscope). Multiply by the square root of your signal bandwidth to get RMS noise. For example, a gyroscope with 0.01°/s/√Hz noise density measured over 50 Hz bandwidth gives 0.01 × √50 ≈ 0.07°/s RMS noise.

Lower noise matters for slow motion and fine angle resolution. High noise washes out into drift after integration, so a noisy gyroscope loses angle accuracy even faster than a quiet one with the same bias.

Bias (also called zero-rate offset or zero-g offset) is the sensor output when no motion is present. For accelerometers, bias is specified in mg; for gyroscopes, in °/s. Bias is not constant - it shifts with temperature, supply voltage, mechanical stress, and time.

I measure bias at power-on by averaging 100-200 samples while the sensor is stationary, then subtract that offset from all future readings. But if the device heats up by 30°C during operation, the bias will drift by another 10-50 mg (accelerometer) or 0.5-2°/s (gyroscope) depending on the part grade. That's why high-end IMUs include internal temperature sensors and store factory calibration tables to correct bias vs. temperature.

Temperature drift is the change in bias per degree Celsius. For a gyroscope spec'd at 0.03°/s/°C, a 30°C temperature rise adds 0.9°/s of drift - nine times the initial bias of a good zero-calibration. Accelerometers suffer less (typically 0.3-1 mg/°C), but it still matters in precision tilt applications.

In one automotive project, the IMU was mounted near a power transistor that cycled 40°C every few minutes. We had to run continuous bias re-estimation using Kalman filter states because the gyroscope zero-rate drifted faster than the vehicle's actual rotation during steady driving.

Calibration Procedure

At minimum, you must calibrate zero-bias for both accelerometer and gyroscope before use. Place the device on a stable surface, collect 200+ samples per axis, compute the mean, and subtract that offset from future readings.

For accelerometers, remember that one axis will read +1 g (or -1 g) due to gravity - do not zero that axis. Instead, subtract the measured value minus the expected gravity component. If the Z-axis reads +1.02 g when the device is flat, your bias is +0.02 g, not +1.02 g.

Gyroscopes should read near zero on all axes when stationary. Any non-zero mean is bias.

More advanced calibration includes:

  • Scale factor correction: the actual sensitivity may differ from nominal by 1-3%. Rotate the sensor through known angles (for gyroscope) or flip it through +1 g and -1 g (for accelerometer) to measure gain error.
  • Axis misalignment correction: the three axes are not perfectly orthogonal. A full 9-parameter calibration matrix can correct this, but it requires lab equipment or a precision turntable.
  • Temperature compensation: store bias vs. temperature in a lookup table and interpolate at runtime.

I rarely bother with full 9-DOF calibration in production designs unless the application demands sub-degree accuracy, because the added complexity and test time usually aren't justified. Zero-bias and scale factor correction cover 90% of real-world error.

Sensor Fusion: Why You Need Both

Accelerometers provide a gravity-referenced vertical direction, but they're noisy and easily disturbed by vibration or linear acceleration (any acceleration other than gravity looks like tilt). Gyroscopes provide clean, fast rotation tracking, but they drift over time.

Sensor fusion combines both: use the gyroscope to propagate orientation at high rate (100 Hz to 1 kHz), then periodically correct the orientation estimate using the accelerometer's gravity vector. The most common algorithm is a complementary filter:

angle = 0.98 × (angle + gyro × dt) + 0.02 × accel_angle

This means 98% of the update comes from integrating the gyroscope, and 2% comes from the accelerometer's tilt measurement. The result is an orientation estimate that responds quickly to motion (like a gyroscope) but doesn't drift over time (like an accelerometer reference).

More sophisticated systems use a Kalman filter or extended Kalman filter (EKF), which dynamically adjusts the weighting based on estimated sensor noise and confidence. During high acceleration or vibration, the filter reduces trust in the accelerometer; during steady motion, it increases correction gain to suppress gyro drift.

Without fusion, you get the worst of both worlds: noisy tilt from the accelerometer or unbounded drift from the gyroscope. Every motion-tracking product I've shipped - from game controllers to IMU modules - has needed fusion to be usable.

Common Issues and Debugging

If you read constant non-zero acceleration or rotation while the sensor is stationary, you didn't calibrate zero-bias. Collect a stationary data set and subtract the mean.

If your orientation estimate drifts steadily in one direction, your gyroscope bias correction isn't working. Either the bias value is wrong, the sample rate is wrong (so dt is wrong), or temperature has shifted the bias since calibration.

If the tilt angle jumps or flips by 90°, you probably mapped axes incorrectly. Go back to the datasheet axis diagram and verify your sign conventions.

If data looks noisy or has periodic spikes, check power supply decoupling (add a 0.1 µF ceramic and 10 µF tantalum close to the sensor), verify SPI clock edges match the datasheet timing, and make sure your sample rate isn't higher than the sensor's internal output data rate (reading faster than the ODR just repeats the last sample or returns stale FIFO data).

If the sensor stops responding or returns all zeros, check I²C pull-ups (4.7 kΩ is typical), verify the chip's I²C address matches your code (many IMUs have two possible addresses selected by a pin), and confirm VDDIO matches your MCU's logic level (1.8 V, 3.3 V, or 5 V). I've debugged three separate designs where someone assumed 3.3 V I/O was always compatible, but the sensor required 1.8 V VDDIO and the 3.3 V MCU was over-driving the inputs.

What Really Limits Accuracy

In most systems, the limiting factor isn't the sensor noise spec - it's bias instability and temperature drift. A gyroscope that drifts 0.5°/s will accumulate 30° of error in one minute, far larger than the 0.07°/s RMS noise floor.

Mechanical mounting also matters. I tested one design where the accelerometer sat near a PCB flexure point, and every time the enclosure was pressed, the board bowed enough to add +20 mg of false Y-axis acceleration. We moved the sensor to a stiffer section of the board and the phantom signal disappeared.

Vibration couples into accelerometers even when the sensor is rated for high shock. At resonance (typically 1-5 kHz for a MEMS die on a PCB), even low-amplitude vibration can alias down into your signal band and look like real acceleration. I've seen this in automotive and industrial applications where a nearby motor or pump created a 2 kHz vibration that folded into the 100 Hz measurement band and added 50+ mg of noise.

The solution is mechanical isolation (rubber dampers or foam spacers) or better low-pass filtering, but you have to identify the vibration frequency first - spectrum analysis of raw accelerometer data usually reveals the culprit.

When Accelerometers and Gyroscopes Aren't Enough

Accelerometer + gyroscope fusion works well for short-term orientation (seconds to minutes), but it cannot correct heading drift around the vertical axis. If the device rotates slowly in yaw (like turning while standing still), the gyroscope will drift and the accelerometer sees no change because gravity is still vertical.

That's why 9-axis IMUs add a magnetometer to sense Earth's magnetic field and provide an absolute heading reference. But magnetometers are easily disturbed by nearby ferrous materials, DC currents, and magnetic fields from motors or batteries - so they introduce a new set of calibration and error-correction problems.

For applications that need long-term position or absolute orientation, you'll eventually need an external reference: GPS for position, visual odometry for relative motion, or a fixed beacon for heading. Accelerometers and gyroscopes give you high-rate local motion, not global truth.

Choosing Between Device Grades

MEMS accelerometers and gyroscopes come in consumer, industrial, and tactical grades. Consumer parts (used in phones and fitness trackers) have bias instability around 0.1-0.5°/s (gyro) and 1-10 mg (accel), with temperature drift up to 0.05°/s/°C.

Industrial-grade IMUs improve bias to 0.01-0.05°/s (gyro) and 0.1-1 mg (accel), often with internal temperature compensation and better long-term stability. These cost 3-10× more but are worth it for robotics, UAV, or precision platform stabilization.

Tactical-grade and navigation-grade sensors (used in aerospace and defense) reach 0.001°/s bias or lower, using fiber-optic or ring-laser gyroscopes rather than MEMS. They cost thousands of dollars per axis and need careful thermal and vibration control - overkill for anything outside of inertial navigation systems.

For most embedded projects, a mid-tier industrial MEMS IMU hits the right balance between cost, performance, and integration effort.