A Butterworth low pass filter is a signal processing circuit designed to pass frequencies below a specific cutoff point with a maximally flat amplitude response in the passband, meaning absolutely zero ripple. In a real circuit, it changes a noisy or stepped waveform into a smooth signal by aggressively attenuating high-frequency switching artifacts without introducing the amplitude peaks (ringing) that plague other filter types near the cutoff frequency. Hobbyists and even some engineers commonly confuse it with Chebyshev filters (which trade passband ripple for a steeper roll-off) or Bessel filters (which prioritize linear phase response for clean square waves over flat amplitude). If you need a pristine, un-rippled passband and a moderate -40 dB/decade roll-off, the Butterworth topology is your definitive default.

The Math in Action: Designing a 20 kHz Audio Filter

Let's move past abstract theory and design a concrete 2nd-order active Butterworth low pass filter. We will use the Sallen-Key topology to clean up the PWM or I2S audio output from an ESP32 or a PCM5102A DAC module before it hits an amplifier.

Design Target: Cutoff frequency ($f_c$) = 20 kHz
Topology: Equal-component Sallen-Key with Gain
Required Q (Damping): 0.707 (The defining characteristic of a 2nd-order Butterworth response)

A unity-gain Sallen-Key filter inherently yields a Q of 0.5, which results in an overdamped, sluggish response. To hit the Butterworth Q of 0.707, we must introduce a slight non-inverting gain of exactly 1.586.

Step 1: Calculate the Resistors

First, select your capacitors. For high-frequency audio, 1 nF is a practical, readily available value. Let $C_1 = C_2 = 1\text{ nF}$.

Using the standard Sallen-Key cutoff formula ($R = \frac{1}{2 \pi f_c C}$):

$R = \frac{1}{2 \pi \times 20,000 \times 10^{-9}} = 7,957\ \Omega$

The nearest standard 1% (E96 series) resistor is 8.06 kΩ. Using this real-world value, our actual cutoff frequency shifts slightly to 19.74 kHz, which is perfectly acceptable for audio reconstruction.

Step 2: Set the Op-Amp Gain

The required gain is $A_v = 3 - \frac{1}{Q} = 3 - 1.414 = 1.586$.

In a non-inverting op-amp configuration, $A_v = 1 + \frac{R_f}{R_g}$. Let's set the ground resistor $R_g$ to a standard 10 kΩ.

$1.586 = 1 + \frac{R_f}{10,000} \implies R_f = 5,860\ \Omega$

The nearest 1% E96 resistor is 5.90 kΩ.

Bench Tip: Your final bill of materials for this filter stage is two 1 nF C0G capacitors, two 8.06 kΩ resistors, one 10 kΩ resistor, and one 5.90 kΩ resistor. Do not use 5% carbon film resistors here; the 5% tolerance will shift your Q factor, potentially introducing the exact passband peaking you are trying to avoid.

Where You Meet This in Practice

You will rarely see a Butterworth filter used for power supply ripple reduction (where simple LC pi-filters dominate). Instead, it lives in the signal chain where waveform fidelity matters.

  • Audio DAC Reconstruction: Smoothing the stair-step output of a PCM5102A, ESS Sabre DAC, or the internal 8-bit DAC of an Arduino/ESP32. The Butterworth response ensures the audible 20 Hz–20 kHz band remains perfectly flat without a 'hump' at 18 kHz.
  • Anti-Aliasing for ADCs: Placed directly before the ADC pin on an STM32, ESP32, or Raspberry Pi Pico. It prevents high-frequency RF noise from folding back into the baseband during the sampling window, which would otherwise manifest as unremovable low-frequency jitter in your readings.
  • Load Cell Signal Conditioning: Stripping 50/60 Hz mains hum and switching regulator noise from the millivolt-level output of a Wheatstone bridge before the signal enters an instrumentation amplifier like the INA125.

Filter Topology Decision Tree

Choosing the right filter response is about trading off passband flatness, roll-off steepness, and phase linearity. Use this decision matrix to lock in your topology.

