First-Order Low-Pass and High-Pass Filters
A temperature sensor's signal changes over seconds, but the wire to the microcontroller also picks up kilohertz switching noise. An audio input must block the DC bias of the previous stage but pass everything above 20 Hz. One resistor and one capacitor solve each problem. These first-order RC filters are the most common filters in electronics, and designing them well means knowing three things: where the corner is, how steep the skirt is, and what happens when the next stage loads the output. This lesson covers all three and the roadmap's lab project of building and measuring both types.
Two circuits, one corner
Both circuits are voltage dividers between and . Take the output across the capacitor and you get a low-pass; across the resistor, a high-pass:
Intuition from the limits: at low frequency the capacitor is nearly open, so the low-pass output follows the input and the high-pass output is nearly zero; at high frequency the capacitor is nearly a short, so the roles swap. At both have () and the low-pass phase is , the high-pass phase . Far from the corner each filter falls at (Decibels and Bode Plots): one decade past the unwanted signal is ten times smaller, not gone. In the time domain the same sets the step response (First-Order RC Circuits): .
Design: choose C, then R
Capacitors come in coarser value steps and wider tolerances than resistors, so pick a convenient first and compute , then round to a standard value. Keep well above the source resistance (or include the source resistance in ) and well below the load resistance.
Loading: the next stage is part of the filter
A load across the output changes both filters. For the low-pass, a Thevenin step (Thevenin and Norton Equivalents) at the capacitor gives
The pass-band gain drops below 1 and the corner moves up. The same Thevenin resistance sets the corner of a loaded high-pass, but its pass-band (high-frequency) gain stays 1. The cure is a load at least 10 to 100 times , or a buffer (an op-amp follower, planned in Analog Electronics).
Worked example
Given: a low-pass with and ; the output drives an input of .
Find: (E24 value), the actual corner, and the loaded DC gain and corner.
Solve:
Check: the load lowers the gain by 14 % and raises the corner by 16 %, both because the load "helps" pull the output towards ground. A load would cut these effects to under 2 %.
In Python
import numpy as np
R, C = 1.6e3, 100e-9
fc = 1 / (2 * np.pi * R * C)
print(f"f_c = {fc:.1f} Hz")
print(" f (Hz) LP dB LP deg HP dB HP deg")
for f in [100, fc, 1e4]:
x = f / fc
lp, hp = 1 / (1 + 1j * x), 1j * x / (1 + 1j * x)
print(f"{f:9.1f} {20*np.log10(abs(lp)):7.2f} {np.degrees(np.angle(lp)):7.1f}"
f" {20*np.log10(abs(hp)):7.2f} {np.degrees(np.angle(hp)):7.1f}")
for RL in [10e3, 100e3]:
Rp = R * RL / (R + RL)
print(f"R_L = {RL/1e3:5.0f} k: gain {RL/(R+RL):.3f} ({20*np.log10(RL/(R+RL)):.2f} dB),"
f" corner {1/(2*np.pi*Rp*C):.1f} Hz")f_c = 994.7 Hz
f (Hz) LP dB LP deg HP dB HP deg
100.0 -0.04 -5.7 -20.00 84.3
994.7 -3.01 -45.0 -3.01 45.0
10000.0 -20.09 -84.3 -0.04 5.7
R_L = 10 k: gain 0.862 (-1.29 dB), corner 1153.9 Hz
R_L = 100 k: gain 0.984 (-0.14 dB), corner 1010.6 Hz
Cross-check with SPICE: measure the corners
An AC sweep from 10 Hz to 100 kHz with 100 points per decade; meas interpolates the frequency where each output crosses , and finds the low-pass phase (in radians) at 1 kHz.
cat > rc.cir <<'EOF'
* RC low-pass and high-pass, R = 1.6k, C = 100n
V1 in 0 AC 1
R1 in lp 1.6k
C1 lp 0 100n
C2 in hp 100n
R2 hp 0 1.6k
.control
ac dec 100 10 100k
meas ac f_lp when vdb(lp)=-3.0103 fall=1
meas ac f_hp when vdb(hp)=-3.0103 rise=1
meas ac ph_lp find vp(lp) at=1k
.endc
.end
EOF
ngspice -b rc.cir 2>&1 | grep -E '^(f_|ph_)'f_lp = 9.947182e+02
f_hp = 9.948110e+02
ph_lp = -7.880460e-01
Both corners agree with to within (the small difference comes from interpolating between sweep points), and matches the hand value at 1 kHz.
Interactive: both filters on one source
The lab drives the two filters from one source. Slide the frequency through the corner and watch and trade places; their phases always differ by .
At the lab shows at and at . The slider moves only the low-pass corner, so you can see the two curves cross at a different place.
Guided lab: build and measure both filters
Hand calculation. ; low-pass at 100 Hz, at , at 10 kHz; the high-pass mirror image.
Simulation. The Python table, the SPICE sweep and the lab above.
What you would measure. Use a 1 % resistor and a film capacitor (5 % or 10 %). Drive each filter from a function generator at peak-to-peak and read input and output on a two-channel scope with 10× probes. Find the corner by tuning the frequency until the output is of the input (or the phase reads with the scope's measurement function). Expect between about and with a 10 % capacitor; measure the capacitor on an LCR meter first and the prediction tightens to the resistor's 1 % plus the meter's accuracy. Then add a load to the low-pass: the low-frequency output should drop to of the input (about peak-to-peak) and the corner rise to about . Feed a square wave at 100 Hz to see the same filter in the time domain: rounded edges through the low-pass, spikes through the high-pass.
Hazards and safe setup. Signal levels only; the generator, scope and circuit share one ground. Electrolytic capacitors are polarised and dislike the AC across them, so use a film or ceramic capacitor.
Pitfalls
- Forgetting the source resistance. A generator in series with moves by 3 %; with small the error is large.
- Expecting a brick wall. At a first-order low-pass still passes 45 % of the amplitude. For a steeper skirt use second order (Second-Order Passive Filters) or active filters.
- Cascading two RC sections and multiplying their gains. The second section loads the first; the result is not (ABCD cascades).
- Probe loading. A 1× scope probe adds about to the output node, which matters when itself is small.
Practice
- Design a high-pass with using . Which E24 resistor?
- A low-pass has , . How many dB does it attenuate a 50 kHz noise signal?
- Why does a load reduce the pass-band gain of the low-pass but not of the high-pass?
Answer
- , giving .
- ; .
- In the low-pass's pass band the capacitor is open and the output is set by the divider / . In the high-pass's pass band the capacitor is a short and the load sits directly across the source.
Test yourself
An RC low-pass has and . Its corner frequency is about…
At its corner frequency, the phase of an RC high-pass output relative to the input is…
A resistive load connected across an RC low-pass output moves the corner frequency…
- down
- up
- nowhere
- to zero
One decade above its corner, a first-order low-pass attenuates by about…