# IC to NPN transistor

Discussion in 'Electronic Design' started by [email protected], Oct 22, 2006.

1. ### Guest

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.

2. ### Johnny BoyGuest

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

3. ### Jonathan KirwanGuest

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 Q2
: +----------| PNP
: | |\c
: |/c Q1 |
: IN---| NPN |
: |>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

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 Q2
: +---/\/\---| PNP
: | 1k |\c
: R1 |/c Q1 |
: IN---/\/\---| NPN |
: 15k |>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

4. ### Tim WescottGuest

* 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 www.tech-chat.de)

--

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