The Core Concept: What a 2nd Order Sallen-Key Low Pass Filter Actually Does
A 2nd order Sallen-Key low pass filter is an active analog circuit using an op-amp, two resistors, and two capacitors to attenuate high-frequency signals at a rate of -40 dB/decade while providing unity or set gain without loading the signal source. Unlike a passive filter, the op-amp buffers the output, meaning whatever you connect next—like a microcontroller ADC or a power amplifier—won't drag down your carefully calculated cutoff frequency.
What people commonly confuse it with: Beginners often confuse it with a simple 1st-order passive RC filter (which only rolls off at -20 dB/decade and suffers from loading effects) or a Multiple Feedback (MFB) filter (which inverts the signal phase and has much higher sensitivity to component tolerances).
To visualize the impedance isolation, think of water flowing through two sequential mesh screens. If the second screen gets clogged, it backs up pressure and alters the flow through the first screen. The op-amp in a Sallen-Key topology acts like a booster pump between the stages, ensuring the second stage's restriction doesn't affect the flow dynamics of the first.
Where You Meet This In Practice
You won't just find this topology in textbooks; it is the workhorse of modern mixed-signal PCB design. You will reach for a Sallen-Key low pass configuration when:
- Anti-aliasing for Microcontrollers: Filtering sensor data before it hits an ESP32-S3, STM32, or Arduino ADC to prevent high-frequency noise from folding back into your digital readings.
- DAC Reconstruction: Smoothing the "staircase" output of a digital-to-analog converter (like the MCP4922) back into a clean analog waveform.
- Audio Crossovers: Routing low frequencies to a subwoofer amplifier while actively rejecting treble frequencies without the insertion loss of passive inductors.
- Sensor Signal Conditioning: Stripping 50/60 Hz mains hum and high-frequency EMI from delicate load cell or thermocouple amplifier outputs.
Worked Numeric Example: Designing a 5 kHz Audio Anti-Aliasing Filter
Let's design a unity-gain Butterworth filter (maximally flat passband) with a target cutoff frequency ($f_c$) of 5 kHz. According to Texas Instruments' Sallen-Key design guidelines, a Butterworth response requires a quality factor ($Q$) of 0.707.
For a unity-gain Sallen-Key filter, the math simplifies beautifully if we set $R_1 = R_2 = R$. To achieve the Butterworth $Q$ of 0.707, the capacitor ratio must be exactly $C_2 = 2 \times C_1$.
Selected C1: 10 nF (C0G/NP0) | Selected C2: 20 nF (C0G/NP0)
Calculated R: 2,253 $\Omega$ $\rightarrow$ Standard 1% Value: 2.2 k$\Omega$
Let's verify the actual cutoff frequency with the standard 2.2 k$\Omega$ resistors:
$$f_c = \frac{1}{2\pi R \sqrt{C_1 C_2}}$$
$$f_c = \frac{1}{2\pi (2200) \sqrt{(10 \times 10^{-9})(20 \times 10^{-9})}}$$
$$f_c = \frac{1}{13823 \times 1.414 \times 10^{-8}} \approx 5,115 \text{ Hz}$$
An actual cutoff of 5.11 kHz is well within acceptable tolerances for audio anti-aliasing. Note that we specifically chose C0G/NP0 dielectric capacitors; using X7R or Y5V ceramics would introduce severe voltage coefficient distortion and microphonics, completely ruining the audio signal.
Real-World Scenario Walkthrough: The ESP32 ADC Noise Disaster
Theory is clean; the workbench is not. Here is a real-world scenario demonstrating why active filtering requires more than just plugging numbers into a calculator.
- Setup: We needed to digitize a 1 kHz analog audio signal using the internal SAR ADC of an original ESP32 DevKit v1 running at a 20 kHz sample rate. To satisfy the Nyquist theorem and prevent aliasing, we needed a low pass filter cutting off sharply at 10 kHz.
- Numbers: We initially tried a passive 1st-order RC filter ($R = 1.5 \text{ k}\Omega$, $C = 10 \text{ nF}$), but the ESP32's ADC input impedance isn't purely resistive—it's a switched capacitor network that causes voltage droop. To fix this, we designed a 2nd order Sallen-Key filter for 10 kHz using an LM358 dual op-amp powered from the ESP32's 3.3V rail. Component values were $R_1=R_2=15 \text{ k}\Omega$, $C_1=1 \text{ nF}$, $C_2=2 \text{ nF}$.
- Outcome: The 1 kHz audio signal passed through, but the digital readings on the serial plotter were still jumping wildly. When we hooked an oscilloscope to the op-amp output, we saw a massive, distorted ringing spike at exactly 20 kHz (the ESP32's internal switching frequency).
- What Went Wrong: We ignored the op-amp's Gain-Bandwidth Product (GBW) and slew rate. The LM358 has a GBW of roughly 1 MHz and terrible crossover distortion. At 10 kHz, the LM358's open-loop gain drops significantly. Because the Sallen-Key topology relies on the op-amp maintaining a virtual ground to control the $Q$ factor, the LM358's lack of bandwidth caused the filter's $Q$ to peak uncontrollably. Instead of attenuating the 20 kHz switching noise, the filter actually amplified it due to high-frequency peaking. The Fix: We swapped the LM358 for a TLV2372 (a rail-to-rail I/O op-amp with a 3 MHz GBW and excellent 3.3V single-supply performance). The peaking vanished, the -40 dB/decade roll-off held true, and the ADC readings stabilized.
Component Selection Rules for Precision Filters
As demonstrated in the scenario above, the passive components and the active silicon are equally critical. Refer to the Analog Devices MT-222 Active Filter Tutorial for deep-dive math on component sensitivity, but keep these bench rules in mind:
| Component | Rule of Thumb | What Happens If You Ignore It |
|---|---|---|
| Op-Amp GBW | GBW must be $> 100 \times f_c$ | Filter $Q$ peaks at cutoff; high-frequency noise is amplified instead of rejected. |
| Capacitor Dielectric | Use C0G/NP0 only for $C < 100 \text{ nF}$ | X7R/Y5V caps change capacitance with applied voltage, causing harmonic distortion and shifting $f_c$ dynamically. |
| Resistor Type | 1% Metal Film | Carbon composition or thick-film resistors introduce excess thermal noise and have poor temperature coefficients, drifting your cutoff frequency as the board heats up. |
| Impedance Scaling | Keep $R$ between 1 k$\Omega$ and 100 k$\Omega$ | Too low: Op-amp output stage overloads. Too high: PCB parasitic capacitance and op-amp input bias currents create DC offset errors. |
FAQ: Sallen-Key Filter Troubleshooting
Why is my Sallen-Key filter ringing or oscillating on the bench?
Oscillation usually points to three culprits: 1) The op-amp isn't stable at unity gain (check the datasheet for "unity-gain stable" specifications). 2) Your PCB layout has stray capacitance on the inverting input node, creating an unintended high-frequency pole. 3) You are driving a highly capacitive load (like a long coaxial cable) directly from the op-amp output without a small isolation resistor (e.g., 22 $\Omega$) in series.
Can I use the exact same topology for a high-pass filter?
Yes. The Sallen-Key topology is highly versatile. To convert your low-pass design into a 2nd order high-pass filter, simply swap the positions of the resistors and capacitors. The resistors go in the shunt (ground) paths, and the capacitors go in the series signal path. The math for $f_c$ remains identical.
When should I choose Sallen-Key over a Multiple Feedback (MFB) filter?
Choose Sallen-Key when you need a non-inverting signal path, high input impedance, and easier tuning (component ratios are less sensitive to op-amp GBW limits). Choose MFB when you need to invert the signal, require higher gain without a second amplifier stage, or are designing high-$Q$ bandpass filters where Sallen-Key component spread becomes impractically large.






