Shop by category
Shop all componentsTiming, filters & signals
Put an anti-alias low-pass filter (even a simple RC) in front of the ADC with its cutoff below half the sample rate, so noise above it cannot fold down into your readings.
f Nyquist = f s ÷ 2Alias = | f − round(f ÷ f s) × f s |A 1 kHz tone sampled at 8 kHz gives 8 samples per cycle and a Nyquist limit of 4 kHz. Sampled at only 1.2 kHz it would appear as a false 200 Hz tone.
An ADC only sees the signal at the moments it takes a sample. If samples are too far apart, a fast signal and a slower one pass through exactly the same points, and the slower, false one is what your code measures. That is aliasing.
The Nyquist rule says you must sample at more than twice the highest frequency present. Twice is the bare minimum to detect a frequency; 5 to 10 times is needed to see its shape on a plot, and a low-pass filter before the ADC stops higher noise sneaking in.
Half the sample rate. Anything above it cannot be measured correctly and appears as a lower, false frequency.
About 9,000 samples per second with the default settings, so signals up to roughly 4 kHz, and a clean waveform only up to about 1 kHz.
Often mains hum at 50 Hz being sampled at a rate close to a multiple of 50 Hz. The aliased difference shows as a slow wave. Average over 20 ms or filter before the ADC.
f Nyquist = f s ÷ 2; Alias = | f − round(f ÷ f s) × f s |.
A 1 kHz tone sampled at 8 kHz gives 8 samples per cycle and a Nyquist limit of 4 kHz. Sampled at only 1.2 kHz it would appear as a false 200 Hz tone.
Geekobot builds that use it include Wi-Fi noise monitor, Wi-Fi sound alert for deaf users and parents, Wi-Fi room noise monitor and Wi-Fi classroom noise monitor. Each has the full parts list, wiring and code.
Results are estimates for design and learning. Check critical designs against the component datasheet. Made by the Geekobot Learning Team. How we write our calculators