Jump to content

Multiple LEDs on a DOUT pin


artyman
 Share

Recommended Posts

Is it possible to drive, for example, 4 LEDs from a single DOUT pin?

e.g. to make a 'light bar' indicator.

or would I need to use a transistor switch like this:-

trswinpn.gif

with the 4 LEDs (and current limiting resistors) in parallel as the load. [NPN transistor assumes the DOUT pins are active high]

many thanks in advance.

Link to comment
Share on other sites

Check the current pass-through capabilities of the shift register you're using (i.e. look at the datasheet). It may be high enough to drive it directly. It also depends on what value resistor you put in series with each LED (or on the DOUT board), which controls the brightness of the LEDs: calculate the current using I = V/R. Each LED wants about 20-25 mA of current for full brightness (though check your LED's datasheet if it's blue or white or some other less-ordinary type).

If you will need more current than the shift register can provide, you need some sort of transistor. I think (but I don't have formal training) that your circuit would work. The BLM I'm making involves driving 64+ LEDs at full brightness (~2 amps) from one DOUT pin, and a friend who's an electrical engineering professor suggested I use a P-channel MOSFET instead of an NPN transistor like in your design (which I had suggested to him). With a MOSFET, he said, you wouldn't need a resistor between the shift register and it; and I believe it (ideally) doesn't take any current to operate when it is either fully off or fully on, only when transitioning. But if you only need to drive 4 LEDs, your circuit is probably sufficient, and I think you could use an ordinary TO-92 package transistor.

Try it on a breadboard and see! I think the worst that could happen is that you fry the transistor, and they're only a few cents.

Also, I heard that you're not supposed to put LEDs directly in parallel; if one takes slightly more current than the others due to manufacturing irregularities, it will get hotter faster than the others, and as it gets hotter it will take even more current, and this continues up to a point; but then the one LED is running hotter than the rest and will have a shorter lifespan. I think (but I'm not positive) that putting LED-resistor pairs in parallel solves this problem (that is, use one resistor for each LED rather than one for all four).

Link to comment
Share on other sites

Yes, LEDs wired directly in parallel don't work reliably.

Normally LED's driven as a group are wired in series with a single resistor. The problem with that here is supply rail +5V will be less than the sum of the forward voltage of the LED (4*1.8>5)

So 4 circuits ( of R and LED) in parallel is the go. If 5mA is bright enough (usually is for an indicator) then you don't need a transistor.

Alternatively (getting pedantic) 2 circuits ( of lower R and 2*LEDs in series)!

Edited by Duggle
Link to comment
Share on other sites

just found out the shift register will only output 35mA, so a transistor switch will be needed.

The only question now is... NPN or PNP ?

I had read about using a series resistance on each LED in parallel, and I'll choose these to run the LEDs at approx 15mA, which should still give a good brightness.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...