A Butterworth filter is an electronic signal processing circuit designed to provide a maximally flat frequency response in the passband, meaning it passes desired frequencies with zero amplitude ripple before smoothly rolling off unwanted signals. In a real circuit or installation, inserting this filter changes how your system handles noise: it strips out high-frequency interference (in a low-pass configuration) or low-frequency DC drift (in a high-pass configuration) without altering the volume, amplitude, or phase relationships of the frequencies you actually want to measure or hear. Beginners frequently confuse it with Chebyshev filters (which trade passband ripple for a steeper roll-off) or Bessel filters (which prioritize linear phase response and step-response over amplitude flatness).
The Core Math: Maximally Flat Magnitude
The defining characteristic of a Butterworth filter is its magnitude response. Unlike other filter topologies that might boost frequencies near the cutoff point (peaking) or attenuate them prematurely (droop), the Butterworth response is mathematically optimized to be as flat as possible up to the -3 dB cutoff point.
The attenuation rate in the stopband is dictated by the filter's order (the number of poles). Each pole contributes -20 dB/decade (or -6 dB/octave) of roll-off. Therefore, a 2nd-order Butterworth filter attenuates unwanted signals at -40 dB/decade, while a 4th-order drops them at -80 dB/decade. The transfer function magnitude $|H(j\omega)|$ for an $n$-th order low-pass Butterworth filter is defined as:
$|H(j\omega)| = \frac{1}{\sqrt{1 + (\frac{\omega}{\omega_c})^{2n}}}$
Where $\omega_c$ is the cutoff frequency in radians per second. Notice that at $\omega = \omega_c$, the denominator becomes $\sqrt{2}$, yielding a gain of $1/\sqrt{2}$, which is exactly -3.01 dB, regardless of the filter order $n$.
Worked Numeric Example: 1 kHz Sallen-Key Low-Pass
Let’s design a 2nd-order (12 dB/octave) unity-gain Sallen-Key Butterworth low-pass filter. This is a standard active topology used to prevent aliasing when feeding an analog sensor signal into a microcontroller ADC, such as the 12-bit SAR ADC on an ESP32.
We will use a modern, low-noise, rail-to-rail op-amp like the Texas Instruments OPA1678, powered by a single 3.3V supply to match the ESP32's logic levels.
The Sallen-Key Topology Wiring
For a unity-gain Sallen-Key low-pass filter, the signal path and feedback network are wired as follows:
- Input Path: The analog signal passes through Resistor 1 ($R_1$) to Node A, then through Resistor 2 ($R_2$) to the op-amp's non-inverting input (+).
- Feedback Cap: Capacitor 1 ($C_1$) connects from Node A directly to the op-amp's output pin. This feedback path creates the complex poles required for the Butterworth response without needing inductors.
- Ground Cap: Capacitor 2 ($C_2$) connects from the non-inverting input (+) to ground.
- Unity Gain: The inverting input (-) is tied directly to the output pin.
Calculating Component Values
Our target cutoff frequency ($f_c$) is 1,000 Hz. For a 2nd-order Butterworth response in a unity-gain Sallen-Key topology, the standard design equations require a specific capacitor ratio. If we set $R_1 = R_2 = R$, the capacitor values must satisfy $C_1 = 2 \times C_2$ (specifically, $C_1 = 1.414C$ and $C_2 = 0.707C$ where $C = \frac{1}{2\pi R f_c}$).
Let’s choose a standard 1% resistor value of $R = 15.0\text{ k}\Omega$.
First, find the base capacitance $C$:
$C = \frac{1}{2 \pi \times 15,000 \times 1,000} = 10.61\text{ nF}$
Now, calculate the specific capacitor values:
- $C_1 = 1.414 \times 10.61\text{ nF} = \mathbf{15.0\text{ nF}}$
- $C_2 = 0.707 \times 10.61\text{ nF} = \mathbf{7.50\text{ nF}}$
Do not use standard X7R or Y5V ceramic capacitors for $C_1$ and $C_2$. These dielectrics exhibit severe voltage coefficients (capacitance drops as voltage increases) and microphonic effects. For a precision 1 kHz Butterworth filter, you must use C0G/NP0 dielectric capacitors to ensure the cutoff frequency remains stable regardless of the signal amplitude.
Where You Meet This in Practice
While filter theory often lives in textbooks, the Butterworth response solves specific, painful hardware problems on the workbench.
1. ADC Anti-Aliasing Front-Ends
If your ESP32 samples a load cell at 10 kHz, the Nyquist limit is 5 kHz. Any noise above 5 kHz (like switching regulator ripple at 1.2 MHz) will fold back down into your baseband, appearing as phantom low-frequency noise. A 4th-order Butterworth low-pass filter set to 2 kHz provides a flat response for your actual load cell data (usually < 50 Hz) while aggressively crushing the high-frequency switching noise before it reaches the ADC sample-and-hold circuit.
2. Active Audio Crossovers
In bi-amplified speaker systems, a Butterworth filter is used to split the audio spectrum. Because the passband is maximally flat, a 2.5 kHz Butterworth low-pass feeding a woofer ensures that the vocal range (300 Hz - 3 kHz) is not artificially colored or boosted right before the crossover point, preserving the natural timbre of the audio.
3. Biomedical Sensor Conditioning
When reading ECG (electrocardiogram) signals, the raw data is plagued by 50/60 Hz mains hum and high-frequency EMG (muscle) noise. A band-pass Butterworth filter (combining a high-pass at 0.5 Hz to remove baseline wander, and a low-pass at 40 Hz to remove muscle noise) extracts the clean QRS complex without introducing passband ripple that could mimic cardiac arrhythmias.
Butterworth vs. Chebyshev vs. Bessel
Choosing the wrong filter type is a common reason for failed signal conditioning. Use the Analog Devices Filter Wizard to simulate these differences, or refer to the comparison matrix below to make your topology decision.
| Criteria | Butterworth | Chebyshev (Type I) | Bessel |
|---|---|---|---|
| Passband Amplitude | Maximally flat (zero ripple) | Unequal ripple (adjustable) | Flat, but droops early |
| Roll-off Steepness | Moderate (-20dB/dec per pole) | Very steep | Very gradual |
| Phase Linearity | Non-linear near cutoff | Highly non-linear | Maximally linear (constant group delay) |
| Step Response | Moderate overshoot/ringing | Severe ringing | No overshoot, smooth transition |
| Best Application | Audio, general ADC anti-aliasing | RF channel selection, strict band limits | Digital data pulses, time-domain sensors |
Choose Butterworth when: You need to preserve the exact amplitude of signals in the passband and don't mind a moderate transition band.
Choose Chebyshev when: You have a strict requirement to kill a specific nearby interference frequency and can tolerate passband ripple.
Choose Bessel when: You are filtering digital square waves or time-critical pulse data where phase shift would distort the pulse shape.
Frequently Asked Questions
What is the difference between a Butterworth and Chebyshev filter?
The fundamental difference lies in the passband behavior and the transition steepness. A Butterworth filter sacrifices roll-off steepness to achieve a perfectly flat passband with zero ripple. A Chebyshev filter allows for a specified amount of amplitude ripple in the passband (e.g., 0.5 dB or 1 dB) in exchange for a much steeper roll-off into the stopband. If you are filtering audio or precision DC sensor data where any amplitude variation in the passband ruins the measurement, you must use Butterworth. If you are designing an RF receiver and need to aggressively block an adjacent channel just a few kilohertz away, Chebyshev is the better tool.
Why use a Butterworth filter for audio crossovers?
Audio crossovers rely on Butterworth filters because human hearing is highly sensitive to amplitude variations in the midrange frequencies. A Chebyshev filter would introduce peaks and dips in the vocal range before the crossover point, making instruments sound unnatural or "colored." The Butterworth response guarantees that all frequencies below the crossover point are reproduced at their exact original relative volumes. Furthermore, when a 2nd-order Butterworth low-pass and high-pass are summed together at the crossover frequency, they exhibit a predictable -6 dB drop and specific phase relationships that speaker designers can easily equalize.
How do I calculate the order of a Butterworth filter for my ADC?
To calculate the required order ($n$), you need three numbers: your cutoff frequency ($f_c$), your stopband frequency ($f_s$), and the minimum attenuation required at the stopband ($A_s$ in dB). The formula is:
$n \ge \frac{\log_{10}(10^{A_s/10} - 1)}{2 \log_{10}(f_s / f_c)}$
For example, if your ESP32 ADC samples at 20 kHz (Nyquist $f_s = 10\text{ kHz}$), your signal bandwidth is 1 kHz ($f_c$), and you need at least 60 dB of attenuation at 10 kHz to prevent aliasing, the math yields $n \ge 3$. You would therefore build a 3rd-order (or higher, like a 4th-order dual-stage Sallen-Key) Butterworth low-pass filter to guarantee clean ADC readings.






