Introduction: Make a 8x10 L.E.D Matrix

UPDATE 1: I HAVE ADDED THE CODE FOR CONWAY'S GAME OF LIFE
UPDATE 2: NOW YOU CAN SAVE SOME ARDUINO PINS WITH THE HELP OF 1 SHIFT REGISTER.

In this instructable I will show you how to build a quite fancy 8 by 10 L.E.D matrix(with scrolling text and animations) using the Arduino and 4017 decade counter. This type of matrix is easy to make and program and it is a good way learn how to multiplex.

I have added another part to this instructable about using the 74HC595 shift register which will help to save some arduino pins for other thing you would like to do.

So now you have to ways to go from here. You can make this matrix without the shift register and that will save you some soldering work or use the shift register if you want to have more free pins to use.

Step 1: Stuff You Need

Tools:
1. Soldering iron
2. Some solder
3. Small needle nose plier
4. A wire striper

For the matrix:
1. 80 L.E.D.s
2. 8 resistors( The value is determent by the type of L.E.D.s)
3. 4017 decade counter
4. 10 1KOhm resistors
5. 10 2N3904 transistors
6. Some single core wire
7. Perfboard
8. Arduino
optional -
9.  74HC595 shift register
10. some pin headers

Step 2: Choosing L.E.Ds and Resistors

This is one of the most important part of this project, because it based on LEDs it's very critical to choose the right ones.
I recommend using 5mm diffused LEDs because they give a good amount of light and make a clear image(the color of the LEDs is your Choice only) .
You can use a 3mm LEDs too but it would make soldering really hard and you would get a small display.

Another tip is to buy the LEDs from Ebay because you can get a really good price and sometimes get free resistors as well (like in my case).
Do not buy exactly 80 LEDs because one or more of the LEDs can be damaged, my advice to buy 10 or 20 more, and if some will be left over you can always use them in future project.

Now to calculate the value of the 8 resistors you can use this site : http://led.linear1.org/1led.wiz.
You should first get some specs on your LEDs, you should know their forward voltage and forward current, you can get this info from the seller. The Arduino gives an output of 5V so your Source voltage is 5V.

Step 3: 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:
http://www.arduino.cc/en/Tutorial/ShiftOut

Step 4: Soldering the Matrix

Soldering the LED matrix is a very tricky thing ,there are a lot of ways to do it and I will give you just two.
The first one is the one I used and this way takes a lot of time and effort but the end result is very nice and pretty.You need to connect all the positive leads of the LEDs in columns and the negative lead in rows.
Now you do this by taking the positive lead of the first LED and bend it down to the other LEDs, solder the pins which touch each other, from here take the last lead that you soldered and bend it again down and repeat till you have all the positive leads connected in the column. snip the leads that you didn't use.
Now the tricky part is connecting the negative pins in a row because you can't bend them and solder like you did with the positive leads. Now I used little jumpers from solid core wire and connect them like you can see in the picture below( this takes lots of time and work).

The second way is to start the same way as in the first way but the only difference is in connecting the negative pins. This method saves lots of time and is a lot simpler.
The trick is to put some tape or another thing on the columns connections to isolate them from the negative pins and if you do that you can bend the negative leads too and connect them like you did with the positive ones.

Without the shift register:
Via a resistor you connect each column to the arduino(pins 0-7).
The reset pin of the 4017 goes to pin 8 on the arduino and the clock pin goes to pin 9 on the arduino.

With the shift register:
Now if you connect every thing like shown in the schematic you will need to connect the control pins like so:
The shift register:
Data Pin = arduino pin9
Latch Pin = arduino pin 11
Clock Pin = arduino pin 10
The 4017:
clock pin = arduino pin 13
reset pin =  arduino pin12


Step 5: It Is Time to Program

