A low pass filter allows frequencies below a cutoff to pass while blocking higher ones, a high pass filter does the exact opposite, and a band pass filter only allows a specific middle range of frequencies to pass. In a real circuit, these networks change the frequency domain of your signal—stripping out high-frequency switching noise, blocking unwanted DC offset, or isolating a narrow RF carrier. Builders commonly confuse the cutoff frequency with an absolute "brick wall" stop, and they frequently overlook loading effects, which silently destroy passive filter performance when connected to low-impedance loads.
The Core Definitions and the -3dB Reality Check
To choose the right topology, you must understand how each filter shapes the AC signal spectrum. All three rely on the frequency-dependent reactance of capacitors ($X_c = \frac{1}{2\pi fC}$) and inductors ($X_l = 2\pi fL$). In most DIY and prototyping scenarios, we use Resistor-Capacitor (RC) networks because inductors are bulky, expensive, and prone to picking up magnetic interference.
- Low Pass Filter (LPF): Passes DC and low frequencies. The capacitor is placed in parallel with the load (shunt), shorting high frequencies to ground.
- High Pass Filter (HPF): Blocks DC and low frequencies. The capacitor is placed in series with the signal path, acting as an open circuit to DC.
- Band Pass Filter (BPF): Combines both. It blocks DC and low frequencies via a series capacitor, and shorts high frequencies to ground via a shunt capacitor, leaving only a "window" of middle frequencies.
Worked Example: Smoothing an ESP32 PWM Signal
Let’s look at a concrete scenario. You are using an ESP32 DevKit v1 to output a 5kHz Pulse Width Modulation (PWM) signal to simulate a 0-3.3V analog DAC for a motor controller. The motor driver expects clean DC, but the 5kHz square wave will cause the motor to whine and overheat. You need a low pass filter to smooth the ripple.
Step 1: Set the target cutoff frequency.
A good rule of thumb for PWM smoothing is to set $f_c$ at least one decade (10x) below the PWM frequency. For a 5kHz PWM, we target $f_c = 500\text{Hz}$.
Step 2: Pick a standard resistor value.
We need an impedance high enough not to overload the ESP32 GPIO (max 40mA, but we want to draw less than 1mA), but low enough to minimize thermal noise. Let’s pick $R = 10,000\ \Omega$ (10kΩ).
Step 3: Calculate the capacitor.
Using the rearranged formula $C = \frac{1}{2\pi R f_c}$:
$C = \frac{1}{2 \times \pi \times 10000 \times 500} = 0.0000000318\text{ Farads} = 31.8\text{nF}$.
Where You Meet These Filters in Practice
Understanding the theory is useless if you don't recognize the application. Here is where these topologies live on the bench and in the field:
- Low Pass in Sensor Conditioning: When reading a thermistor or load cell with an Arduino ADC, high-frequency EMI from nearby switching regulators or 50/60Hz mains hum will cause jittery readings. A simple 1kΩ / 100nF LPF ($f_c \approx 1.6\text{kHz}$) right at the ADC pin stabilizes the reading.
- High Pass in Audio Coupling: If you build a microphone preamp, the output will have a DC bias (e.g., 1.65V). If you feed that directly into a speaker amplifier, the DC offset will waste power and risk blowing the speaker coil. A 10kΩ / 1µF series HPF ($f_c \approx 16\text{Hz}$) blocks the DC while passing the 20Hz-20kHz audio spectrum.
- Band Pass in IR Receivers: Ambient sunlight contains massive amounts of infrared noise. IR remote controls modulate their signal at exactly 38kHz. The receiver module uses an internal BPF tuned to 38kHz to ignore the sun and only react to the remote's carrier.
Decision Tree: Which Filter Topology to Pick
Use this decision matrix to terminate your design process with a concrete component choice. Do not default to a passive RC filter if your load impedance is low.
| If your goal is... | And your load impedance is... | Choose this topology | Concrete Part / Value Pick |
|---|---|---|---|
| Smoothing PWM to DC or removing high-freq sensor noise | High (>100kΩ, like an MCU ADC) | Passive RC Low Pass | R=10kΩ, C=100nF (Y5V or X7R) |
| Smoothing PWM to drive a low-Z analog input or audio line | Low (<10kΩ) | Active Op-Amp Low Pass (Sallen-Key) | MCP6001 op-amp, R=10kΩ, C=10nF |
| Blocking DC offset from an AC audio or AC sensor signal | Any | Passive RC High Pass | C=1µF film cap, R=10kΩ to ground |
| Isolating a specific carrier (e.g., 433MHz RF or 38kHz IR) | N/A (Signal processing) | Dedicated Active BPF IC | TSOP38238 (for 38kHz IR) or SAW filter |
Common Confusions and Loading Disasters
The most frequent reason a passive filter "doesn't work" on the bench is the loading effect. A passive RC low pass filter has an output impedance roughly equal to its resistor value ($R$). If you design a filter with a 10kΩ resistor and connect it directly to a load that has an input impedance of 1kΩ (like a cheap audio amplifier or a low-end ADC), you have accidentally created a voltage divider.
Your signal amplitude will drop to roughly 9% of its original value ($\frac{1k}{10k + 1k}$), and your cutoff frequency will shift drastically because the load resistor is now in parallel with your filter resistor. Passive filter tutorials assume an infinite load impedance; real life rarely provides one.
Another common confusion is assuming that cascading two identical passive RC low pass filters will give you a neat -40dB/decade roll-off. It won't. The second stage loads the first stage, shifting the poles and creating a sluggish, rounded knee rather than a sharp filter response. If you need a second-order (-40dB/decade) response, you must use an active Sallen-Key topology or buffer the stages.
Frequently Asked Questions
Can I use an inductor instead of a resistor for a low pass filter?
Yes, an LC (inductor-capacitor) low pass filter is highly efficient for power supply filtering because the inductor passes DC with almost zero voltage drop (unlike a resistor, which wastes power as heat). However, for signal processing on a breadboard, inductors are avoided due to their physical size, parasitic capacitance, and tendency to act as antennas for stray magnetic fields.
Why does my high pass filter ring or oscillate when I feed it a square wave?
If you are using an active high pass filter (op-amp based) and feeding it a fast-edged square wave, the high-frequency harmonics can exceed the op-amp's slew rate or trigger internal phase margin instability. Stick to passive RC high pass filters for coupling digital square waves, or use an op-amp with a high slew rate (like the TL072) and ensure your power rails are properly decoupled with 100nF bypass capacitors.
What capacitor dielectric should I use for audio filters?






