A sensor can be electrically correct, calibrated and noise-free yet still produce data that tells the wrong story. One of the most common causes is the sampling strategy: the system measures too slowly, at irregular intervals, or without limiting frequency content before digitization.
The key idea: sampled data can invent a lower frequency
When a continuous signal is sampled, frequency components above half the sampling frequency can appear as false lower-frequency components in the sampled data. This is aliasing. Analog Devices’ Nyquist tutorial defines the first Nyquist zone as DC to fs/2 and explains why out-of-band energy can fold into that range.
The practical consequence is important: a smooth-looking plot is not proof that the measurement is correct. A fast vibration sampled too slowly can look like a slow oscillation. A pulse train can appear to drift. A rotating system can seem to reverse direction in sampled imagery or data.
“Sample at twice the frequency” is only the theoretical boundary
The Nyquist criterion tells you the minimum condition for an ideal band-limited signal. Real sensors and ADC systems are not ideal. Anti-alias filters need transition bandwidth, real signals contain harmonics/noise, and the application may require amplitude or timing accuracy.
For engineering work, define the highest frequency you actually need to preserve, then choose a sample rate with enough margin for filtering and analysis. The correct margin depends on the signal, filter and required accuracy; there is no universal “always use 10×” rule.
Start from the physical event
Do not choose the rate because a library example uses 100 Hz. Ask:
- What is the fastest physical event I need to detect?
- Do I care about waveform shape, peak value, RMS value or only a slow trend?
- What bandwidth does the sensor itself support?
- Is there an analog low-pass filter before the ADC?
- Will digital filtering or FFT analysis be performed later?
A temperature logger can often sample slowly because the thermal process changes slowly. Vibration, audio, switching currents and motor commutation require very different rates.
Sampling rate and logging rate are not the same thing
You may sample internally at a high rate, filter or average the measurements, then log one value per second. That can be correct if the filtering step preserves the quantity you care about. The mistake is to collect one raw sample per second and assume it represents everything that happened during that second.
Anti-alias filtering matters before the ADC
Once an unwanted high-frequency component has aliased into the sampled band, digital software cannot reliably distinguish it from a genuine in-band signal. That is why ADC systems often include an analog anti-alias low-pass filter ahead of sampling.
Analog Devices explicitly notes that frequency components outside the Nyquist bandwidth can alias back into the first Nyquist zone and that filtering ahead of the sampler is used to remove them.
Timing jitter can distort data too
Sampling “approximately every millisecond” from a busy application loop is not equivalent to a stable 1 kHz sample clock. Interrupts, network stacks, file writes and display updates can add jitter.
For low-frequency environmental sensors this may not matter. For waveform analysis it can. Use a hardware timer, ADC trigger, DMA or another deterministic mechanism when sample timing is part of the measurement specification.
A simple aliasing experiment
To demonstrate the problem:
- Generate a stable sine wave or pulse signal from a known source.
- Measure it first with an oscilloscope to establish the real frequency.
- Sample it at a rate safely above the signal bandwidth and plot the result.
- Lower the sample rate until it approaches and then falls below twice the signal frequency.
- Observe the false frequency or waveform that appears.
This experiment is more educational than memorizing a formula because it makes the failure visible.
How to choose a defensible rate
| Question | Engineering action |
|---|---|
| Highest useful signal frequency? | Define it from the physical process or measurement goal. |
| Energy above that band? | Add/verify analog filtering before sampling. |
| Need waveform shape? | Use enough oversampling margin for amplitude/timing fidelity. |
| Timing-sensitive analysis? | Use deterministic triggering and measure actual interval jitter. |
| Long-term logging? | Separate acquisition rate from stored/reporting rate. |
Watch the entire acquisition chain
The final number depends on more than sample frequency. Check ADC reference stability, source impedance, sensor bandwidth, amplifier settling, filter response and software scaling. If multiple channels are multiplexed, verify whether each channel receives the sample rate you think it does.
When the data passes through microcontroller interfaces before logging, wiring and bus timing can introduce a different class of errors. See The Wiring and Timing Mistakes That Break Microcontroller Interfaces.
Final validation checklist
- Define the highest frequency or shortest event that matters.
- Document the actual per-channel sample rate.
- Confirm anti-alias filtering before digitization when required.
- Measure sampling interval/jitter instead of assuming the loop rate.
- Compare the sampled waveform with an independent instrument.
- Test frequencies near the top of the intended bandwidth.
- Only then apply averaging, decimation or logging-rate reduction.
Primary reference
Analog Devices MT-002 — What the Nyquist Criterion Means