Full Stack Electronics · Stage One · Experiment 1

Experiment 1: The Reference 555

Build a blinking LED circuit, then measure its timing and capacitor voltage.

Start with an NE555 timer chip and a blinking LED. You'll wire the circuit and check that it runs. Then you'll use the oscilloscope to see how the capacitor voltage controls each blink. I'll guide you through the wiring, the instrument settings and the first measurements.

This build gives you a reference for the timers you'll build later. Your readings can differ a little from mine. Record the behaviour and your measurements. Keep the board assembled so you can compare it with the next build.

You will need

What the 555 is

It turns a resistor and a capacitor into a time interval. When a resistor feeds current into a capacitor, the capacitor charges at a rate that the two parts set together. The 555 watches that charging. It decides when the voltage is high enough or low enough, and it acts on that decision. Depending on the wiring, it repeats this continuously or does it once.

The blocks you build later each do one part of that job. Two comparators compare the capacitor voltage with two fixed levels. A latch (a one-bit memory circuit) remembers which comparator fired last. A transistor drains the capacitor, and an output stage drives the load.

The blinker circuit of Figure 1-1 below, with the 555 drawn as its blocks: a three-resistor divider, two comparators, a latch and a discharge transistor. Moving dots show the current. The output drives the same red LED as the breadboard circuit. On the right, the capacitor voltage is teal and the output is gold. Red marks the two voltage levels that the chip watches, and each decision that it makes.

Build the classic blinker

The circuit in Figure 1-1 charges and discharges capacitor C1 repeatedly. C1 charges through both timing resistors, R1 and R2, and discharges through R2 only. The LED is on during charging and off during discharging. We'll look at those two parts of the cycle on the oscilloscope.

Schematic drawing in the workbook style. The 555 is a grey DIP package in its physical pin order, with the notch to the left. Pins 8, 7, 6 and 5 run across the top, and pins 1, 2, 3 and 4 across the bottom. The red positive line runs from the +5 V supply at the top left to pin 8. It continues around the right side of the chip to pin 4 (RESET). R1 (10 kΩ) connects the +5 V line to pin 7. R2 (10 kΩ) connects pin 7 to pin 6. A wire connects pin 6 around the chip to pin 2, so THRESHOLD and TRIGGER both watch the timing capacitor C1. C1, a 10 µF electrolytic, connects that node to the blue ground line. Pin 3 connects to the LED anode, and R3 (220 Ω) connects the LED cathode to ground. Pin 1 connects to ground. C2, a 0.01 µF ceramic capacitor, connects pin 5 (CONTROL) to ground. Wire bridges show where wires cross without a connection. A components table lists R1, R2, R3, C1, C2 and IC1.
Figure 1-1: The astable: a circuit that switches repeatedly without an external trigger. R1 (from +5 V to pin 7) and R2 (from pin 7 to the capacitor) carry the charging current. R2 alone carries the discharge current into pin 7. The capacitor voltage swings between one-third and two-thirds of the supply voltage. THRESHOLD (pin 6) and TRIGGER (pin 2) both watch that one capacitor node. OUTPUT (pin 3) drives the LED through R3. RESET (pin 4) connects to +5 V, so the reset stays inactive.

View the chip from above with its notch at the top. Pin 1 is then at the top left. Count down the left side and then up the right side, as Figure 1-2 shows. The circuit drawings turn the chip so that its notch faces left. The pin numbers stay the same, so use them to check each connection.

