How the anti-aliasing filter calculator works
An ADC samples its input at discrete moments. Anything in the signal above half the sample rate, the Nyquist frequency, is not lost but folds back into the measured band as a false low-frequency component. A filter ahead of the ADC must remove it before it is sampled. The simplest is a resistor and a capacitor, often in front of the ADC input or a sensor’s terminals.
The calculator takes R and C, or R and the corner frequency, and shows the −3 dB frequency, the attenuation at the Nyquist frequency against what ½ LSB requires, the time to settle after a step, and the delay. It handles up to four identical stages separated by buffers.
How much attenuation is enough
For a full-scale signal at the Nyquist frequency to stay below ½ LSB, the filter must attenuate it by 20 log(2^−(N+1)): 78 dB for 12 bits, 102 dB for 16 bits. A single RC stage falls by 20 dB per decade above its corner, so with a 1.6 kHz corner and 10 kHz sampling it reaches only 10 dB at 5 kHz. The calculator states the shortfall.
In practice, real interference at the Nyquist frequency is rarely full scale, and most designs combine a simple RC filter with oversampling and a digital filter after the ADC. The figure shows how much of the work the analogue filter does.
Settling time
After a step at the input, the filter output approaches the new value exponentially. To be within ½ LSB a single stage needs (N + 1) ln 2 time constants: 9 τ for 12 bits, 11.8 τ for 16 bits. This matters when the ADC is multiplexed between channels, when the input steps, or when the source is switched on just before a measurement. A continuously sampled, filtered signal simply lags by the delay.
Signal loss and phase
The filter also attenuates the signal you want. At a tenth of the corner frequency the loss is 0.5 %; at the corner it is 29 %. Enter the signal frequency to see the amplitude loss and the phase shift, and an interference frequency, such as 50 or 60 Hz mains, to see how much of it remains.
What the calculation leaves out
Stages connected directly without buffers load each other, which lowers the corner and changes the response. The ADC’s sampling capacitor draws a charge at each conversion, and the filter capacitor must be large enough to supply it without a step; the ADC datasheet states the maximum source impedance. The ADC resolution calculator shows how many codes the sensor span uses.
Frequently asked questions
Why not choose a very low corner frequency?
A low corner removes more interference but also slows the response, delays the signal and reduces the amplitude of fast changes. Choose the corner from the fastest change you need to see, then raise the sample rate until the attenuation at Nyquist is enough.
Are two RC stages better than one?
Two stages fall at 40 dB per decade instead of 20, so they attenuate far more at Nyquist. Their −3 dB frequency is 0.64 times the corner of each stage, and they settle more slowly.
Do sigma-delta ADCs need this filter?
Much less. A sigma-delta converter samples far above the output data rate and filters digitally, so a simple RC with a corner well above the band is usually enough. Check the datasheet’s recommended input filter.