IC to NPN transistor

Hey I need some help calculating some resister values, I cant seem to find the formula anywhere. I'm trying to trigger a NPN transistor to switch on a set of leds when my IC's output goes HIGH. Heres my values:

NPN transistor: Typical Hfe - 200 Max Vce - 30v Ic - 800mA Power dissipation - 1.8w

IC: Lowoutput - 8mA, 0.35v Highoutput - 0.4mA, 3.5v Power Source - 5v

Leds:

4.5v x 6 20mA x 6

What I need to happen is when the output goes high is to turns on 6 leds (parralle) operating at 20ma each from a 9 volts source. I already know I need a 39 ohm resistor for the leds, what I really need to know is how to calculate the resistor value I need between the IC and the transistor.

Reply to
Digitmode
Loading thread data ...

It looks like you might be pushing it a bit from the figures you've given. (6*20mA)[LEDs] / 200 [Hfe] = 0.6mA, but the IC can only supply 0.4mA @ 3.5V. What voltage will the IC's output drop to when sourcing 0.6mA? What is the IC and what is the transistor? ... Johnny

Reply to
Johnny Boy

This thread should be in sci.electronics.basics, I think. Adding it there, with followups set to .basics.

Johnny, the transistor's beta is 200 only if it is kept out of saturation and even then only if not at too high currents, often. So the situation is probably still worse than just the 600uA versus 400uA would otherwise indicate.

I think this kind of thing does call for two transistors, to relieve the load on the IC output.

: +4.5V : | : | : \\ : / R2 +4.5V : \\ 4.5k | : / | : | |e +-----+-----+-----+-----+-----, :3.5V | | | | | | | :400uA | \\ R \\ R \\ R \\ R \\ R \\ R :max \\ / 39 / 39 / 39 / 39 / 39 / 39 : / R1 \\ \\ \\ \\ \\ \\ : \\ 1k | | | | | | : / v v v v v v LEDs : | - - - - - - : | | | | | | | : gnd gnd gnd gnd gnd gnd gnd

But this would mean a PNP capable of the loading.

Q1 gets close to saturation in this case because Q1's collector probably has to get dragged down some 800-900mV. That places it very close to the Q1 base voltage, when on. So if the 3.5V drive is a little higher up than 3.5V (and it might very well be) then the base drive current will rise a lot. So really this isn't so good, even though it really limits the drive current -- if the Q1 base voltage is kept low enough to keep Q1 out of saturation, but not so well otherwise.

So perhaps a better circuit using another resistor is:

: +4.5V : | : | : \\ : / R2 +4.5V : \\ 15k | : / | : | R3 |e +-----+-----+-----+-----+-----, :3.5V | | | | | | | :400uA | \\ R \\ R \\ R \\ R \\ R \\ R :max gnd / 39 / 39 / 39 / 39 / 39 / 39 : \\ \\ \\ \\ \\ \\ : | | | | | | : v v v v v v LEDs : - - - - - - : | | | | | | : gnd gnd gnd gnd gnd gnd

That will load the IC output more, as Q1 is also saturated now, but it will deal with an input voltage that spans the likely range and the worst case current is about half the IC output max spec of 400uA.

Jon

Reply to
Jonathan Kirwan

  • Use the _minimum_ Hfe, if you want the circuit to be successful all the time. If I'm driving a transistor into saturation I'll calculate a base current assuming Hfe/10. So assume that your transistor type has a minimum Hfe of 100, that gives you an Hfe of 10.
  • With an Hfe of 10, and 120mA, you'll need 12mA into the base of the transistor -- that's bigger than what your microprocessor can supply, so you'll want a Darlington pair, or other current boost topology. With a Darlington, you'll need 120uA into the first transistor, but I'd go with everything your processor can deliver.
  • Oh -- you don't want one 39 ohm resistor -- you'll be much better off with one R per LED, so take R = 220. With one resistor you have a much greater chance that the LED's will be at significantly different brightnesses.

So I'd do something like this:

+9V --- | .-----------o------o------. | | | | | .-. .-. .-. | 220| | 220| | 220| | | | | | | | | | '-' '-' '-' | | | | | | | | | V -> V -> V ->

___ 1.3V |/ - - - o---|___|--o--| | | | 10K | |> o------o------' | | | .-. | |/ | | '-------o-| 12K| | | |>

'-' | | | .-. | | | | | | 1K| | | | '-' | | | | | | | === === === GND GND GND (created by AACircuit v1.28.6 beta 04/19/05

formatting link

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/

"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.