Make a 24X6 LED Matrix




About: Electronics and LEDs what can be better ?! :D

After making a 8X10 matrix a lot of people asked me about expanding the matrix to some thing bigger, and some wanted to write stuff to the matrix via a PC, so one day I looked at a pile of LEDs that I had leftover from a LED cube projected and I decided to make a bigger matrix with all the things people wanted.

So what are you waiting for? Get those LEDs out and heat up your soldering iron because we are about to make a 24X6 LED matrix! 

Step 1: Getting All the Right Things

So you will need the basic set of tools for this project : a soldering iron, some solder wire, a cutter, a needle nosed plier,some wire, wire striper, and some desoldering tools if you need them.

For the matrix you will:
1. 144 LEDs
2. 24 resistors( The value is determent by the type of LEDs, in my case 91 ohm)
3. 4017 decade counter
4. 6 1KOhm resistors
5. 6 2N3904 transistors
6. A long Perfboard
7. Arduino
8. 3 x 74HC595 shift register
10. some pin headers

Step 2: How It Works?

The tricky behind the display is multiplexing and the idea is the same as withe the 8x10 LED matrix: 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.

Now this time we have 3 shift registers which multiply the number of outputs and save lots of arduino pins.
Each shift register has 8 outputs and you only need 3 arduino pins to control almost an limited numbers of shift registers.
We also use the 4017 decade counter to scan the rows, and you can scan up to 10 rows with it because you have only 10 outputs but to control it you need only 2 pins.
The 4017 is a very useful chip and it's a good idea to know how to work with it(

Like I said the scanning is done with the 4017, by connecting one row at a time to ground and sending the right data via the shift registers to the columns.

Step 3: Schematics

The only thing I didn't specified in the schematics is the value of the current limiting resistors because they change from each type of LEDs, so you will need to calculate them by your self.

Now to calculate the value of the 24 resistors you can use this site :
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 circuit operates on 5V so your Source voltage is 5V.

Download the original file to see the schematics better.(press the "i" icon in the top left corner of the picture)

I have added a PCB layout of the control board, and i want to thanks Willard2.0 who made this layout and let me use it so thanks a lot mate!

Step 4: Soldering the LEDs

Soldering 144 LEDs in a matrix formation can be a little tricky if you don't have a general idea how.
The last time I soldered a matrix I used lots of little wire jumpers which was a pain to solder, so this time I was a little more creative and came up with this way.

You need to bend the positive lead of the LED down towards the other ones and make a column, and snip off the leads you didn't use and try to make the connections as low as you can get, and you do this to all of the positive leads.
Now the negative leads are connected in a column and thats make soldering tricky because the positive rows are in the way, so you will need to make a 90 degrees bend with the negative lead and make a bridge over the positive row to the next negative lead, and so on to the next LEDs.

Now I will not explain how to solder the shift registers and all the parts because every one has hes own style and methods.

Step 5: Programming the Display

We are almost there, the only thing thats left is the program.
So far I wrote two programs for it that do pretty much the same thing.
I have added the program that gets a word or a sentence from the arduino IDE serial monitor and displays it on the matrix, my code is very basic and may be not the best in the world but it does the work, and you are free to write your own code and modify mine as you wish.

I have added an excel file so you can create your own symbols and characters.
The way it works is like so:
You create the symbol you want  pixel by pixel(don't worry it's very easy) and copy the output line like so - #define {OUTPUT LINE}

I will add in the future a code for animations and a nice game of snake as soon as I have more time on my hands.


Step 6: We Are Done!

Congratulations you made yourself a 24x6 matrix and now you can display anything you like on the fly.
Now try to play with it and come up with a new program and a better interface.

21 People Made This Project!


  • Classroom Science Contest

    Classroom Science Contest
  • Barbecue Challenge

    Barbecue Challenge
  • Planter Challenge

    Planter Challenge

878 Discussions


7 days ago

Plz sir can you explain this code. I want to improve this. I'm not a profession in C language. I can understand this code but i can't understand the order. Plz mail me...


7 days ago

Can you tell me how to and some animated symbol to the text. Eg. I♥U like that. The heart is animated. Big, small, big, small.


Question 4 months ago

I don't understand the necessity of the transistors. Why not just have the row of LEDs connected directly to the output (with a resistor) to the decade counter?

3 answers
Sandeep V MenonDianaK53

Answer 2 months ago

The short answer is the transistors are used to turn ON/OFF a particular row at a very fast rate so that there is persistence of vision.
The long answer is - the transistors act as a switch that gets triggered by the input of the decade counter. The decade counter's out put is a positive pulse. As it can be seen, the LED matrix is composed of Coumns made up of anodes and Rows made up of cathodes if the LEDs, connecting the rows ( even via resistor) will damage the IC (due to currents flowing beyond permissible range). Also there would be no persistence of vision as any one of the row may light up or entire matrix not lighting up at all.

