Step 3: Multi what?

Picture of Multi what?
So what is multiplexing:
It is basically a way to split information in to little peaces and send it one by one.
this way you can save a lot of pins on the Arduino and keep your program quite simple.

In our case we split the image that we want to display to 10 peaces (10 rows), We want to scan the rows of the matrix( light up one row at a time) and send info from the Arduino to the columns.
All the columns are positives of the LEDs and the rows are negatives so if the first row is connected to ground and we send information to the columns we will only light the first row.
To get a good display we need to scan the rows very fast, so fast the the human eye thinks that all of the rows are connected at the same time.

So why the 4017:
For this LED matrix I wanted to use this useful IC.
Heres a good site to learn the basics of this IC : http://www.doctronics.co.uk/4017.htm
The 4017 decade counter is used to allow multiplexing.
This IC basically scans the rows of the matrix( lights up one row at a time).
In our case we want to connect the rows to ground but the 4017 doesn't build to sink current, so to solve this little problem we need to use a transistor with a resistor.
The 4017 has 10 output pins so we need 10 resistors and 10 transistors, we connect the 1K resistors to the outputs of the 4017 and the base of the transistor to the other end of the resistor.
Then we connect the collectors of the transistor to the rows and the emitter to the ground.
Heres the data sheet of the transistor we need to use : http://www.fairchildsemi.com/ds/2N/2N3904.pdf

The shift register:
This little IC is a very useful one it allows you to control lots of outputs with the use of onlt 3 pins from the micro-controller. By connecting more IC's you can increase the number of outputs with losing more micro-controller pins.
You can read more about them and how to use them with arduino in this link:


Hi very nice and neat project! I am making it right now actually. I was wondering why we need the 1k ohm resistors in series with the base of the transistor. Can't we just leave them out?
Thanks Lars

axeman9114 years ago
what is the purpose of a decade counter, adn how does it work? also what are its syntaxes in the arudino language? please help!!
Check the website he posted about the 4017 to start with it will give you the basics. http://www.doctronics.co.uk/4017.htm There isn't any Arduino 'syntax' this is just a logic IC.
KongDan3 years ago
First of all - great tutorial!
Might be a stupid question - how exactly do I connect the emitter pins of the transistors to the ground?
sciguy1023 years ago
hey my 10x8 led iz not workn well ...am using arduino 1280 mega and the pin 0-7 are not workng..........18-21 are workn only and it can only power 4 colums ....plzzzzzzzzzzzz some1 help......................................tnxxxx
Hi Syst3mX,

First of many thanks for posting great articles. There are some discussions on Arduino forum where many times it has been suggested to use MAX7219/7221 instead of this 595-counter combo. If I understand right, I can select a combination of 74HC595 shift register and 4017 counter OR just pick a MAX7219/7221 IC. Am I right?

Thank you,
Syst3mX (author)  जपरीख4 years ago
yep you can choose what is best for you. but keep in mind that the counter limits you to only 10 rows.
deko644 years ago
This is my first time to do the led light so i need someone to help me do it and with the diagram so that i can do it
Syst3mX (author)  deko644 years ago
ok ask me if you need something
deko64 Syst3mX4 years ago
yes i need your help so that i can build the LED for myself and i can teach and l`m good in building some of thing like this so i need your help and the diagram.
Syst3mX (author)  deko644 years ago
press the "i" symbol in the top left of the picture to get the original file, that way you will see the digram a lot better.
I think I understand how this works, but I was wondering how I can make this into a 10 x 10 array?

Also, are the LEDs being lit up a few at a time, but at high speeds, to form the image, so that there is no conflict between the LEDs that should stay off?
Syst3mX (author)  coolsciencetech4 years ago
Yep you got the idea.
Making a 10X10 matrix will only need a change in the code, if you want I can help you out with the code if you send me your email.
hey, i have a similar problem to johann because i want to make my matrix 5x25 so it can show a longer message but i cant see how im supposed to wire this. if you have any spare time, i would apreciate it you could help. thanks =)
Syst3mX (author)  qwertyuiop54335 years ago
 Sure I have time to help you. Just give me your email and i will send you instructions on how to wire every thing up
josu86 Syst3mX5 years ago
Hey, could you also send the instructions to me ;)..thanks a lot 
Syst3mX (author)  josu865 years ago
No problems just give me your email
johannesgj5 years ago
 i know its long time since somebody wrote on this subject but anyway :-)
i have a project looking to be at least 10x10 leds maybe 16x16 leds.
i have read you instructions carefully but i cant seem to understand how i would go about this.
i hope to be only using one arduino. so i need some sort of multiplexer or register between the register s and the arduino else i am low on output pins.
so my question is really:
how complicated would it be?
how many registers and multiplexers?
is one arduino too little?
if youve got a lot of sparetime i would of course ask if you would try and draw me a picture but then again i am too humble to ask for such a favor :-)
if i didnt say it i admire the teachers skills by which you tell the guide. its really easy to understand!
Syst3mX (author)  johannesgj5 years ago
First of all the arduino can handle this kind of "abuse" without any problems.
And if you want give me your email and I will send you the big picture on how to go about this thing.
For a 16x16 matrix you will need only 4 shift registers that will use 3 arduino pins :D
 hehe it sounds so easy :-)
well my email is johannesgj tobefoundat gmail.com
 hey if i make the 16x16 matrix and i have success with it maybe it could be my first instructable of course with regards to you. 

Syst3mX (author)  johannesgj5 years ago
LOL good to know.
And luck with your project
zidakano5 years ago
looks like a neat build. I'm looking to get into messing with the arduino and have been looking at different projects and what not. I was wondering if the 4017 does not sink current could you not switch the orientation of the anode and cathode removing the need for the 1k resistor and the transistors then change your predefined arrays for characters so that it would still output the way it does now. And using the arduino to sink the current.

dunno just an observation from someone who knows nothing. :)
dsveen5 years ago
I have a question about the 4017 Multiplexor. I am trying to do a matrix of 5x16 and i have two of these 4017 multiplexors. How would i put those together to perform the same type of operation. Any help would be greatly appreciated.
Syst3mX (author)  dsveen5 years ago
Mm you can't use them both, there is a problem with this chip because the first output is on when you power up the chip(you can't make all of the outputs low). I will recommend you to use 2 74HC595 shift registers, they are very cheap and easy to use and will be perfect for your project because every 74HC595 has 8 outputs.