Instructables

Multiplexing 7 Segment displays with Arduino and Shift Registers

Featured
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.
 
Remove these adsRemove these ads by Signing Up
SuperTech-IT4 months ago

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!

beingobserver6 months ago

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;

robot7978 months 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?
Magej9 months ago
Can I use 74HC595 instead tpic6b596?
Project 231 year ago
http://www.instructables.com/community/Instructables-android-ios-app-improvement-idea/
gcanders1 year ago
Beautiful Instructable. This one I am printing out.
ynze1 year 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 :-)