The passive RC filter
An air-conditioner's temperature sensor gives a slow 1.0 V signal. Mains wiring beside its cable adds 0.5 V of 50 Hz hum. A filter passes some frequencies and blocks others: keep the slow signal, drop the hum.
The simplest filter is a passive RC low-pass: a 10 kΩ resistor in series and a 10 µF capacitor to ground. The output is the capacitor's voltage. Passive means it needs no power supply; an RC filter's gain never goes above 1.
A capacitor's impedance is ZC = 1/(jωC), with ω = 2πf. At 0 Hz it is an open circuit, so the signal stays. At 50 Hz, |ZC| = 318 Ω, far below 10 kΩ, so the hum current takes the capacitor to ground.
Frequency response
R and C form a voltage divider. The transfer function is the output phasor over the input phasor: H = ZC/(R + ZC) = 1/(1 + jωRC). Here RC = 0.1 s, the time constant. The Bode plot shows |H| in decibels.
The corner, or cutoff, is where ωRC = 1: fc = 1/(2πRC) = 1.59 Hz. There |H| = 1/√2 = 0.707, which is −3.01 dB, and the output lags by 45°. The output power is half.
Above fc, each tenfold rise in frequency cuts |H| tenfold: −20 dB per decade. At 50 Hz, |H| = 1/√(1 + (50/1.59)²) = 0.0318, or −29.9 dB. The hum shrinks about 31 times and lags 88.2°.
Loading and the active filter
Now hang a 10 kΩ load straight across C. It draws current, so the divider changes: the gain falls to 0.5 (−6.02 dB) and the corner moves to 3.18 Hz. A passive filter's response depends on what it drives.
An active filter adds an amplifier, here an op-amp, which needs a power supply. Its + input draws no current, so the RC sees no load and keeps fc = 1.59 Hz. Its output drives the load without sagging.
Rf and Rg set a non-inverting gain K = 1 + Rf/Rg = 1 + 10k/10k = 2, which is +6.02 dB. So H = 2/(1 + jf/fc). The curve moves up 6 dB, and the corner stays at 1.59 Hz.
The output holds the signal, ×2: 2.00 V. The hum is 0.5 × 0.0318 × 2 = 0.0318 V. It was 50 % of the signal and is now 1.6 %. For more cut, use a second-order filter.
The working
# step 1/10 · hum
input vin(t) = 1.0 + 0.5·sin(2π·50·t) V
signal 1.0 V (slow, almost 0 Hz)
hum 0.5 V peak at 50 Hz
Kuwait mains: 240/415 V, 50 Hz.
The hum is 50 % of the signal.
Values are illustrative. The op-amp is ideal: no input current, zero output impedance and unlimited bandwidth. The plots show sinusoidal steady state, after the start-up transient (about 5τ = 0.5 s) has died away. Every number is computed from this model.