Pinout drawing in the workbook style: the 555 as a grey DIP-8 seen from the top, with the locating notch at the top edge. Down the left side: pin 1 GND, pin 2 TRIGGER, pin 3 OUTPUT, pin 4 RESET. Up the right side: pin 5 CONTROL, pin 6 THRESHOLD, pin 7 DISCHARGE, pin 8 VCC. Thin arrows beside each side show the count down the left and up the right. A line below reads: pins count anticlockwise from the notch.
Figure 1-2: Which pin is which on the 555.
Breadboard layout drawing, top view. A 555 straddles the centre gap of a half-size board, with the notch to the left. R1 (10 kΩ) connects the top red rail to the column of pin 7. R2 (10 kΩ) connects the column of pin 7 to the column of pin 6. A green jumper connects pins 6 and 2. The 10 µF electrolytic connects the column of pin 2 to the bottom blue rail, with its negative stripe towards ground. A red jumper connects pin 8 to the top red rail. Another red jumper connects pin 4 to the bottom red rail. A blue jumper connects pin 1 to the bottom blue rail. At the right end of the board, a red jumper joins the two red rails and a blue jumper joins the two blue rails. A yellow wire connects pin 3 to the LED anode, which has a red + mark. The LED straddles the centre gap with its cathode above the gap. A vertical 220 Ω resistor connects the cathode to the top blue ground rail. The electrolytic has a blue − mark at its negative lead. A yellow 0.01 µF ceramic capacitor connects pin 5 to the next column. A short blue wire connects that column to the top ground rail. Supply leads marked +5 V and GND enter columns 1 and 2 at the left. Column 3 is empty, and the circuit starts in column 4.
Figure 1-3: Breadboard layout for the repeating blinker. The drawing uses a half-size board. The same connections fit on a full-size BB830. Follow the connected columns and the pin numbers. You can place the circuit anywhere on the board.

Check the capacitor polarity before you apply power. The stripe on the 10 µF electrolytic marks its negative lead. Connect that lead to ground. A reversed capacitor can be damaged, and it can become hot or vent. Turn the supply output off before you move any component or wire.

  1. Keep the supply disconnected. Place the NE555 across the centre gap of the breadboard. The long strips along the board edges are the power rails. A red line marks a positive rail and a blue line marks a ground rail. Join the two positive rails with a jumper. Join the two ground rails with a jumper. Connect pin 8 and pin 4 to a positive rail. Connect pin 1 to a ground rail. On some boards, each rail is split at the middle, with a break in its red or blue line. If your board has such a break, add a short jumper across it.
  2. Add the timing network. Connect R1 (10 kΩ) from the positive rail to pin 7. Connect R2 (10 kΩ) from pin 7 to pin 6. Connect pin 6 to pin 2 with a jumper. Connect the positive lead of C1 (10 µF) to the column of pin 2. Connect the negative lead of C1 to ground.
  3. Add the LED and its resistor in series. Connect pin 3 to the LED anode with a jumper. Connect the LED cathode through R3, the 220 Ω resistor, to the ground rail, as Figure 1-3 shows. On a typical new LED, the longer lead is the anode, and the flat edge of the body marks the cathode. R3 can also go between pin 3 and the anode. The two parts only need to be in series.
  4. Bypass the control pin. Connect C2, the 0.01 µF ceramic capacitor, between pin 5 and ground, as Figure 1-3 shows. C2 has no polarity, so either lead can go to ground. Pin 5 connects to the internal reference that sets the switching thresholds. C2 helps filter electrical noise at that point. This helps keep the thresholds steady, so the timer switches when it should. C1 sets the timing, and C2 helps keep the timing reliable.
  5. Check each connection against the schematic. Check the chip orientation. Check the polarity of C1 and of the LED. Check the resistor values and the jumper between pins 2 and 6.
  6. Set the supply with its output off. On the SPD3303X-E power supply, press CH1 to select output 1. Set its voltage to 5.00 V and its current limit to 0.05 A (50 mA). Check the displayed settings. Connect the positive terminal of output 1 to the positive rail. Connect its negative terminal to the ground rail.
  7. Enable power supply output 1. Expect about five blinks per second. The LED should stay on about twice as long as it stays off. If the supply display shows CC (constant current), the circuit draws the full 50 mA limit. If CC shows, or a component becomes hot, turn the output off and check the wiring.

If the LED doesn't blink

A wiring mistake is a normal part of building. Turn the supply output off before you change anything. Then work through these checks:

