Accelerometers measure linear motion and gravity; gyroscopes track rotational velocity. Neither works reliably alone—accelerometers drift when integrated to position, gyroscopes accumulate angle error from bias—so real systems fuse both to cancel each other's weaknesses. This guide covers MEMS operating principles, error sources you'll actually encounter, and the calibration steps that separate working prototypes from production failures.
Key Conclusions:
- MEMS accelerometers and gyroscopes are built on different physical principles (capacitive displacement vs. Coriolis effect), which is why their error modes don't correlate—the basis for effective sensor fusion.
- Bias and temperature drift dominate long-term error; noise density limits short-term resolution. Calibration must address both, or you'll chase phantom bugs.
- Axis alignment errors corrupt fusion algorithms silently. I've debugged more "bad IMU" reports that turned out to be 90° axis swaps than actual sensor defects.
- Sampling rate and bandwidth are not the same thing. Set bandwidth by your signal of interest, not by the MCU's comfortable I²C speed.
What Accelerometers Measure and What They Don't
An accelerometer reports specific force: the vector sum of all non-gravitational forces per unit mass, plus gravity. When the device sits still on a table, it reads +1 g vertically because the table pushes up. In free fall, it reads zero—gravity isn't a force you feel.
This counterintuitive behavior is why accelerometers work for tilt sensing (gravity provides the reference vector) but fail for dead-reckoning navigation. Integrating acceleration once gives velocity; twice gives position. Every measurement error integrates into velocity, then position, and you drift off the map in seconds. I've watched engineers try to build indoor navigation with a $2 accelerometer and 30 seconds of walking data. The position estimate was 15 meters off after one hallway.
Accelerometers shine at short-duration motion detection, vibration monitoring, and orientation reference against gravity. Use them where the time window is brief or where gravity remains your anchor.

How MEMS Accelerometers Actually Work
Most accelerometers you'll spec are capacitive MEMS devices. A proof mass hangs on compliant beams between two fixed plates, forming a differential capacitor. Acceleration displaces the mass; displacement changes capacitance; readout electronics convert capacitance to voltage.
The entire structure fits in a 3×3 mm package and draws microamps. That's the reason MEMS ate the motion-sensor market: size, power, and cost dropped far enough to put an accelerometer in every phone and fitness tracker.
But small size brings limits. Mechanical resonance sits in the kilohertz range—hit that frequency and your output spikes. Acoustic noise couples in if you mount the sensor near a speaker. One project I worked on saw mysterious 8 kHz content in accelerometer data; turned out the switching regulator sat 2 mm away and vibrated the PCB.
Gyroscope Rotation Measurement: Angular Velocity, Not Angle
A gyroscope outputs angular velocity (degrees or radians per second), not orientation angle. To recover angle, you integrate angular velocity over time. That integration step is where gyroscope bias—a constant offset in the rate signal—turns into unbounded angle drift.
Leave a gyroscope motionless, integrate its output, and you'll see orientation wander several degrees per minute. This is why gyroscopes can't provide absolute orientation references but excel at tracking fast rotations where accelerometers slosh and lag.
In sensor fusion, the gyroscope handles dynamic motion; the accelerometer provides the long-term gravity reference. The fusion filter weights each sensor according to motion conditions and time scale.

MEMS Gyroscopes and the Coriolis Effect
MEMS gyroscopes use the Coriolis effect: a vibrating mass experiences a perpendicular force when rotated. Inside the sensor, a drive oscillator vibrates a proof mass at resonance (typically 10–30 kHz). Rotation about the sensitive axis generates a Coriolis force orthogonal to both vibration and rotation. A sense capacitor detects the resulting displacement, which is proportional to angular rate.
This operating principle makes gyroscopes sensitive to vibration at the drive frequency. If your system has a motor or pump running near the gyroscope's resonance, you'll see false rotation signals. I once traced an unexplained yaw drift in a drone to a cooling fan that hit the gyro's drive mode. Moved the IMU 10 mm away; drift dropped by 80%.
Unlike accelerometers, gyroscopes have no natural reference. Bias stability and temperature drift specifications tell you how much the zero-rate output wanders. A gyroscope spec'd at 10°/hr bias instability will drift up to 10° per hour when perfectly still—acceptable for consumer devices, disastrous for inertial navigation.
Sensor Axes: Why Datasheets Matter More Than Package Markings
Accelerometers and gyroscopes report motion along internal axes defined by the MEMS structure, not the chip outline. A 3×3 mm square package does not guarantee that X, Y, and Z align with the edges.
Check the datasheet for axis orientation diagrams. If you assume X is "forward" based on package silkscreen and the sensor actually defines X as 90° clockwise, your fusion algorithm will mix pitch into roll. I've debugged at least four designs where "the IMU drifts in the wrong direction" was actually a board layout that ignored axis definitions.
When you mount the sensor, measure the gravity vector in your coordinate system and confirm that it matches expected orientation. A rotated sensor in firmware is fixable; a rotated sensor discovered during user testing is a hardware respin.

