Timers & comparators

In this lesson

  • Say what an astable does.
  • Name the 555 pins in the circuit.
  • Describe how C1 makes pin 3 switch.
  • Calculate the mark time, space time and frequency.
  • Simulate it in Yenka.
  • Build it on stripboard and test it.

Booklet and slides

Lesson 4 is the last lesson in the booklet. Tasks 1 to 5 and your exam questions are there.

Block 6 booklet (PDF) Lesson slides
Concept 1

What an astable does

Key words

Astable
a circuit with no stable state. Its output switches high and low by itself, again and again.
Mark time
how long the output stays high in each cycle.
Space time
how long the output stays low in each cycle.
Period
one mark plus one space. The time for one cycle.
Frequency
how many cycles each second, in hertz (Hz).

An astable never settles. Nobody presses a switch, but the output on pin 3 keeps changing.

  • Pin 3 goes high. LED1, the red LED, comes on. This is the mark time.
  • Pin 3 goes low. LED2, the green LED, comes on. This is the space time.
  • Then it starts again. One mark plus one space is one period.

The frequency is how many periods fit in one second. Our board flashes about 20 times in 30 s.

You meet astables in flashing warning lights, bike lights and the clock that runs a counter.

pin 3, output mark LED1 on space LED2 on one period T time →
Pin 3 switches high, low, high, low. Each high is a mark; each low is a space.
Practice 1

An astable's output is high for 0.3 s, then low for 0.2 s, again and again.

(a) State the mark time. (b) State the period.

Answer
(a) 0.3 s, the time it is high. (b) 0.5 s: one mark plus one space, 0.3 + 0.2.

You can now…

  • say what an astable does.
  • pick out the mark time, space time and period on a graph.
Concept 2

The 555 timer's pins

Key words

Threshold
pin 6. When C1 reaches ⅔ of the supply, pin 3 goes low.
Trigger
pin 2. When C1 falls to ⅓ of the supply, pin 3 goes high.
Discharge
pin 7. It empties C1 while pin 3 is low.

It is the same chip as in Lesson 3. Hold it with the notch at the top. Pin 1 is top left.

  • Pins 8 and 4 go to +5 V. Pin 1 goes to 0 V.
  • Pins 2 and 6 are joined. Both watch the voltage across C1.
  • Pin 7 sits between R1 and R2. It empties C1.
  • Pin 3, output, drives both LEDs.
  • Pin 5 is not used.
555 1234 8765 0 Vtriggeroutputreset +Vdischargethresholdcontrol (not used)
The 555 from above. Notch at the top, pin 1 top left.
Practice 2

State the pin number for each job.

  • (a) empties C1
  • (b) is joined to pin 6
  • (c) drives the two LEDs
Answer
(a) Pin 7, discharge. (b) Pin 2, trigger. (c) Pin 3, output.

You can now…

  • find pin 1 on a 555.
  • name the job of each pin in the astable.
Concept 3

Read the circuit diagram

Key words

Timing parts
R1, R2 and C1. They set how fast it flashes.
Electrolytic capacitor
C1. It has a + leg, so it must go the right way round.
Test point
a pin on the board where you put the meter or the probe.

This is the circuit in your booklet.

  • R1 runs from +5 V to pin 7. R2 runs from pin 7 to pins 6 and 2.
  • C1 runs from pins 6 and 2 to 0 V, + side up.
  • R3 and LED1, red, go from pin 3 down to 0 V.
  • R4 and LED2, green, come from +5 V down to pin 3.

R3 and R4 limit the current. Each LED carries about 11 mA: (5 V − 2 V) ÷ 270 Ω.

Test points T1 to T4 are where you put the meter and the probe.

+5 V0 V T1 T2 + R11 k R210 k C1100 µF T4 762 48 15 3 555 IC1 R4270 LED2green R3270 LED1red T3 2.50 V high
The booklet circuit, with test points T1 to T4.
Test pointWhat it measuresExpected reading
T1the +5 V supply5 V
T20 V0 V
T3pin 3, the outputkeeps changing: about 0 V, then 3.5 V to 5 V
T4C1, pins 2 and 6rises and falls between about 1.7 V and 3.3 V

Another way to draw it

Most exam papers draw the astable with one LED. R3 and LED1 go from pin 3 to 0 V. It flashes at the same rate.

The timing part of the circuit, R1, R2 and C1, stays the same.

pin 30 V R3270 LED1
The one-LED version of the output.
Practice 3

State the job of R3 and R4.

Answer
They limit the current through LED1 and LED2, so the LEDs are not damaged.

You can now…

  • say what each part of the circuit does.
  • say what each test point measures.
Concept 4

How C1 makes pin 3 switch

Key words

Charge
C1 fills through R1 and R2. The voltage across it rises.
Discharge
C1 empties through R2 into pin 7. The voltage across it falls.
⅓ and ⅔ of the supply
1.7 V and 3.3 V on a 5 V supply. C1 swings between them.

