A low pass filter allows signals below a specific cutoff frequency to pass while attenuating higher frequencies, whereas a high pass filter does the exact opposite, blocking low frequencies and passing high ones. In a real circuit, these filters change the frequency domain of a signal by stripping away high-frequency noise (like EMI or PWM switching ripple) or blocking unwanted low-frequency components (like DC offset or 60Hz mains hum). The most common mistake makers and junior engineers make is confusing the -3dB cutoff frequency with a 'brick wall' where the signal abruptly drops to zero; in reality, a standard first-order passive filter only rolls off gradually at -20dB per decade.
Think of a low pass filter like a heavy, sluggish door: a slow, steady push (low frequency) opens it easily, but a rapid, high-frequency tapping just vibrates the handle without moving the door. To truly understand how to deploy these in your designs, we need to look at the math, the physical components, and the specific topologies that solve real bench problems.
The Math and Mechanics: A Worked RC Filter Example
The most fundamental building block for filtering is the passive RC (Resistor-Capacitor) network. The cutoff frequency ($f_c$)—the exact point where the signal's power is halved and the voltage drops to 70.7% of its input—is calculated using a fixed formula:
f_c = 1 / (2 × π × R × C)Where R is resistance in Ohms, C is capacitance in Farads, and f_c is the cutoff frequency in Hertz.
Let us walk through a concrete numeric example. Suppose you are using an ESP32 DevKit v1 to generate a 5kHz PWM signal, and you want to smooth this digital pulse train into a pseudo-analog DC voltage to drive a 0-10V industrial dimmer via an op-amp. You need a low pass filter with a cutoff frequency well below the 5kHz switching frequency to eliminate the ripple. Let us target a 500Hz cutoff.
If we select a standard 10kΩ resistor to keep the impedance high enough that it does not overload the ESP32 GPIO pin, we can solve for the capacitor:
C = 1 / (2 × 3.14159 × 10,000 × 500)C = 1 / 31,415,900C ≈ 0.0000000318 Farads, or 31.8nF.
Since 31.8nF is not a standard E12 series value, we select the closest standard component: a 33nF (0.033µF) ceramic capacitor (such as a KEMET C315C330K5G5TA). Plugging 33nF back into the formula yields an actual cutoff frequency of roughly 482Hz. At 5kHz (one decade above our cutoff), this first-order filter will attenuate the PWM ripple by approximately -20dB, reducing the 3.3V peak-to-peak ripple down to about 330mV. If that ripple is still too high for your analog dimmer, you would need to cascade a second filter stage or lower the cutoff frequency further by increasing the resistor to 100kΩ and dropping the capacitor to 3.3nF.
Where You Meet Low Pass and High Pass Filters in Practice
You rarely build filters just for the sake of theory; they are critical conditioning stages in almost every mixed-signal and power design. Here is where you will physically wire them on the bench.
1. PWM to Analog Conversion (DAC Smoothing)
Microcontrollers like the Arduino Uno or ESP32 do not have true analog voltage outputs; they simulate them using Pulse Width Modulation (PWM). A low pass RC filter integrates these rapid on/off pulses into a steady DC voltage. If your PWM frequency is 490Hz (the default on many Arduino pins), your low pass filter cutoff must be around 10Hz to 20Hz to achieve a flat DC line, requiring large electrolytic capacitors (e.g., 10µF) paired with high-value resistors.
2. Audio Crossovers and Speaker Protection
In audio systems, high pass filters protect tweeters from low-frequency bass energy that could physically tear the delicate voice coil. A simple first-order high pass filter for a tweeter consists of a non-polarized capacitor wired in series with the speaker. Conversely, woofers use a low pass filter (an inductor in series, or a capacitor in parallel to ground) to block high-frequency treble. According to Analog Devices MT-202 Tutorial, understanding the impedance curve of the speaker is critical here, as the speaker's varying resistance will shift the filter's actual cutoff frequency in real-time.
3. Sensor Debouncing and EMI Rejection
When running a long wire from a remote thermistor or a mechanical limit switch back to a microcontroller ADC, the wire acts as an antenna, picking up 60Hz mains hum and RF interference. Placing a simple low pass filter (e.g., 1kΩ and 100nF) directly at the microcontroller pin creates a 1.59kHz cutoff, shorting high-frequency RF noise to ground while letting the slow-changing DC sensor voltage pass untouched.
Passive vs. Active Filters: Choosing the Right Topology
While passive RC filters are cheap and require no power supply, they suffer from a fatal flaw in complex circuits: loading effects. If you connect a low-impedance load (like an 8Ω speaker or a 1kΩ ADC input) to the output of a passive filter, the load resistance parallels with your filter resistor, drastically shifting the cutoff frequency and attenuating your signal amplitude.
To solve this, we use active filters, which incorporate an operational amplifier (like the ubiquitous TL072 or LM358) to buffer the output and provide gain. Below is a decision matrix to help you choose the right topology for your build.
| Criteria | Passive RC Filter | Active Filter (Op-Amp Sallen-Key) |
|---|---|---|
| Power Requirement | None (Zero quiescent current) | Requires dual or single supply rails (e.g., ±12V or 5V) |
| Signal Gain | Always ≤ 1 (Insertion loss) | Can be ≥ 1 (Unity gain or amplification) |
| Impedance Buffering | Poor (Cutoff shifts with load) | Excellent (Op-amp isolates load from RC network) |
| Roll-off Steepness | -20dB/decade per stage | -40dB/decade or steeper per stage easily achieved |
| Best Use Case | Simple PWM smoothing, basic EMI snubbing | Precision audio crossovers, anti-aliasing for ADCs |
For a deep dive into calculating the exact resistor and capacitor ratios for active topologies, the Texas Instruments SLOA093 Application Note remains the definitive bench reference for designing Sallen-Key and Multiple Feedback (MFB) active filters without getting bogged down in complex pole-zero math.
Frequently Asked Questions
How do I calculate the cutoff frequency for an RC low pass filter?
Use the formula f_c = 1 / (2 × π × R × C). Ensure your units are in base SI values before calculating: Ohms for resistance and Farads for capacitance. For example, a 10kΩ resistor and a 0.1µF (100nF) capacitor yields a cutoff of approximately 159Hz. Remember that this frequency represents the -3dB point, meaning the output voltage will be 70.7% of the input voltage at this exact frequency, not zero.
What is the difference between a low pass and high pass filter in audio crossovers?
In a basic passive audio crossover, a high pass filter for a tweeter places a capacitor in series with the speaker, which blocks DC and low-frequency bass while allowing high-frequency treble to pass. A low pass filter for a woofer places a capacitor in parallel to ground (often paired with a series inductor), which shunts high-frequency treble away from the speaker while letting the bass frequencies reach the voice coil.
Why does my low pass filter output look like a triangle wave instead of smooth DC?
If you are trying to smooth a PWM signal and the oscilloscope shows a triangle or sawtooth wave, your cutoff frequency is too close to the PWM switching frequency. A first-order RC filter needs the PWM frequency to be at least one to two decades (10x to 100x) higher than the filter's cutoff frequency to achieve a flat DC line. To fix this, either increase the resistor value, increase the capacitor value, or increase the microcontroller's PWM frequency via timer registers.
Can I cascade two passive RC filters to get a steeper -40dB/decade roll-off?
You can physically wire them in series, but you will not get a true -40dB/decade Butterworth response because of impedance interaction. The second RC stage will load down the first stage, altering the cutoff frequencies of both and creating a sluggish, poorly damped response. To properly cascade filter stages for a steep roll-off, you must buffer each stage with a unity-gain op-amp (voltage follower) to isolate their impedances, effectively turning it into an active filter design.






