LED Matrix
Computer Controlled
September 2004
Introduction
As a personal project in grade 12, I decided to
build an LED Matrix and write the software to control it. I was
able to submit the software for my grade 12 computer science final
project, so that worked out well. When I first started looking
into how to do this, I wanted to control every light individually.
Since the parallel port has less than 12 outputs, additional electronics
would be required to control more than 12 LEDs (light emitting
diodes, tiny light bulbs).

Below I will describe the approaches I had to solve the problem, as well as the final solution.
Approach 1: Address Each LED Individually
I was hoping that using shift registers, or some other electronics I haven't used before ... that I could send a series of pulses of information, and then through the electronics, each LED would be able to be controlled individually. I haven't used shift registers before, and it would require buying 100 LEDs (10x10 matrix), soldering them all individually and there would be a lot of additional electronics required by this approach. Also, when looking on the net ... other people who have done similar projects have not used a massive ammount of electronics.
Approach 2: Use a Commercial Solution
![]() |
5x7 LED boards are used all time in Pinball and Arcade Machines. In the Monopoly Pinball machine, they scroll pictures of houses and other small graphics like that accross the screen. That's what I wanted to be able to do with my display. After looking around on the web, I found a company that makes a chip to control 5x7 LED Modules. That is Maxim-IC's MAX6952 chip. After trying to buy the chip locally, I couldn't find it, so I went to the company's website and they ship free samples. So I got a couple sample chips for free. I followed the company's wiring diagram and used their test software, but for whatever reason I couldn't get the display to light up. Their chip has a built in font-set which might not allow custom graphics. Also, their chip has a serial interface which I haven't worked with before, and I'm guessing that it would be hard in Visual Basic to get the timing right to get the parallel port to "talk" to their chip. This approach is really the lazy way out, because if everything worked properly, programming it would be very easy. But it wouldn't allow the flexibility of each LED being controlled individually. |
Approach 3: Custom Software, Nifty Electronics [Scanning Method]
After I wan't able to get the MAX6952 chip to work, knew I had to figure out my own solution. The way that a TV or computer monitor works, is by a beam scaning across the screen from top to bottom, many times a second. So fast, that it appears to be a solid or moving image in front of your eyes. That is the method that was used with my LED Matrix. One coloumn is selected, certain LEDs are turned on in that coloumn, and then the next column is selected, and so on. This is done many times per second, which makes it appear as if there is a solid or moving image. I didn't want to go this route, because the programming is probably the most difficult of the 3 approaches.
How it Works
I used (2) 5x7 LED Displays, so 10 columns and 7 rows for a total of 70 LEDs. As mentioned before, the matrix works on the basis of scanning the display very quickly. I used the 4017 chip to switch between the columns. The way the 4017 chip works, is that when a signal is sent to a certain pin, 1 of 10 of the other pins is sequentially activated. The way the software works, is it tells the chip to switch columns, which sets one column high. The software then makes the parallel port turn on the individual LEDs in that column needed. This is done very quickly, many times a second. It's a fairly easy concept and it turned out the programming was easier than I had initially anticipated.
Construction
![]() |
The project required 10 transistors and 10 resistors. I probably shouldn't have put all the transistors so close together, because it made them quite difficult to solder. It worked out ok in the end though. The parallel port sends a signal to the transistor, the transistor acts as a switch so that the external power supply can give the current needed to light up the LEDs. The parallel port does not have the amperage required to power 7 LEDs brightly. |
![]() |
This is the clip for the external power supply. 5-6 Volts is connected and that powers the (2) 5x7 LED Matrix displays. |
![]() |
This is the 4017 chip that is used to switch between the columns. After soldering all the wires, the chip was extremely hot! I'm just glad I didn't fry it. |
![]() |
Parallel port connector. This is the part of the project that gets plugged into the computer. |
![]() |
Here's the back of the board where you can see all of my soldering. I'm not a soldering guru, but at least it's functional. I covered all the connections with glue, so that no one would accidentally placed it on a metal surface when it was on or something. |
![]() |
The final product. The massive ammount of wires required are held out of the way by wire ties. If I had gone with approach 1, discussed above, there would have been 10x the ammount of wires and electronics. |
Display Pictures
Scrolling Videos
Quicktime Player required, download
it here if needed.
To Download Movie: Right-Click, "Save-Target-As"...
GoLeafs.mov![]() 4 seconds, 1.19MB Go Leafs Go! Scrolled |
HeartScroll.mov![]() 6 seconds, 1.68MB A heart, scrolled |
jb2.mov![]() 2 seconds, 570KB JB Graphic, Scrolled |
Movie Mode Movies
These movies were made using the movie-mode function of the software.
(more about that below)
zoom.mov![]() 8 seconds, 2.28MB Zoom affect. Nifty. |
bball.mov![]() 3 seconds, 929KB Quick Basketball Shot |
snake.mov![]() 4 seconds, 1.17MB Quick snake Game. |
Software
The software is what makes this all work. It was programmed in Visual Basic 6 and the commented source code is avaliable to download, in the Download Section. The biggest problem with programming this was getting the timing correctly. Windows 98 and Win2k/XP handle timing calls differently and the smallest timing division can be as large as 55ms. This means that to switch a coloumn, it would take 55ms, which means it would take 1/2 second to scan through the display once ... for a refresh rate of 2Hz, which is very slow. I found a control that worked in Windows 98 which supposedly had a resolution of 1ms, but in practice it was not that low. That same timer had a resolution of 55ms in 2K/XP! Currently I'm using the QueryPerformanceCounter timer, which seems to be working well in Win2K. I was using the TimeGetTime counter for Windows 98.
Problems with the software:
Flickering
- Flickers when scrolling large messages (see Go Leafs Go! video)
Software should
be re-written using threads. Then the CPU isn't tied up so much
when running the main loop when scrolling.
Possible Applications:
| - LED Clock - Message Scroller - Hook it up to a microcontroller, so no PC is required. |
- Simple Movie Display - Simple game display (ie Pong) |
Project Costs
| Item: | Cost: (cdn) |
| Solder breadboard | 7.00 |
| Wires, wireclip and parallel port connector | 2.00 |
| (2) 5x7 LED Matrix Displays | 10.00 |
| Transistors | 1.50 |
| Resistors | 1.00 |
| 4017 Chip | 1.00 |
| Tax (15%) | 3.38 |
| Total: | $25.88 |
Conclusion
I've been thinking about doing an LED matrix for quite a while. I'm pleased with the way it turned out, and I'm glad I didn't have to solder 70 LEDs individually. The software has room to improve, but it's up to "proof of concept" standards. If I ever start messing around with microcontrollers, hooking this up to one could be a really neat project. With the current hardware and software, it wouldn't be hard to double the size of the matrix to 20x7, instead of 10x7. That would allow for a lot more to be displayed at once. If there's a lot of interest, I might even make a how-to guide like I did for the PC Controlled RC Car, so if you want one, let me know.
Resources
| Description | Link |
| LED Matrix Clock using a Maxim-IC Chip | |
| 16x16 LED Matrix, each LED hand soldered. Was a university project for him in the 80s. Microcontroller used. | |
| LED Matrix Tutorial. It got me thinking about how to do the project using the scanning method, described as "persistance of vision" | |
| LED Sign using 4017's and scanning. Has a good explanation of the scanning method. | |
| LED Matrix Pong! So Awesome. Check it out! Also a cool projector project there as well. | |
| Maxim-IC's product page for the MAX6952 chip. You can also get free samples from them. | |
| Information about the QueryPerformanceCounter I'm currently using. | |
| Pinout of the 4017 Decade Counter. | link (scroll down) |

















