A low pass filter is an electronic circuit that allows signals with frequencies below a specific cutoff point to pass through while attenuating (blocking) higher frequencies. In a real circuit, it changes jagged, high-frequency digital pulses into smooth analog DC voltages, or strips radio-frequency (RF) noise out of delicate audio and sensor lines. Beginners commonly confuse it with a simple decoupling capacitor or assume the 'cutoff' frequency means a hard brick-wall stop, rather than the -3dB (half-power) roll-off point it actually represents.
The Core Mechanism: How a Passive RC Filter Works
The most common low pass topology is the passive RC (Resistor-Capacitor) filter. It works by exploiting the frequency-dependent impedance of a capacitor. The resistor is placed in series with the signal path, and the capacitor is placed in parallel from the signal line to ground. The output is measured across the capacitor.
A capacitor's reactance (AC resistance) is defined by the formula:
Where Xc is capacitive reactance in ohms, f is frequency in Hertz, and C is capacitance in Farads.
Because Xc is inversely proportional to frequency, the capacitor acts like a frequency-dependent resistor to ground. At low frequencies, Xc is very high, meaning the capacitor blocks the signal from escaping to ground, allowing it to pass to the output. At high frequencies, Xc drops toward zero, effectively shorting the high-frequency noise to ground before it can reach the output.
The cutoff frequency (fc) is the exact point where the capacitive reactance equals the resistance (Xc = R). At this frequency, the output voltage drops to 70.7% of the input voltage, which corresponds to a -3dB attenuation. It does not block the signal entirely at this point; it merely begins the roll-off.
Worked Example: Smoothing a 5kHz ESP32 PWM Signal
Let's design a filter to convert a 5kHz Pulse Width Modulation (PWM) signal from an ESP32 LEDC peripheral into a smooth pseudo-analog DC voltage to drive an analog panel meter.
Step 1: Choose the Cutoff Frequency
We want to heavily attenuate the 5kHz PWM carrier while passing the slow-changing DC envelope. A cutoff frequency of roughly 1/30th of the carrier frequency provides excellent smoothing. Let's target 159 Hz.
Step 2: Select R and C Values
Using the standard cutoff formula fc = 1 / (2πRC), we can pick standard component values. Let's use a 10 kΩ resistor and a 100 nF (0.1 µF) capacitor.
- fc = 1 / (2 * π * 10,000 * 0.0000001)
- fc = 1 / 0.006283
- fc ≈ 159.15 Hz
Step 3: Calculate Attenuation at 5kHz
At the 5kHz PWM frequency, the attenuation factor is calculated as: A = 1 / √(1 + (f/fc)²).
Plugging in the numbers: A = 1 / √(1 + (5000/159)²) ≈ 0.031. This means the 5kHz ripple is reduced to about 3% of its original amplitude (-30dB), yielding a highly stable DC output.
Where You Meet Low Pass Filters in Practice
You will encounter low pass filters in almost every mixed-signal and power electronics project. Here are the three most common jobsite and bench scenarios:
- PWM to Analog DAC Conversion: Microcontrollers like the Arduino Uno or ESP32 lack true analog outputs. By passing a high-frequency PWM signal through an RC low pass filter, you average the pulses into a proportional DC voltage. This is standard practice for driving analog control inputs on motor controllers or lighting ballasts.
- Anti-Aliasing Before ADCs: If you are sampling a sensor with an external ADC (like the MCP3008) or the ESP32's internal SAR ADC, any noise above the Nyquist frequency (half your sample rate) will 'fold back' into your data as false low-frequency signals. A hardware low pass filter placed directly at the ADC input pin physically destroys this high-frequency noise before the sampler can see it.
- Audio Crossovers and Subwoofers: In audio installations, a low pass filter routes only the bass frequencies (typically below 80 Hz - 120 Hz) to the subwoofer amplifier, preventing the sub from trying to reproduce midrange vocals, which causes severe intermodulation distortion.
Decision Tree: Choosing the Right Filter Topology
Not every application can be solved with a single resistor and capacitor. Use this decision matrix to select the correct topology and terminate your design with a specific, purchasable part.
| If Your Requirement Is... | Then Use This Topology... | Concrete Part / Value Pick |
|---|---|---|
| Simple DC smoothing, low cost, high-impedance load (>100kΩ) | 1st-Order Passive RC | WIMA MKS2 100nF Film Cap + 10kΩ Metal Film Resistor |
| Steep roll-off needed, driving a low-impedance load (e.g., 600Ω audio line) | 2nd-Order Active Sallen-Key | Texas Instruments TL072 or Burr-Brown OPA2134 Op-Amp |
| High current power supply ripple filtering (e.g., 2A LED driver) | Passive LC (Inductor-Capacitor) | Bourns 78F Series 100µH Radial Inductor + 470µF Low-ESR Electrolytic |
| Exact, programmable cutoff frequencies for data acquisition | Switched-Capacitor IC Filter | Analog Devices LTC1068 (Clock-tunable 8th-order filter) |
Default Recommendation: If you are unsure and just need to clean up a microcontroller sensor line or PWM output, start with the 1st-Order Passive RC using a C0G capacitor. It requires no power supply, introduces zero op-amp noise, and costs pennies.
Common Confusions and Mistakes to Avoid
Mistake 1: Ignoring the Loading Effect
The math for an RC filter assumes the output is connected to an infinite impedance. If you design a 10kΩ/100nF filter (159 Hz cutoff) and connect it directly to a load with a 10kΩ input impedance, the load resistor acts in parallel with your filter resistor. The effective resistance drops to 5kΩ, instantly doubling your cutoff frequency to 318 Hz and ruining your attenuation. Fix: Always buffer passive filters with a unity-gain op-amp, or ensure the load impedance is at least 10x higher than the filter resistor.
Mistake 2: Confusing Decoupling with Filtering
Placing a 100nF capacitor across the VCC and GND pins of an IC is decoupling, not low-pass filtering a signal. Decoupling provides a local, high-frequency energy reservoir to prevent voltage sag during IC switching. While it technically acts as a low-pass filter for the power rail, its physical placement (must be within 2mm of the IC pins) and purpose are entirely different from signal-line filtering.
Mistake 3: Using Mains-Rated Caps on Low Voltage Signals
Conversely, if you are filtering high-voltage AC mains ripple (e.g., in a tube amplifier power supply), you cannot use standard DC-rated film capacitors. You must use X2 or Y2 safety-rated capacitors designed to fail open rather than short-circuit, protecting the user from lethal shock. For low-voltage DC signal lines, standard 50V or 100V rated components are perfectly adequate.
Frequently Asked Questions
Can I just use a bigger capacitor to make the PWM output smoother?
Yes, but with a penalty. Increasing the capacitor value lowers the cutoff frequency, which reduces high-frequency ripple. However, it also drastically slows down the step response of the filter. If your PWM duty cycle changes rapidly (e.g., for fast motor control or audio synthesis), a massive capacitor will cause the output voltage to slew too slowly to track the signal, resulting in lag and distorted waveforms. You must balance ripple rejection with slew rate.
How do I calculate the exact values for an active filter?
Do not calculate 2nd-order or higher active Sallen-Key filters by hand; the algebra for Q-factor and damping is highly prone to arithmetic errors. Use the free Texas Instruments WEBENCH Filter Designer or the Analog Devices Filter Wizard. You input your desired cutoff, roll-off (e.g., Butterworth for flat passband, Bessel for linear phase), and supply voltage, and the tool outputs the exact standard 1% resistor and capacitor values required.






