Home / Learn Embedded C / Averaging and Filtering ADC Readings
Averaging and Filtering ADC Readings
Reducing noise in a sensor reading by combining several samples.
How to think about this
Definition
Averaging multiple ADC readings (or applying a simple digital filter) smooths out random electrical noise, producing a more stable value than any single raw reading alone.
Why you need this
Real-world ADC readings are rarely perfectly stable even for a constant input — small electrical noise causes the raw value to jitter slightly from sample to sample; averaging/filtering turns this noisy signal into a usable, stable one.
How it works
A simple moving average (keep the last N readings, report their mean) trades a little responsiveness (it lags behind true fast changes slightly) for a large reduction in noise — a common, practical trade-off.
Where you'll see this
- Noisy sensor smoothing
- Stable display values
- Any ADC-based measurement
Try it
A real moving average continuously updates as new samples arrive, dropping the oldest one each time — this shows one snapshot of that computation.
Try it: comparing a single noisy reading against the averaged value
Trusting any one raw sample alone can be off by a noticeable amount; the averaged value is far more stable.
Test what you just read
1. What is the main trade-off of smoothing ADC readings with a moving average?
Averaging smooths out noise effectively but also slightly delays the filtered output's response to a genuinely fast real change in the input.