Hola , I am Javier from Makespace Madrid. Last week we organised a meetup to play with LED matrixes and Arduinos. This was part of  "La noche de la electrónica con Jameco"
This instructable is based on the workshop. It uses one single LED matrix and shows how to switch its LEDs on/off and how to display ASCII characters.
A future instructable will show how to work with mulitple LED matrixes connected together.

Step 1: Components

For this example, you need the following components:
- Arduino Uno board
- MAX7219 Red Dot Matrix Module
- 5 jumper wires F/M (female/male)

Although this instructable uses an Arduino Uno board, you can use other Arduino (compatible) boards

You can find the matrix module at many online stores (e.g. http://dx.com/p/max7219-dot-matrix-module-w-5-dupont-lines-184854). This includes a 8x8 LED matrix (red colour), a MAX7219 chip to control the LEDs, header PINs and sockets, one 10KOhm resistor, a 100nF capacitor, a 10uF electrolic capacitor and a PCB where everything is connected together. You can purchase the module already soldered and mounted or just the components. Up to you;-)

If you want to learn the low level details, you should check this article at arduino playground.

IMPORTANT: The LED matrix is common cathode. This module does not work with common anode matrixes.
<p>my frend i need your help, i do all what you did, but when i run the program all the led always are ON and i can't turn them Off. why? i have to increment the intensity to 15 and i can si how the text is moving but other leds always are ON.<br><br></p>
<p>One possible cause is the wrong connection of the wires. Please double-check that you have connected the right PINs in Arduino/LED matrix and that the wires are in good state.</p><p>It could also be that you soldered something wrong in the board or that one of the PINS in the matrix is broken or bended.</p>
<p>di you speak spanish? can you say me you facebook or email to contact to you? thank you.</p>
that's great.
<p>Congratulations :-)</p>
<p>Your library really rocks, congratulation :))</p>
<p>How do I make the text scroll smoothly across a single matrix?</p><p>Because with the sketch I have now (yours), the letters will just appear and dissapear on the same position.</p><p>I hope you can help me!</p>
<p>Sorry for the late reply. The library does not support smooth scrolling. You need to update it addding scrolling functionality (handle every letter/char as a set of pixel columns that scroll over the 8 columns of the matrix). Not difficult, but it requires some coding.</p>
<p>Just use the code from the other Instructable and change #define NBR_MTX 4 to #define NBR_MTX 1</p>
<p>How would I make a 16 row display,... please advise....</p><p>my email is eng.gachara@gmail.com</p>
<p>It is a long time since I made this project, but as fas as I can remember the maximum number of matrices supported by the library and the MAX7219 chip is 8. I tested it in the past and it worked fine. I just had to provide enough power ideally with an external power source other than Arduino (when many LEDS are ON Arduino cannot provide enough miliamps and things start going wrong)</p><p>8 marices make 64 x 8 LEDS. If you need a larger display, the current library is not suitable and you need to either synchronise somehow two sets of matrices or dig into the curent library code and see if you can update it to control two sets of matrices (i.e. 16 matrices)</p>
<p>I am only getting two leds showing at once. I have checked for bridges and there are none. Can anyone help me here?</p>
<p>I am now getting more LEDs on at once but no distinguishable letters.</p>
<p>Sorry for the late response. </p><p>Not sure what is wrong, but I suggest to check three points:</p><p>- Are you providing enough power (miliamps) to the matrix?</p><p>- Have you double/triple checked that the wires are properly connected?</p><p>- Are you using a common cathode matrix? (the code does not work if the matrix is common anode)</p>
<p>Excellent stuff, very clear and easy to follow - thanks a lot. </p><p>I have a bunch of matrices lying around and will definitely be doing your other 'ible :) </p>
<p>Thanks for trying it out:) Have fun!</p>
<p>I soldered up a MAX7219 kit ($8 with prime shipping on Amazon - constantly amazes me how cheap things are these days) and this instructable was exactly what I needed next. Just wanted to say thanks!</p>
<p>Thanks for your message! If you decide to solder more matrices, you can then browse my second instructable ;-)</p><p> <a href="http://www.instructables.com/id/Multiple-LED-Matrixes-with-Arduino/" rel="nofollow">http://www.instructables.com/id/Multiple-LED-Matri...</a></p>
<p>Hello,</p><p>congratulations for the project !!!</p><p>I'd like to get help to realize this project using two MAX7219.</p><p>http://scuola.arduino.cc/lesson/l81bRbQ/Tabellone_Segnapunti.</p><p>I have some problem with the code ... it's very urgent.</p><p>best regards</p>
<p>Can you be more specific about the problem that you have? What is not working? Note that the LED matrices in your link are 7x5 instead of 8x8 (the ones my project and library are using)</p>
<p>Hi,</p><p>thank you for answering!<br>Simply'm buildingthescoreboardbutinsteadof the two7x5matricesI would usetwo8x8matricesMAX7219so I shouldrewrite the code(usingifthey also servethe appropriate libraries).I would also liketo addtwo buttonsto increase or decreasethe scoremanually.Unfortunately I am notgood at writingthe code...</p>
<p>Thank-you SO much &mdash; this has been my first successful Arduino &lsquo;anything&rsquo;!!</p>
<p>CONGRATULATIONS!!</p><p>I am getting this error.. Please help me....</p><p>Arduino: 1.6.3 (Windows 8.1), Board: &quot;Arduino Uno&quot;</p><p>please_work.ino:11:40: fatal error: FFT.h: No such file or directory</p><p>compilation terminated.</p><p>Error compiling.</p><p> This report would have more information with</p><p> &quot;Show verbose output during compilation&quot;</p><p> enabled in File &gt; Preferences.</p>
You are trying to import a library (FFT.h) in your Arduino sketch (line 11) and the IDE is not able to find it. I do not know what this library is and why you are importing it but it has nothing to do with the LED matrix project/library<br> <br> Anyway, if your project uses this library, you should import/copy it into your Arduino libraries folder. Google for &quot;how to install a library in Arduino&quot; or check <a href="http://www.instructables.com/id/LED-Matrix-with-Arduino/step2/Arduino-Library/" rel="nofollow">http://www.instructables.com/id/LED-Matrix-with-Arduino/step2/Arduino-Library/</a>&nbsp;to learn how to install the library.
<p>we are actually doing the audio spectrrum analyzer which has to include fft library</p>
<p>Thanks for trying it out!</p><p>Hope this is just the first one of a looong list of Arduino projects :-)</p>
<p>hello</p><p>good sketch</p><p>how many elements can be connected in series?</p>
A maximum of 8 matrices
<p>Why just 8 matrices? Is because of the current supported by Arduino? And if I use an external source?</p>
<p>It has been a while since I made this project but I think that 8 is the maximum number of matrices that can be controlled by the MAX7219. This maximum value (8) is definitely hardcoded in the library.</p>
<p>Thanks you, and well done. This and your other--the scrolling LED matrices--got me started on my first project, an LED clock, which I published today to this site. I'd like to give credit where it's due.</p>
<p>Thanks a lot!</p><p>I do recommend other visitors to check your intstructable to understand how to reuse and adapt my original work:</p><p><a href="http://www.instructables.com/id/Arduino-LED-Matrix-Clock/" rel="nofollow">http://www.instructables.com/id/Arduino-LED-Matrix...</a></p>
<p>My brother tried this yesterday and was very happy about it :)</p>
<p>Glad that he enjoyed it :-) Keep on tinkering!</p>
<p>Does the arduino have to have a UNO bootloader on it for the Matrix fo function? I've tried this code with the libraries, on a Leonardo and a mini pro and all I get is; almost all the leds constantly being on not even a blink.</p>
<p>I have not used it with Leonardo so I cannot tell you:-(</p><p>I have used it with Arduino Mini (5V) without any problem.</p><p>Your behaviour seems to be due to wrong connection of wires (double check them) or to not enough power (try to power the LED matirx (Vcc&amp;GND) form another power supply tan the Arduino. </p><p>Be careful! Vcc of your new power supply should be 5V and ground(GND) of the power supply and the Arduino Leronardo should be connected. If you do this wrong you can burn the chip of the LED matrix.</p>
<p>It works on a Leonardo. I had the same problem as some folks -- all of my LEDs on the Matrix were on the first time. I had two wires in the incorrect spots. Fixed it so that:</p><p>CLK =&gt; pin #11</p><p>CS =&gt; pin #10</p><p>and</p><p>DIN =&gt; pin #12</p><p>Easy mistake to make because the first 3 were in order. Good luck.</p><p>Nice Library too!</p>
<p>Thanks :-)</p>
<p>Nice and easy tutorial to get things going. Thanks!</p>
<p>Hi i am running the Arduino IDE 1.0.5 on a mac and i can't find any LedControlIMS folders</p>
The folder does not exist. You have to create it as explained in Step2.<br><br>I do not know where the libraries folder is in a Mac. Try;<br> ~/Documents/Arduino/libraries/<br><br>
<p>Hi again. I pulled in my led matrix and loaded up the basic example from the led matrix (MakeSape_LEDMatrix). and it just lights up at the LEDs and nothing happens. these a picture. please help and thanks a lot.</p>
Hi,<br>Which Arduino version are you using? I know it works on an Arduino Uno, but I have not tested it with other boards.<br><br>One possible cause for this behaviour is that you have not properly connected the wires. Please double check all the wires are properly connected!<br><br>Another possible reason may be a wrong soldering of the LED matrix board. Did you solder it yourself or did you get already soldered and mounted?<br><br>Sorry I cannot be more specific.
<p>I got it was the wires. thanks. but now I need a code and I still dont know how to wire code its so hard.</p>
<p>I have a Arduino nano v3 and im pretty sure I put the right pins in the right spots. I did solder my own led matrix but I did it right and I even looked up how to solder them. I have 3 of them all the same . But one of the Matrix came pre soldered. All 3 of them do that same just light up all the lights or sometimes flash. Thanks for the help its because I want to have it done by next mouth so I can give at as a gift for my girlfriend's and I anniversary </p>
<p>Plugged not pulled. sorry<br></p>
<p>Hi, thanks for your help. I just have one more question. is there a way to get the code out if the Arduino and on to something else? I want to make it portable but without the Arduino. thank!</p>
<p>This code is based on Arduino. You can port it to another micro/platform, but it would not be straightforward. </p><p>Another option, probably more aligned with what you are looking for, is to use a smaller Arduino board (e.g. Arduino Mini) or build your own DIY Arduino (there are very good instructbles about how to do it).</p>

About This Instructable


191 favorites


More by tumaku: Multiple LED Matrices with Arduino LED Matrix with Arduino
Add instructable to: