The final thing we'll make is a something to generate a regular series of pulses. There are many cases in digital circuits where we need a continuous sequence of pulses: generally called a clock.

A clock has two parameters we will want to be able to control:

  1. frequency: how often the pulse occurs, measured in pulses per second, aka Hertz.
  2. duty cycle: the relative amount of time the signal is high, versus the amount of time it is low. In other words: the width of the pulses, generally expressed as a percentage.

You can buy proper clock generators and give you fine, visible control over these and let you dial in exactly what you want. That is not this clock generator. We just need something basic that we can adjust somewhat. Back to our friend the 555. To make a debounced pulse generator we used it in monostable mode. For this we need to use it in astable mode.

The purpose of this circuit is not to generate high speed clock signals. In fact that wouldn't be overly useful. What we need to generate is a series of pulses, regular and continuous but slow enough (i.e. with a low enough frequency) that we can watch our circuit go through its various states.

The two 100K adjustable resistors that are used to adjust the frequency and duty cycle of the output. It's not so simple as one for adjusting frequency and the other for duty cycle.  Recall how this circuit works*: C1 charges through R1 and R2; the output of the 555 is high during this time. When the voltage on C1 reaches 2/3 Vcc, it begins discharging though R2 (via the DIScharge pin of the 555). While it is discharging the output is low. Once the voltage on C2 reaches 1/3 Vcc, it starts charging again and the process repeats indefinitely. The frequency is the reciprocal of total time of a cycle (the time to charge plus the time to discharge): 1.44/((R1+2R2)C1). The duty cycle will be the ratio of the time to charge to the total time. Since the capacitor value and timing constant is in both time calculations it can be factored out leaving it just dependant on the two resistors: (R1 + R2)/(R1 + 2R2).

For example, if we set R1 to 30K and R2 to 15K the frequency will be:

1.44 / ((30000 + 2 *15000) * 0.000047)
1.44 / (60000 * 0.000047)
1.44 / 2.82
0.51 Hz

That's about 1 full cycle every 2 seconds.

The duty cycle is:

(30000 + 15000) / (30000 + 2 * 15000)
(30000 + 15000) / (30000 + 30000)
45000 / 60000

which is 75%. That means the LED should be lit for 3/4 of the time, and dark for 1/4.

The LED was added so that there is visible feedback on the frequency and duty cycle.

The first two invertors (IC2A and IC2B) are used to avoid the LED impacting the circuit you are connecting the signal to. The first buffers the 555 output to provide plenty of current to drive the LED and the second isolates the circuit connected to the output. 

The third invertor (IC2C) provides an inverted output. The way this circuit works, you get a duty cycle greater than 50% (i.e. a series of logic low pulses). If you want a duty cycle lower than 50%, the inverted output gives that to you (i.e. a series of logic high pulses).

Given the simplicity, usefulness, and low cost of the circuit and the fact that it uses 3 of the 6 NOT gates on the 7404, I've put 2 on the PCB I made.

* See my 555 tutorial for details.

This guide was first published on Mar 29, 2018. It was last updated on Jun 29, 2018.

This page (Clock Generator) was last updated on Mar 14, 2018.

Text editor powered by tinymce.