Sampling & Nyquist Visualizer
Use sample dots, frequency folding, and IoT data trade-offs to choose a defensible sensor sample rate
Sampling & Nyquist Visualizer
See how a smooth sensor signal becomes individual ADC samples. When the sample clock is too slow, those dots can fit a lower false frequency, so the device may record a signal that was never really there.
Sampling Workbench
The sample dots are the only evidence your digital system receives.
Learning Support
Sampling stores evidence
The ADC stores values at fixed instants. It does not store everything that happened between those instants.
Nyquist is a boundary
The ideal minimum sample rate is twice the highest signal frequency. Exact boundary cases leave no room for phase or real filters.
Aliasing cannot be repaired later
Once an out-of-band analog signal has folded into the sampled data, software cannot reliably tell which frequency was original.
Sampling has a cost
Higher sample rates can improve fidelity, but they also increase ADC work, processor time, storage, and radio traffic.
Quick Reference
Nyquist frequency
f_nyquist = sample_rate / 2
This is the highest frequency the sampled data can represent in the ideal model.
Minimum sample rate
sample_rate >= 2 x f_signal_max
Use this as the teaching minimum, then add margin for real hardware and filters.
Alias frequency
f_alias = abs(f_signal - round(f_signal / fs) x fs)
Fold the result into the 0 to fs/2 band. Example: 18 Hz at 25 samples/s appears as 7 Hz.
Guard margin
practical target = 2.5x to 5x highest useful frequency
Margin gives the anti-alias filter room to attenuate unwanted high frequencies before the ADC.
Raw data rate
bits/s = sample_rate x bits_per_sample x channels
This is only sample payload. Real network packets add headers, retries, timestamps, and metadata.
Slow sensors
temperature and humidity often need low rates
Slow environmental signals may need only a few samples per minute, but alarms may require faster polling.
Fast sensors
vibration and audio need high rates
A 1 kHz vibration feature needs at least 2 k samples/s, often more after practical margin.
Anti-alias filter
low-pass before ADC
The filter must be analog and before sampling. Digital filters are too late to prevent aliasing.
Guided Practice
Find an alias
Set the signal to 18 Hz and the sample rate to 25 /s. Notice the apparent 7 Hz result.
Add safe margin
Raise the sample rate until the condition changes from aliasing to safe. Compare the data volume metric.
Test the boundary
Use 20 Hz and 40 /s. The math reaches Nyquist, but the page marks it as thin margin.
Connect to design
Switch between Slow sensor and Vibration. The right rate depends on signal bandwidth, not just sensor type.