An electrical filter is a circuit that selectively passes or blocks specific frequencies of a signal or power waveform while attenuating others. In a physical circuit, a filter changes the frequency response—altering the amplitude and phase of AC signals or stripping high-frequency switching noise from a DC power rail. Builders commonly confuse a simple decoupling capacitor (which merely provides local high-frequency charge storage) with a true multi-pole filter, or they mix up power line EMI filters (which block RF interference on AC mains) with signal processing filters (which shape audio or sensor waveforms).

Choosing the right topology depends entirely on whether you are cleaning up a low-voltage DC rail, shaping an analog sensor signal, or blocking radio-frequency interference (RFI) from entering your enclosure. According to the All About Circuits textbook on AC filters, understanding the cutoff frequency and the impedance of your source and load is the mandatory first step before selecting components.

Core Filter Topologies: RC, LC, and EMI

Different circuit environments demand different filtering approaches. A passive RC (Resistor-Capacitor) network is cheap and ideal for low-current signal lines, while an LC (Inductor-Capacitor) network handles high-current power rails without the resistive voltage drop. For mains AC or high-speed digital buses, dedicated EMI (Electromagnetic Interference) filters use complex internal topologies (common-mode chokes and Y-capacitors) to meet regulatory emissions standards.

Topology Best Application Typical Cutoff Range Current Handling Avg. Component Cost
RC Low-Pass ADC inputs, audio lines, slow sensors 10 Hz – 100 kHz Low (< 20 mA) $0.02 – $0.05
LC Pi Filter SMPS DC outputs, motor driver rails 1 kHz – 5 MHz High (1A – 30A+) $0.40 – $2.50
Ferrite Bead + Cap I2C/SPI lines, digital IC VCC pins 10 MHz – 1 GHz Medium (up to 2A) $0.10 – $0.25
AC Mains EMI AC/DC power supply inlets 150 kHz – 30 MHz High (6A – 20A) $4.00 – $12.00
Safety Warning: When installing AC Mains EMI filters (like the Schurter 5110 series), you are working with lethal voltages. Always de-energize the circuit, verify dead with a CAT III/IV multimeter, and ensure the filter's ground pin is tied to a true earth ground. NEC-style guidance requires proper bonding; your local AHJ has final authority on mains wiring.

Worked Numeric Example: Filtering an ESP32 ADC Input

The ESP32-WROOM-32 is notorious for its noisy internal SAR (Successive Approximation Register) ADC. If you are reading a 10kΩ NTC thermistor on GPIO 34, you will likely see jitter caused by internal Wi-Fi RF bursts and external 500 kHz switching noise from a nearby buck converter. To stabilize the reading, we design a hardware RC low-pass filter.

The Goal: Pass the slow-changing DC temperature signal (which changes at maybe 0.1 Hz) but block 60 Hz mains hum and 500 kHz switching noise.

Component Selection:
We choose a R = 10 kΩ resistor and a C = 100 nF (0.1 µF) X7R ceramic capacitor. We place the resistor in series with the signal line, and the capacitor from the ADC pin to GND.

The Math:
The cutoff frequency (-3dB point) is calculated as:
f_c = 1 / (2π × R × C)
f_c = 1 / (2 × 3.14159 × 10,000 × 0.0000001)
f_c ≈ 159.15 Hz

The Result:
At the 159 Hz cutoff, the signal is attenuated by 3dB. By the time we reach the 500 kHz buck converter noise (over three decades higher), a single-pole RC filter attenuates the noise by roughly -70 dB, effectively flattening the ADC readings. The Espressif ESP32 Hardware Design Guidelines explicitly recommend adding this exact RC network to ADC pins when measuring slow DC signals to achieve reliable 12-bit resolution.

Where You Meet Filters in Practice

You will encounter filtering requirements across almost every domain of electrical and electronics work. Recognizing the application dictates the component you buy.

1. Switch-Mode Power Supply (SMPS) Outputs

A cheap 12V 5A LED driver will output a DC voltage with a massive 100 mV peak-to-peak ripple at 100 kHz. If this powers a sensitive analog audio preamp, you will hear a whining buzz. Here, you use an LC Pi filter. A 10 µH power inductor (rated for at least 6A saturation current) in series with the positive rail, flanked by two 470 µF low-ESR electrolytic capacitors to ground, will drop that high-frequency ripple into the microvolt range without wasting power as heat.

2. High-Speed Digital Buses (I2C / SPI)

When routing I2C lines off-board to a sensor, the wires act as antennas picking up RF energy. Adding a standard resistor will ruin the rise-time of the digital edges. Instead, use a ferrite bead (like the Murata BLM18PG121SN1D, which offers 120Ω impedance at 100 MHz but near-zero DC resistance). Combined with a 33 pF capacitor to ground, this forms a low-pass filter that kills RF interference but leaves the 400 kHz I2C clock edges perfectly intact.

3. Mains AC Inlets

Any device with a switching power supply or a triac-based motor controller generates common-mode noise that travels back out the AC cord, potentially failing FCC/CE emissions testing. An AC EMI inlet filter (such as the Schurter 5110.0333.1) contains a common-mode choke and Y-capacitors. The Texas Instruments filter design literature notes that common-mode chokes are uniquely effective here because they present high impedance to noise currents that flow in the same direction on both Line and Neutral, while allowing the 50/60 Hz differential power current to pass unimpeded.

Frequently Asked Questions

What filter do I need to reduce 60Hz hum in an audio circuit?

To eliminate 60 Hz mains hum in an audio signal path, a simple passive RC filter is usually a bad choice because it will also roll off the low-end bass frequencies (20 Hz - 80 Hz) of your audio. Instead, you need an active notch filter (band-stop filter) tuned exactly to 60 Hz (or 50 Hz in Europe) using a dual-T op-amp topology, or you must solve the root cause by implementing a star-grounding scheme and using twisted-pair shielded cables to prevent the 60 Hz magnetic field from inducing current in your signal loops.

What filter capacitor size should I use for a 12V DC power supply?

For a standard 12V DC linear power supply using a full-wave bridge rectifier, the rule of thumb for the primary reservoir filter capacitor is 1,000 µF per ampere of load current. Therefore, a 2A load requires a minimum 2,000 µF capacitor rated for at least 25V (always use a voltage rating at least 1.5x to 2x the nominal DC output to handle ripple and transient spikes). If you are using a switching buck converter, you do not need massive reservoir caps; instead, use low-ESR ceramic or polymer capacitors in the 22 µF to 100 µF range to handle the high-frequency switching ripple.

What filter is best for suppressing EMI on an ESP32 I2C bus?

For an ESP32 I2C bus running at 400 kHz (Fast Mode), the best filter is a ferrite bead paired with a small ceramic capacitor. Place a surface-mount ferrite bead (e.g., 600Ω at 100 MHz) in series with the SDA and SCL lines, and add a 22 pF to 47 pF ceramic capacitor from each line to ground near the sensor. Do not use standard resistors for this, as they will interact with the bus capacitance and destroy the sharp rising edges required for I2C acknowledgement bits, leading to bus lockups and I2C timeout errors in your Arduino/ESP-IDF code.