Home / Learn Embedded C / ADC Sampling Rate and Aliasing

ADC Sampling Rate and Aliasing

Why sampling too slowly relative to a changing signal produces misleading results.

The short versionWhy sampling too slowly relative to a changing signal produces misleading results.

Theory in plain words

Definition

ADC sampling rate is how often a new conversion is taken; sampling too slowly relative to how fast the input signal changes can produce "aliasing" — a reconstructed signal that looks like a completely different, slower-changing one.

Why you need this

Measuring a fast-changing signal (like an audio waveform or a rapidly pulsing sensor) with too low a sampling rate can produce a plausible-looking but entirely wrong result — understanding this prevents trusting bad data.

How it works

The Nyquist criterion states sampling must occur at more than twice the highest frequency present in the signal to avoid aliasing — undersampling folds higher frequencies down into lower, false-looking ones in the digitized result.

Where you'll see this

  • Fast-changing signal measurement
  • Audio/vibration sensing
  • Sampling rate configuration

Try it

Checking a chosen sampling rate against the Nyquist requirementC: edit and run

Here 1500 Hz actually falls short of the 2000 Hz Nyquist minimum, correctly triggering the aliasing warning.

Careful:Always sample at more than twice the highest frequency you need to capture (the Nyquist rate) — undersampling a changing signal does not just lose detail, it can actively produce a convincingly wrong, aliased result.

Try it: computing the misleading apparent (aliased) frequency

Estimating the false alias frequency produced by undersamplingC: edit and run

This simplified folding calculation shows why undersampling a 1000 Hz signal at 900 Hz can make it look like a much slower, different signal.

Test what you just read

1. What does "aliasing" mean in the context of ADC sampling?