Go Down

Topic: 8x8 RGB Matrix + 2x TLC5940 + 4051? (Read 9784 times) previous topic - next topic


Aug 15, 2009, 06:11 pm Last Edit: Aug 15, 2009, 06:55 pm by lwhi Reason: 1

I'm about to start wiring up an 8x8 rgb matrix I've bought from LEDSEE.COM.  I've got a few questions before I start, to make sure I'm going about this the right way.

Datasheet for the matrix is here -> http://www.aplomb.nl/Niels_skn/RGB%20FULL%20COLOR%20MATRIX.pdf

I intend to use 2 TLC5940 ICs to sink the current from the matrix columns (24 pins in total), and then use one 4051 multiplexer to supply V to the matrix rows from the arduino's digital out pins.

Does this sound okay?


4051 can only output up to 25mA.  Your row driver needs to be able to supply enough current for every LED in each row, so 24 * If  (480mA if you drive each LED at 20mA).  You will need some sort of current amplification (FET or Darlington) for the row drivers.


Thanks for the reply ajb - that makes a lot of sense.  As the arduino only allows a max current draw of 40mA per I/O pin, it looks like I'll need to amplify current (or supply a secondary pwr supply) in most situations.

The mosfet route looks like it'll be far too expensive.

I'm considering http://docs-europe.electrocomponents.com/webdocs/0881/0900766b8088183b.pdf - a 8-channel darlington transistor array.  (ULN2803A)

It's rated at 500mA, and as the 480mA is a maximum, I think it should be okay?


The datasheet indicates that your matrix can be driven at 30mA per LED at 10% duty cycle which would give you a brighter display, but if you're okay with the brightness at 20mA, then that darlington array will be fine.


Well, I can imagine that it'll take me a while to work out the best multiplexing routines, so there'll be instances when the rows are driven for longer than 10% of the duty cycle.  20mA is probably safer :)



hey - I've just had a thought ..

I've gotten hold of some of the darlington arrays I mentioned above (ULN2803A), but I've just realised that these sink current (providing a common source).  Afaik, the TLC5940 sinks current too...

Is there anyway I can use what I've got, or do I need to find a new darlington array?


or do I need to find a new darlington array?

You need to find a way to source current not sink it. Have you seen what I did in:-


Hi Grumpy_Mike,

The FET route seems possible - but as I'd need 8 (one for each common anode), I'm thinking it would be a bit too expensive.  Your project looks great - definitely into the idea of not buying the expensive sparkfun kit.  I was thinking about using small sections of glue-gun stick as a diffuser -> where did you source yr acrylic from?

I'm going to try and get hold of an allegro UDN2981A which is another 8-channel darlington array - but this time sources current.  Hopefully that'll do it.

(I just need to remember that each one of these dense mistakes is teaching me a lesson... freaking annoying none-the-less)


where did you source yr acrylic from?


OK on the 2981s, note that you can get only about 120mA from each output if they are all on at once.


Aug 20, 2009, 05:44 pm Last Edit: Aug 20, 2009, 05:54 pm by lwhi Reason: 1
Ah - shit.  I guess I could limit current for each channel to 15mA.  Maybe I'd need to sort out something else - I'll have a think.

Out of interest - where did you find out about the 120mA?  I had a look at the datasheet (http://www.datasheetcatalog.org/datasheet/allegromicrosystems/2981.pdf) and couldn't work it out.

The datasheet mentions -500 mA for Iout .. does Iout refer to the total current from all 8 drivers?


Aug 21, 2009, 03:20 pm Last Edit: Aug 21, 2009, 03:20 pm by lwhi Reason: 1
Ah.. I understand now - sorry, I was being a bit dense.

I didn't look at the graph in the datasheet.  120mA max if all 8 channels are on constantly.  I'll be using a 100/8 duty cycle, so I'll be able to make use of a higher current.

one thing though - why does the graph stop giving info at 34%?
I'll have a duty cycle of 12.5% - does that mean I can't assume I'll be able to source more than 350mA?


Jul 02, 2010, 08:44 pm Last Edit: Jul 03, 2010, 04:30 pm by lwhi Reason: 1

Well, nearly a year later I've come back to this project.  I ended up finding a darlington array that can source the current my RGB matrix will require (UDN2981AT).

To try help ensure I get the circuit right, I've mocked it up.  I'm going to produce it using perf-board.  

Understanding this is probably going to be a bit of a headache.  I've tried to label everything in the mocked version - if anything's unclear, pls let me know.

One thing I'm unsure of, is whether the 4051 multiplexer is going to be okay to control the darlington array.

Also .. the darlington array is going to have to potentially source a max of (20mA*3)*8 (480mA) on a duty cycle of 12.5%, on one output.  The unit is rated for a maximum of 500mA.

I'm not great at reading datasheets -> it seems possible, but if anyone could confirm, would be grateful.


Advice would be appreciated.




Jul 03, 2010, 01:22 pm Last Edit: Jul 03, 2010, 01:22 pm by lwhi Reason: 1
There's also one other thing I'm unsure of.

The RGB components of the matrix each have different forward voltage requirements and luminosities.

Green and blue have similar characteristics, red is the odd one out.

Afaik the TLC5940 looks after the current via the setting of the resistor on IREF, will I need to do anything to deal with the differing requirements between R and G/B?


Because the perf-board circuit is so difficult to read, I've drawn up the circuit using Eagle.  First time using Eagle - so apologies for the mess.


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.

Go Up