piclist 2002\10\18\161333a >
www.piclist.com/techref/displays.htm?key=led
BY : Russell McMahon email (remove spam text)

>*     A couple weeks ago, we were talking about different ways to drive an
LED
(original topic - using a PNP for an active low signal) and this circuit was
suggested to drive an LED from the unregulated supply and take its current
burden off the regulator.

+Vin (unregulated) -------.
|
LED
|
C
uP output -- B   (NPN)
E
|
R
|
GND ----,
*>

I suggested that circuit.
It is generally applicable to the situation you describe.

No rudeness intended:  your questions reflect a general lack of knowledge of
transistor operation and long term you would probably benefit from doing
some reading on the subject. At the level needed for most applications it's
not too complex and would repay the effort. Should be tutorials available on
web.
For a "quick" comment, this should help:

Consider a transistor as a current controlled switch. When turned on,
current will from collector to emitter. The amount of CE current supported
is controlled by the current from base to emitter. In most general terms the
transistor has a current amplification factor called Beta or Hfe. If a
transistor has a Beta of 100 say, then if there is 1 mA of current from B to
E (Ibe) then you can carry 100 mA from C to E.. The actual current that
flows from C to E is dependent on external factors (load resistance, voltage
applied etc) but cannot be MORE than Ibe x Beta. There are other factors
such as saturation voltage (Vce when turned on etc) but the above is enough
for now.

When the transistor is operating BE is a FORWARD BIASED diode junction. For
a silicon transistor Vbe is therefore approximately 0.6v as this is the
normal forward voltage drop for a Silicon junction. (See aforementioned
transistor articles to find out why). This voltage will increase slightly
with increasing Ibe but the increase is usually less than 0.1 volt from off
to very very on except in cases not relevant here.

Note that Vc may fall BELOW Vb ie Vc may approach Ve so Vce approaches 0. Vc
cannot (of course :-) ) fall below Ve.
Vc being able to be BELOW Vb confuses many people - it also gives us

__________________

APPLICATION

In the circuit shown, Vbe may be considered to always be about 0.6V when the
transistor is on.
If you now look at your questions with the above points in mind and work
through the logic you will find most of them answered.

Under most conditions Ice witll be Beta x Ibe.

If you take Vb to 3.3V Ve will rise to about 3.3-0.6 = 2.7V to maintain the
0.6V junction drop.
This turns the transistor on and the nin zero value of Ve causes current to
flow in R (Ie = Ve/R).
If this current is "too low" then Ve is lower than 2.7V and the transistor
will turn on more until Vbe=0.6V.
Ie will now be Ib + Ic. As Ic is Beta x Ib and Beta is usually high (say
100+ in tpical applications) then Ie can be regarded as = Ic for practical
purposes. In some power applications a much lower Beta is acceptable (or the
best available). In certain specialist applications a Beta of about 5 is
used/available but this is MOST unusual for lower voltage circuits. (If the
load voltage is say 500 volts then even with a beta of 5 the POWER in the
base circuit is still much lower than the power being switched in the
collector circuit. This is typically the case in some TV deflection
circuits).

In our present application lets assume a Beta of 100 and R= 500ohm, VPIC
output = 3V3, V_LED_Supply=5V.
Vbe drop = 0.6V when on.
Assume Vled_on = 1.2V as you say. (This will vary substantially with LED
type eg it can be about 3V for some white LEDs).

Vr will be 3V3 - 0.6 = 2.7V
Ir = 2.7/500 = 5.4 mA.

Available voltage max for LED = 5-2.7 = 2.3 V
V across CE = 2.3-1.2 = 1.1V

This is the "headroom: available for current regulation to take place.
The transistor will have some minimum Vce at the current being used. This is
called Vsat. At 5.4mA any transistor worth using will have a Vsat of no
higher than a few tenths of a volt. We still have about say 0.8V drop across
Vce which can be turned on and off as required by the demands of the
circuit. A LED of 1.2 + 0.8 = 2V drop would be about the upper limit of this
circuit.

For day to day applications I use BC337 NPN and BC327 PNP transistors as my
default devices. There will no doubt be some equivalents more commonly
available in US markets. These are superb value transistors as they have 500
mA  Icmax, Beta of 100-300 across most of their current range and just
happen to be about the cheapest TO92 transistor available. (See Roman's
recent comments for other good value/performance transistors). Vce max from
memory is 30 to 40 volts, making them useful in most applications.

(copy, to me as well as list to make sure I don;'t miss it).

Russell McMahon

___________________

I have two questions.

1) What forces the bulk of the current to go through the collector?  I did
not think that the gain of a transistor is fundamental property that would
necessarily dictate the proportion of emitter current divided between base
and collector.  Is it because the potential at the collector is higher that
that at the base, it gets first dibs on the emitter current?  If the LED is
missing or goes open, it seems that the full emitter current goes through
the base (which can't be good).  Should there be a small resistor between
the base and uP output to protect against a missing LED (which can happen in
my design)?  Would this also 'encourage' the bulk of the emitter current to
go through the collector?

2) If the collector potential drops below the base potential, I think the
collector current would stop abruptly and all the current would go through
the base.  Is that right?  Or, is there a voltage drop across the
collector/base that needs to be maintained?  So if the base is driven from a
3.3v logic signal, and the LED is driven from 5V regulated, and the LED v
drop is 1.2V, there is a mere 0.5 volt clearance.  Is this too close for
comfort?  It works on the breadboard, but I am wondering if I can rely on it
with different pieces and under various real world conditions.

Thanks,

--BobG

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestmitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestmitvma.mit.edu