A lowpass filter is an electronic circuit that allows signals with a frequency lower than a specific cutoff point to pass through while attenuating (weakening) higher-frequency signals. Whether you are smoothing a harsh PWM signal from a microcontroller into a clean analog voltage, or keeping high-frequency radio interference out of a sensitive audio preamp, this fundamental building block dictates what gets through and what gets blocked. In this guide, we will break down the math, look at real component values, and calculate a working audio crossover.
The Core Mechanics: What It Changes in a Real Circuit
In a circuit, a lowpass filter changes the impedance relationship between series and shunt components as frequency varies. The most common topology is the passive RC (Resistor-Capacitor) filter. Here, a resistor is placed in series with the signal path, and a capacitor is placed in parallel (shunt) to ground.
At DC (0 Hz), the capacitor's reactance is theoretically infinite, meaning it acts like an open circuit and the full input voltage reaches the output. As frequency increases, the capacitor's reactance ($X_c$) drops. High-frequency signals see the capacitor as a low-impedance path to ground, effectively shorting them out before they can reach the load.
The formula for the cutoff frequency of a first-order RC lowpass filter is:
$f_c = \frac{1}{2 \pi R C}$
Where $f_c$ is in Hertz, $R$ is in Ohms, and $C$ is in Farads. According to foundational texts like All About Circuits, a first-order filter provides a roll-off of -20 dB per decade (or -6 dB per octave). This means for every 10x increase in frequency past the cutoff, the signal voltage is reduced by 90%.
Standard RC Lowpass Filter Component Matrix
Designing a filter on paper is easy; building it with real-world components requires mapping your target frequency to standard E24 resistor and E12 capacitor values. Below is a data-dense reference matrix for common bench and DIY applications.
| Target Application | Target Cutoff ($f_c$) | Resistor (R) | Capacitor (C) | Actual Cutoff | Attenuation at 10x $f_c$ |
|---|---|---|---|---|---|
| Audio Subwoofer Crossover | 100 Hz | 16 kΩ | 100 nF | 99.5 Hz | -20 dB |
| PWM to DAC Smoothing (1kHz PWM) | 160 Hz | 10 kΩ | 100 nF | 159.2 Hz | -20 dB |
| Sensor Anti-Aliasing (ADC) | 1.6 kHz | 10 kΩ | 10 nF | 1.59 kHz | -20 dB |
| RF EMI Snubber (Mains) | 16 kHz | 1 kΩ | 10 nF | 15.9 kHz | -20 dB |
| I2S Audio DAC Reconstruction | 34 kHz | 4.7 kΩ | 1 nF | 33.8 kHz | -20 dB |
Worked Example: Designing a 100 Hz Subwoofer Crossover
Let's design a passive lowpass filter for an active subwoofer input. We want to block midrange and treble frequencies, setting our cutoff at exactly 100 Hz.
Step 1: Choose the Capacitor
Capacitor values are less granular than resistors, so we pick a standard value first. Let's choose C = 100 nF (0.1 µF).
Step 2: Calculate the Resistor
Rearranging the formula to solve for R:
$R = \frac{1}{2 \pi f_c C}$
$R = \frac{1}{2 \times \pi \times 100 \times (100 \times 10^{-9})}$
$R = \frac{1}{0.00006283} \approx 15,915 \Omega$
Step 3: Select the Standard Value
The nearest standard E24 resistor value is 16 kΩ.
Step 4: Verify the Actual Cutoff
$f_c = \frac{1}{2 \pi \times 16000 \times 100 \times 10^{-9}} = 99.47 \text{ Hz}$
The Installation Gotcha (Loading Effect):
If you connect this passive filter directly to a source with a high output impedance, or an amplifier with a low input impedance (e.g., 10 kΩ), that external impedance acts in parallel or series with your components, shifting the cutoff frequency drastically. To prevent this, buffer the filter. Place an op-amp (like a low-noise NE5532 or TL072) configured as a unity-gain voltage follower immediately after the RC network. This provides a high-impedance load for the filter and a low-impedance drive for the amplifier, locking your cutoff at exactly 99.47 Hz.
Where You Meet Lowpass Filters in Practice
You interact with lowpass filters constantly, even if they are hidden inside silicon or plastic housings. Here is where they do the heavy lifting in real-world systems:
- Microcontroller DAC Smoothing: Microcontrollers like the ESP32 or Arduino do not have true analog outputs; they simulate them using Pulse Width Modulation (PWM). A 5 kHz PWM signal looks like a harsh square wave to an oscilloscope. By passing it through an RC lowpass filter (e.g., 10 kΩ and 1 µF for a ~16 Hz cutoff), the capacitor integrates the rapid pulses into a smooth, steady DC voltage proportional to the duty cycle.
- Anti-Aliasing in Data Acquisition: Before an Analog-to-Digital Converter (ADC) samples a sensor, a lowpass filter must remove frequencies above half the sampling rate (the Nyquist limit). If you sample at 10 kHz, any 6 kHz noise will "fold back" and appear as a false 4 kHz signal in your data. A hardware lowpass filter at 4 kHz prevents this aliasing artifact.
- Mains EMI/RFI Inlets: The IEC C14 power inlet on your desktop PC or bench power supply contains an LC lowpass filter. It easily passes 50/60 Hz mains power, but it shorts high-frequency switching noise (generated by the internal Switched-Mode Power Supply) back to the ground/neutral lines so it doesn't pollute the local electrical grid.
- Audio Tone Controls: The "bass" knob on an analog mixer or guitar pedal is often a shelving lowpass filter, selectively boosting or cutting the amplitude of frequencies below a set threshold (usually around 100 Hz to 250 Hz).
Common Confusions and Troubleshooting
Even experienced makers trip over the nuances of filter theory. Here are the most common points of confusion, detailed in a quick-reference FAQ format.
Lowpass vs. Highpass: What is the physical difference?
A lowpass filter places the resistor in series and the capacitor to ground. A highpass filter swaps them: the capacitor goes in series (blocking DC and low frequencies) and the resistor goes to ground. If your audio circuit is missing all the bass, check if you accidentally swapped the R and C positions on the PCB.
Passive vs. Active: When do I need op-amps?
Passive filters (just R, L, and C) always suffer from insertion loss—the signal gets weaker, and the filter's response is easily ruined by the load it drives. Active filters use op-amps to provide gain, isolate stages, and achieve steeper roll-offs. If you need a -40 dB/decade drop-off to aggressively kill noise, you need an active topology like the Sallen-Key lowpass filter, as detailed in Electronics Tutorials.
Is the cutoff frequency a "brick wall"?
No. A first-order RC filter rolls off gradually at -20 dB/decade. If your cutoff is 100 Hz, a 1 kHz signal (one decade higher) is not eliminated; it is merely attenuated by 20 dB (reduced to 10% of its original voltage). If your application requires absolute elimination of high frequencies, you must cascade multiple filter stages or use higher-order active designs.
Why is my filtered PWM signal still noisy?
If your smoothed DAC output still shows ripple on an oscilloscope, your cutoff frequency is too close to the PWM frequency. A good rule of thumb for PWM smoothing is to set the filter cutoff frequency at least 10 to 30 times lower than the PWM base frequency. If your ESP32 outputs PWM at 5 kHz, aim for a filter cutoff below 160 Hz to achieve a clean, ripple-free DC line.






