Go Down

Topic: Understanding the components of a LED matrix (Read 1 time) previous topic - next topic

M4573R

I'm looking into making an 8x8 LED matrix. My eyes are almost burning from the amount of googling I've been doing. The most common parts that pop up all the time are the 74HC595 and the ULN2803A. The biggest hurdle is dealing with the current drain. Taking a look at this tutorial for the 74HC595 (http://arduino.cc/en/Tutorial/ShiftOut), I've realized that powering all 8 LEDs with only 220 ohm resistors would be far over the limit of the  chip, which appears to be a maximum of ±70mA (http://www.sparkfun.com/datasheets/IC/SN74HC595.pdf). In a row-scanning matrix, the ULN2803A can sink 8 LEDs worth of current on a single pin, but it can handle 500mA, so that's fine (http://www.sparkfun.com/datasheets/IC/uln2803a.pdf). However, if each LED in the row is on, the 74HC595 still has to source 8 LEDs, 1 per pin. Why don't I see any examples or tutorials using a bunch of PNP transistors (differences to MOSFETS?) between the shift register and the LEDs to handle the current? Apologies for the noob questions. I'm trying to determine if I need to order a bunch of transistors to make my matrix. Thanks for any help!

Riva

What chip(s) you need depend on what you want.
Are you talking about a 8x8 RGB, bi-colour or single colour matrix?
Do you need to dim individual LED's within the matrix or whole matrix dimming with simple LED on/off?

Grumpy_Mike

Quote
Why don't I see any examples or tutorials using a bunch of PNP transistors (differences to MOSFETS?) between the shift register and the LEDs to handle the current?

Two reasons:-
1) Depending on how you scan the matrix you might have a ULN2803A sinking 8 LEDs but only one pin sourcing the current for one LED at at time. As described here:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html

2) There are a lot of moron tutorials out there. Some don't even use resistors to limit the current in the mistaken belief that because it is multiplexing there is no need to. This is wrong. See:- http://www.thebox.myzen.co.uk/Tutorial/LEDs.html 

M4573R

That is quite a helpful tutorial! However I still don't understand how you'd only ever source or sink 1 led as a worst case. Wouldn't the worst case be that each chip could be handling 8 LEDs, just one is per pin, and the other is a single pin? Take the last line in the row-scan example: each LED in the row is lit. That's 8x20mA sourced on a single pin (the walking bit), and 20mA sinking on each column. If those were connected straight to the arduino, wouldn't that be a dangerous 160mA? I feel like I'm misunderstanding some fundamental step here :~

This will be a single color matrix with no dimming for clarification.

Riva


This will be a single color matrix with no dimming for clarification.

Then have a look at this article http://playground.arduino.cc//Main/MAX72XXHardware You cannot get much simpler than using a MAX7219 as it takes care of all the row/column scanning for you and only needs a single resistor to set current limiting. They are cheap to buy on ebay and so simple to use I made this http://arduino.cc/forum/index.php/topic,118338.0.html as my first arduino project.

Go Up