First we need to familiarize ourselves with the 7 segment module. These modules are made up of 8 LEDs, 7 of which make an “8” pattern and 1 for the decimal point. Using the 7 segments, you can make any decimal digit.
The modules we will be using have a common cathode. This means that the negative side of all the LEDs are connected together. This connection is available on pins 3 and 8.
Each segment is identified by a letter as can be seen below as well as the pinout and schematic for reference.
Now we will build a very simple circuit to drive a single digit. We will use a DIP switch to turn various segments on and off. Since this is being powered by a 9V battery, I am using 1.3K resistors for each LED segment. This provides a little over 5ma for each segment. I used the LED resistor calculator on ohmslawcalculator.com to help select the right size here.
With this circuit, you can create any decimal digit you want, plus some things that aren’t valid digits or characters. See the example below.
Now controlling a 7 segment display like this is OK, but we can do much better. With the 4511 – BCD to 7 Segment Latch/Decoder/Driver we can drive the display with just 4 lines. Each 4511 IC takes a binary number as an input, then outputs the necessary lines to display that number on the 7 segment display.
For normal operation, Latch Enable (LE) is held high, but when it is grounded, the 4511 takes the 4 line input and updates its internal registers. The segments are then displayed on the basis of those internal registers.
The pin-out for the 4511 is shown below, and the datasheet is available at http://www.st.com/stonline/products/literature/ds/4900/hcf4511.pdf.
In this example I will be using 2 x 4511 and 2 x7 segment module. The input will be a Binary Coded Decimal (BCD) which means that each decimal digit is individually coded in binary. For example the decimal number “32” is 00010000 in binary and 00110010 in BCD.
Lamp Test (LT) and Blanking Input (BI) are both held high as we don’t want to use these options in this circuit.
The schematic for the circuit is below…
The photo below shows the finished circuit. We are using a DIP switch to set the BCD number, but you could easily substitute a microcontroller or other device.
To use the circuit, simple select your BCD number on the DIP switches, then press the Latch Enable button. Once you do this the number will be updated on the 2 LED modules.