Introduction: Easy 4x6 LED Matrix, Arduino!

Picture of Easy 4x6 LED Matrix, Arduino!
In this inst'able, I will show you how to create your very own 4x6
LED matrix as well as show you how to write code for it!

There is an animation creator program in step 4!

Here is one ANIMATION to get you excited about the project!

Hello everyone! I'm back with an all new Inst'able!

This Inst'able is for the electronic enthusiast/hobbyists that has basic
knowledge of the simple hardware used, and a good grasp of the
arduino programming language!

Email me at "" if you have any questions about
the instructable.
Post Videos of your own LED Matrices!



Step 1: Hardware

Picture of Hardware
For this project you will need:
  • An arduino board;
  • Twenty-four LEDs of the same color;
  • Four transistors;
  • Four 100ohm resistors;
  • Four 1Kohm resistors;
  • And a fair amount of wire.

"C" stands for Column while "R" stands for Row.
Columns are vertical, varying the Y axis
Rows are horizontal, varying the X axis.

Click Here for a bigger and better res. view of the above schematic

How The Hardware Works:
        The hardware works by applying +5 volts to the desired column and row, and having GND wired to the arduino's GND pin. If I apply +5v only to C1, there will be +5v ready to be passed through all of the LEDs in column 1, but still has to go through the transistors in order to get to GND and there are no LEDs on.. On the other hand, if I apply +5v only to R1, that transistor will allow current to pass from any LED in row 1 to GND. But since there is no voltage applied to any of the columns, no LED is turned on.
        From what I have said thus far, we can see that +5v must be applied to a Column and a Row at the same time for any LED to be turned on. Here is where we run into a problem: the only way to turn on 3 LEDs [(C1, R2), (C1, R1), and (C2, R1,) which are the three lowest and to the left] is to apply +5v to pins R2, R1, C1, and C2. The problem with this is that it will also turn on LED (C2, R2)! See step 2 for how to solve this problem, read on for the technical specs!

Technical stuff...
Schematic Pin Name-----------Digital Arduino Pin They Connect To


GND...................................GDN     Well, duh!     = )

Step 2: Persistence of Vision! (POV)

Picture of Persistence of Vision! (POV)

In step 1--the hardware step--we couldn't turn on more than one LED. How do we fix this?
        The answer to this question lies in our wonderful eyes, and their insistence in persistence.
        When lights blink very rapidly, our eyes perceive them as being consistently on. We can use this to our advantage when creating animations. To see how the Matrix uses this, see step 4.

The Animation Creator file included in STEP 4 and is designed to blink each row really fast and can be used by the novice animator to achieve fame and fortune! ok, well, maybe not. but still!


Step 3: Lights, Camera, Lights!

Picture of Lights, Camera, Lights!

In the above photo are a few snapshots of the Matrix in action!
These are come of the animations I have made.
You can download these animations, as well as
the animation creator that I created for the Matrix!
you will find all of the programs you will need in step 4.

Step 4: Animation Creator!

Picture of Animation Creator!

Attached are some various animations as well as my Animation Creator for all of your matrix animation creating needs!

How the Animation Creator Works:

The program layout:

     --The program first shuts off all of the pins, sets all of the pin variables to 0, and adds 1 to each cycle variable.
     --Then we have the portion of the program where we specify which LEDs get turned on, and when they get turned             on.
     --The cy, cy2, and cy3 variables are very useful in that they increase in one with each cycle of the loop. This allows             us to create our POV

if (cy > 1000){ 
  ro = 3;
  co3 = 1; 

if (cy < 1000){
  ro = 2;
  co2 = 1;
=-=This means that if the "cy" variable is less than 1000,  LED (C3, R3) gets turned on. In addition, if the "cy" variable is greater than 1000, LED (C2, R2) gets turned on. Remember that upon each cycle, the ro and co1-co6 get reset to 0, as well as the digital pins reset to a LOW state. So the arduino does NOT turn one then the other on, in fact switched from LED (C3, R3) to (C2, R2).

=-=The next step is to turn this information into electrical signals going out to our matrix. If co1=1, C1 is turned HIGH.  likewise, if co5=1, C5 is turned HIGH. if ro=1, R1 is turned HIGH, and if ro=4, R4 is turned HIGH.

And that is the basic information that I you need to create your very own animations!
The Animation Creator attached has a clearly labeled section that instructs you where to put you own animation data!


Step 5: Contact and Ideas

Picture of Contact and Ideas

Email me at "" if you have any questions about
the instructable, or if you'd like to
share with me a program of your own! Don't be shy!     =D



shahryar.adil.3 (author)2017-05-14

I made a 5x5 led matrix but am having difficulty in coding. Are you willing to help?

Kim Erso (author)2016-09-03

hello, this is a very nice project for beginners like me!! i would just like to ask why do we need those transistors?

jensenr30 (author)Kim Erso2016-09-05

The transistors are used to connect or disconnect the cathodes of the LEDs to ground. This either: allows a row to e turned on by the arduino pins, or does not allow a row to be turned on.

I turn on one row of LEDs at a time.

If I didn't have the transistors, the current from 6 LEDs would go into one arduino pin. I did not want to do this, because the arduino pins can only handle so much current.

Julian_mele made it! (author)2016-07-20

Nice Idea, works well!

I made it in LEGO style.

Very good project to start with the arduinos. I've had a button to change between animations and add some new mines.

jensenr30 (author)Julian_mele2016-07-21

Cool! Thanks for posting some pictures! It looks nice.

It is really cool to see some other people building things with electronics.

DodyC made it! (author)2015-05-04

coollll i made it in my first attempt

i loved it

working properly


thank youuuuuuuuuuuu

robot1398 (author)2011-05-14

cool did you create all these codes

jensenr30 (author)robot13982011-05-14

Yup! I wrote each program.

nodoubtman (author)jensenr302014-10-13

Congrads! :)

JasonH1 (author)2014-08-23

This was my first major soldering project, works like a charm :)

