We’re now going to look at two new components – the CD4026 counter and the 7-segment display and we’re going to use them to build a simple reaction timer circuit.
A 7-segment display is nothing but 7 LEDs grouped and arranged in figure 8 along with another LED that acts as a decimal point. Together, these can be used to display the digits 0-9 and a decimal place.
The 7 segments are labelled a to f and there are two common types of 7 segment displays – a common cathode display and a common anode display. As the name implies, a common cathode or CC display has all the LED cathodes connected together so we need to apply a positive voltage to each of the segment pins to switch them ON. A common anode or CA display has all the LED anodes connected together and so we have to apply a negative voltage or ground to each of the segment pins to switch them ON. The kit contains a common cathode display.
The 4017 counter IC we’ve used previously can only drive individual LEDs, but the 4026 counter is designed to drive these 7 segment displays. So instead of counting the individual LEDs we can simply read the number on the display.
Here’s what the schematic looks like. We simply connect the individual display segments to the corresponding pin and connect the common terminal to ground. We supply power to the 4026 and pull up the display enable pin as we want the display to be ON at all times. The 555 timer IC is used in the astable mode with a frequency of about 15Hz. The output is directly fed into the clock signal of the 4026 which means that it will start counting as soon as power is applied.
We have two switches in the circuit. Pressing the start switch will reset the 4026 and it will be held in the reset state with the digit 0 as the output. As soon as the start switch is released, the 4026 counter will start counting at 15Hz and it will only stop once the STOP switch is pressed. Pressing the stop switch asserts the clock inhibit signal which prevents the clock signals from passing into the internal counter section, and this means that the count will be frozen at the last value.
Here’s what the assembled PCB looks like, please ensure that the 7 segment display is inserted the right way around. Pressing the START button will take the counter to 0 and releasing it will start the count. Pressing the STOP button will freeze the count.
Since we only have 1 segment in the circuit, it can only count from 0 to 9 and it will then wrap around, back to 0. You can add more segments to extend the digits by using the carry-out signal as the clock for the next display. Alternatively, you can add a potentiometer to vary the 555 timer frequency and you can adjust it depending on the count frequency that is needed.
7 segment displays and ICs like the 4026 that can drive them can be used to create all sorts of counters. Let’s move on to the next project.