I been researching how to build a 12x24 LED Matrix. I found a couple of solutions. What looks the most attractive to me is daisy chaining 3 MAX7219 led drivers together. I am some what new to electronics and am not 100% sure what kind of voltage I will need to power this thing or if the MAX7219 drivers will be able to handle the current I need when all the LEDs are turned on. I'm hoping that someone can help me figure this out or lead me in the right direction to find what I'm looking for. Thanks!
-
1\$\begingroup\$ What LEDs are you planing on using? \$\endgroup\$– Garrett FogerlieCommented Nov 16, 2012 at 23:39
-
\$\begingroup\$ about 1.2V / 20mA \$\endgroup\$– ForYourOwnGoodCommented Nov 16, 2012 at 23:43
-
\$\begingroup\$ 1.2V LED's are not avail. Perhaps you can specify PN \$\endgroup\$– D.A.S.Commented Nov 17, 2012 at 0:02
-
\$\begingroup\$ jameco.com/webapp/wcs/stores/servlet/… \$\endgroup\$– ForYourOwnGoodCommented Nov 17, 2012 at 0:19
-
3\$\begingroup\$ Why IR for a matrix? \$\endgroup\$– D.A.S.Commented Nov 17, 2012 at 2:38
2 Answers
I will not go into specific IC's since you might change your design. Instead I will go into the theory. Driving LED's is quite easy.
First:
There are different ways to drive LED's. The two main methods is by using a constant current or constant voltage source. LED's "operate" on current. Their intensity is generally someone proportional to the current and exponential to the voltage. Therefore, a constant current driver is generally used. When you use a constant voltage source and a resistor(the basic way) you are creating a rudimentary constant current source. Most driver chips use a constant current source.
With such a driver you do not need to supply resistors. You tell the driver how much current it is suppose to supply and it will supply that amount to the LED. Usually you "program" the current by using a resistor and the datasheet will tell you about how much current will be used for a given resistor. (you can use a variable resistor to allow you to adjust the intensity of the LED's after the fact)
Second,
LED's have specific current ratings that relate to how long the will live. Usually this number of around 1mA to 20mA for your average LED's. You need to figure out how bright you want your LED's to get some estimate of power usage. If you have a 64 driver chip, each using 10mA, then that is 640mA total. If the IC is 5V then 5V*640mA = 3.2W. This may be too much for the chip. Check the datasheets of the driver to find out. (and remember, these generally are absolute maximum ratings)
Also, the more current you use the more power the LED's dissipate this may or may not be an issue for the board. If you can't get rid of the heat then your LED's could burn up.
Third,
You can "daisy chain" IC's they have the capabilities without issue BUT this could potentially reduce the speed if you are doing fast updates(like graphics). Daisy chaining is very simple and the driver IC's usually have an SDI and SDO along with a clock. Your simply send your clock to all the chips in parallel(star routing) and connect the your uC to the SDI of one chip, then that chip's SDO to the SDI of the next chip, etc...
Using this method, you do have to worry about clock skew and such but for 3-4 chips it shouldn't be a problem.
Also, it will be faster if you use the uC to it's full advantage, and possibly easier. Most uP's can output at least 8 bits on a "port" at once. So you could drive up to 8 LED drivers at the same time. This, in theory, would be 8 times faster than if you daisy chained 8 LED drivers.
As far as your "voltage" question, it doesn't make a lot of sense. You use the voltage that is required. If the uP uses 5V, the LED drivers use 3V then you use 5V for the uP and 3V for the drivers.
In most cases though, you want to use the lowest voltage you can get away with. This allows you to reduce the power consumption. Before I said 64 LED's all using 10mA at 5V = 3.2W but at 3V it is 1.92W. Almost half(since you cut the voltage in half). BUT the LED's are just as bright(since they are still using 10mA)!!
So, if your uP can use 3V and your LED driver can use 3V then you drive it with 3V. (note that if you want to drive your LED's with a lot of current you might actually have to use a little more voltage. You do need some headroom but generally 3V is plenty)
LEDs:
N LED's all using a max of A amps at V volts will dissipate a total of N*A*V W. You can calculate this per driver to find out what each driver will dissipate. Make sure you have plenty of "room" from the absolute max values.
Obviously if you are only driving 2 LED's out of 10 the value will be different BUT we must calculate the worst case, if all 10 were on, else we will be sorry(unless we know it can never happen, then we have to find out how many).
So you have 288 LED's, If you use 10mA and 5V then that is about 14W. Pretty significant. That means your power supply has to supply 2.88A. (Thats assuming you are only driving LED's and no power losses).
If you drop that down to 1mA then that cuts all everything by an order of magnitude. Only 1.4W and .288A which is much more reasonable.
You shouldn't worry too much though, I've done a project with 500 LED's using 20 driver chips without any major issues. I had to use serial and parallel driving to get it all done but it worked without issues. I think I was using about 1mA or so per LED.
(I'm assuming you're not doing anything crazy like trying to make a torch(using high power LED's) or something)
daisy chaining 3 MAX7219 led drivers together.
The MAX7219 sounds fine. With a LED matrix, you'll want to use the "No-Decode Mode" of that chip. However, each of those chips is only designed to handle up to 8x8 LEDs. Perhaps the conceptually simplest way to handle a 12x24 LED Matrix is to use 6 MAX7219 chips, as if you were driving 6 arrays of 8x8 each -- a total of 16 x 24 LEDs -- and skip some of the LEDs. (There may be some clever way of using less than 6 of those chips).
what kind of voltage ... if the MAX7219 drivers will be able to handle the current ...
The people who make the MAX7219 also publish a pretty good MAX7219 datasheet. Your project has a much higher chance of success if you read it.
The datasheet specifies the operating supply voltage for the MAX7219 is 4.0 V to 5.5 V. The MAX7219 drivers are specifically designed to limit the current to the LEDs to some appropriate amount, and at room temperature it can easily handle the 330 mA when all 8x8 LEDs appear to be all turned on to humans. At (typical) 330 mA per chip and 6 chips, that's a total of about 2 A.
I'm guessing that you don't have anything else eating more than another 1 A, so one of the many 5.0 VDC, 3 A wall-warts or 5.0 VDC, 4 A wall warts (typically under $25) would be entirely adequate for your project.
I've been assuming that your LED matrixes have exactly 1 LED of a single color at each point. Then you can hook the MAX7219 chips directly up to the LEDs with one capacitor and one resistor per chip. Some popular LED matrixes appear to have 1 LED at each point, but it's a RGB LED that acts like 3 independent LEDs -- you'll need 3 times as many MAX7219 chips for that, one chip for red, one for green, one for blue, and 3 times as much total power. A few physically large LED matrixes have a series of LEDs of the same color at each point, requiring more than 5 V to turn on -- that makes things more complicated.
The MAX7219 chip can handle blue LEDs (about 3.0 V), green LEDs (about 2.0 V), red LEDs (about 1.7 V), or infrared LEDs (about 1.2 V). Although I'm curious to know why anyone would make a matrix of infrared LEDs.
Sounds like a fun project. Good luck.