🚀 C# ile Programlamaya Giriş: Kodlamaya İlk Adımını At, Kendi Projelerini Geliştirmeye Başla!
00HOME
07GLOSSARY 08TAGS ♡MY LIST ⌕SEARCH
TRENG

The 555 timer: astable operation and the frequency formula

Build the 555 in astable (free-running) mode. Calculate the high and low times, the frequency and the duty cycle; run a warning flasher and a 1 kHz signal source in Proteus.

Think of the yellow lamps blinking on road-works barriers, old staircase light timers, simple alarm sirens. At the heart of many of them sits a small chip that has been made for decades: the 555 timer. Without any microcontroller, it produces a square wave from two resistors and a capacitor. Here we will use the RC charge-discharge behaviour from the previous lesson to build a "clock".

Theory: what does the 555 do inside?

Inside the 555 there are two comparators, a flip-flop and a discharge transistor. In astable mode the capacitor charges through R1 and R2. When its voltage reaches 2/3 of the supply, the output goes low and the discharge pin empties the capacitor through R2 only. When the voltage falls to 1/3, the output goes high again and the cycle repeats. The capacitor voltage swings between 1/3 Vcc and 2/3 Vcc.

Pin connections (DIP-8 package):

  • 1: GND, 8: VCC (supply, typically 5-15 V)
  • 2: TRIG (trigger) and 6: THR (threshold) are tied together and to the capacitor
  • 3: OUT (output)
  • 4: RESET, tied to VCC when not used
  • 5: CV (control voltage), to ground through 10 nF against noise
  • 7: DIS (discharge), to the junction of R1 and R2
High time  : tH = 0.693 x (R1 + R2) x C
Low time   : tL = 0.693 x R2 x C
Frequency  : f  = 1.44 / ((R1 + 2 x R2) x C)
Duty cycle : D  = (R1 + R2) / (R1 + 2 x R2)

Example (flasher): R1 = 1 kOhm, R2 = 10 kOhm, C = 100 uF
tH = 0.693 x 11000 x 0.0001 = 0.762 s
tL = 0.693 x 10000 x 0.0001 = 0.693 s
T  = 1.455 s  ->  f = 0.687 Hz
D  = 11 / 21 = 52.4%

Note: in this basic circuit tH is always longer than tL, because charging goes through R1+R2 while discharging goes through R2 only. The duty cycle cannot drop below 50%. Choosing R1 small compared with R2 brings you close to 50%.

Building a flasher in Proteus

  1. Press P and add an NE555, three RES parts, a CAP-ELEC, a CAP, an LED-YELLOW and a BATTERY.
  2. Set the battery to 5V. Connect its positive to the VCC and RESET pins of the 555, and its negative to the GND pin and a GROUND terminal.
  3. Put R1 (1k) between VCC and DIS, and R2 (10k) between DIS and THR.
  4. Join THR and TRIG with a wire. From that node connect the positive lead of the CAP-ELEC (100u), and its negative lead to ground.
  5. Go from the CV pin to ground through a 10n CAP.
  6. OUT pin → 330 ohm → LED anode, LED cathode → ground.
  7. Start the simulation. The LED blinks, staying on for about 0.76 s and off for about 0.69 s.

On the Proteus 555 symbol the pins may be labelled by name rather than number (VCC, DC/DIS, TR/TRIG, TH/THR, Q/OUT, R/RESET, CV). The names vary a little by version and model; match them by function.

Look inside with the oscilloscope

The flasher is nice to watch, but a 1.5-second period crawls across the oscilloscope. Replace the capacitor with a 10 nF ceramic (CAP) and speed things up:

C = 10 nF:
f  = 1.44 / ((1000 + 20000) x 0.00000001) = 6857 Hz
T  = 1 / 6857 = 0.146 ms
tH = 0.693 x 11000 x 0.00000001 = 76 us
tL = 0.693 x 10000 x 0.00000001 = 69 us
  1. Connect oscilloscope channel A to the OUT pin and channel B to the capacitor (the THR/TRIG node).
  2. Set the time base to 50 us per division and both channels to 1 V per division.
  3. Start the simulation.
Channel A (OUT): square wave between 0 and about 5 V, period about 0.146 ms
Channel B (C)  : sawtooth/triangle-like wave between about 1.67 V and 3.33 V
                 (1/3 and 2/3 of Vcc)

Watching the wave on channel B turn around exactly at the 1/3 and 2/3 levels fixes the 555's working principle in your head for good. The frequency measured in simulation may differ from the calculation by a few percent because of the model's internal delays; that is normal.

Common mistakes

Leaving RESET floating: a floating RESET picks up noise and the chip stops at random. If you don't use it, tie it to VCC.

Forgetting to join TRIG and THR: in an astable circuit both go to the same node, the capacitor. If one is left open, oscillation does not start.

Including R1 in the tL formula: discharge happens through R2 only; tL = 0.693 x R2 x C.

Exercise

A buzzer warning circuit needs a square wave of about 1 kHz. You have a 100 nF capacitor and a 1 kOhm R1. Pick R2 from standard values, calculate the actual frequency and duty cycle, and verify them in Proteus with the oscilloscope.

Hint: use the frequency formula to find the sum (R1 + 2 x R2), then extract R2.

Solution

R1 + 2 x R2 = 1.44 / (f x C) = 1.44 / (1000 x 0.0000001) = 14 400 ohm
2 x R2 = 14 400 - 1000 = 13 400  ->  R2 = 6700 ohm
Standard: 6.8 kOhm
f = 1.44 / ((1000 + 13 600) x 0.0000001) = 986 Hz
D = (1000 + 6800) / (1000 + 13 600) = 7800 / 14 600 = 53.4%

In Proteus set R2 to 6.8k and the capacitor to 100n; set the oscilloscope to 0.5 ms per division. One period spans about 1.01 ms, i.e. 2 divisions. In a real circuit, drive the buzzer or speaker through a transistor rather than straight from the output.

In short: in an astable 555 the capacitor oscillates between 1/3 and 2/3 Vcc, and R1, R2 and C set the frequency. In the next lesson you will produce a square wave in software instead: you will run an Arduino program in Proteus.

// Spot the bug +10 XP

Exactly one line below is wrong. Click the faulty line.

// Mini quiz

Click an option; you will see right away, with the reason, whether it is correct or not.

1. In an astable 555, R1 = 1 kOhm, R2 = 4.7 kOhm, C = 100 nF. What is the frequency, approximately?
2. In an astable 555, between which levels does the capacitor voltage swing?
3. Why can't the duty cycle of the basic astable 555 circuit drop below 50%?

Mark it when you finish: your progress is saved and you earn +20 XP.

Tip: ← → keys let you move between lessons.