IMU sensors: why the accelerometer and gyroscope are useless alone — and powerful together
The drill that couldn’t find vertical
A few years ago I was building a system to help a hand drill make perfectly perpendicular holes. Mount an accelerometer on the drill, measure the tilt, light up LEDs to guide the user. Simple idea.
It worked fine on the bench. The moment I turned the drill on, the system lost its mind.
Motor vibrations flooded the sensor with noise. The LEDs flickered randomly. The angle readings had nothing to do with reality. A tool designed to guide you became actively misleading, at exactly the moment you needed it.
That project — and fixing it — is what taught me what these sensors actually do, where each one breaks down, and why you almost always need both.
What an accelerometer actually measures
The name is a bit misleading. An accelerometer doesn’t just measure motion — it measures all forces acting on it, including gravity.
When the sensor is flat, gravity pulls straight down through one axis. When you tilt it, gravity distributes across multiple axes. The ratio of those readings gives you the angle — no movement required, just a snapshot of which way gravity is pulling right now.
The problem shows up the moment the sensor starts moving. The accelerometer can’t tell the difference between gravity and any other acceleration. A barbell decelerating mid-lift, a drill vibrating at 200 Hz, an athlete’s footstrike — they all look identical to a change in tilt. The sensor sees forces. It has no way to know where they came from.
You can filter out the high-frequency noise with a low-pass filter, and that works well when the real signal is slow. But when the signal and the noise overlap in frequency — a barbell moving fast through a squat, or a drill at full speed — no filter can cleanly separate them.
You need a second sensor.
What a gyroscope actually measures — and why it drifts
A gyroscope measures angular velocity: how fast the sensor is rotating, in degrees per second. It works by exploiting the Coriolis effect — a tiny vibrating mass inside the chip gets deflected when the system rotates, and that deflection is read as a rotation rate.
Crucially, it’s indifferent to linear acceleration. Vibrations, impacts, lateral forces — none of these produce a rotation rate signal. Where the accelerometer panicked under drill vibrations, the gyroscope would have stayed calm.
To get an angle from the gyroscope, you integrate the rotation rate over time: 10°/s for 0.1 seconds equals 1 degree of rotation. Add up every sample and you get a running angle estimate.
The problem: every reading contains a tiny error. And integration is accumulation.
It’s like trying to keep a running total by adding a long sequence of numbers that are almost zero — but not quite. You expect the total to stay near zero. Instead it creeps, slowly at first, then undeniably. The gyroscope does exactly this: it accumulates tiny errors into a steadily growing offset that has nothing to do with reality. This is drift.
Leave a gyroscope sitting still on a table and watch its angle estimate wander away from zero. It’s reliable for tracking rapid rotations over short bursts. Over time, it loses the plot entirely.
Complementary weaknesses, complementary fix
Put the two failure modes side by side:
- The accelerometer knows absolute orientation — it always knows which way gravity points — but high-frequency noise makes it unreliable during dynamic movement.
- The gyroscope tracks fast rotations accurately, immune to vibration, but drifts over time and loses track of absolute orientation.
One is reliable at low frequencies. The other at high frequencies. The solution is to use each sensor only where it’s reliable, and combine them.
This is what a complementary filter does. The name is literal: the two sensors have complementary weaknesses, and the filter exploits that.
Apply a low-pass filter to the accelerometer: keep only the slow, stable orientation signal, discard the rapid noise.
Apply a high-pass filter to the gyroscope: keep only the fast rotation tracking, discard the slow drift.
Add the two filtered outputs together. The result is accurate over time — the accelerometer continuously corrects the gyroscope’s drift — and responsive to rapid movement — the gyroscope handles fast rotations that would confuse the accelerometer — and resistant to vibration — the low-pass filter suppresses the high-frequency noise.
The one design parameter is the cutoff frequency: what counts as “fast” versus “slow.” For the drill project, actual tilt changes slowly (a human hand tilts gradually) while motor vibrations are fast. A low cutoff works well. For a barbell during an explosive squat, the real signal is faster and the cutoff has to move accordingly.
One level up: the Kalman filter
The complementary filter is the right starting point for most sport-tech applications — practical, easy to implement, and effective. For situations where noise characteristics change over time or accuracy requirements are stricter, the Kalman filter is more powerful. It does the same job but adds a statistical model of the sensor’s uncertainty, dynamically adjusting how much it trusts each sensor based on current conditions.
That’s a separate article.
Back to the barbell
If you’ve read the previous articles on VBT and accommodating resistance, you already see where this lands.
An IMU on the barbell faces exactly these problems. Slow steady movements versus fast explosive pulls. Impacts when plates are loaded. Vibrations when the bar bends. The accelerometer alone produces noisy velocity estimates during dynamic lifts. The gyroscope alone drifts across a training set. And for accommodating resistance work specifically — where the shape of the velocity-time curve tells you whether the load split is correct — a drifting or noisy measurement is worse than no measurement at all.
Good sensor fusion is what separates an IMU that gives you actionable data from one that just gives you numbers.
The next question is how to get that data off the sensor and to a display or logging device — without cables interfering with the lift. That’s what the NRF24L01 article covers.
Building something in sport-tech and want a second opinion?
Work with me →