I have written a little program to make scrolling text and added all the letters and number( lots of work ), I used ports for my program because it saves space and easier to handle.
If you don't know how to work with ports on the arduino I recommend to go on the arduio web site a learn before you start.
here a link : http://arduino.cc/en/Reference/PortManipulation

If you want to make your own images I have made a little tool with excel that will make writing images a lot easier(the instructions come with the tool)

If you don't have excel, I recommend making a matrix in paint and drawing the image there and then it would be a lot easier to write the bytes.

And the last things is to not forget to unplug pins 0 and 1 when you upload your program because this pins also used as communication pins and may cause some errors with the program.

If you choose to use shift register you will not need to worry about disconnecting the 0 and 1 pin on the arduino. I have added the code to control the matrix with shift registers too.

Step 6: It's Done

Now you can try and make your one patterns and images and you will know how to use the 4017 IC
and the 74HC595 shift register.

Comments

author
SaraH196 made it! (author)2017-04-24

Hi, I used this scheme for my little project. But I have a problem. The leds are hardly dimmed and the brightness isn't equal. Does anyone know how I can fix this?

Thanks!

author
KoayH made it! (author)2016-05-20

Hi. I made one with 74HC595. After uploading the code, only the 1st row lights up. Why? Thanks.

author
vladislav1705 made it! (author)vladislav17052017-01-10

I had the same problem. You need just swap 12 and 13 contacts on the 4017

author
Alexisgm97 made it! (author)Alexisgm972016-09-04

I have the same problem but without usin the shift register. Anyone has a solution?

author
vlad.fara.1 made it! (author)2015-07-23

Hey, cool tut, I managed to adapt it to 8x8(pretty easy in fact, I just had to reset the 4017 after 8 rows :) ) .. I didn't have all the LEDs :)) hope you like it :D

temp_1731993152.jpgtemp_-1234944977.jpgtemp_1081496368.jpgtemp_694210202.jpg
author
Kim Erso made it! (author)Kim Erso2016-12-28

hello, im not that good with codes, can you tell me how to apply it to 8x8 matrix? thanks

author
abhijit2683 made it! (author)2016-08-05

Hi,

If I want to connect 10x 10 matrix then I have to use shift register. Can any one help me with the circuit diagram and code. Thanks in advance.

author
Lustrousfiddle4 made it! (author)2016-06-01

Could the same code be used if I were to add an additional 8 columns? I would use another 595 shift register and cascade the date from the first to the next allowing 16 total outputs. I would imagine something in the FOR loop would need to change. Any comments would be great! :)

-Sky

author
Pranav CB made it! (author)2016-04-13

Simple online code generator : https://jsfiddle.net/pranavcbalan/Lk2szgu5/4/

author
fugatecody made it! (author)2016-04-09

How large of a perfboard is used? I'm trying to buy it and idk what size would fit! I have everything else already, just need the canvas

author
mirycia made it! (author)2016-02-08

HOLA SYS3MX

HE PREPARADO UNA FORMA MAS SENCILLA DE LA MATRIX MIRA AQUI SI TE GUSTA ,GRACIAS

https://www.instructables.com/id/10x8leds-En-3-Horas/

led.png
author
mirycia made it! (author)2016-02-08

thanks for you work

20160208_081924[1].jpg
author
Mattosx made it! (author)2016-01-03

Question: Is supplying the current from the +5V pin unwise? Isn't that a lot of current going through that one pin that could possibly destroy the Arduino's voltage regulator? Go through VIN instead?

author
agunk_wg made it! (author)2015-12-21

how about 8x8 led matrix?

author
Kilmore made it! (author)2015-09-05

This was my first electrical project. It works, but it scrolls backwards and the letters are backwards. I know I could remedy this by turning it upside down and redefining the code but I would like to know where I went wrong.

image.jpg
author
abuffa made it! (author)abuffa2015-11-26

you must invert the negative pins, this happened to me too in a 24x6 matrix
if you don't understand my english is because i am argentinian

author
MathiasF1 made it! (author)MathiasF12015-09-16