Follow one cycle:

  1. Pin 3 is high. LED1 is on.
  2. C1 charges through R1 and R2. The voltage across C1 rises.
  3. At ⅔ of the supply, pin 3 goes low. LED2 comes on.
  4. Pin 7 connects to 0 V inside the chip. C1 discharges through R2 only.
  5. At ⅓ of the supply, pin 3 goes high again. The cycle repeats.

C1 stays between ⅓ and ⅔ of the supply. It swings from 1.7 V to 3.3 V and back.

01.73.35 ⅔ of 5 V⅓ of 5 V pin 3 output charging:R1 + R2 discharging: R2 only C1 time (s) voltage (V)
C1 charges to ⅔ of the supply and discharges to ⅓. Each turn flips pin 3.

Watch out: R1 is only in the charging path. A bigger R1 makes the mark time longer. It does not change the space time.

Practice 4

Describe how the astable keeps switching. (3)

Answer
  • While pin 3 is high, C1 charges through R1 and R2 (1).
  • At ⅔ of the supply, pin 3 goes low and C1 discharges through R2 into pin 7 (1).
  • At ⅓ of the supply, pin 3 goes high again and the cycle repeats (1).

You can now…

  • describe one cycle, one step for each mark.
  • say which resistors C1 charges and discharges through.
Concept 5

Calculate the timing

Key words

