The CD4060 is a CMOS chip with a binary counter and oscillator included. It can be used to produce selectable time delays or to create signals of different frequencies. This is because it has a built-in oscillator module that only requires a few passive electronic components.
From only two resistors and one capacitor it can create 10 different frequencies . That makes it a very interesting chip, especially for those interested in audio and synthesizers.
|Pin Name||Pin #||Type||Description|
|VDD||16||Power||Supply Voltage (+3 to +15V)|
|CEXT||9||Input||Connection for external capacitor|
|REXT||10||Input||Connection for external resistor|
|CLK||11||Input||Clock input/Oscillator pin|
|RST||12||Input||Resets the counter|
What is a Binary Counter with Oscillator?
A binary ripple counter is a circuit made up of flip-flops in series. The output of one is connected to the CLK input of the next. The CLK input of the flip-flop on the left is the counter input.
Instead of just four flip-flops like in the example above, the CD4060 has 14 flip-flops in series. This means it can count up to 16383 (the maximum value of 14 bits).
It also has a built-in oscillator that makes it possible to create a clock pulse to automatically increase the counter. This makes the CD4060 a timer circuit that can be used to select between different time delays (or frequencies), depending on which Q-output you use.
For example, if you choose values for the resistor and capacitor so that the oscillator creates a clock pulse of 1 Hz, it means it will increase the counter every second. So for an 8-second delay, you can use output Q3. Or for a delay of 2 hours and 16 minutes (8192 seconds), you can use output Q13.
The Missing Outputs Q0, Q1, Q2, Q10
For some reason, the CD4060 lacks the outputs Q0 to Q2 and Q10.
I haven’t found any official info on why those outputs are omitted, but the most probable theory I’ve read is that the 4060 is an upgrade of the 4040. The 4040 had 16 pins, so they might have removed some of the bits to be able to add an oscillator and a higher bit-count with the same amount of pins.
How To Use The CD4060
First of all, you need to connect the VDD pin to your positive supply terminal and the GND pin to your negative supply terminal. You can use a power supply voltage between 3V and 15V. Although, some versions of the 4060 chip support up to 20V. Check your datasheet for exact values.
To activate the oscillator, connect a resistor from the REXT pin, a capacitor from the CEXT pin, and a resistor from the CLK pin, and connect all three of them at the other end:
The frequency is given by this formula:
Frequency f (Hz) = 1 / ( 2.3 * Ct * Rt )
Note that Rt needs to be much lower than R2 for the formula to be correct.
If you want to reset the counter back to zero, use pull the RST (Reset) pin HIGH. Normally, you need to pull this LOW for the chip to work.
Use any of the Q pins as your output to control whatever you want to control. They become HIGH after:
- Q3 goes HIGH after 23 = 8 clock pulses
- Q4 goes HIGH after 24 = 16 clock pulses
- Q5 goes HIGH after 25 = 32 clock pulses
- Q6 goes HIGH after 26 = 64 clock pulses
- Q7 goes HIGH after 27 = 128 clock pulses
- Q8 goes HIGH after 28 = 256 clock pulses
- Q9 goes HIGH after 29 = 512 clock pulses
- Q11 goes HIGH after 211 = 2048 clock pulses
- Q12 goes HIGH after 212 = 4096 clock pulses
- Q13 goes HIGH after 213 = 8192 clock pulses
Using a Crystal with the CD4060
Want to use a crystal for better precision?
That’s possible. This type of oscillator is called a Pierce Oscillator.
The datasheet of the CD4060 does not say much about how to choose values for this. But I found a similar chip, the 74AHC1G4210. It works like the 4060, except that it only has one output instead of several.
It gives a bit more info in its datasheet:
A typical crystal oscillator schematic is shown in Figure 8. R1 is the power limiting resistor, its value depends on the frequency and required stability against changes in VCC or average ICC. For starting and maintaining oscillation a minimum transconductance is necessary, so R1 should not be too large. A practical value for R1 is 2.2 kΩ.
What Crystal To Choose?
Let’s say you want to use the 4060 IC as a frequency divider to get 500 Hz. What crystal do you need?
Q3 needs 8 clock pulses to go from low to high. And another 8 to go from high back to low again. So it needs 16 pulses for one complete cycle (frequency period).
It’s the same for every output, so we can use this to find the theoretical crystal frequency you’d need to get 500 Hz from a given output:
- For Q3 output, you’d need a crystal of 500 * 16 = 8 kHz
- For Q4 output, you’d need a crystal of 500 * 32 = 16 kHz
- For Q5 output, you’d need a crystal of 500 * 64 = 32 kHz
- For Q6 output, you’d need a crystal of 500 * 128 = 64 kHz
- For Q7 output, you’d need a crystal of 500 * 256 = 128 kHz
- For Q8 output, you’d need a crystal of 500 * 512 = 256 kHz
- For Q9 output, you’d need a crystal of 500 * 1024 = 512 kHz
- For Q11 output, you’d need a crystal of 500 * 4096 = 2.048 MHz
- For Q12 output, you’d need a crystal of 500 * 8192 = 4.096 MHz
- For Q13 output, you’d need a crystal of 500 * 16384 = 8.192 MHz
Not all these exist as crystal values, it’s just an example of how you can find viable crystal frequencies for a given output. But the 2.048MHz or 4.096MHz are both pretty common and will give you 500 Hz.
CD4060 Example Circuit – Adjustable Timer
Here’s a practical example that you can build with the 4060 chip:
To build this circuit you’ll need:
- A 4060 chip, such as the CD4060BE
- A rotary switch with as many positions as you’d like timer options
- A 100 kΩ resistor (R1)
- 0.22 nF (C1)
- A 1 MΩ resistor (R2)
- An NPN transistor (Q1)
- A 1kΩ resistor (R3) to limit the current through the transistor
- A relay
With the chosen values for C1 and R2, you get a frequency of:
Frequency f (Hz) = 1 / ( 2.3 * 0.0000022 F * 100000 Ω) = 1.98 Hz
So we have about 2 clock pulses per second. And we can thereby find the time delay before each output goes high:
- Q3 goes HIGH after 23 = 8 clock pulses = 4 seconds
- Q4 goes HIGH after 24 = 16 clock pulses = 8 seconds
- Q5 goes HIGH after 25 = 32 clock pulses = 16 seconds
- Q6 goes HIGH after 26 = 64 clock pulses = 32 seconds
- Q7 goes HIGH after 27 = 128 clock pulses = 1 minute and 4 seconds
- Q8 goes HIGH after 28 = 256 clock pulses = 2 minutes and 8 seconds
- Q9 goes HIGH after 29 = 512 clock pulses = 4 minutes and 16 seconds
- Q11 goes HIGH after 211 = 2048 clock pulses = 17 minutes and 4 seconds
- Q12 goes HIGH after 212 = 4096 clock pulses = 34 minutes and 8 seconds
- Q13 goes HIGH after 213 = 8192 clock pulses = 1 hour, 8 minutes and 16 seconds
Alternatives and Equivalents for 4060
You likely find the 4060 IC marked as CD4060, NTE4060, MC14060, HCF4060, TC4060, or HEF4060. Usually with a few extra characters at the end (Ex: CD4060BE).
This has to do with the manufacturer of the chip and the technology used. But the functionality and the pins are the same.
If you can’t find any of these chips in your local electronics store, check out my list of online stores with several options to buy from.
If you can’t find the 4060, you could try one of the following IC alternatives with binary ripple counter. But note that you’d have to create the oscillator yourself:
- 4020: 14-stage binary ripple counter (No oscillator)
- 4024: 7-stage binary ripple counter (No oscillator)
- 4040: 12-stage binary ripple counter (No oscillator)
Download the PDF datasheet for the IC 4060 here: