ULN2803 Based LED drive

Discussion in 'General Electronics Chat' started by anik321, Feb 6, 2013.

  1. anik321

    Thread Starter Member

    Oct 25, 2008
    22
    0
    Guys, I have a quick question about the circuit below: VbeO for Q3 is -4V.
    In this design is this being exceeded when the device is ON or OFF?
    Doesnt look like to me but a coworker disagrees. What do you think? Any insight would be appreciated. Thank you.

    My component calculations are Below:

    Parameters Used:
    Worst Case Rail voltage = 26.3Volts

    Q3 Saturation Vce = .3V
    Q3 hFEmin = 100
    Q3 VbeON = 1.2V
    ULN28 Saturation VceULN = 1.1V
    LED1 Vf ~ 2.2V
    Current required through LED = 20mA

    Calculations:

    - - R27 = (26.3V – VCEsat – Vf)/20mA = (26.3 - 0.3 - 2.2V)/(20mA) = 1190 ohms.
    Let’s go with a 1.1K.
    Power Check: (20mA)^2 * 1.1k = .44W.
    We will need a 1/2W Resistor. Size 1210?


    - Ib = IC/hFEmin = 20mA/100 = .2mA

    - R29 = (26.3- VbeONQ3 – VceULN)/Ib = (26.3-1.2-1.1)V/0.2mA = 120K.
    But let’s drive Q3 hard when ON and go with R29 = 10K. This will ensure Q3 is well within saturation.

    - R25 = roughly 5 times R29 or 50K. We will pick a standard value and go with 51K.
    A smaller resistor may allow too much current through the R29/(R25+R29) divider causing Vb to be too high to ever turn off.
    I think 51K is a safe number.







    [​IMG]
     
  2. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    I think everything in your circuit is selected properly, but what you have there is hideously inefficient. You're using a high voltage, high current driver to turn on a transistor via a 10K resistor, then you're running LEDs off 24V, which as you correctly say, dissipates power in a 1.1K resistor. Can't this setup run off a 5V supply?
     
  3. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Your calculations are basically sound, except for some of the numbers.
    1. Q3 Vbe≈0.7V. Where did you get 1.2v?
    2. Hfemin=100 is valid when the transistor is active. Notice that the datasheet specifies Vce=-1v. For saturation, use β=10. This is called "forced beta". See the attachment. Fortunately, you decided to drive the base with plenty of current. Note that the transistor will saturate when Ic/Ib>10, but Vce(sat) will be higher.
    3.
    This doesn't make sense. A lower value for R25 will turn the transistor off faster, if you need speed. The tradeoff is, a lower value steal a little base drive from Q3 when it is on. Even if you used R25=1k (just an example), the resistor would only draw Vbe/R25≈0.7mA. When the ULN2803A is off, the only current that flows through R25 is collector-base leakage current, which is miniscule unless Q3 is very hot. I have seen many designs with R25 omitted, and the circuit still works, although I don't recommend doing that. 51k is fine.
    4. Why are you using ULN2803A? Do you have 8 of these circuits? And why don't you drive the LEDs directly from the ULN2803A? Is it because the LEDs HAVE to be grounded?
     
  4. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    I would say that in this case, there's no worry about whether the transistor saturates or not, because if some of the power is lost there rather than in the resistor, who cares. It won't affect the brightness of the LED much.

    I assume that the dual LED has to be driven by a high-going input because it's common cathode. But could whatever drives pins 2 and 3 of the ULN2803 drive the LEDs directly with no other components except a resistor?

    Re the base of the PNP, if R25 and R26 were incredibly low, say 510 instead of 51K, you wouldn't be able to turn the transistors on. But that would be an absurd selection.
     
  5. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Sorry. I didn't notice that the LEDs have a common cathode. You can only drive directly from the inputs if your input sources can supply 20mA.
     
  6. anik321

    Thread Starter Member

    Oct 25, 2008
    22
    0
    Ron and John,

    Thank you so much for the prompt input and analysis. Most of you answered you own questions:

    1. it has to be a Bi-Color LED and most of them are common cathodes - so requires a high side drive.

    2. The entire circuit runs off 24V. An LDO steps the 24V down to 3.3 to run the micro. If I put the LEDS and other components on the 3.3V line, the LDO would power limit and thermally shutdown sooner or later due to that Huge voltage drop.

    3. Yes the ULNs are being used to drive other stuff on the board (bunch of relays) and I had two left over so decided to use them to drive the LEDS off 24V.

    Hope this answers most of your questions. The caution about B=10 at saturation is noted and I will look into whether my selection for R25 is enough to keep the LED going.

    Thank you guys! MUCH appreciated.
     
  7. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    An output pin of a 74HC logic chip or a PIC processor can drive >20mA. Maybe not all the pins at once can do it, though--there will have to be some design work. But that's how we earn the big bucks.

    Edited to say that 20mA is a fairly large current for this part. The spec sheet says 25mA absolute max for the green, and 30mA for the red. But maybe the application requires high brightness.
     
    Last edited: Feb 6, 2013
Loading...