If the LED stays dark after those checks, use the oscilloscope steps below. A repeating waveform at pin 3 shows that the timer runs and that the LED circuit needs attention. If you get stuck, you can ask me at @dnixty. Send a photo of the wiring and your observations.

Watch it run

With the LED blinking about five times a second, the oscilloscope can show what drives it: the capacitor voltage and the output at pin 3. A channel is one measurement input of the oscilloscope. Each probe measures the voltage at its tip relative to its ground clip.

What to expect on the screen

During charging, the capacitor voltage rises and the LED is on. During discharging, the voltage falls and the LED is off. Charging runs through two resistors and discharging runs through one. So the rise takes longer than the fall: about 0.14 s against 0.07 s with these parts. Both parts of the trace curve, because the current into the capacitor falls as its voltage nears the level it moves towards.

Connect the oscilloscope

Use two oscilloscope probes. Each probe has a BNC connector for the oscilloscope, a tip or spring hook for the signal, and a short ground lead with a clip. A measurement needs both the tip and the ground connection.

Turn the bench supply output off before you connect the probes. Fit the BNC connector of one probe to the CH1 input of the oscilloscope. Fit the other probe to the CH2 input. Push each connector on and turn its collar to lock it. Use the numbered channel inputs on the front panel. Leave any external-trigger input empty.

Oscilloscope channelTip or hookGround clip
Channel 1: outputPin 3 of the NE555Ground rail
Channel 2: capacitor voltagePositive lead of C1, joined to pins 2 and 6The same ground rail

Connect both ground clips to the ground rail. That rail connects to the negative terminal of the supply, to pin 1 and to the negative lead of C1. Push a short bare jumper into that rail, so each clip has a secure point to grip.

The same breadboard with the completed circuit muted. A yellow tip marker for oscilloscope channel 1 identifies the column of pin 3. A magenta tip marker for oscilloscope channel 2 identifies the column of the positive lead of C1, joined to pins 2 and 6. Two blue markers identify separate attachment points for the ground clips on the bottom ground rail.
Figure 1-4: Add the oscilloscope probes with the supply output off. Oscilloscope channel 1 measures the output. Oscilloscope channel 2 measures the capacitor voltage. Connect both ground clips to the blue ground rail. The drawing mutes the existing build, so the four probe connections are easy to see.

Inside this bench oscilloscope, the probe ground clips connect to each other and to protective earth. Connect both clips to circuit ground. A ground clip on the positive rail or on a signal node can short that point to ground. Keep the protective-earth connection of the oscilloscope intact.

  1. Attach each probe tip to its measurement point. Keep the supply output off. Grip a component lead or a short bare jumper in the correct column with the hook on each probe tip. Attach the channel 1 probe in the column of pin 3. Attach the channel 2 probe in the column of pin 2, where the positive lead of C1 sits. Check that neither hook touches an adjacent lead.
  2. Match the probe settings. Set the switch on each probe to 10×. On the SDS1104X-E, press CH1. Set Probe to 10X and Coupling to DC. Repeat for CH2. A mismatch can make a correct voltage appear ten times too small or too large.
  3. Set the scales. Turn the vertical scale knob of each channel to 1 V/div. Set the horizontal scale to 50 ms/div, which shows a few complete blinks. Adjust the vertical position of each channel so that its ground marker is near the bottom of the display. Voltages from 0 to 5 V then fit on the screen.
  4. Stabilise the trace. In the trigger menu, select Edge, source CH1, rising slope and Auto mode. Set the trigger level to about 1.5 V. Enable power supply output 1. The trigger starts each sweep at the same point on the rising edge of the output. So the repeating traces stay still on the screen.
  5. Compare the traces with the expected shape. Oscilloscope channel 2 should rise and fall between about 1.67 and 3.33 V. Oscilloscope channel 1 should be high during the rise and low during the fall. If a trace is clipped, adjust its vertical position or scale before you measure.

