artyman Posted September 26, 2012 Report Share Posted September 26, 2012 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:- 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. Quote Link to comment Share on other sites More sharing options...
Sauraen Posted September 26, 2012 Report Share Posted September 26, 2012 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). Quote Link to comment Share on other sites More sharing options...
Duggle Posted September 26, 2012 Report Share Posted September 26, 2012 (edited) 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 September 26, 2012 by Duggle Quote Link to comment Share on other sites More sharing options...
artyman Posted September 26, 2012 Author Report Share Posted September 26, 2012 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. Quote Link to comment Share on other sites More sharing options...
Duggle Posted September 26, 2012 Report Share Posted September 26, 2012 Test the LEDs for brightness before you worry about an NPN transistor (unless you just want to do this). In theory you could have 2 series circuits (R+LED+LED) in parallel with 17.5mA in each. That will be annoyingly bright and very close to the limits of the LED. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.