If I am connecting ICs to both sides of a led matrix, the ICs need to be able to source and sink enough current to light the LEDs? Or just sink?

Let me explain my question with an example:


In this diagram, I select which row is illuminated on LED1 through IC12 (a shift register). The column is selected through a demux (IC14). The LED matrix current is sunk through IC13, a ULN2803 transistor array.

I know that the ULN2803 (IC13) can sink enough current to light all LEDs. However, IC12 can only source 25mA, and lighting all the leds in a row would take around 100mA. Do I also need to put transistors in the source side of the LED matrix? If not, then what is the recommended setup for what I'm trying to do?

Please bear with me that I'm a beginner. If my question is not clear, please indicate so that I can edit it.


If you are selecting a column via a 4515 de-multiplexer, ONLY one column is active therefore it is impossible drive more than 1 LED in the same row at any one moment in time: -

enter image description here

This means, if 25mA will drive 1 LED sufficiently then that's all you need.

EDIT Passerby has made a very good point about the drive capabilities of the 74HC4094 - basically, in a nutshell, the max supply current is 50mA which means that if all 7 row outputs were selected at once, the maximum current deliverable per line is about 7mA and this is somewhat less than what the OP was expecting. There is another serial device that could suit and this is the 74HC595 and its maximum supply current is 70mA; this will deliver 10mA to each of the 7 LEDs but the OP has to decide if this is good enough.

I think the 74AC164 may just do the job however - it has 25mA outputs but I'm struggling to find the max supply current spec - anyone any ideas? Anyway, here's a small diagram that shows it driving a 7 seg display with about 13mA per line: -

enter image description here

  • \$\begingroup\$ I haven't realized that, you're absolutely right. Thank you! \$\endgroup\$ – André Wagner Jun 4 '13 at 13:24
  • \$\begingroup\$ You are correct. I removed my answer. \$\endgroup\$ – mjh2007 Jun 4 '13 at 13:24
  • \$\begingroup\$ This still means that IC12 could allow up to 8 leds in the column can be lit, if OP allows the 4094n to do that. \$\endgroup\$ – Passerby Jun 4 '13 at 18:17
  • \$\begingroup\$ @Passerby - I don't know if the 4094 can simultaneously drive 25mA through all its outputs. It might have limitations in this respect. \$\endgroup\$ – Andy aka Jun 4 '13 at 18:25
  • \$\begingroup\$ @Andyaka it's 25mA max per pin, but 50mA max for the port. Since OP has a single resistor for a column (8 leds in parallel), the current will be the same through the ULN, with the same hazards of a single resistor on a parallel led string. My point was, it is impossible to drive more than one led in a row at a time, but it is not impossible for OP to drive more than one in a column at a time. \$\endgroup\$ – Passerby Jun 4 '13 at 18:31

The issue is that your chosen setup, as explained, will only allow a single LED to be lit at any given time. You said I select which row is illuminated on LED1 through IC12. The column is selected through a demux (IC14). The LED matrix current is sunk through IC13, a ULN2803 transistor array.

Since only one column is allowed with the demux through the ULN2803, and you said you select only one row selected at a time, you will only light a single led.

Second, the 4094, (you don't mention which specific version, there are a ton of different manufacturer and models between them), generally speaking, allows up to 25mA PER PIN. BUT it has a maximum current allowance of 50mA for all 8 pins. IE, a single pin can put out up to 25mA, but you can't have 3 pins putting out 25mA at the same time. You could have 5 at 10mA, or 8 at 6 mA, etc.

The problem with this is that you only have one led on at a time, your duty cycle through your code and the ICs just went from 1/6th to 1/48th to show all the leds. The standard method of getting this done would be to show all leds on a column (or row) at the same time, then shift to the next row or column. Less coding, less processor intensive. As far as wiring it, you would want pnp transistors on the shift register side (and your code would need to have 1 for off on the shift register side), with the resistor on that side of the LED Matrix. The ULN2803 can handle up to 500mA Per Channel (2.5A max on the entire port) at 5v, so it can easily handle 20mA * 8 (160mA) for full brightness with all 8 leds on a single column lit.

  • \$\begingroup\$ It's a good point dude and the op should take note about this. If he wants to drive several LEDs in one column then PNP transistors are required OR he finds a row driver chip that can do the business +1 \$\endgroup\$ – Andy aka Jun 4 '13 at 20:17
  • \$\begingroup\$ That's a good point, I haven't thought of that. I believe that I can try to make a compromise here, which is to divide the output of the shift register in two (4 LEDs each time). That way my duty cycle would only double, and I would have 12.5 mA per pin. I don't know how bright will the LEDs be, need to test it. If that doesn't work, then I guess I'll have to resort to transistors. \$\endgroup\$ – André Wagner Jun 5 '13 at 11:42
  • 1
    \$\begingroup\$ @AndréWagner exactly, that would work. You want to move the resistors to the shift register side so each of the leds gets the full 12.5mA, instead of the four unevenly sharing it. \$\endgroup\$ – Passerby Jun 5 '13 at 14:56
  • \$\begingroup\$ @Passerby Just one more (important) question: if I light four LEDs that consume 20mA each, I'll be consuming 80mA. If the IC has its maximum current at 50mA, am I not at risk of damaging the IC? Or will it simply supply th 50mA? \$\endgroup\$ – André Wagner Jun 6 '13 at 0:39
  • 1
    \$\begingroup\$ @AndréWagner the 4094 has no internal regulation. If you try to pull 80mA, you will pull 80mA. That's 30mA beyond it's "Absolute Maximum" almost 60% more. By most standards, you will fry the IC. It may work, but more likely than not, it will not. Sometimes you can get away with that, essentially like overclocking, but by that much (160%), I think not. \$\endgroup\$ – Passerby Jun 6 '13 at 1:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.