Back to timeline
school Dec 2025

A 6th-order Butterworth anti-alias filter

Anti-aliasing for an ADC sampled at 3 kHz: the signal must be attenuated by at least 10 dB at the Nyquist frequency of 1.5 kHz, while keeping the cutoff above 1.125 kHz so the passband stays useful. A Butterworth response gives flatness in the passband; doing the math says sixth order; the implementation is three cascaded Sallen-Key stages with one op-amp each.

The math, briefly

For a Butterworth filter, the order needed to hit attenuation A at frequency fstop while keeping the −3 dB cutoff fc elsewhere is

n = (1/2) · ln(A⁻² − 1) / ln(f_stop / f_c)

With A = 10−0.5, a 5% margin on both sides, and fstop/fc ≈ 1.21, this gives n ≈ 5.86, rounded up to n = 6.

Three Sallen-Key sections, each with the same ω₀ = 2π·1181 Hz but different Q-factors set by the Butterworth pole layout: Q₁ ≈ 0.518, Q₂ ≈ 0.707, Q₃ ≈ 1.93.

Building odd capacitor values from standard parts

With every R fixed at 10 kΩ, the per-stage capacitances came out to weird non-standard values (14, 13, 19, 9.5, 52, 3.5 nF). All were built as parallel combinations of stock components:

Parallel-only on purpose: fewer wires on the breadboard, and no risk of the series formula tripping you up at 2 a.m.

Breadboard with three cascaded Sallen-Key sections: three op-amps, banks of parallel capacitors making the odd values.
Breadboard build. Three Sallen-Key stages, parallel-cap stacks for the non-standard values.
The same circuit transferred to an Elektra-branded stripboard, soldered.
Second build on stripboard. Same topology, cleaner layout.

Measured vs predicted

Two complete builds, both came out the same way: the stop-band attenuation hit the 10 dB target with margin (measured 11.67 dB at 1.5 kHz), but the cutoff sat at ~1.07 kHz instead of the designed 1.18 kHz, about 10% low and below the spec. Simulation in Falstad with ideal parts puts cutoff exactly where the calculations predict, which fingers component tolerance, stray capacitance/inductance, and the op-amp's finite gain-bandwidth as the culprits.

Falstad simulation: three cascaded Sallen-Key stages with the designed values, plus the resulting frequency response sweep showing the −3 dB point near 1.18 kHz.
Falstad simulation with ideal parts. Cutoff lands at the designed 1.18 kHz, as the math predicts.
Measured amplitude response of build 1: flat passband, −3 dB at 1.07 kHz.
Build 1. −3 dB at 1.07 kHz (designed 1.18 kHz).
Detailed measurement around 1.5 kHz showing −11.67 dB attenuation.
Stop-band measurement. −11.67 dB at 1.5 kHz, comfortably past the 10 dB requirement.

Easiest fix is to design the cutoff a little high to compensate for that systematic downshift. Tighter-tolerance parts and better board layout would also help.

Writeup

Back to timeline