Electronics From Zero Search/

Explainer · Intermediate · about 30 minutes

Filters and frequency

A resistor and a capacitor together can let slow signals through and block fast ones, or the other way round. That simple idea removes noise from sensors, turns PWM into a steady voltage, and shapes the sound in every speaker. Change the parts and the input frequency, and watch what comes out.

The idea

A capacitor needs time to charge. Feed a resistor and capacitor a slowly changing voltage and the capacitor keeps up; change it quickly and the capacitor cannot follow.

  • Low-pass: take the output across the capacitor. Slow signals pass; fast ones are reduced.
  • High-pass: swap the parts and take the output across the resistor. Fast signals pass; slow ones, and steady DC, are blocked.

The dividing line is the cutoff frequency:

fc = 1 ÷ (2π × R × C)

At fc the output is 70.7% of the input (−3 dB, half the power), shifted by 45°. Far beyond fc, each tenfold change in frequency changes the output tenfold (20 dB per decade).

Try it

Filter circuit
Cutoff fc—
Output ÷ input—
In decibels—
Phase shift—

Frequency response

gain (dB) your frequency −3 dB

What goes in and what comes out

input output

Model: ideal resistors and capacitors driven by an ideal source, with nothing connected to the output. The two-stage and band-pass circuits assume a buffer (an op-amp follower) between stages, so one stage does not load the next. Without buffers, real stages interact and the results differ.

Where you meet filters

  • PWM to a steady voltage: a low-pass filter with fc well below the PWM frequency leaves just the average. This is a cheap digital-to-analogue converter.
  • Quieter sensor readings: a low-pass filter before an ADC removes fast noise from a slow signal such as temperature.
  • Blocking DC: a capacitor in series (a high-pass filter) passes an audio signal but not the steady voltage it rides on.
  • Speakers and tone controls: crossovers send low frequencies to the woofer and high ones to the tweeter.
  • Button debouncing: a small low-pass filter smooths out the rapid bouncing of a switch's contacts.
  • On the oscilloscope: the sandbox low-pass example drives a real RC circuit at its cutoff frequency; probe 2 shows 70.7% of probe 1, an eighth of a cycle (45°) behind. There is a high-pass example too.

Check your understanding