RC Low-Pass Filter
A resistor and capacitor let slow signals through and soften fast ones. Watch both on an oscilloscope.
- Intermediate
- Analog Electronics
- 5 parts
Opens in your browser with the parts, wiring and code already in place. Press Run to watch it work, then change anything you like.
How it works
A function generator produces a 1 kilohertz sine wave swinging between 0 and 5 volts. It passes through a 1 kilohm resistor into a 0.1 microfarad capacitor to ground. A capacitor charges and discharges through the resistor, so it cannot follow signals that change faster than the product of the two, here 0.1 milliseconds. Slow signals pass almost unchanged and fast ones are weakened and delayed. This is a low-pass filter, and its corner frequency is 1 divided by 2 pi R C, about 1.6 kilohertz.
The oscilloscope shows both ends. Channel 1, in yellow, is the generator, and channel 2, in blue, is the voltage across the capacitor. At 1 kilohertz you should see the blue wave a little smaller than the yellow and lagging behind it. Move the frequency up and the blue trace shrinks and slides further behind. There is no sketch, since the circuit does all of the work.
Parts
- Function Generator
- Resistor
- Capacitor
- GND
- Oscilloscope
Wiring
- Function Generator OUT → Resistor A
- Resistor B → Capacitor +
- Capacitor - → GND
- Function Generator GND → GND
- Oscilloscope CH1 → Function Generator OUT
- Oscilloscope CH2 → Resistor B
- Oscilloscope GND → GND
Arduino code
// RC Low-Pass Filter
// Press Run: channel 1 (yellow) is the input, channel 2 (blue) the filtered output.
// There is no sketch to write: this is a circuit, so there is nothing for code to do.
void setup() {
}
void loop() {
}
Try changing it
- Select the function generator and change the frequency to 5000. The output shrinks to about a third of the input and falls well behind it.
- Change the frequency to 100 and the two traces become almost the same, because a slow signal passes through easily.
- Select the generator and change the waveform to square. The capacitor rounds off the sharp edges into curves, and you can see the charging and discharging directly.
Next challenge
More projects in Analog Electronics
- Voltage DividerTwo resistors share a supply voltage in proportion to their values. Measure the middle…
- Voltage ReaderAn Arduino reads a two-resistor divider with analogRead and prints the voltage. Change a…
- Thermistor ThermometerA thermistor and a fixed resistor form a divider the Arduino reads. The sketch turns the…
- LED Current LimitingA resistor sets how much current an LED carries. Put a multimeter in series and see it.