Picture of Multiplexing 7 Segment displays with Arduino and Shift Registers
In this instructable, I will be teaching the basics of multiplexing 7 segment displays using an Arduino and a couple of shift registers. This project is well suited for displaying numerical information or if you want to control a bunch of LEDs. For beginners, like me, I had no clue on how to tackle this project. But after trial and error and blood, sweat, and tears, I can say that I have a better understanding of multiplexing and how best to implement it on an Arduino.

First off, what is multiplexing? What about Charlieplexing? Any differences?
Actually, they are they same... Charlieplexing just takes multiplexing to a higher level. Both are techniques used to not only reduce the number of microcontroller pins needed, but also to reduce the power requirements substantially. However, at the cost of time and/or brightness.

In multiplexing, an entire digit or row of LEDs are shown at one time. After some time, the whole digit or row is turned off and the next digit/row is turned on, etc... Simple!

However, Charlieplexing is a bit more complicated in that it goes deeper than multiplexing. Instead of turning on a whole digit or row, a single segment or individual LED is turned on/off. After some time, the segment/LED is turned off and the next segment/individual LED is turned on, etc... After cycling through a digit/row, the process repeats with the next digit/row. So, if you're charlieplexing a 7-segment, you would consume a max of 20mA vs 160mA in multiplexing since only 1 segment is on at a time. The severe downside is that it takes longer to display information and brightness is reduced because the program needs to cycle through all the 7 segments + decimal or each LED first before moving to the next digit or row. You will also notice a slight flicker as you chain more displays/LEDs.

Look above for a comparison on multiplexing and charlieplexing. Notice how charlieplexing requires more time to display a number?

Before you tackle your multiplexing project, you must lay everything out--research as much as you can. Otherwise, you will end up wasting time, money, and pulling your hair out of frustration.

>> - I would avoid the popular 74HC series as it can only source/sink a max
of 70mA through the chip and cannot handle high voltages.

If someone had only those lying around (like yours truly), I guess slapping on some transistors would do the trick, wouldn't it?

rosjio998 months ago

Hey guys, I have question about the TPIC6B596 IC. I'm familiar with the 74HC595 but I am stuck on grasping the concept of the SER IN and SER OUT pin on the TPIC6B596. My interpretation is that you send 8 bits of data from your controller to pin 3 (SER IN). The data is then sent out via D0-D7 to illuminate the LEDs. Then data is retrieved on pin 18 (SER OUT) and shifted out to pin 3 of the next shift register. My question is, how is the data retrieved on pin 18 (SER OUT)? What is the source that determines the data being sent out to the next shift register?

Thank you in advance for your feedback!

I would like to point out to the entire universe that what everyone is calling multiplexing is in reality DE-Multiplexing.

I don't know how or when it all got confused, but everyone is doing it now, and it kinds bugs me!

Multiplexing is when you take a large number if signals, and combine them into a few lines. A good example of this is when 500 apartments in an apartment building all have their telephone lines connected by one fibre optic line to the phone company. De-multiplexing happens when the fibre optic line comes back to the apartment and then becomes 500 individual phone lines. So what we are really doing with our microcontrollers sending out data that gets spread across a much larger number of devices or wires (LEDs usually) is de-multiplexing. If we were to take 250 push-buttons and connect them all to the Arduino with 2 wires so that it could tell which button was pressed, that would be multiplexing.

That said - Nice project!

A really good instructable.

I did it with zero knowledge about 7 segments and TPLC6B595N. Thank you.

A question. Should code be like this according to the schematic?

const int CLK = 13;
const int LATCH = 10;
const int OE = 9;
const int DOUT = 11;

robot7971 year ago
hello my good sir
i have a question
can i use this for building a nice vfd shield?
and another one can this be rewritten for an 74hc595?
Magej1 year ago
Can I use 74HC595 instead tpic6b596?
Project 232 years ago
gcanders2 years ago
Beautiful Instructable. This one I am printing out.
ynze2 years ago
Nice tutorial! And a cool maiden Instructable! It would be totally cool when your next I'ble is some cool application of charlie/multiplexing :-)