Comments
pls..help i have the same project but it must stand allone or pic microcontroller base..and i must construct a much larger display board..pls send me some details on how to do it.....
thanks!!!!!!!!!!!
Posted by Sir_rouge on 2009-06-27 @ 01:52
would you please help me about programming
Posted by ainoor on 2009-04-3 @ 23:51
ay dude can u do me a big favour i need to do this electrical technology project can you plz send me a lined diagramme of the led matrix! im beggin u man plz
Posted by imran paruk on 2009-03-31 @ 07:23
please can you help me. i have some trouble when design 24 matrix led 8x8 with microcntroller.can you give me shematic. thank you very much
Posted by le thanh tuan on 2009-03-8 @ 19:40
I forgot my email:) diogoangelim@yahoo.com.br
Posted by Diogo on 2009-03-3 @ 10:18
could somebody send me the project or the schematics to my email or an other link? I'll be very glad!
Posted by Diogo on 2009-03-3 @ 08:19
could you please send me a copy of your project..it would greatly help me in my project study.thanks!
Posted by anneth on 2009-02-11 @ 20:41
Hi!
I've kinda replicated your project already. Now all I have to do is hook it up to the computer and use the app you wrote. But it aint working. It keeps saying that the device driver is not loaded, even after I followed the instructions in your readme file that says I should put the .dll file in the system folder and the .sys file in the system32 folder. How do I fix this? Thank you so much.
-Joniel
Posted by Joniel on 2009-01-24 @ 01:18
if youput the resistors on the rows then the brighter parts would go and it would look the same
Posted by matthew on 2009-01-16 @ 01:59
hi there..
i was just wondrin if i could have a copy of the schematic diagram of this project..it would be very much appreciated..
thanks
Posted by adjing on 2009-01-6 @ 03:11
Is there a more elaborate "schematic" of how this project wired available?
Posted by Patrick on 2008-12-17 @ 07:11
Can you please send me the diagram for this? Thank you so much.
Posted by pendi on 2008-12-14 @ 05:50
Hi!
Can you please send me the diagram for this? I decided to do something very similar to your project but designing something like this is waaaay beyond my limit and so I just need a diagram to get me started... Thank you so much.
-Jon
Posted by Jon on 2008-12-4 @ 04:15
Hello Jon !
I found your article during the search for some hints for my final year project.
Currently my project is to write a program that compute 10 by 10 matrix (using DISCRETE COSINE TRANSFORM DCT) which will WILL BE USE TO COMPRESS IMAGE ie.image compression.
i will be very grateful if u can help me out
thanks and God bless,
Terry
Posted by Terry on 2008-10-8 @ 08:04
Come on, lazy people ! Do it yourselves !
Posted by OMG on 2008-09-21 @ 03:04
hi, your project is a big help to me. can i have the design of this?
Posted by van on 2008-08-26 @ 01:08
Hi,
Could you update your software to visual basic 2008 (express edition), I can't open the files in 2008. And is it possible to make a howto to extend te board (like 7 * 50 LEDS)
Posted by Mathijs on 2008-07-31 @ 03:36
hi, I would like ask help from you. Please help me do a visual basic program for 5x7 LED Matrix to display the word "JPHICES" scrolling to the left... Please
Posted by Jennilyn P. Bahian on 2008-07-8 @ 20:46
Hello Jon !
I found your article during the search for some hints for my diploma project.
Currently my idea is to build a LED display which will show road signs or messages about how good road is within next 3-5 miles. This LED display should fit on the back of the police car.
I also came to conclusion that I will use
MAX6952 driver
some controller- maybe MAXQ2000
and LED matrix display
I had a question how to tie all these devices together and how to make it cheap and reliable.
I will apreciate your idea - it may be easy for you to spend 5 minutes for an answer , but a great help to my further research and work .
Best regards,
Ivan
Posted by Ivan on 2008-04-17 @ 14:12