Introduction to the 4017 Decade Counter
We use the 4017 Decade Counter to count transitions. More specifically, we count false to true transitions. The 4017 Decade Counter has 10 outputs (0 to 9) in addition to the carry output.
The 4017 outputs do not count in binary. It simply turns on an output 0 to 9 representing the number of transitions. Each time the clock has a false to true transition, the next output will energize (Q0 to Q9).
The Carry (+10) bit turns on when Q9 shuts off. However, when Q5 is energized, the carry bit shuts off. Obviously, this gives you the transitions you need to trigger the clock on another 4017 for the 10’s digit.
We can use this IC as a frequency divider, or to simply count voltage transitions.
Pinout for 4017 Decade Counter
Basically, I’ve set up these diagrams using Tinkercad. This is a good simulation tool for testing your diagrams before implementing them in the real world. Before we start, let’s take a look at the pinout for the 4017.
Wiring the 4017 Decade Counter
Basically you can wire all of the “Q” outputs and the “CARRY” to a standard LED through a 1K resistor. Pay close attention to the Pinout diagram. You want to organize your LED’s in the right order. Usually you will arrange your LED’s left to right in descending order.
VCC connects to + on your 5v power supply. GND connects to -.
At this time, connect RESET and CLOCK to GND, or -, through a 100K resistor. This will pull down the voltage in the “OFF” State.
Place a .22 microfarad capacitor between VCC and RESET.
Finally, connect a push button between VCC and the CLOCK. Be sure you are on the IC side of the resistor that connects the clock to GND.
Test your Circuit
When you power up the circuit, the Q0 output light should be on. Obviously, this indicates zero counts. Each time you press the button, the next output will energize, and the previous output shuts off. After you energize Q9, and press the button one more time, the carry output energizes. In fact, the carry output stays on until you energize Q5.
You might utilize this carry output to feed the clock input into another decade counter. This will count the 10’s place. Cascade another 4017 decade counter to represent the 100’s place, and so on.
Read the datasheet for more specific information about the 4017.
Be sure to press the button enough times to test all of your LED’s including the CARRY LED.
For more information, visit the beginner’s category page for the Arduino!
— Ricky Bryce