DianaK53Sandeep V Menon

Reply 2 months ago

I understand.
I am trying to fully understand the process here. The decade timer is what allows the message to move across the LEDs, correct? If scrolling wasn't necessary, the decade timer doesn't seem necessary as well.

Additionally, I'm wondering how people know how to design these types of things. Before reading this article I didn't know these components existed and if I decided to make my own device of some kind (not this in particular, though it is really cool) I wouldn't know how to look up the components I'd like. I would have no idea what to call a shift register, for example. Any suggestions?

Sandeep V MenonDianaK53

Reply 2 months ago

No, that is not the case. The Decade Counters (so called as they "count" 10 digits, usually 0 to 9), aid in the display of a given letter. (I shall explain)

Consider a 5x5 LED matrix, it would have 25 LEDs. Let us assume that the anodes (+ve terminals) of all the LEDs are connected to rows and the cathodes (-ve terminals) are connected to columns via switches to a battery (as illustrated in image).

> Now, if say LED L13 needs to be lit. We press switch SW3 and SW8. If we hold SW3 while pressing sequentially SW6 to SW10, we will see that L11 to L15 lights up as the switches are pressed (and turns OFF as soon as the switch is released)
> If we were to somehow repeatedly press the switches SW6 to SW10 at, say, 120 times a minute, our eyes will perceive that the line remains lit.
> Now, continuing as in the previous step, we press the switches SW1 to SW5 one-by-one. We will be able to see/perceive that LEDs L1 to L5 lights up when SW1 is pressed, L6 to L10 lights up when SW2 is pressed and so on.
>If we need to light up the entire matrix in the above mentioned way, we need to press switches on both the row and column in the same manner as we were pressing SW6 to SW10.
>An alphabet is displayed in this manner. Let us consider displaying the alphabet 'A' in our 5x5 LED matrix. We can see that we need to light up L3, followed by L7 and L9, then L11 and L15, L16 to L20 and finally both L21 and L25. If this light up occurs at very fast rate, we will perceive the letter 'A' on the matrix.

This switching without errors is not physically possible. To make error free and precise switching, we use the switching circuits(example - Decade Counter with transistors). To display a word, such ON-OFF patterns (from above example) are required. If we represent ON state by 1 and OFF state 0, for the above example we get a pattern as below :
0 0 1 0 0
0 1 0 1 0
1 0 0 0 1
1 1 1 1 1
1 0 0 0 1

Such patterns are called Bit Patterns. Each letters (upper or lower case) symbols are created in this way.

PS:- I could not clearly understand your requirement in second half of the comment, hence I'm replying from my understanding of it. I hope this helps.
>> The components are named based on the functions, technology with which they are built and so on. For example, and IC AtMEGA328 (which is a microcontroller) is named so due to following reasons - the IC is a microcontroller of the "MEGA" series, from the manufacturer named ATmel Corporation. It has a 32KB flash memory and and 8 bit CPU/ALU


Question 8 months ago

I have a 20x6 blue led matrix. How did you come up with the value of the resistors before the bipolar junction transistors? Does it have to be 1k ohm resistors? How do you calculate? Also can I have updated code?

1 answer
Sandeep V MenonSteveA204

Answer 2 months ago

The resistors before BJTs are called as Bias Resistors.

Now, assume that, the supply voltage is 5V and (or, refer datasheet to ensure the exact value) the max current the IC terminal can supply is 5mA. The transistor needs 0.7V to "turn ON". Rest needs to be dropped across some device. This is where the resistor plays it's part

On the assumption that the voltage at IC terminals is the supply voltage, 5V, we use Ohm's Law (R = V/I ) to get
R = (5 - 0.7)V/5m
= 820 Ohm

To be on safe side, the current from the IC terminals need to be less than the maximum value hence the value is approximated to 1K Ohm.


7 months ago

i would like to 32x6, only got 28x6. i don't understand why don't go to 32x6 please help me!!!
what have i to change in the code? i tried modificate spi_transfer(make_word(0x01000000)); so many times, but it never runs to 32 column, only 28.

1 reply
Sandeep V Menonfabiox34

Reply 2 months ago

This is something that crossed my mind. I thing you will have to update/modify the circuit to accommodate as well as drive the 192 LEDs. If this has been done then the program will need be updated, ie, search and find out all the instances where there is a call to drive the 28 pins and modify it to 32.

Ps:- I too am going through the program myself as I type this. Please consider the reply/answer as more of a comment rather than an answer. Thanks


4 months ago

i need help for 100 column by 6 rows i need to make a project like this but bigger one 2 meter i think the exact size


9 months ago on Step 6

i made one but not showing anything.


4 years ago on Introduction

can some one mail me 48*8 or

tq uuuuuuuuuuuuuuuuuuuu...

5 replies
Burhanudin ahmadelink5319

Reply 1 year ago

Dear "elink5319"
Would you like to send the same 48×8 code for me & put 10 text or more.