If the display looks wrong, check the probe connections, the channel settings and the trigger before you change the circuit. Make sure that both channels are on and set to DC coupling.

Oscilloscope screen. The yellow output square wave sits at about 3.7 V when high and near 0 V when low. The magenta capacitor sawtooth swings between cursors at 1.68 V and 3.34 V. The automatic period measurement reads 200.46 ms.
Figure 1-5: The capacitor voltage and the output on one screen. Oscilloscope channel 2 (magenta) shows the capacitor: a lopsided sawtooth. Its slow, curved rise (charging through R1 + R2) changes to a faster fall (discharging through R2 alone). It stays between about one-third and two-thirds of the 5 V supply. Its turning points sit on the cursor lines at 1.68 V and 3.34 V. Oscilloscope channel 1 (yellow) shows the output: a square wave at about 3.7 V during the charge and near 0 V during the discharge. The period is 200.46 ms, so the frequency is 4.99 Hz. The output is high about twice as long as it is low.

Measure one cycle and the capacitor limits

On the SDS1104X-E, press Cursors and select Manual mode. Make sure that the cursor source is CH2, the capacitor trace. The cursor source is separate from the trigger source.

  1. Measure the period. Select the time cursors (X). Select X1 and turn the universal knob to move it to one peak of the capacitor waveform. Select X2 and move it to the next peak. Read ΔX, the time for one cycle. Expect about 0.2 s. The reciprocal, 1/ΔX, is the frequency: about 5 Hz.
  2. Measure the voltage limits. Select the voltage cursors (Y) and keep the source on CH2. Move Y1 to the bottom of the capacitor waveform. Move Y2 to the top. Record both voltages and the supply voltage.
  3. Compare the on and off times. Select the time cursors again. Measure the rising part and the falling part separately. The rising part should take about twice as long as the falling part. The duty cycle is the fraction of the cycle that the LED is on. With a 2:1 ratio, the duty cycle is about two-thirds.
MeasurementExpected with nominal partsMy recorded result
PeriodAbout 208 ms200.46 ms
FrequencyAbout 4.81 Hz4.99 Hz
Output duty cycle66.7%66.76%
Capacitor minimum at 5.00 V supplyAbout 1.67 V1.68 V
Capacitor maximum at 5.00 V supplyAbout 3.33 V3.34 V

Use your readings as the baseline for your later builds. Component tolerances and measurement uncertainty change the last digits. If the voltages are far from the expected fractions, first check the probe settings (10×) and the cursor source. If you have a multimeter, use it to check a suspicious steady voltage.

What just happened?

My capture shows the capacitor voltage moving between 1.68 V and 3.34 V, with a period of 200.46 ms. Two voltage thresholds set when the capacitor changes direction. The resistors and the capacitor set how long each part of the cycle takes.

Where the 555 came from

Hans Camenzind designed the 555 in 1971. He was a Swiss-born engineer who worked under contract to Signetics. Signetics put the chip on sale in 1972. Inside the chip, a chain of three equal 5 kΩ resistors connects across the supply. That chain sets the one-third and two-thirds levels that you measured.

The name is often said to record those three resistors: 5, 5, 5. Camenzind described the name as a marketing choice, unconnected to the resistor values. You build a chain of three equal resistors in Experiment 2, and again on the transistor board in Experiment 9, which tells the story of the name.

How the chip decides

The capture shows two turning points, at 1.68 V and 3.34 V. Inside the chip, two comparators watch for those levels. A comparator compares two voltages and switches its output to show which voltage is higher. In your circuit, one cycle runs like this:

  1. C1 charges through R1 and R2. Pin 3 is high, so the LED is on.
  2. C1 reaches two-thirds of the supply voltage (about 3.33 V). The comparator on pin 6 (THRESHOLD) fires. Pin 3 goes low, and the LED goes off.
  3. At the same time, an internal transistor connects pin 7 (DISCHARGE) to ground. This holds the junction of R1 and R2 at ground, so C1 discharges through R2.
  4. C1 falls to one-third of the supply voltage (about 1.67 V). The comparator on pin 2 (TRIGGER) fires. Pin 3 goes high, pin 7 releases the junction, and charging starts again.
  5. A latch holds the state of pin 3 between those two events. It remembers which threshold C1 crossed last.

