In this step we will use a chip called a 4511 binary to 7 segment decoder to make displaying numbers on the 7 segment display much more simple. This chip connects to the 7 segment display so that when we give it a binary number input (0000-1001), it will output the base ten value (numbers 0-9) on the display.
The pin configuration of the 4511 is given in the datasheet
, and I've copied it in figure 2. Notice how pin numbering starts at 1 at the top left of the chip (indicated with a semicircle or sometimes a dot) and wraps around the outside of the chip until ending at 16 in the top right.
-disconnect power to the board
-put the 4511 on the breadboard so that it straddles the middle section of the board (figure 4)
-disconnect the 5V connections of the 150ohm resistors and connect to 4511 pins Qa-Qg. You will probably need to use jumper wires to extend these connections (green wires in figures 5, 6, and 7). Pin numbering/letters are given in the diagram at the bottom of figure 3 for the display and in figure 2 for the 4511.
-use four 10kOhm resistors to create a connection between the 4511 input pins (1, 2, 6, and 7) and four spare rows on the breadboard (figure 8)
-connect 5v to 4511 pins 3, 4, and 16 (red wires in figure 9)
-connect ground to 4511 pins 5 and 8 (black wires in figure 10)
-connect the free ends of the 10kohm resistors to ground (red wires in figure 11)
-power on, you should see the number 0 (figures 12 and 13)
Try connecting the 4511 input pins (red wires connected to 10kOhm resistors to 5V to make different numbers. Here is a table that shows you how to convert from binary to decimal:
D0(pin 7) D1(pin 1) D2(pin 2) D3(pin 6) decimal
0 0 0 0 0
1 0 0 0 1
0 1 0 0 2
1 1 0 0 3
0 0 1 0 4
1 0 1 0 5
0 1 1 0 6
1 1 1 0 7
0 0 0 1 8
1 0 0 1 9
So if you connect D0 to 5V and D1-3 to ground you should see a 1(figure 14)
D0 and D1 to 5V and D2 and D3 to ground gives a 2 (figure 15)
Since there are so many connections, it is easy to make a small mistake that causes the whole project to malfunction. If the display is not lighting up at all: check to see if all your components are powered and are connected in the correct orientation. If it is on but displaying nonsense: carefully check the schematic and make sure your connections between pins a-g are correct.
I've also attached a fritzing document for this circuit for your reference, find it below.