Primary Requirement Choose This Topology Roll-Off & Phase Trade-off Concrete Implementation Pick
Perfectly flat amplitude in the passband (Audio, Sensor DC) Butterworth Moderate roll-off (-40dB/dec for 2nd order); non-linear phase near cutoff. 2nd-Order Sallen-Key with OPA2134 and C0G caps.
Steepest possible cutoff to kill a specific nearby frequency Chebyshev Type I Very steep roll-off; introduces amplitude ripple in the passband and severe phase ringing. Higher-order active cascade; requires precise 0.1% tolerance components.
Clean square waves / precise pulse timing (Data buses, PPS signals) Bessel Linear phase (no overshoot on steps); very gentle, gradual roll-off. 4th-Order Multiple Feedback (MFB) Bessel using high-speed op-amps.
Basic high-frequency noise knock-down (LED PWM, simple DC motors) 1st-Order Passive RC Gentle roll-off (-20dB/dec); zero phase complexity; no power required. 100Ω resistor + 10µF electrolytic capacitor.
The Default Recommendation: If your application is not explicitly transmitting digital square waves (which demands Bessel) and you do not have a strict regulatory EMI mask requiring a brick-wall cutoff (which demands Chebyshev or Elliptic), default to a 2nd-order Butterworth. It provides the best balance of component tolerance forgiveness and passband fidelity for 90% of maker and commercial IoT projects.

Component Selection and Real-World Parasitics

A simulated Butterworth filter behaves perfectly. A physical one built on a breadboard will fail if you ignore parasitics. The two most common failure modes in DIY and prototype filters are capacitor dielectric absorption and op-amp gain-bandwidth starvation.

The Capacitor Dielectric Trap

Never use X7R, X5R, or Y5V ceramic capacitors in the signal path of an active filter. These Class II dielectrics exhibit two fatal flaws:

  1. Voltage Coefficient: A 1 nF X7R capacitor might drop to 0.6 nF when a 3V signal is applied, shifting your cutoff frequency unpredictably.
  2. Piezoelectric Microphonics: X7R caps generate voltage when subjected to mechanical vibration (like a motor or speaker on the same chassis), injecting noise directly into your filter.

The Fix: Only use C0G (NP0) Class I ceramic capacitors or polypropylene film capacitors. They are bulkier and more expensive, but their capacitance remains rock-solid regardless of applied voltage or temperature.

Op-Amp Gain-Bandwidth Product (GBW)

An op-amp's open-loop gain drops as frequency increases. If your op-amp runs out of gain at your filter's cutoff frequency, the feedback loop fails, and the filter response collapses. According to Electronics Tutorials, a safe rule of thumb is to select an op-amp with a GBW at least 100 times the filter's cutoff frequency.

For our 20 kHz audio filter, you need a minimum GBW of 2 MHz. The classic TL072 (3 MHz GBW) is technically sufficient but leaves little headroom. The OPA2134 (8 MHz GBW, FET inputs) or the OPA333 (for sub-1 kHz precision sensor filters) are vastly superior choices that guarantee the math holds up in silicon.

Frequently Asked Questions

Can I just cascade two 1st-order RC filters to get a 2nd-order Butterworth?

No. If you simply wire two RC low-pass filters in series, the second stage loads the first stage. The resulting transfer function yields a Q factor of 0.5 (critically damped or overdamped), not the 0.707 required for a Butterworth response. To achieve a true 2nd-order Butterworth without an active op-amp, you must insert a unity-gain buffer op-amp between the two RC stages to isolate them.

Why use an active filter instead of a passive LC filter?

Passive LC filters require inductors. At audio and low-kHz frequencies, inductors become physically massive, expensive, and prone to picking up stray magnetic fields from nearby transformers or motors. Active RC filters using op-amps replace the bulky inductor with a few cheap resistors and capacitors, yielding a much smaller footprint and immunity to magnetic interference. For a deep dive into automated active component selection, the Analog Devices Filter Wizard is an excellent bench resource for generating exact BOMs.

What happens if my resistors are 5% tolerance?

Your cutoff frequency will shift by up to 5%, which is usually fine. However, the Q factor will also shift. If the Q drifts above 0.707, you will introduce a resonant peak (amplification) right at the cutoff frequency. For a 20 kHz filter, this means frequencies around 18-20 kHz will be artificially boosted, ruining the 'maximally flat' promise of the Butterworth design. Always use 1% metal film resistors for active filter networks.