You'll build these blocks in later experiments.

Three ways to use the timer

The same eight pins can do three different jobs, depending on how they are wired. Wired as in Figure 1-1, as an astable, the timer runs freely and switches back and forth continuously. That makes the LED blink. With different wiring it becomes a monostable: a one-shot circuit that gives a single timed pulse when triggered, then waits. Wired with no timing capacitor, with pin 2 setting the output high and pin 4 resetting it low, it becomes a bistable. A bistable is a set-reset latch, which can de-bounce a switch.

This course uses the astable mode throughout. A blinking LED is a useful first check. The timing and voltage measurements show more about whether the circuit behaves as expected.

Why the timer runs at that rate

The steps above show when the chip switches. The resistors and C1 set how long each part of the cycle takes. C1 charges through R1 + R2 and discharges through R2. The maths of an exponential curve that crosses fixed fractions of the supply voltage gives this blink frequency:

With R1 = R2 = 10 kΩ, C = 10 µF and ln 2 ≈ 0.693, the formula predicts 4.81 Hz. My build measured 4.99 Hz, about 4% higher. Resistor and capacitor tolerances, the non-ideal behaviour of the chip and measurement uncertainty can all contribute to that difference. The frequency measurement alone does not give the actual value of the capacitor.

Why the LED is on longer than it is off

Charging runs through both resistors, and discharging runs through R2 alone. So the high part of each cycle takes longer than the low part. With these parts, the formulas below give 0.139 s high against 0.069 s low. My capture works out to about 0.134 s high and 0.067 s low (66.76% of 200.46 ms).

The fraction of each cycle spent high is the duty cycle. It equals , which is exactly two-thirds with equal resistors. My measured duty cycle is 66.8%. This circuit cannot go below 50% without a steering diode. The charging current always flows through R2, and through R1 as well. If you want to see where the two times come from, open the derivation below.

Where the rate equation comes from optional

Let be the voltage on the timing capacitor, its capacitance, the supply voltage, and the current that flows into the capacitor. During the high part of the cycle, the capacitor charges from the supply through and in series. Write for that series resistance.

Two relations set the charging rate. The first is Ohm's law across the series resistance. One end of it is at and the other end is at :

The second is the defining relation of a capacitor, , differentiated with respect to time. Current is the rate at which charge arrives, so:

The same current appears in both equations, so set them equal:

Divide both sides by . The rate of change is then on its own:

The quantity appears again and again. It is the voltage that the capacitor still has to climb. Call it the gap, :

Differentiate that definition. The supply voltage is constant, so its derivative is zero. The gap therefore shrinks exactly as fast as the voltage climbs:

Substitute both results into the rate equation. The left side becomes the negative of the rate of change of the gap. The numerator on the right is by definition:

Multiply both sides by :

In words: the gap closes at a rate proportional to its own size, with time constant .

Separate the variables. Divide both sides by and multiply both sides by . Each variable is then on its own side:

Integrate both sides from the start of the charge, when and the gap is , to a general time :

The integral of is , and the integral of is :

The difference of two logarithms is the logarithm of the ratio. So the left side becomes one term:

To free from the logarithm, raise to the power of each side. The exponential cancels the logarithm, because . The right side becomes an exponent:

Multiply both sides by :

So during an RC charge, the gap to the target decays exponentially. The target only sets where the gap is measured from.

How long does the gap take to fall from to a fraction of itself? Set . Then cancels:

Take the natural logarithm of both sides:

Multiply both sides by :

The time depends only on and on the ratio by which the gap shrinks. The absolute size of the gap, and therefore the supply voltage, is no longer in the equation.

