2
\$\begingroup\$

Apologies in advance for probably missing a lot of things. I'm pretty new to electronics.

I'm building a 128 led (monochrome) multiplexed array, driven by an Arduino. I'm using a 74HC595 as the current source and a TLC5940 for sinking and PWM. The output consists of an 8 (74HC595) x 16 (TLC5940) array of leds. Any number of the leds can be on at a given time.

I'm doing the multiplexing by turning on a column with the 595, one at a time, and then setting the appropriate values for PWM for the TLC, lighting the rows in a columns at desired value.

Multiplexing works fine already but scale becomes a problem with the current 8x6 array i have built (6 out of 16 so far connected to the TLC). I'm pretty sure my problem is that turning on a column with the 595 can not supply enough juice for the 16 leds in it. The leds have a forward voltage of 3.3V with 20mA current. This would mean the 16 leds in series would eat up ~53V @ 320mA, which is far above what the 595 can provide and the TLC can sink. How would i go with making this work? Is there some magic i can do in software to help with this (my guess is not)?

I've been looking at adding a darlington array (something like ULN2803) to pump up the voltage to 50V per channel. This i guess would be fine if all 16 leds would be on at the same time but if only 1 is on the led will most certainly fry. Because of this i guess i need to be able to add a resistor that changes value depending on how many leds are on at a given time. I was thinking of putting in a digital potentiometer to do this but it feels a bit overkill + i haven't come up with a good solution for hooking this up (without putting a single one on each 2803 output)?

Ideally i'd keep the circuit quite simple but i'm open for ideas so any suggestions are more than welcome! Also I wouldn't be surprised if i'm totally missing the point on the problem..

If what i'm trying to do is not clear enough i can create a schematic for it

thanks

\$\endgroup\$
5
  • \$\begingroup\$ It's not making sense why you need higher voltage. You will need high current since one row of LEDs will be on at a time, and the current needs to be lage to make up for the small duty cycle. But, high voltage makes no sense. Show the schematic. \$\endgroup\$ Nov 30, 2011 at 14:23
  • \$\begingroup\$ Yeah i was guessing something in that direction (= me being totally off). I guess i need to raise the amount of milliamps as the input then instead? From what i understand the 595 can provide up to 35mA per output. Basically 74HC505->35mA->X->320mA->16x20mA (need to figure out X). I'll create a schematic for what i'm thinking \$\endgroup\$
    – Antti
    Nov 30, 2011 at 14:39
  • \$\begingroup\$ I should note that the schematic provided by Majenko is exactly what i have (except for R1 and Q1 so far of course). \$\endgroup\$
    – Antti
    Nov 30, 2011 at 17:10
  • \$\begingroup\$ AFAIK the darlington array mentioned will allow the row to draw up to 500mA of current. \$\endgroup\$ Jul 24, 2012 at 13:44
  • \$\begingroup\$ Can you take a look at this question? electronics.stackexchange.com/questions/85807/… \$\endgroup\$ Oct 22, 2013 at 10:20

3 Answers 3

2
\$\begingroup\$

If you were running the LEDs in series then yes, you would need a higher voltage. You aren't though - otherwise they'd all be on or all be off. You are running them in parallel.

From what I understand of your description you have the one output of the '595 going into the anode of the all the LEDs of one column. The cathodes of these LEDs then go into separate inputs of the TLC for PWM.

And, as you say, the '595 can supply 35mA of current per output. That is enough for to light one LED reliably.

You will need to supply 6 times that current for 6 LEDs.

The simplest way would be to use a single transistor and resistor per column. For example, the '595 output connects to the base of an PNP transistor through a 1KΩ (for example) resistor. The emitter connects to Vcc, and the collector connects to the LEDs in the same way the output of the '595 used to. When the '595 sets an output low it turns on the transistor which then allows the current to flow from Vcc to the LEDs.

enter image description here

  • I don't know what the TLC5940 does in the way of current limiting - I haven't shown any current limiting resistors that may be required for the LEDs if the TLC5940 doesn't do that for you.

You can't use the TLC with, for example. a ULN2803 as they are both current sinks. You need something which can be a current source, which a transistor can be.

\$\endgroup\$
5
  • \$\begingroup\$ Sounds like a reasonable solution. Just a small point on the transistors base resistor - if it needs to sink ~200mA or more then using a lower value than 10k would be a good idea to make sure the transistor gain doesn't limit the current (e.g. assuming a conservative gain of 100, then 3.3V/10k = 0.33mA. 0.33mA * 100 = only 33mA). I would maybe use something like 1k. \$\endgroup\$
    – Oli Glaser
    Nov 30, 2011 at 15:19
  • \$\begingroup\$ True. I'm more used to working with 5v, and NPN low-side switching. I shall edit. \$\endgroup\$
    – Majenko
    Nov 30, 2011 at 15:22
  • \$\begingroup\$ Of course I should have said (3.3V - 0.7V) / 10k = ~0.26mA for the base current. \$\endgroup\$
    – Oli Glaser
    Nov 30, 2011 at 15:34
  • \$\begingroup\$ Close enough :P \$\endgroup\$
    – Majenko
    Nov 30, 2011 at 15:37
  • \$\begingroup\$ This worked great! Really appreciate the explanation too, i now understand much better what was happening \$\endgroup\$
    – Antti
    Nov 30, 2011 at 21:41
0
\$\begingroup\$

You need to use a pnp transistor as the high-side switch. Use the 595 to drive the transistor (0 is on, 1 is off) through a resistor to limit the base current. The discrete transistor will be able to source far more current than the shift register.

\$\endgroup\$
0
\$\begingroup\$

Unlike what others have said, you don't need a PNP high side switch. That's one option, but a NPN emitter follower is even simpler. Connect the collector to the 5V supply, the base directly to the 0-5V column drive logic output, and the emitter becomes a voltage source for that column. The digital logic output only has to supply the column current divided by the transistor gain. For example, if the column current is 300 mA and the transistor gain is 80, then the digital output only needs to source 4 mA.

This scheme provides up to about 4.3V, which leaves about 1V for the low side switch and current limiting resistor. In this case I would use NPNs as low side switches.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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