Built-in project · no microcontroller

555 on the bench

A 555 astable with a scope on its output and its timing capacitor and a multimeter reading the average: the frequency, the duty and the mean all measured at once. There is no microcontroller in it: the simulator solves the 6 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.

Teaching? Assign it to your class in one click.

Intermediate About 15 minutes to build and run. Runs in your browser. Free, and no account needed.

The parts retail for about $5.45. On Mokxi they're free.

The circuit runs here once the page has loaded.

What you'll learn

  • How a 555 astable sets frequency with two resistors, one capacitor
  • Why the capacitor swings between 1/3 and 2/3 of supply
  • Reading frequency and duty cycle off an oscilloscope trace
  • Why a DC meter shows the average of a square wave
  • Why real parts miss textbook numbers, like a 3.3 V 555 output
  • Difficulty: Intermediate
  • Time: About 15 minutes
  • Parts: 6

How it works

A 555 timer chip is wired as an astable, which means it flips its output high and low forever. A 10k resistor from 5 V to the DIS pin, a second 10k resistor from DIS to the timing node, and a 100 nF capacitor from that node to ground set the speed.

The capacitor charges up toward 2/3 of the supply through both resistors, then drains down to 1/3 through the second one alone. The chip flips its output each time the capacitor reaches one of those levels. Charging is slower than draining, so the output is high longer than it is low.

The oscilloscope shows the output on CH1 and the capacitor on CH2. The multimeter reads DC volts on the output. A DC meter averages, so it reads about two thirds of the output height, around 2.2 V.

Parts list

6 parts, plus the jumper wires and 2 bench instruments. The parts retail for about $5.45; on Mokxi they're free, and so are the instruments.

Wiring table

Every connection, pin by pin, read from the circuit itself. Each row joins the pin on the left to the pin on the right, by a jumper wire or a breadboard strip.

Part and pinConnects to
Resistor, 10k Ω (1) pin 15 V
NE555 timer pin RESET5 V
NE555 timer pin VCC5 V
NE555 timer pin GNDGround
Capacitor, 100 nF pin 2Ground
Oscilloscope pin GNDGround
Multimeter pin COMGround
NE555 timer pin DISResistor, 10k Ω (1) pin 2
Resistor, 10k Ω (2) pin 1Resistor, 10k Ω (1) pin 2
NE555 timer pin THRNE555 timer pin TRIG
Resistor, 10k Ω (2) pin 2NE555 timer pin TRIG
Capacitor, 100 nF pin 1NE555 timer pin TRIG
Oscilloscope pin CH2NE555 timer pin TRIG
Oscilloscope pin CH1NE555 timer pin OUT
Multimeter pin VNE555 timer pin OUT

The notes that come with it

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 555 astable, with a scope on it and a meter reading its average.
//
// R1 = 10 k from the supply to pin 7, R2 = 10 k from pin 7 to the timing node,
// C1 = 100 nF from that node to ground. The capacitor charges to 2/3 of the
// supply through R1 and R2 and discharges to 1/3 through R2 alone:
//
//   high   =  0.693 x (R1 + R2) x C  =  1.386 ms
//   low    =  0.693 x R2 x C         =  0.693 ms
//   period =  2.079 ms  ->  481 Hz, high for 2/3 of it
//
// Three readings of one signal, and they have to agree:
//
//   CH1 (yellow)  the output. The strip under the screen says Vpp, the
//                 frequency and the duty, measured off the trace itself:
//                 about 474 Hz at 67%. That is a little under the 481 on
//                 paper, and CH2 is most of the reason: its 1 Mohm probe
//                 sits on the timing capacitor and takes a little of the
//                 current that charges it.
//   CH2 (blue)    the capacitor, sloping up to 2/3 of the supply and back
//                 down to 1/3. That sawtooth is where the timing comes from.
//   the meter     DC volts on the same output. A DC meter averages, so a
//                 square wave that is high for two thirds of every cycle
//                 reads two thirds of its height, 2.2 V.
//
// Two thirds of *its height*, not of the supply. A bipolar 555 cannot pull its
// output all the way up: it tops out around 3.3 V on a 5 V rail, which the
// scope shows and the meter then averages. That is the difference between
// reading a datasheet and measuring the part.
//
// Things to try. Make R2 100 k and the duty goes towards 50%, because the
// charge and discharge paths become nearly equal; the meter follows it down
// towards half the height. Make C1 1 uF and everything slows by ten, so turn
// the scope's time base up with the + button on its face. The circuit keeps
// running while you do, which is the point of having it there.

Troubleshooting

The usual mistakes with this circuit, and the fix for each.

  • The output never changes, or the scope trace is flat. This project
    Check that RESET and VCC are both on 5 V, and that TRIG and THR are joined together at the capacitor.
  • The frequency is far from about 480 Hz. This project
    Check the values: two 10k resistors and a 100 nF capacitor. A 1 uF capacitor slows everything by ten, so turn the scope's time base up.
  • The meter reads more than 2.2 V or looks like 3.3 V. This project
    The meter shows an average, not the peak. It should sit near two thirds of the output height, not the full 5 V supply.
  • The LED is dim, burns out, or the pin reads wrong because the resistor value is off. Resistor
    Read the color bands again. A 220 ohm to 330 ohm resistor suits a typical LED on 5 V. 10k is a common pull-up or pull-down value. Check with a multimeter if unsure.
  • A pull-up or pull-down resistor is missing, so the input floats and reads random values. Resistor
    Tie the input to 5 V or ground through about 10k. Or use INPUT_PULLUP and wire the switch to ground.
  • The output does nothing or stays high. NE555 timer
    Pin 8 goes to the supply, pin 1 to ground, and RESET (pin 4) must be tied high. Floating reset is the most common mistake.
  • The frequency is unstable or wrong. NE555 timer
    Tie pin 5 to ground through a 10 nF capacitor. In astable mode f is about 1.44 divided by (R1 + 2 x R2) x C. Watch the polarity of electrolytic caps.
  • An electrolytic capacitor heats up, bulges or pops. Capacitor
    Electrolytics have a polarity. The stripe marks the negative leg, which goes toward ground. Also keep the voltage under the rated value, such as 10 V or 16 V.

Change it and keep it

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