Web searches for a simple LED matrix—at least eight LEDs wide by eight high—turn up tens of thousands of pages. Yet people keep asking how to build one. To help make sense of this enduring interest, we’ll take a fresh look at constructing a small, useful scrolling-message display without losing heart along the way.
Before starting any build, it pays to be realistic about what it takes to finish successfully. Imagine wanting to become a surf instructor on a Hawaiian beach: you would need to live in Hawaii, be fit and agile, know at least a little of the local language, perhaps grow dreadlocks, and, of course, have a surfboard of your own if possible.
An LED matrix is much the same. Without all the essential materials, posting on every electronics forum or emailing everyone who has built one in the hope of a magical solution won’t get you far. Get all the materials first. The number of LEDs—and the cost—can put off anyone hoping for a working sign. The circuit’s complexity and uncertainty about how to organise a microcontroller program can be just as daunting.
Our aim is to shed some light on the subject with a circuit that is simple, expandable and, as always, educational. We’ll start with just an 8×8 LED matrix; the giant Las Vegas-style displays can come later. First, decide whether to buy a ready-made matrix or build one from individual LEDs. The pictures show the difference between the two options.
Either type can work well; the result depends on the microcontroller program used to drive it. Their construction, however, presents different trade-offs. A compact design, easy connections and the desired performance may favour the integrated 64-LED module shown on the left. If you need a non-standard size, building from individual LEDs may be the only option, and lower cost can also influence the choice. Whichever route you take, understand how these small information displays work—and be clear about what you want to achieve.
Mapping a character onto the display
To show a character, drawing or symbol, start by understanding how the display operates. Take the letter “R”: first sketch a map of how it should look on the matrix. This preparation can be tedious, but it is necessary to get the image onto the display. Plan out every letter, number and symbol in advance. Once it is time to program the microcontroller, a few simple operations can then form the graphic you want.
In the diagram, the letter “R” is represented by the sequence 0, 0, 127, 76, 72, 74, 49 and 0. These values are sent to the matrix through the rows as 8-bit data, with each value placed in the corresponding column. The program repeatedly places each row’s value in its column. The data appears in the correct column, then switches off; the next set of data arrives in a new cycle. Repeating this process many times per second makes the symbol appear stationary, much like an optical illusion.
The key idea: scan the columns
The image is created by scanning the columns and sending each the appropriate data at the right moment. Data is applied one item at a time to its place in the bitmap prepared beforehand. Repeat the cycle many times each second and the image seems fixed. The LEDs’ switching persistence, together with the speed of our vision in detecting changes, helps produce this effect.
Building the matrix
We’ll make a matrix with eight LEDs on each side. You could instead use seven rows by five columns and still show letters, numbers, punctuation and simple graphics at that modest resolution.
Wiring the 64 LEDs is one of the most tedious parts. Take your time: rushing or working to a tight deadline can lead to an accidental soldering mistake that means taking everything apart and starting over. Set aside a full day to assemble the matrix rather than leave yourself searching for hard-to-find faults later.
There are many connections, so the chance of error adds up. A custom, double-sided printed circuit board with plated-through holes could simplify the job. But designing and making a good board takes time and may cost more. An experimental prototyping board is often the practical alternative. The LED connections are laid out as follows:
Correct assembly is crucial. A misplaced or incorrectly connected LED can take hours to track down. Work carefully, then test each of the 64 LEDs with a multimeter once the assembly is complete. Otherwise, a later fault could be in the matrix wiring or in the LED driver circuit, and you won’t know which. Work methodically and check each step. Catching an error early can save hours of frustration.
With a ready-made matrix, your main task is to identify its pinout—the connection for each LED—and decide whether to add a protective cover at the front. A cover hides the gaps between LEDs and creates a dark-looking face that lights up only when in use. Our “water clear” LEDs reflect ambient light from their plastic bodies, so we add a plastic sheet at the front to reduce the glare. A translucent layer also lets us use slower refresh rates—the LEDs’ on/off timing—which produces a brighter final display while keeping the message easier to see.
Wiring and driving the LEDs
For this design, we use a PIC 16F876A, with port B driving the rows and port C driving the columns. We could have used the familiar shift register found in many designs, allowing a smaller PIC to control the columns. Instead, we chose a different arrangement so you can compare another approach and see how the circuit works from a different angle.
If making a matrix were straightforward, everyone would know how. In practice, the web is full of questions and short on demonstrations of successful builds. Searching YouTube for “Matriz 8X8” returns fewer than 350 results, while Google returns more than 20,000. That does not mean all the Google results are questions, but even a generous estimate would put the number at around 1,000.
The diagram shows how one of the 64 LEDs is connected, as a generic example of selecting one of eight rows and one of eight columns. Any such combination energises a single LED. A LOW signal on a port B pin and a HIGH signal on a port C pin switch on the connected transistors and light the selected LED. The complete circuit uses a PIC 16F876A (a 16F873A can also be used), a 12 MHz crystal, a ULN2803A driver, several resistors and a power supply that can run from a battery or an external voltage source.
The 1N4007 diodes protect the unit from accidental reverse polarity, which could damage the PIC. Changing the 220-ohm resistor values changes the display brightness. You can use resistors as low as 56 ohms in those positions without causing functional problems, but current consumption will rise considerably—a concern for small battery-powered projects. For indoor use, we don’t need that much light. Outdoors, bright daylight can make the display harder to see. Lower resistor values and experimenting with refresh speed can help adjust brightness to suit the conditions.
What comes next
In the next instalment, we’ll program the PIC and look at producing a clear static image, using the matrix as an emergency beacon, and creating scrolling text for a message board. We’ll also explore visual effects, such as making text appear to fall or move upward.
We’re not reinventing the wheel or revealing the mystery of LED matrices; we’re showing another way to build one. It may or may not be the best approach, but the important thing is that it helps you understand the theory and gives you practical options. Don’t miss part two, where we’ll build a distinctive, eye-catching display to decorate the room for the festive season ahead.