Filters
On this page
A sieve keeps the stones and lets the sand through: it sorts by size. A signal from a sensor is also a mixture, of a slow reading that you want and fast noise that you do not. A filter is a circuit that sorts a signal by how fast it changes, keeping one part and reducing the other.
See it
A sensor reading changes slowly, 2 times a second. It carries hum from the mains at 50 Hz. You add a simple low-pass filter with its cutoff at 10 Hz. What happens to the hum?
The upper line goes into the filter: a slow wave of 2 Hz with 50 Hz hum on it. The lower line comes out. The dashed line is the slow wave alone, which is what you want to keep. A high cutoff lets the hum through. A cutoff that is too low also shrinks the slow wave and makes it late.
The idea
The frequency of a signal is how many times it repeats each second, in hertz (Hz). A low-pass filter passes low frequencies and reduces high ones. A high-pass filter does the opposite, and removes a slow drift.
The simplest low-pass filter is a resistor R followed by a capacitor C to ground. Its cutoff frequency, fc, is where it begins to act. A second formula gives the share of a signal of frequency f that passes:
Vout ÷ Vin = 1 ÷ √(1 + (f ÷ fc)²)
R in ohms, C in farads, f and fc in hertz
Far below the cutoff almost everything passes. At the cutoff 70.7% passes. Ten times above it, about 10% passes. One resistor and one capacitor give only this gentle slope.
One worked number
A filter uses R = 16 kΩ and C = 1 µF. Where is its cutoff, and how much of a 50 Hz hum and of a 2 Hz reading passes?
Show the worked solution, 3 steps
- Find the cutoff
fc = 1 ÷ (2π × 16,000 Ω × 0.000001 F) = 9.95 Hz, which is about 10 Hz.
- Find the share of the hum
50 Hz is 5 times the cutoff. 1 ÷ √(1 + 5²) = 1 ÷ √26 = 0.196, so 19.6% of the hum passes.
- Find the share of the reading
2 Hz is 0.2 times the cutoff. 1 ÷ √(1 + 0.2²) = 1 ÷ √1.04 = 0.981, so 98.1% passes. The figure opens at this cutoff.
The mistake to avoid
A second trap: a very low cutoff looks clean, but it also hides fast changes that are real, and the reading arrives late. The lesson on filters and frequency response shows how to choose.
Check yourself
A low-pass filter in front of an analog input uses R = 3.3 kΩ and C = 100 nF. What is its cutoff frequency?
A low-pass filter has its cutoff at 1 kHz. A 1 kHz wave of 1 V goes in. What comes out?
A cold room logger has a very low cutoff to give a smooth temperature line. The door is left open for a short time, the air warms and cools again, and the logged line hardly moves. Why?
Where you meet it
- Sensor inputsA resistor and a capacitor in front of an analog input keep mains hum and motor noise out of a pressure or temperature reading.
- Averaged readingsA meter that shows the average of the last minute is a low-pass filter made in software.
- Variable speed drivesFilters stop the switching noise of a drive from reaching nearby instruments.
- Vibration monitoringA high-pass filter removes the slow movement of a machine, so the fast vibration of a worn bearing can be seen.
- A filter sorts a signal by frequency. Low-pass keeps the slow part, high-pass keeps the fast part.
- Cutoff of a resistor and capacitor: fc = 1 ÷ (2π R C).
- The cutoff is the start of a slope: 70.7% passes at the cutoff, about 10% at ten times the cutoff.
- Too low a cutoff also removes real fast changes and makes the reading late.
Discussion
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
My notes on this page
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
Notes on earlier wording
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.