What a filter does
A filter passes some frequencies and attenuates others. The common types are low-pass (passes low frequencies), high-pass (passes high frequencies), band-pass (passes a band in the middle) and notch (removes one narrow band). Analog filters are built from resistors, capacitors, inductors and, for active filters, op amps.
A filter design balances several things: the cutoff frequency, how steeply the response falls outside the passband, how flat the passband is, and how much the filter delays different frequencies.
Passive RC filters
A single resistor and capacitor make a first-order low-pass filter. Its cutoff frequency, where the output has fallen to about 70.7% of the input, is:
f_c = 1 / (2πRC)
Worked example. With R = 10 kΩ and C = 10 nF:
f_c = 1 / (2π × 10,000 × 10 × 10⁻⁹) ≈ 1.6 kHz
Above the cutoff, the response falls by about 20 dB per decade (a factor of 10 in frequency).
Passive filters are simple and need no power, but they have no gain, and their response changes with the load they drive. For a stable response, use an active filter.
Active filters with op amps
An active filter uses an op amp for gain and buffering, so the load does not change the response. A common second-order choice is the Sallen-Key low-pass. For the unity-gain version, the cutoff is:
f_c = 1 / (2π √(R1 R2 C1 C2))
With equal resistors, the ratio C1 = 2 × C2 gives a Q of about 0.71. That is the Butterworth response, which has a flat passband. The Q is the sharpness of the response near the cutoff.
Worked example. R1 = R2 = 10 kΩ, C2 = 10 nF and C1 = 20 nF give:
f_c = 1 / (2π × 10,000 × √(20 nF × 10 nF)) ≈ 1.1 kHz
The response falls by about 40 dB per decade above cutoff. The op amp must have enough bandwidth to work well above the cutoff frequency, so check its gain-bandwidth product in the datasheet.
Choosing a response shape
- Butterworth: maximally flat passband with a moderate roll-off. A good default.
- Chebyshev: steeper roll-off, with a small ripple in the passband.
- Bessel: nearly constant delay across frequencies, with a gentler roll-off. Useful when pulse shape matters.
Filter design tools
Use three kinds of tool together:
- Circuit simulators (for example SPICE-based tools), to check the response before you build.
- Manufacturer filter design software and online calculators. TI’s FilterPro is one example. These produce starting component values for a chosen response.
- Measurement. Build the filter and check the response with a signal generator and oscilloscope.
Tools give starting values. Check the component tolerances and noise, because they change the real response.
Common mode chokes and EMI filters
A common mode choke is a component with two windings on a shared core. It helps to suppress electromagnetic interference (EMI) on a pair of wires:
- Common-mode current flows in the same direction on both wires. It sees high impedance from the choke.
- Differential current flows in opposite directions. Its magnetic fields cancel in the core, so the choke adds little impedance to it.
The choke therefore blocks noise that appears on both wires while passing the wanted signal between them. In a full EMI filter, a choke is usually combined with capacitors: X capacitors connect across the line, and Y capacitors connect each line to earth.
Safety notes for mains-connected filters
Mains-connected EMI filters need safety-rated X and Y capacitors, correct spacing between conductors, proper fusing and correct earth bonding. Y capacitors leak a small current to earth, and safety standards limit that current. A mistake can cause a shock or a fire.
For mains work, use a certified off-the-shelf filter module, and follow the applicable safety standards. Do not build a mains filter from an informal hobby diagram. Low-voltage DC filters are much simpler, but component ratings and layout still matter.