jensenr30 (author)JasonH12014-08-24

excellent! I'm glad it worked out well for you.
Thanks for the comment.

D1A9M9O9 (author)2014-02-06

Hey, I found this cool Arduino board from online and its pretty cheap.

Check out the link...

ninjaprawn (author)2013-01-22

Hey there!

I was wondering if you could use the same concept for a 4x4 Matrix?

jensenr30 (author)ninjaprawn2013-01-24

absolutely. There is no reason you can't make a 4x4 LED matrix using the same method I did.
In fact, it would be easier and probably have a better picture as there are less things to solder, less programming, and less LEDs to turn on.

gogoi_nilutpal (author)2012-07-02

how to write a name in animation creator program plz give me details

jensenr30 (author)gogoi_nilutpal2012-07-02

what you are going to want to do is make several for() loops.
each for() loop will loop through each row/column several times, turning on the correct LEDs to make a letter appear.

simply execute one for loop after another and a series of letters will show up that you can make to be the letters of your name.

you're going to have to be a little creative here. do what you think needs to be done. A good way to be creative with programming is to know what tools you have available to you. go to to learn all about how to program is C. This website is essential for using the arduino.

i hope this helped!

gogoi_nilutpal (author)2012-07-02

how to write a name in animation creator program? plz help me i am new in c program

Grumpy Mike (author)2011-07-24

While the circuit / age ratio might be admirable it is a poor use of transistors. Basically the 100R resistor should not be in the emitter but in the collector. As you have it in the emitter current flowing through it will raise the voltage on the emitter, thus reducing the voltage between the emitter and the signal driving the base and so cutting off some base current. While this might work for you it is a poor design because it might not work for other transistor or transistor types because it needs a much higher gain from the transistor than you would otherwise need. It could cause the transistor to not be fully saturated and that will increase power dissipation in the transistor.

osarbantovičs (author)2011-07-23

Just made my 4x4 matrix, without transistors only 8 resistors(actualy 4 are used). Codes placed here works just fine after I changed pin numbers

Acarius (author)2011-06-19

Do you have any images on what the matrix looks like without the plastic cover?

jensenr30 (author)Acarius2011-06-19

no. the matrix is built around the plastic cover. just to clarify, the LEDs are on the outside of the plastic, in case you didn't know...

robot1398 (author)2011-06-19

do you have the pcb design for this

jensenr30 (author)robot13982011-06-19

i do not, sadly. I put it together on a small plastic container.

Electronics Man (author)2011-05-20

would it be possible to use an existing LED matrix that is a 4x6 instead of making one?

If you can solder wires to the anode-columns and the cathode-rows, you should--in theory--be able to use it.

If you have cathode-columns and anode-rows
instead of anode-columns and cathode-rows you will have to wire the devise differently. Interestingly enough, you would have less brightness fluctuation. This is due to the fact that instead of six LEDs sharing the same transistor and resistor, we now have only four.

Thanks for the info it really helped

no problem!

Avadhut.Deshmukh (author)2011-05-15

good work i will start this buy arduino soon

sanjib_cu (author)2011-03-02

i am interested to design a led matrix display having dimention 4.5'' x 1.5'' .
will you suggest me how we can do it with less expenditure compair to the conventional one. Please also try to inform me what precautional measure i should take to run it for a long time continuasly -- ROSKY

jensenr30 (author)sanjib_cu2011-03-02

If you use 3mm LEDs, you will be looking at a total of 38 LEDs wide by 12 LEDs tall. thats a total of 456 LEDs!!
The first thing I would like to point out is the power consumption that this will take. A high efficiency colored LED consumes somewhere around 2 Milliamps when at normal brightness. when you take 2Milliamps x 456 LEDs, you get a total of 912 Milliamps! that is basically one amp. I don't believe an arduino should be subjected to this kind of power consumption.
Secondly, You will need to write CODE upon CODE to program this thing! with a total of 456 LEDs to control, You will likely spend 10 hours of coding for every 5 seconds of animation.
In closing, good luck! and I expect it to be done by next monday.    =D

pfred2 (author)2011-02-23

Easy for you maybe. hehe J/K! It looks pretty cool. I have a sleeve of matrix displays here and a driver IC I never did anything with. One of these days ...

About This Instructable




Bio: I'm an 18 year old Electronics enthusiast. I have completed five semesters of schooling at Minnesota State University in Mankato. I'm pursuing a ... More »
More by jensenr30:Taking Apart a Barcode ScannerBand Analyzer Bass Channel WIP - Falling by GodsRobotsArduino Uno Controlling my 8-note Sequencer
Add instructable to: