How to source current to a common anode RGB led Matrix

Hey guys,

I am fairly new to this forum and working with RGB LED matrixes .

I am currently working with an 8x8 common anode RGB Led matrix.

I am using an arduino uno

I am also using two tlc5940 to control the 24 columns (leds)

My problem is I am not sure how I am suppose to source current to the 8 anode rows. I want each LED max current to be 20mA, and from what I have read people keep saying to use p MOSFETs, but even still I am not sure exactly what ratings I am looking for (eg vds, vgs, and that type of information). Also since I am testing this on breadboard it needs to be through hole type mounting. So I hope this is enough information, I am really trying to learn about how this works, but at the same time I am just getting stuck and would really appreciate the help.

mfran89: My problem is I am not sure how I am suppose to source current to the 8 anode rows. I want each LED max current to be 20mA, and from what I have read people keep saying to use p MOSFETs, but even still I am not sure exactly what ratings I am looking for (eg vds, vgs, and that type of information).

Exact rating is probably not important but make sure it says "Logic Level" somewhere on the datasheet (and it usually has the letter 'L' somewhere in the part number).

Logic-level P-channel MOSFETs in through-hole packages aren't common, but you could also use a BJT. Maximum current on a row is 3x8x20=480mA - no big deal, something like a BC327 will handle that and they're really easy to find.

hello,

I'm working in the same kind of project but thinking of using one 74hc595 + udn2981AT for the anode, is that a good idea ?

( :blush: Sorry to ask my question here but i think it's the same subject so no need to start a new thread :) )

mfran89, take care with the two tlc because on the left side of the matrix it's usualy red & blue cathodes, but blue and red LEDSs needs diferent voltage (on mine R:1.8V and G or B:2.3V) .

Best regards, Sylk78

sylk78: hello,

I'm working in the same kind of project but thinking of using one 74hc595 + udn2981AT for the anode, is that a good idea ?

Sure, or a tlc59213...

sylk78: mfran89, take care with the two tlc because on the left side of the matrix it's usualy red & blue cathodes, but blue and red LEDSs needs diferent voltage (on mine R:1.8V and G or B:2.3V) .

TLC5940 does current regulation so this isn't an issue.

Sure, or a tlc59213...

For the moment i just have some 595 and udn2981 :)

TLC5940 does current regulation so this isn't an issue.

What i wanted to say was to connect blue and green on the same tlc (because of same voltage) and the red on the second. It's not a "trivial" choice because blue and red are on the same side and easier to connect.

So if i put one 74hc595 + udn 2981 on the anode and two tlc for the 24 output that will be ok ? If i put the 2981 on the 5v of the arduino is that ok ?

Other question : why do we need current source + current sink ? not just current sink ?

Regards, Sylk78.

I read this on another post:

Just a word of warning.

The UDN2981A will source enough current for this LED matrix, but the chip is quite SLOW. If you intend to do fast PWM, you'll see ghost images. The information from row N will 'bleed' to N-1, N-2 etc. You can see this effect in my avatar's icon.

Have a look at the source driver used in the RainbowDuino. Its turn-off time is much more useful.

Also thanks for ideas and tips guys.

As for the p channel mosfets or bjt s do I need some type of shift register to control the 8 of them?

Thanks !

For the moment i just have the udn on my desk so i think i'll try with this one in first :)

Regards

sylk78: What i wanted to say was to connect blue and green on the same tlc (because of same voltage) and the red on the second. It's not a "trivial" choice because blue and red are on the same side and easier to connect.

Voltage doesn't matter.

If you set 20mA with the TLC5940's resistor then 20mA will pass through whatever LED you attach to it.

Voltage doesn't matter.

If you set 20mA with the TLC5940's resistor then 20mA will pass through whatever LED you attach to it.

Thank you :) usefull information ! ^^

Regards, Sylk78

As the total anode current you need to switch is only 160mA maximum, you could use either a bjt or a mosfet. Unless you are making a pcb and using smd components, a bjt will cost a lot less than a mosfet. I would use a BC337 BC327 with a 470 ohm base resistor. Instead of a shift register to drive the 8 bjts, I would use a 74HC138 demultpilexer, because (given that you only want to drive one set of anodes at a time), it is easier to drive, and guarantees that only one set of anodes will be enabled at a time.

Hello,

I draw this schematics : http://fritzing.org/projectsrgb-matrix-ca .

Can you tell me for the 74hc595 + UDN2981a if it’s ok ?

Just for the test can i use the arduino as power source ?

The matrix component is emulated by an IC ^^ the only difference is the pin order. On the matrix the 1 is on the bottom left, on the schematics on the top left.

Best regards,
Sylk78.

The UDN2981A has far too much voltage drop to drive your LED anodes from a 5V supply.

If i want to keep this solution what do i need to do to power it and to have enought voltage in the output of the udn ?

In alternative i have some 2n3904, can i put the Base in output of the 74hc595 with resistors (i didn't do the math yet), all the Collectors to the 5V (arduino's ??) and the Emmitor on the different lines ?

Best regards, Sylk78

sylk78: If i want to keep this solution what do i need to do to power it and to have enought voltage in the output of the udn ?

Power the udn from at least 7V.

sylk78: In alternative i have some 2n3904, can i put the Base in output of the 74hc595 with resistors (i didn't do the math yet), all the Collectors to the 5V (arduino's ??) and the Emmitor on the different lines ?

In that configuration (emitter follower), you don't need the base resistors, however you will get around 1V voltage drop in the transistors (perhaps a bit more, because 2N3904 are really intended for lower currents), leaving you with about 4V between the LEDs, series resistors and cathode drivers - which isn't really enough. You would get a lower voltage drop if you used suitable PNP transistors to drive the anodes, emitters to +5V, collectors to the columns, and bases to 74HC595 outputs via series resistors. This is what I suggested earlier, with BC327 as the PNP transistor, although I also suggested driving the transistors from a 74HC138 instead of a 74HC595.

This video presents a usefull tutorial about common anode matrix (not RGB, but it can be helpful).

http://www.youtube.com/watch?v=wXvs0CrRPIw