Introduction: Multiplexing Four 7-segment Displays Using Shift Registers Arduino

Hallo Every one

I designed a simple way to multiplex four 7-Segment displays using Shift Registers and an Arduino

Let us multiplex the 7 segment display

Step 1: Step-1 : Let's Design

Take four 7-segment displays and solder them on a PCB in a side by side manner.

A cathode or anode display can be used. This design is for an anode display.

Combine the 7 pins (pin-a to pin-g) and the dot pin of all the four displays.

Take four BC548 NPN transistors

connect each transistor emitter to each anode of 7 segment display

Combine all collector pins together it is for power supply +5v

then we have connect base of transistors and a,b,c,d,e,f,g,dot pins to shift-registers

go to next step

Step 2: Connecting to ShiftRegisters

Take two 74HC595 shift Registers

connect them to form 16 bit shift register by connecting serial pin of first shift register to data pin of second shift register

Combine latch pins to form single , like wise combine clock pins to form single one

Connect enable (active low)pin to ground pin on both register

connect master reset pin(active Low)pin to Vcc in on both registers

this connection form a 16 bit shift register

now connect the a,b,c,d,e,f,g,dot pins of LED to Q0,Q1,Q2,Q3,Q4,Q5,Q6,Q7 pins of first shift register

Now connect Base of transistors ,First LED Transistor Base Pin to second shift register Q0 pin , second Base of transistor to Q1, third to Q2, fourth to Q3

Now the set up is completed Next coding

Step 3: Coding

To display numbers on 7segment we have pass +5v or connect to 0v to on each segment

we have 7 segments a,b,c,d,e,f,g according to diagram

to display 0,9 numbers some segments make them to on , some off

Table

Number Byte_to_display_7sgment(a-g) Decimal_number
0 0b0000001 1

1 0b1001111 79

2 0b0110110 18

3 0b0000110 6

4 0b1001100 76

5 0b0100100 36

6 0b0100000 32

7 0b0001111 15

8 0b0000000 0

9 0b0001100 12

above is byte and decimal code to display the numbers in 7segments

we have shift this byte to first shift register ,because we connect the first shift register parallel pins to LED's a,b,c,d,e,f,g,dot pins

Next

we connected the LED on circuit (transistor Bases) to second shift register

for make first led on we have to shift

00000001 into second shift-register

00000010 for Second LED on

00000100 for third one

00001000 for fourth one

In this design we connect first and second shift-registers each other

so we first shift the position byte first and the value next the potion byte will move to the second shift register by using serial out pin of first one then we can shift the value bytes

Examples:

for display 5 on third LED we have shift the byte

00000100 then 0100100

Next :arduino Coding

Step 4: Arduino Coding

Connect the Latch , Clock ,Data pins to 8,10,9 pins of arduino (or any other one your wish )

I was written a code , that was take the 4 digit number from serial input and display onto the 4 LED

See the files for the Code

Note: I just designed it not tested , because presently i don't have arduino and LED

code written based on Imagination