this happened to me too. do you know where to edit in the code?

author
MathiasF1 made it! (author)MathiasF12015-09-16

I've figured it out if anyone else get this problem.
Just change this line
for(y=0;y<10;y++){
into this instead:
for(y=9;y>-1;y--){

author
Kilmore made it! (author)Kilmore2015-09-18

I don't know anything about code, I probably should have mentioned that.

author
Kilmore made it! (author)Kilmore2015-09-18

Thanks, it works correctly.

author
Kilmore made it! (author)Kilmore2015-09-16

Well what I did was flip the matrix upside down, then in the code I went through and reversed the order of the "B00000000" part for each character.

Ex: #define A {B00000000,B00111100,B01000010,B01000010,B01000010,B01111110,B01000010,B01000010,B01000010,B00000000}

into: #define A {B00000000,B01000010,B01000010,B01000010,B01111110,B01000010,B01000010,B01000010,B00111100,B00000000}

I think if you reverse the order of the wires going from the positive wires > arduino pins and then from the transistors to the decade counter, it would do the trick, but I haven't tried it yet. Hope this helps.

author
MathiasF1 made it! (author)MathiasF12015-09-18

thanks, but found another solutions (see reply above)

author
MathiasF1 made it! (author)2015-09-16

First project done! Thanks for nice instructable.

Had trouble with the letters were backwards. Fixed it by changing this line
for(y=0;y<10;y++){
into this instead:
for(y=9;y>-1;y--){

smiley2.jpg
author
GilC3 made it! (author)2015-09-13

well it works perfectly using 8x8 matrix..
well im trying to do 8 rows x 12columns and daisy chain 2 shift registers on columns.. can someone help me with the code? need it badly.. TIA guys

author
AngelaWhitmey made it! (author)2015-09-07

First complete project, this was really helpful- thank you!

author
harry1to4 made it! (author)2015-09-02

I made the hardware same as the description above using shift register and used the code of Scrolling text(with a shift register) but while in the output all the all the LED of the row and column required for a letter to display glows. I tried a lot still having the same problem. Is it a hardware problem or coding????

Photo0067.jpg
author
ArduinoCheckMate made it! (author)2015-08-25

Thanks a lot for the author. Made it today but using 2n2222A transistors. Also wrote a little program create custom patterns. I would like to share it.

Smiley.jpgPattern Creator.exe
author
vlad.fara.1 made it! (author)2015-07-21

Hey :D really cool tutorial.. I am almost done, but I would like a bit of help on making this matrix a 8x8, so just reduce the 4017 steps.. but I am not very good with such complex code.. I tried but couldn't follow..Can you please help me?

author
ElectronicManiac made it! (author)2015-07-06

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

author
mirelush made it! (author)2015-04-21

My only need is to simulate this project and I can not find any simulator that provides a 4017 decade counter. Is it possible to replace it with another component or even not use it at all?

author
pitrowski made it! (author)2015-02-24

I built the matrix without using the shift register. Is there a way of coding to light up a standing image of a letter? without scrolling? tried to figure out myself but cannot make it work. thanks!!

author
ryeq made it! (author)2015-02-08

is it possible to this without the use of 4017 decade counter, or any other shift register ? just only a transistor and resistor connected to the LED

author
DjZ2 made it! (author)2015-01-07

megcsináltam én is a led matrix szot nagyon jó

photo.jpeg
author
walt.schlender made it! (author)2015-01-05

Thanks for putting together this instructable. I learned so much and it was really fun.

I did mine with wire-wrap which turned out to be really elegnt.

10384099_10152406672601921_5419160309808949612_n.jpg1966949_10152406672486921_2273960777943063368_n.jpg
author
binush69030 made it! (author)2014-12-19

i am doing 8*10 led display for my minor project. so i want to ask that whether the provided information are sufficient or not. are there anythings that u have not explained. n can anyone tell me what are the main things to present in a minor project defense. Please kindly reply soon. Its a humble request.. Please..

author
binush69030 made it! (author)2014-12-19

i am doing 8*10 led display for my minor project. so i want to ask that whether the provided information are sufficient or not. are there anythings that u have not explained. n can anyone tell me what are the main things to present in a minor project defense. Please kindly reply soon. Its a humble request.. Please..

author
namila007 made it! (author)2014-11-17

made it.thanks

https://www.youtube.com/watch?v=nhybbm-POcg

B2pMinzCIAAjdWI.jpg
author
FedericoR made it! (author)2014-09-22

Hello,

I am working with both the 74HC595 and 4017 Decade Counter to acheive One-at-a-time lighting (without the letters going from one side to the other on the screen).

Is there any part of code that I can erase to just show the letters at once, rather than moving?

As you may imagine, I'm a newby here, so please share if possible. Thank you very much

author
FedericoR made it! (author)2014-09-22

Hello,

I am working with both the 74HC595 and 4017 Decade Counter to acheive One-at-a-time lighting (without the letters going from one side to the other on the screen).

Is there any part of code that I can erase to just show the letters at once, rather than moving?

As you may imagine, I'm a newby here, so please share if possible. Thank you very much

author
filip.trejbal.5 made it! (author)2014-09-21

Hi, will it work with arduino substitute with same schema ??? thanks

author
tuberdj made it! (author)2014-02-09

hey guys! I made a matrix (with shift register) with this nice instruction. I used exactly the code as posted above... But know after shifting a couple columns something strange happens... As a test I used a whole lighted matrix (or all B11111111), where after ALL LED's light up like they should. When this block has shifted four columns to the left in a normal way, a bug appears. In the next shifting step the whole next TWO columns aren't lighted and this remains two shifting time steps. After this the remaining two columns are shifted out like they should...
Does someone has a idea how to fix this problem? (A)

author
rca123 made it! (author)2014-01-28

HI... i want to make a 48x10 LED matrix for my arduino project. help me to modify the code of yours...

author
yusfsalim made it! (author)2013-06-03

The Leonardo pin map

32U4PinMapping.pngpin map.png
author
rodrigolimauk made it! (author)rodrigolimauk2013-10-10

Hi yusfsalim, it does work with Leonardo just fine, i just did it.
check the pins, it canbe very tricky. with a shift register it worked a lot better.

author
arandomalien made it! (author)2013-08-25

where can i buy the Arduino Duemilanove

author
yusfsalim made it! (author)2013-06-03

Hey, I built the matrix but I used an arduino leonardo to code it.
I saw the ATmega 32U4-Arduino leonardo Pin Mapping diagram and Port manipulation is really different.
PORTD is used to control pins 0,1,2,3,4,6,12 and the tx LED. So the program that you have written is not applicable on the Leonardo. Could you help me change the code so that it is compatible with the Leonardo.
Thanks for the amazing instructable, any help would be great.

author
kirangowle made it! (author)2013-01-30

Hello,
I am doing the similar kind project with 8051 and 4094.
Can i use the same logic of yours.

author
matt.e.jenkins made it! (author)2011-12-26

This is what i have so far.

author
mzee233 made it! (author)mzee2332012-02-22

dude...is it necessary to have a separate circuit to display the time and date....??

author
matt.e.jenkins made it! (author)matt.e.jenkins2012-02-23

I added a RTC time chip with back-up battery, a TMP36 temperature sensor, a IR detector, and an arduino from scratch embedded on the broad. I tried to see how much stuff I could fit. :-) Let me know if you want the code, though it is not yet compatible with Arduino 1.0.

About This Instructable

218,481views

257favorites

License:

Bio: Electronics and LEDs what can be better ?! :D
More by Syst3mX:Make a Desktop TamagotchiLED Binary CalculatorMake a 24X6 LED matrix
Add instructable to: