A low-pass filter (LPF) is a circuit that allows signals below a specific cutoff frequency to pass through while attenuating signals above that frequency. In a real circuit, this changes a jagged, high-frequency switching waveform into a smooth DC voltage, or strips out RF interference before a sensitive analog-to-digital converter (ADC) samples a sensor. The most common confusion among hobbyists is treating the cutoff frequency ($f_c$) as a 'brick wall' where high frequencies instantly disappear; in reality, $f_c$ is the -3dB point where the signal's power is halved (and voltage drops to 70.7%), with attenuation rolling off gradually beyond it.
Think of it like a heavy flywheel on a motor: it easily absorbs and smooths out rapid, jerky pulses (high frequencies) but faithfully follows slow, steady changes in speed (low frequencies).
The Math and a Worked Numeric Example
For the most common topology—the first-order passive RC low-pass filter—the cutoff frequency is determined by the resistor and capacitor values. The formula is:
Where: $f_c$ is in Hertz (Hz), $R$ is in Ohms ($\Omega$), and $C$ is in Farads (F).
Let's look at a concrete scenario: you are using an ESP32 to generate a 5 kHz PWM signal to simulate an analog 0-3.3V output for a motor controller. A raw 5 kHz PWM square wave will cause the motor driver to chirp and overheat. We need an LP filter to smooth this into a clean DC voltage.
Step 1: Pick the target cutoff frequency. A good rule of thumb for PWM smoothing is to set $f_c$ to roughly 1/10th to 1/30th of the PWM frequency. Let's target 160 Hz.
Step 2: Pick a standard capacitor value. Capacitors come in fewer standard values than resistors. Let's choose a 100 nF (0.1 µF) ceramic capacitor.
Step 3: Calculate the resistor.
$R = \frac{1}{2 \pi \times f_c \times C}$
$R = \frac{1}{2 \pi \times 160 \times 100 \times 10^{-9}}$
$R \approx 9,947 \Omega$
The closest standard 1% E96 resistor value is 10.0 kΩ. This gives an actual cutoff of 159.1 Hz, which is perfectly acceptable.
Where You Meet This in Practice
You will encounter LP filter design across nearly every domain of electronics. Here is where they do the heavy lifting on the bench:
- PWM to Analog Conversion: Smoothing microcontroller PWM pins into pseudo-DAC analog voltages for motor control, LED dimming, or audio generation.
- Anti-Aliasing for ADCs: Placed directly in front of an ADC input to block high-frequency noise that would otherwise fold back into the sampling band and corrupt your digital readings.
- Audio Crossovers: Routing low-frequency bass signals to a subwoofer while blocking treble frequencies that could damage the driver.
- Power Supply Snubbing: Filtering out high-frequency switching noise from DC-DC buck converters before it reaches sensitive RF or analog sensor circuits.
Decision Tree: Choosing Your LP Filter Topology
Not every problem requires a simple RC network. Use this decision path to select the right topology for your specific constraints.
| If your circuit needs... | Then choose this topology... | Concrete Component Pick |
|---|---|---|
| Basic noise reduction, PWM smoothing, and you have no strict space or loading constraints. | Passive 1st-Order RC (Cheapest, no power required, but slow -20dB/decade roll-off and susceptible to loading). |
10 kΩ 1% Metal Film Resistor + 100 nF C0G Ceramic Capacitor. |
| A sharp cutoff (steep roll-off) to block a specific noise frequency very close to your signal band. | Active 2nd-Order Sallen-Key (Uses an op-amp, provides -40dB/decade roll-off, buffers the output, requires power rails). |
MCP6002 Op-Amp + matched 1% resistors + C0G capacitors. |
| Filtering high currents on a power supply line (e.g., >500mA) where a resistor would overheat. | Passive LC Filter (Uses an inductor instead of a resistor; no DC voltage drop, handles high current, but risks resonance ringing). |
Ferrite bead or shielded power inductor (e.g., 10µH) + 10µF Tantalum/MLCC. |
| Phase-linear filtering, exact tunable cutoffs, or handling complex DSP audio signals. | Digital FIR/IIR Filter (Done in software on a DSP/MCU; requires an ADC upfront, zero physical component drift). |
STM32 with ARM CMSIS-DSP library or ESP32 I2S peripheral. |
For a deeper dive into calculating active component values, the Analog Devices Filter Wizard is an indispensable browser tool that generates exact Sallen-Key schematics based on your desired passband.
Component Parasitics: The Real-World Gotchas
Theoretical LP filter design assumes perfect components. On the bench, parasitics will ruin your filter response if you ignore them.
The Capacitor Dielectric Trap
Never use Y5V or Z5U dielectric capacitors for precision filters. Their capacitance can drop by 50% or more with temperature changes and applied DC bias. Even the ubiquitous X7R dielectric suffers from DC bias derating—a 10µF X7R capacitor might only provide 2µF of actual capacitance when 10V DC is applied across it. For signal-path LP filters where accuracy matters, always specify C0G (also known as NP0) dielectrics. They are virtually immune to temperature and voltage drift.
Resistor Thermal Noise
In high-gain audio or sensor front-ends, the resistor itself generates Johnson-Nyquist thermal noise. The formula is $V_n = \sqrt{4k_B T R \Delta f}$. If you are designing an LP filter for a low-noise microphone preamp, keep your resistor values as low as practically possible (e.g., 1 kΩ instead of 100 kΩ) and compensate with larger capacitors to minimize the noise floor.
Frequently Asked Questions
Can I just cascade two passive RC filters to get a sharper roll-off?
Yes, but with a major caveat. If you simply connect a second RC stage directly to the first, the second stage will load the first, shifting your cutoff frequency and ruining the Butterworth/Chebyshev response. To cascade passive RC filters effectively, you must either make the second stage's impedance at least 10x higher than the first (which limits your drive capability), or place a unity-gain op-amp buffer between the stages.
Why does my filtered PWM output voltage drop under load?
This is the output impedance issue mentioned in our worked example. A passive RC filter has an output impedance roughly equal to the resistor value at DC. If you draw 1mA of current through a 10 kΩ filter resistor, Ohm's law dictates a 10V drop (or in the case of a 3.3V ESP32, the voltage will collapse to near zero). You must buffer the output with an op-amp configured as a voltage follower if the next stage draws any meaningful current.
What is the default pick if I am unsure?
If you are prototyping and unsure which topology to commit to, default to a passive RC filter using a 10 kΩ 1% metal film resistor and a 100 nF C0G/NP0 ceramic capacitor. It covers 80% of hobbyist microcontroller noise-snubbing and basic PWM-smoothing needs, costs pennies, requires no dual power rails, and provides a safe, high-impedance starting point that you can later buffer with an op-amp if loading becomes an issue.
For further reading on the foundational theory of reactive components in AC circuits, the All About Circuits textbook chapter on filters provides excellent interactive simulations to visualize the phase shift and attenuation curves.