Output Interfaces and Data Handling
Most modern IMUs (integrated accelerometer + gyroscope) use I²C or SPI. I²C saves two wires but maxes out around 400 kHz (3.4 MHz Fast Mode+ if you're lucky). SPI runs faster—10 MHz is common—but needs four wires.
For a 6-axis IMU sampled at 1 kHz, I²C is marginal. Six 16-bit registers plus overhead means roughly 120 bits per sample, or 120 kbit/s continuous. That leaves little bus margin for other peripherals. If you're polling multiple sensors or running above 500 Hz, use SPI.
Many IMUs include a FIFO buffer (typically 512–1024 bytes). Fill the FIFO at the sensor's ODR (output data rate), then burst-read in larger blocks. This reduces interrupt frequency and lets your MCU sleep longer. Just don't overflow the FIFO—old samples get overwritten, and you lose time synchronization.
When SPI beats I²C:
- Sample rates above 500 Hz
- Multiple high-speed sensors on one bus
- Real-time control loops sensitive to latency jitter
When I²C is fine:
- Sample rates below 200 Hz
- Low-power, MCU-sleep-heavy applications
- Shared bus with low-bandwidth peripherals
Performance Specifications That Matter in Practice
Measurement Range and Sensitivity
Accelerometer range is typically ±2 g, ±4 g, ±8 g, or ±16 g. Gyroscope range runs from ±250°/s to ±2000°/s. Wider range means coarser LSB resolution. A ±2 g accelerometer with 16-bit output gives 0.06 mg per LSB; ±16 g gives 0.5 mg per LSB.
If your application sees 1 g peaks and you select ±16 g range for "safety margin," you've thrown away 3 bits of effective resolution. Match range to actual signal amplitude, then add 20–30% margin for transients.
Noise Density and Bandwidth
Noise density is specified in µg/√Hz (accelerometer) or °/s/√Hz (gyroscope). Multiply by the square root of your measurement bandwidth to estimate RMS noise.
Example: A gyroscope with 0.01°/s/√Hz noise density and 50 Hz bandwidth produces 0.01 × √50 ≈ 0.07°/s RMS noise. That's 0.07° of angle error per second of integration under perfect conditions.
Bandwidth is set by an internal low-pass filter, not by sample rate. I've seen designs sample at 1 kHz with bandwidth set to 250 Hz "because Nyquist." All they did was oversample noise and waste I²C bandwidth. Set bandwidth to your signal's highest frequency content, not to half your sample rate.
Bias, Bias Instability, and Temperature Drift
Bias is the output when the sensor is motionless. It shifts with temperature, time, and mechanical stress.
- Initial bias offset: The zero-rate output when powered on. Calibrate this out during production or at startup.
- Bias instability: How much bias wanders over time, even at constant temperature. Allan variance plots quantify this; most datasheets just give a single number in °/hr or µg.
- Temperature coefficient: Bias shift per °C. A gyroscope with 0.03°/s/°C drift changes by 1.5°/s across a 50°C range if you don't compensate.
In projects where I've skipped temperature calibration, gyroscope drift became the top customer complaint. One automotive design spec'd a ±2000°/s gyro with 0.05°/s/°C drift and operated from -40°C to +85°C. That's 6.25°/s of bias shift—unacceptable for angle integration. We added a temperature lookup table and dropped it to 0.3°/s equivalent.
Sensor Fusion: Why You Need Both
Accelerometers provide a long-term orientation reference (gravity vector) but respond to all accelerations—motion, vibration, and shock. Gyroscopes track rotation cleanly during motion but drift over time.
A complementary filter or Kalman filter fuses both:
- High-pass filter gyroscope data: Use it for fast changes (short-term orientation).
- Low-pass filter accelerometer data: Use it for slow corrections (long-term reference).
The crossover frequency is typically 0.1–1 Hz. Below that, the accelerometer dominates; above it, the gyroscope. This suppresses accelerometer noise during motion and corrects gyroscope drift when still.
I've run projects that relied on gyroscopes alone because "accelerometers are too noisy." Orientation drifted 20° in the first minute. I've also seen designs use accelerometers alone because "gyroscopes are expensive." Tilt oscillated ±10° during walking because motion acceleration corrupted the gravity estimate. Use both.

Calibration: The Step Everyone Skips Until It's Too Late
Zero-Bias Calibration
Place the device motionless in a known orientation. Average 100–1000 samples. Subtract this average from all future readings. Repeat after every power cycle if bias stability is poor, or store calibration in non-volatile memory if it's stable.
Axis Alignment Check
With the sensor horizontal, the accelerometer should read close to [0, 0, 1 g] or [0, 0, -1 g] depending on Z-axis direction. Rotate 90° and check that the 1 g vector shifts to the expected axis. If it doesn't, your axis mapping is wrong.
Temperature Compensation
Characterize bias versus temperature in a chamber from your min to max operating range. Fit a polynomial (usually first- or second-order). Store coefficients and apply correction based on the IMU's internal temperature sensor.
Temperature compensation cuts gyroscope drift by 5–10× in real deployments. It's tedious to characterize, but you do it once per sensor model, not per unit.
Gyroscope Scale Factor
Rotate the device at a known rate (use a rate table if you have one; otherwise, a stepper motor with an encoder works). Compare measured angular velocity to true rate. Adjust the scale factor if error exceeds 1–2%.
Most consumer IMUs ship with factory scale calibration good to 2–3%. If you need better, you'll calibrate yourself.
Common Issues and Real Fixes
| Symptom | Likely Root Cause | What Actually Fixes It |
|---|---|---|
| Constant 0.2 g X-axis reading when still | Accelerometer bias offset | Zero-bias calibration; store offset |
| Gyroscope angle drifts 5°/min | Bias instability + temperature drift | Temperature compensation + re-zero on detected stillness |
| Tilt estimate oscillates during walking | Accelerometer seeing motion, not gravity | Increase accelerometer low-pass corner frequency in fusion filter |
| 8 kHz spikes in accelerometer FFT | Mechanical resonance or switching noise | Move IMU away from noise source; add 1 kHz analog low-pass |
| Yaw drifts only during motor operation | Vibration coupling into gyroscope | Isolate IMU mechanically; check for resonance overlap |
| I²C reads return 0xFF or NAK | Power supply sag or bus capacitance | Check decoupling caps (0.1 µF + 10 µF); reduce I²C pull-up resistors |
What Matters When You're Specifying an IMU
Pick the accelerometer range based on peak motion, not "maximum possible shock." If you see 2 g peaks in normal use, ±4 g or ±8 g is appropriate. ±16 g is for drop detection and crash sensing.
Pick the gyroscope range based on rotation speed. Human head motion rarely exceeds ±300°/s. A quadcopter might see ±1000°/s. ±2000°/s is for acrobatic drones and hard impacts.
Bias stability determines how often you must re-calibrate or how much angle drift you tolerate. Consumer-grade IMUs (e.g., 0.01–0.05°/s bias instability) need periodic zeroing. Tactical-grade (0.001°/s) can integrate for minutes.
Noise density sets your resolution floor. If you need to detect 0.05° tilt changes, your accelerometer noise must be well below 1 mg.
Temperature range and drift matter if your device lives outdoors, in a car, or in industrial environments. Check the datasheet's "performance over temperature" curves, not just the min/max operating temperature.
Where IMUs Fail and Where They Shine
Don't use IMUs for:
- Long-term position tracking without external references (GNSS, visual odometry, etc.). Drift is inevitable.
- High-accuracy angle measurement without calibration. Uncalibrated consumer IMUs give ±2–5° error.
- Measuring steady-state velocity. Accelerometers can't distinguish constant velocity from rest.
Do use IMUs for:
- Short-duration inertial navigation (pedestrian dead reckoning between GNSS fixes).
- Rotation and tilt sensing in robotics, drones, and stabilization systems.
- Vibration and shock detection.
- Motion activity classification (walking, running, falling).
Final Thoughts
Accelerometers and gyroscopes are reliable motion sensors when you understand their error modes and design around them. Calibration is not optional—it's the difference between a prototype that works on your desk and a product that works in customers' hands.
Sensor fusion is necessary, not a feature add. Neither sensor alone delivers stable orientation over time and motion.
The real question for your next design is whether your system can tolerate the drift and noise profile of consumer-grade MEMS, or whether you need to step up to automotive or tactical-grade parts. Run the numbers on your error budget before you commit to a BOM line.
If your application demands better than 1° orientation accuracy over 10 minutes of integration, either add an external reference (magnetometer, GNSS, vision) or increase your IMU budget by 10×.