A low pass filter is a circuit that allows signals below a specific cutoff frequency to pass through while attenuating higher frequencies. In a real circuit or installation, this changes harsh digital PWM squares into smooth analog DC voltages, strips high-frequency switching noise from sensitive sensor lines, and prevents aliasing distortion before an analog-to-digital converter (ADC). Beginners commonly confuse the -3dB cutoff frequency point with a "brick wall" where all high frequencies instantly vanish; in reality, a standard first-order passive filter only rolls off at -20dB per decade, meaning significant high-frequency energy still leaks through just above the cutoff threshold.
The Core Math: Designing a First-Order RC Low Pass Filter
Before you open a complex software tool, you need to understand the hand math for a basic resistor-capacitor (RC) network. The cutoff frequency ($f_c$) is the point where the output voltage drops to 70.7% (-3dB) of the input voltage. The governing formula is:
$f_c = \frac{1}{2 \pi R C}$
Let's design a filter to smooth a 5kHz PWM signal from an ESP32-WROOM-32 GPIO pin into a clean DC voltage for a 0-10V motor controller. To get a clean ripple, we want the cutoff frequency to be at least 10 times lower than the PWM frequency, so we will target $f_c = 500\text{ Hz}$.
1. Choose the capacitor first: Capacitors have fewer standard values than resistors. We will select a 100nF (0.1µF) X7R ceramic capacitor, which offers stable capacitance across voltage and temperature.
2. Calculate the resistor: Rearranging the formula to solve for R gives us $R = \frac{1}{2 \pi f_c C}$.
$R = \frac{1}{2 \times \pi \times 500 \times (100 \times 10^{-9})} = 3183\text{ }\Omega$
3. Select standard components: The nearest standard E24 resistor value is 3.3kΩ.
4. Verify the actual cutoff: Recalculating with 3.3kΩ and 100nF yields an actual $f_c$ of 482 Hz.
Final Design: 3.3kΩ Resistor + 100nF Capacitor | Cutoff: 482 Hz | Attenuation at 5kHz: ~20.3dB (90.4% reduction in voltage amplitude)
For a deeper look at the phase shift and impedance characteristics of passive networks, the All About Circuits RC filter tutorial provides excellent baseline schematics and Bode plot explanations.
Passive vs. Active: When to Add an Op-Amp
The biggest trap in low pass filter design is ignoring output impedance. In our passive RC example above, the output impedance of the filter is the 3.3kΩ resistor. If you connect that directly to a motor controller with a 10kΩ input impedance, you accidentally create a voltage divider. Your maximum output voltage will drop to roughly 75% of the ESP32's 3.3V logic level, and your cutoff frequency will shift upward.
To fix this, you use an active filter by placing an operational amplifier (like a TL072 or LM358) configured as a unity-gain buffer immediately after the RC network. Here is how the two approaches compare:
| Criteria | Passive RC Filter | Active Filter (Buffered / Sallen-Key) |
|---|---|---|
| Output Impedance | High (Equal to R) | Near Zero (Op-amp driven) |
| Component Count | 2 (1 Resistor, 1 Capacitor) | 4+ (Resistors, Caps, Op-Amp IC) |
| Power Requirement | None (Passive) | Requires VCC/VEE rails for Op-Amp |
| Roll-off Steepness | -20dB/decade (1st order) | -40dB/decade or steeper (2nd order+) |
| Signal Gain | Always < 1 (Attenuates slightly) | Can be unity (1) or amplified (>1) |
Choose passive when driving high-impedance inputs (like an Arduino ADC pin at 100MΩ). Choose active when driving low-impedance loads, when you need a steeper roll-off to kill noise faster, or when you need to amplify the signal simultaneously.
Where You Meet Low Pass Filters in Practice
You will rarely design a filter just for the sake of theory. On the bench or in the field, low pass filters solve three specific hardware problems:
- PWM to DAC Conversion: Microcontrollers without true digital-to-analog converters (DACs) use Pulse Width Modulation. A low pass filter integrates the high and low pulses into a steady average voltage. If your PWM is 1kHz, a 100Hz cutoff filter will yield a smooth DC line with minimal ripple.
- Audio Crossovers and Subwoofers: In speaker building, a 2nd-order passive LC (inductor-capacitor) low pass filter routes only the bass frequencies (typically below 80Hz to 120Hz) to the subwoofer, protecting it from high-frequency distortion and keeping the soundstage clean.
- ADC Anti-Aliasing: The Nyquist-Shannon sampling theorem dictates that you must sample a signal at least twice as fast as its highest frequency component. If your ESP32 is sampling an audio microphone at 10kHz, any noise above 5kHz will "fold back" and create false low-frequency artifacts. A strict active low pass filter set to 4kHz at the ADC input prevents this aliasing.
Using a Low Pass Filter Designer Tool vs. Hand Math
Hand math is perfect for 1st-order RC filters. But the moment you need a 2nd-order Sallen-Key or Multiple Feedback (MFB) topology, calculating the Q-factor, damping ratio, and component sensitivities by hand becomes a nightmare. This is where a dedicated low pass filter designer software tool earns its keep.
The Analog Devices Analog Filter Wizard is the industry standard for this. You input your desired filter type (Butterworth for flat passband, Chebyshev for steeper roll-off, or Bessel for linear phase), your cutoff frequency, and your stopband attenuation. The tool then calculates the exact resistor and capacitor ratios.
When using software designers, never ignore the Gain Bandwidth Product (GBWP) of the op-amp. If you design a 50kHz active filter but select an LM358 op-amp (which has a GBWP of roughly 1MHz), the op-amp will run out of internal gain and your filter will fail to attenuate high frequencies properly. Always choose an op-amp with a GBWP at least 50 to 100 times higher than your filter's cutoff frequency.
Software tools also account for standard component values (E24/E96 series). A common beginner mistake is calculating a required capacitance of 43.7nF, only to realize that value doesn't exist in the real world. Good filter designer tools will automatically scale your resistor values to match the nearest available 1% or 5% capacitor values.
Frequently Asked Questions
What is the best low pass filter designer software for beginners?
For beginners and intermediate makers, the Analog Devices Analog Filter Wizard is the most intuitive. It provides a visual Bode plot that updates in real-time as you tweak component values, and it automatically suggests standard E24/E96 resistor and capacitor pairings. For Texas Instruments users, the FilterPro tool (often integrated into their TINA-TI simulation suite) is equally powerful, though it has a slightly steeper learning curve for active topologies.
How do I calculate the low pass filter cutoff frequency for an LC circuit?
For a passive LC (inductor-capacitor) low pass filter, the formula changes because you are dealing with two reactive components. The resonant cutoff frequency is calculated as $f_c = \frac{1}{2 \pi \sqrt{L C}}$. LC filters are 2nd-order by default, meaning they roll off at -40dB/decade. However, they are prone to ringing (peaking at the cutoff frequency) if the circuit lacks sufficient resistance to dampen the resonance, which is why RC or active filters are usually preferred for low-power signal processing.
Why does my passive low pass filter output drop when I connect a load?
This is the loading effect. A passive RC filter relies on the resistor to drop voltage at high frequencies. When you connect a load (like a motor, a speaker, or a low-impedance ADC) to the output, that load acts as a second resistor in parallel with your capacitor. This alters the voltage divider ratio, dropping your maximum DC output voltage and shifting your cutoff frequency higher. To fix this, buffer the output with a unity-gain op-amp.
Can I use a low pass filter to remove 60Hz mains hum?
Technically yes, but practically it is a bad idea if your target signal contains frequencies near or above 60Hz. A low pass filter set below 60Hz (e.g., at 30Hz) will successfully block the 60Hz hum, but it will also destroy any audio, sensor, or data signals above 30Hz. To remove 60Hz mains hum without killing your high-frequency signal, you should use a notch filter (band-stop filter) tuned specifically to 60Hz, combined with proper physical shielding and twisted-pair wiring.