Apply this result to the high part of the cycle. The capacitor climbs from one-third of the supply voltage to two-thirds. So its gap to the supply falls from two-thirds of the supply voltage to one-third:

The supply voltage cancels in that ratio. With in place of :

During the low part, pin 7 holds the junction of R1 and R2 at ground. The capacitor then discharges through alone, towards 0 V. Ohm's law across gives the current into the capacitor:

Set it equal to the capacitor current, as before:

The gap to the new target, 0 V, is the capacitor voltage itself, so . Divide both sides by :

This is the same equation as before, with time constant . The gap falls from two-thirds of the supply voltage to one-third, so again :

A different pair of threshold fractions would give a different logarithmic factor.

One period is one high interval plus one low interval:

The frequency is the reciprocal of the period:

The duty cycle is the high interval divided by the period. The factor cancels:

The 1.44 in the datasheet formula is one divided by ln 2. With 10 kΩ for each resistor and 10 µF, the high interval is 0.693 × 20 kΩ × 10 µF = 0.139 s. The low interval is 0.693 × 10 kΩ × 10 µF = 0.069 s. The period is 0.208 s, and the frequency is 4.81 Hz, the prediction quoted above. The duty cycle is 20 kΩ / 30 kΩ = 2/3.

This derivation assumes exact threshold fractions. It also assumes a discharge transistor that pulls pin 7 all the way to ground. Physical components depart from those assumptions. Use the formula as a prediction to compare with the bench. Expect some difference between the prediction and your readings.

Why the supply voltage is absent from the formula

The frequency formula contains R1, R2 and C, and no supply voltage. The two switching thresholds and the charging target all scale with the supply voltage. In the ideal circuit those changes cancel, so R1, R2 and C alone set the timing. This behaviour is called ratiometric. An NE555's measured frequency can still change slightly, because the cancellation is approximate.

Going further

The timing formula contains no supply voltage, and you can test that on the bench. When the supply drops from 5.00 to 4.50 V, one-third of the supply becomes 1.50 V and two-thirds becomes 3.00 V. The charging target drops by the same fraction, so the formula still gives 4.81 Hz. The measured frequency should stay approximately the same.

Record your baseline readings. Set power supply output 1 to 4.50 V. Repeat the capacitor-limit and period measurements. Then set output 1 back to 5.00 V. The specified supply range of the NE555 starts at 4.5 V, so go no lower. Experiment 9 examines this behaviour on the divider of your transistor board.

Quick check

1. Across one full cycle, the voltage on the timing capacitor moves between…

The trigger comparator reverses the cycle at a third of the supply voltage. The threshold comparator reverses it at two-thirds. On a 5.00 V supply, those levels are about 1.67 V and 3.33 V. Once the timer runs, the capacitor never returns to ground or reaches the full supply voltage.

2. Lower the supply to 4.5 V and the blink rate barely changes. The reason is that…

Each level that the capacitor moves towards or switches at is a fixed fraction of the supply voltage. When the supply changes, all of these levels change together. So the supply voltage cancels from the ideal timing equation. A built circuit can show a small change. Experiment 9 measures how closely the references on the transistor board follow the supply.

3. The LED stays on about twice as long as it stays off because…

Charging runs through R1 and R2 together. Discharging runs through R2 alone. So the high part of the cycle is the longer part. With equal resistors, the duty cycle is two-thirds. It cannot go below one half without a steering diode.

Before moving on

If the inner workings of the 555 still seem unclear, that is fine. I was still confused at this stage too. The chip only started to make sense to me when I built it from scratch, one block at a time. You can continue without a full picture of the inside of the chip. The next experiments build those blocks one at a time.

You built and measured the reference timer. In Experiment 2, you'll build the same behaviour from separate comparator and logic chips. The connections between the functional blocks are then open to your probes.

Reference documentation: TI NE555 datasheet and Siglent SDS1000X-E user manual.

Contents All experiments