how to control these 8x8 2-color LED matrices

hello, i got a hold of these 8x8 LED matrices, but i have no clue how to control them?

they are supposed to be red/green LEDs and have 12+12=24 inputs.

basically i am looking for a blueprint that shows me what pin does what and how to identify each pin on the matrix.

Hmmm.... the god ol' Google just found this single link on this forum and ledmaniac linked to a PDF,IC%20chips/LE-MM103.pdf, which is not quite the same, but seems to match.

So a quick test is to wire up 3 pins into Arduino pins (f.ex.) 5,6 & 7 with a 220 Ohm in between each and then write a program that slowly tries all 8 combinations of HIGH and LOW. See what is blinking (if any) and eventually you can deduce what is "pin 1". I can't seem to find it in the diagram (there is legend- but which is the "front"?) or your photos.

Try using something like this as a starting point, the pinouts are probably similar if not the same.

There are some others at listed. search for LED matrix, filter on 8x8

I just bought one of these myself! (8x8, red/yellow/green medium sized)

Which one is it? 3 color (well 2 colors of leds and red+yellow=green) or red+yellow+blue? If it's the same one that I have, sparkfun has the schematic (well actually some users of the site made one): "official datasheet" not much help though: "womble's datasheet"

here's a current/miliamp chart for them as well:

To control them, I am using an Atmega32L 40 pins/32 outputs @ 8mhz internal oscillator I am still young in my project but I do have proof of concept with the arduino, and here is my Fritzing project page for it: I am going to be using npn transistors to address each led individually.

Hope that helps!!!

So what are you looking to make with yours? I have a project box from radio shack and I am going to build what I would.. Like to say is an "autonomous led matrix multipurpose system" i.e. you can play games on it, use it for other stuff, but if your not doing anything with it, it will time out on a certain period of time, and start showing something like an audio graph, maybe some sound enabled graphics, and the time and date. Heck maybe even an rss feed :P

thanks guys! so if i got this right, then the color of the LED (red or green) is controlled by the amount of Voltage that runs into the pins?

how do i control voltage with the arduino?


The way you actually control them is like this:

ROW ---1-2-3-4-5-6-7-8 Column-2 ---------3 ---------4 ---------5 ---------6 ---------7 ---------8 You have to active a + pin and a - pin to light one of the lights (say for example the 6th led in the 2nd row, you would have to activate a positive charge on pin 6(or pin that goes to that column) and a negative charge on pin 2 (or pin that goes to that row

You will have two different positive pins for each led. One for one color and one for the other, however they use the same negative line.

Look at my 3x3 sketch in Fritzing:

This is the way it looks on the breadboard (in fritzing) but here is what it looks like in real life (Sorta)

Now then with these two things taken into account, you know you can't switch on and off a negative port on the arduino, so to sidestep this, you use a transistor OR a chip like the MAX7219CNG or a 74HC238, but for your understanding you should consider the theory of using the transistor.

You can use a transistor as a switch, and the beautiful thing about it, is it's an indirect switch which means you can switch positive OR negative signals on or off. So what you are doing is using the transistor as a sort of "negative switch", so you can switch on any positive and/or negative pins on the led matrix that you want at any given time.

Another way you could look at it is an old school time table.

Say you needed to get to LED number 42 (dont mind that there are other numbers the same.....) you need to put a positive charge on Row 7 and a negative charge onColumn 6.

Hope that helps!

wow! thanks a lot for the detailed answer! now it makes more sense!

but before wiring everything up, i need to know where on the matrix is pin 1, pin 2, etc... infact.

you wrote earlier that you can see a text through the back of the matrix. unfortunately i cant see anything except a bit of wiring.
Take a look at this one.
Get a 5V source and a 330 ohm resistor, wire up a little tester like this.
(really, any 5V source will do, just not 5V from the arduino)

You’re gonna put the resistor on a pin, and work the ground across the other pins and see if you can determine where the cathode rows are.
Be systematical about it. You’ll figure it out.
The pins are arranged
1 24
2 23
3 22
: :
: :
11 14
12 13


CrossRoads idea will work, but I used a 3 volt battery like you find on a PC motherboard. Then I didn't have to use a resistor (while testing which pin lights which LED). You still probably need a 3 volt battery holder to attach wires to it to reach all the pins. Remember that each LED is a bicolor LED, so it will be a different color when you reverse the positive and negative pins of the battery.

I used a couple of MAX7221 chips to address all the pins. See the LEDcontrol library, and this playground article:


"different color when you reverse the positive and negative pins " what? The part will either be common cathode or common anode, no reversing will be going on. So how does a 3V battery not need a current limiting resistor? Those batteries have limited current capability or something?

emzic: how do i control voltage with the arduino?

you can use the PWM pin's to control the voltage ,PWM is the technology that provides switching on and off stuff so quickly so it seems the voltage is HIGHER or LOWERING ,if the amount of time for which it keeps off is high than amount of time it keeps on then the voltage will be LOW the viceversa is True Too!

…and to add to this thread of information overload, I present my own version of a “datasheet”:

I did what CrossRoads suggested a while ago. Also with the aid of some GIMP magic, I patched my photographed A6 page so it made a little more sense, hence the somewhat pathced-up look (Yes, my (not so) wonderful “all-in-one” printer-scanner will not scan any longer, for the lack of… tada… INK! $) - btw its heading for the parts bin ]:slight_smile: Ok no more ranting about that printer).

Now I wont guarantee this is the same as the one you got. This one I got from Earthshine Design a while back, they are two-color Red Green with a common anode (so two cathodes pr. LED / dot). Also they are 32mm by 32mm.

Btw the “side with text” (in the drawing) is where I begun counting pin nr. 1, going around the device in the same fasion as is usual with IC’s. As far as I know this was the only way to find pin nr. 1 (except testing it of course).

In addition I made a kicad parts library for those a while back as well. However, among other things due to the same ink shortage and my etching tank that got a hole in it (wrong ethcant, or wrong tank material probably), I haven’t actually tested these yet (so no guarantee on the correctness etc, as usual).

so if i got this right, then the color of the LED (red or green) is controlled by the amount of Voltage that runs into the pins?

Not quite… Maybe I’m nitpicking, but the brightness of a LED is controlled by the current that flows through it. Which again is controlled by a resistor in series with the LED. To calculate this resistors size, one must know how much voltage is over this resistor, and how much current will pass through it (and hence the LED, since they are in series connection).

R = U/I (or, resistance = voltage divided by current).

To get how much voltage is left over the resistor, one must know how much voltage is over the LED. If your current is not too far off from the “forward voltage” drop for the LED found in the datasheet, you can use that. Or look in the datasheet. Say Vf=2V. Then, if the total voltage to the LED-resistor series is 5V there will be 3V left over the resistor. if using 20mA, resistance should be 3/0.02 = 150 ohms.

The thing about PWM still holds, basically. That you can adjust the apparent brightness smoothly through the trick known as PWM:

However this gets a little more involved with a LED matrix.

RGC LED matrix.JPG