Custom RGB led matrix

Hi all

This is my first post here. I originally started learning assembly and using pic microcontrollers, I have a little experience with electronics and I am finding arduino good fun to use.

I have some board that I bought second hand from someones failed project. I have nearly 100 of these boards and I want to fire one up just to see what it looks like.
I have attached a couple of photos, one of the front showing the leds in an 8x4 pattern and one of the header connector on the back.

I have no information on them so I need to work out how they are connected, although I assume it will be similar to the rows and columns seen elsewhere.

What I guess I want to know is how do I go about determining the number/rating of the resistors needed and the power requirements and then I will need to find the correct pin for shift registers or whatever method is best to drive them.

If anyone has any suggestions I would appreciate it.

Thanks for looking

First off you need to determine if the LEDs are common anode or common cathode. Take a 5V source and include a 820R series resistor and go an prod.

These LEDs look quite standard so I would assume they will take 20mA each colour. Use this as the target current in the LED calculations (you can google for an LED resistor calculator if you don't know how to do it by hand).

However without the part number there is no way of telling for sure what the manufacturers ratings are.

They are all common anode. That was the easy part. They are 4 pin and the second pin from the top of the board is the anode and the top is red, second from bottom is blue and bottom is green.

When using a matrix like this how many resistors are required? Will I need 32 of them or is it a larger resistor for each row or column.

All the forward voltages will be different wont they? Perhaps 2v for the red and 3.4v for the green and blue seem typical from looking at standard 5mm rgb leds with common anodes.

That looks like a standard pinout.

When using a matrix like this how many resistors are required?

Depending on how you drive it you need one resistor per column or row. The trick is to have only one resistor limiting the current for one LED at any one time. You should measure the forwards volt drop for each LED colour.

Grumpy_Mike: You should measure the forwards volt drop for each LED colour.

I've never done that trick(or even thought of it funnily enough!) Is it just a matter of measuring the supply then measuring it again after turning on each color?

No you put a resistor in line and light up the LED. Then you take your meter and measure the voltage dropped across the LED. By and large to a first approximation the voltage measured will be independent of the resistor value.

Okay. I get it now. I measured the forward voltages. I used a 5.29V battery pack and a 307 ohm resistor

The red was 1.95v, Green 2.83v and Blue 2.92v

Attempting to do the math using ohms law gave me a current through the led of 0.01087 which is in milliamps right? And the calculations returned 0.008 for Green and 0.0059

How I did that was 5.29v(battery source)-1.95v(red forward voltage)/307=0.01087 Is that correct?

Yes you did it right but wrote it wrong, you meant: V=IR, so V/R = I, or:


Note the parenthesis. Its not in milliamps. The equation is nice that way... volts = amps*ohms, all clean units. Besides .01mA would be very hard to see :-). So you are seeing .01amps, or 10mA.

Just many boards does it take to make a circle?

If you don't want to entirely DIY, check out my board which seems pretty prefect to drive something like this as it has source drivers and constant current sinks.

Cheers! Andrew

Hi Thanks for that. I don't think it will make a circle, I think the shape is a little off. I was planning on making some arches with them.

Thanks for the link too, those boards look pretty good. How do I go about making one? is there a link to how you went about it as I have several programmed chips lying around ready to go.

I think I would need to do it as a matrix though as I would only be able to light 2 boards the other way.

Okay so breaking the board down into 8 columns of anodes and 12 rows of cathodes it goes like this

Pin 1 to anodes column 1 Pin 2 to anodes column 2 Pin 3 to anodes column 3 Pin 4 to anodes column 4 Pin 5 to anodes column 8 Pin 6 to anodes column 7 Pin 7 to anodes column 6 Pin 8 to anodes column 5 Pin 9 to cathodes row 10 (red) Pin 10 to cathodes row 7 (Red) Pin 11 to cathodes row 4 (Red) Pin 12 to cathodes row 1 (Red) Pin 13 to cathodes row 12 (Green) Pin 14 to cathodes row 9 (Green) Pin 15 to cathodes row 6 (Green) Pin 16 to cathodes row 3 (Green) Pin 17 to cathodes row 11 (Blue) Pin 18 to cathodes row 8 (Blue) Pin 19 to cathodes row 5 (Blue) Pin 20 to cathodes row 2 (Blue)

Sorry but there didn't seem an easy way to draw that.

So as these will be multiplexed and using my previous values if I use a 12v power supply do I add 12 resistors to the row pins, using 10 mA as a rough guide that would mean I needed 1.2Kohm resistors on the Red pins and 1Kohm on the Green and Blue.

How do I calculate the total draw of the board so I can ensure I have a large enough power supply? By allowing for all 32 leds to be lit at once?

It depends on how you are going to multiplex them. The normal way is to switch on each anode in turn. In that way you only need to consider the current for all the cathodes connected to one anode.

if I use a 12v power supply do I add 12 resistors to the row pins,

Yes but what ever driver you use must be capable of working at 12V. It is normal to use 5V. How are you going to drive them? Have you seen this project:-

No I hadn't seen that project. I am still pondering the best way to drive them. All up there may be over 1000 leds so it needs a bit more research. I am leaning towards the chips used in the lightuino at the moment. I run a computer controlled christmas display and I am used to using 12v or 24v in all my items but I guess 5v would be just as easy to rig up.