kΩ to Ω
multiply by 1000. 10 kΩ = 10 000 Ω.
µF to F
divide by 1 000 000. 100 µF = 0.000 1 F.
Mark time: pin 3 high
Tm = 0.7 (R1 + R2) C1
charging, through R1 and R2
Space time: pin 3 low
Ts = 0.7 R2 C1
discharging, through R2 only
Period: mark plus space
T = Tm + Ts ≈ 0.7 (R1 + 2R2) C1
R2 is in both paths, so it counts twice
Frequency
f = 1T
cycles each second
Tm
mark time: how long pin 3 is high
s
Ts
space time: how long pin 3 is low
s
T
period: one mark plus one space
s
R1, R2
the two timing resistors
Ω
C1
the timing capacitor
F
f
frequency
Hz
Worked example 1 Our board has R1 = 1 kΩ, R2 = 10 kΩ and C1 = 100 µF. Calculate the frequency.
Tm=0.7 × (1000 + 10 000) × 0.000 1 = 0.77 sR1 + R2
Ts=0.7 × 10 000 × 0.000 1 = 0.70 sR2 only
T=0.77 + 0.70 = 1.47 scheck: 0.7 × 21 000 × 0.000 1
f=1 ÷ 1.47 = 0.68 Hzabout 20 flashes in 30 s
Worked example 2 C1 = 47 µF. LED2 must stay on for 0.33 s each time. Calculate the value of R2.
Ts=0.7 R2 C1LED2 is on while pin 3 is low: the space
0.33=0.7 × R2 × 0.000 047numbers in first
R2=0.33 ÷ (0.7 × 0.000 047)
R2=10 000 Ω = 10 kΩ10 030 Ω, to 2 sig. figs
Practice 5

    You can now…

    • calculate the mark time, space time and period.
    • calculate the frequency from the period.

    Astable bench

    The booklet circuit, live

    Change R1, R2 and C1. Watch the LEDs, C1 and the graph.

    Predict what happens to the flashing if C1 is changed from 100 µF to 200 µF.

    LED1 glows while pin 3 is high. LED2 glows while it is low.
    Mark time Tm–
    Space time Ts–
    Period T–
    Frequency f–
    Pin 3 (T3)–
    C1 (T4)–
    Speed

    As in booklet Task 1.

    Presets
    Solid: C1. Dashed: pin 3. C1 turns at ⅓ and ⅔ of 5 V.
    Concept 6

    Simulate it in Yenka

    Key words

    Voltmeter
    measures the voltage across C1. Connect it from C1's + leg to 0 V.
    Logic indicator
    shows the logic level. In Yenka, red = high and white = low.

    This is booklet Task 1. Build the circuit in Yenka first, then add:

    • a voltmeter across C1
    • a logic indicator on pin 3

    Count how many times the logic indicator turns red in 30 seconds. Then divide by 30 to get the frequency.

    Watch the voltmeter. Record C1's lowest and highest voltage.

    +5 V0 V + R1R2C1 V 762 48 15 3 555 logicindicator R4LED2 R3LED1
    The Yenka set-up: a voltmeter across C1 and a logic indicator on pin 3.
    Practice 6

    In Yenka, the voltmeter across C1 has just reached 3.3 V.

    State which LED comes on next. Give a reason.

    Answer
    LED2, the green LED. 3.3 V is ⅔ of the supply, so pin 3 goes low. The logic indicator turns white.

    You can now…

    • add a voltmeter and a logic indicator to a Yenka circuit.
    • work out the frequency from a count of flashes.
    Concept 7

    Build it on stripboard

    This is booklet Tasks 2 to 4. The guide takes you from the diagram to the stripboard, one net at a time. A net is a set of legs that are joined. On the parts steps it is your turn: tap where each leg goes before the answer shows. Then find the mistake on three faulty boards.

    Pre-power-up check

    Do this before you connect the supply. Tick each one in booklet Task 4.

    1. No beep between T1 and T2 on continuity: no short across the supply.
    2. No solder bridges between tracks. The track cuts under IC1 are clean: continuity, no beep.
    3. IC1 in its socket the right way round: notch and pin 1 at the marked end.
    4. C1, LED1 and LED2 the right way round.
    5. Every link matches the wiring schedule.
    6. The supply is set to 5 V before it is connected.
    Copper side. The red ✗ is a track cut on the middle track. On the right, solder joins two tracks: a solder bridge, which is a fault.
    Practice 7

    State what a solder bridge is. Explain why it is a fault.

    Answer
    A blob of solder that joins two tracks. It joins two nets that should be apart, so parts are shorted out and the circuit will not work.

    You can now…

    • plan the astable on stripboard, with track cuts and test points.
    • do a pre-power-up check.
    Concept 8

    Test your board

    This is booklet Task 5. Pick a tool and a test point. See what your board should read.

    Meter and probe on the astable

    The meter is on DCV 20 with the black probe on T2. The probe is clipped to +5 V and 0 V, on TTL and Pulse.

    The test point you pick is shown in green.
    Tool
    Test point

    Fault from readings

    Compare each reading with the one you expect. The first one that is wrong tells you where to look.

    • T1 not 5 V: look at the supply leads.
    • T4 does not rise and fall: look at R1, R2, C1 and the link from pin 2 to pin 6.
    • T3 does not flash: look at pins 4 and 8, and at IC1 itself.
    • T3 flashes but one LED stays dark: look at that LED and its resistor.
    T1 = 5 V? T4 rises and falls? T3 flashes? yesyesyes nonono check supply check R1, R2, C1and pin 2 to 6 link check pins 4, 8and IC1 check the dark LED and its resistor
    Test in order, from the supply to the LEDs.
    Practice 8

    LED1 never lights. LED2 flashes. T1 reads 5.0 V. The probe on T3 flashes red and green.

    Suggest the fault.

    Answer
    The 555 is working: pin 3 is pulsing. The fault is in LED1's branch. LED1 is the wrong way round, or R3 or LED1 is not joined.

    You can now…

    • say what the meter and the probe should show at each test point.
    • find a fault from the readings.
    Check

    Check your understanding

    Pick an answer to see feedback on it. You can then try the others. Your score counts first tries only.

    Fill the gaps

    C1 charges through until it reaches of the supply. Then pin 3 goes and comes on. C1 discharges through into pin .

    RAG self-check

    Tap Red, Amber or Green for how sure you feel.

    Booklet answers: Lesson 4

    Try the task in your booklet first. Then tap to check.

    Task 1: Yenka
    • About 20 flashes in 30 s, so the frequency is about 0.7 Hz.
    • C1's lowest voltage is about 1.7 V and its highest is about 3.3 V: ⅓ and ⅔ of 5 V.
    Task 2: Plan it
    Check your plan against Part 2 of the guide above. Every track under the chip is cut, every link is numbered, and T1 to T4 are marked.
    Task 5: Test it
    Why your board might differ from Yenka: component tolerance (C1 is often ±20 %), or a counting error.
    Exam question 1: the oscilloscope trace
    • (a) 5 V: 5 divisions × 1 V/div. The unit is needed.
    • (b) T = 5 × 100 ms = 0.5 s (1); f = 1 ÷ T (1); f = 2 Hz (1).
    Exam question 2: test points across C1
    T4 and T2.
    Exam question 3 (2024 Q5(b))
    • The capacitor is the wrong way round.
    • A diode is used, not an LED.
    • R3, the LED's protective resistor, has too high a value. Not "resistor too big"; not "pin 5 not connected".
    Exam question 4 (specimen paper Q6(c))
    Any three, after "Check IC orientation": orientation of the capacitor; orientation of the LED; supply voltage or resistance values.
    Exam question 5 (2018 Q9)

    1 mark for each correct row. The 47 µF must be the 16 V part: the circuit runs at 9 V.

    SupplierComponentProduct codeCost (p)
    SWIFTLED 5 mm stdSC-01554
    JIMSON47 µF electrolytic capacitorEC 79914
    JIMSON270RFR 9220·25
    JIMSON1KFR 9230·25
    SWIFT10KEC-01821·5
    Key words
    1. astable · 2. period · 3. frequency · 4. track · 5. socket · 6. pulsing

    Picture glossary

    Astable

    Switches high and low by itself, again and again.

    Mark time

    How long the output stays high in each cycle.

    Space time

    How long the output stays low in each cycle.

    Period

    One mark plus one space. Frequency = 1 ÷ period.

    Track cut

    A break in a copper track, so the two ends are not joined.

    DIL socket

    Solder the socket, not the chip. Then push the 555 in.

    +

    Electrolytic capacitor

    C1. Its + leg must go to the higher voltage.

    ⅓ and ⅔ of the supply

    1.7 V and 3.3 V on 5 V. C1 swings between them.

    Sources & credits: booklet answers to 2024 Q5(b), the specimen paper Q6(c) and 2018 Q9 follow the National 5 Practical Electronics marking instructions, © Qualifications Scotland (SQA). Text, drawings, simulator, build guide and booklet by R Stewart. R Stewart - October 2026.