Built-in project · no microcontroller

RC filter on the scope

A signal generator into an RC low pass with both ends on a two-channel scope: the textbook corner frequency, drawn. There is no microcontroller in it: the simulator solves the 4 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.

BeginnerRuns in your browser. Free, and no account needed.

RC filter on the scopelive0.000 s 0.00x
Click to open it in the editor
The circuit itself, running here on the simulator. Press what can be pressed; click anything else to open it in the editor.

How it works

There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.

sketch.ino
// A generator into an RC low pass, both ends on the scope.
//
// R = 1.6 k, C = 100 nF. The corner is where the capacitor's reactance equals
// the resistance:
//
//   f0 = 1 / (2 pi R C) = 1 / (2 pi x 1600 x 100e-9) = 995 Hz
//
// The generator is set to 1 kHz, which is as good as on the corner, so the
// filtered trace (blue, CH2) should come out at
//
//   |H| = 1 / sqrt(1 + (2 pi f R C)^2) = 0.705
//
// of the yellow one, and a whole eighth of a cycle behind it. 2 V in, 1.41 V
// out. Count the divisions: 2 V/div vertically, 400 us/div across.
//
// Things to try. Take the frequency to 100 Hz and the two traces sit on top of
// each other; take it to 10 kHz and the blue one nearly vanishes, down by a
// factor of ten. Swap the generator to a square wave and watch the RC round
// the corners off, which is the same filter doing the same thing to every
// harmonic at once. Make C ten times bigger and the corner moves down a
// decade.

Parts list

5 parts, plus the jumper wires. Every one is in the editor's parts bin.

How it is wired

3 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.

  • Ground: Signal generator pin GND; Capacitor, 100 nF pin 2; Oscilloscope pin GND
  • Signal generator pin OUT; Resistor, 1.6k Ω pin 1; Oscilloscope pin CH1
  • Resistor, 1.6k Ω pin 2; Capacitor, 100 nF pin 1; Oscilloscope pin CH2

Change it and keep it

Open it in the editor, change the circuit or the code, and keep your version in a free account.