CSC 211 - Transistors
CSC 211 - Transistors
Transistors
Transistors make our electronics world go ‘round. They’re
critical as a control source in just about every modern circuit.
Sometimes you see them, but more-o!en-than-not they’re
hidden deep within the die of an integrated circuit. In this
tutorial we’ll introduce you to the basics of the most common
transistor around: the bi-polar junction transistor (BJT).
Suggested Reading
Before digging into this tutorial, we’d highly recommend
giving these tutorials a look-through:
B-INPN BI*PNP
The only di"erence between an NPN and PNP is the direction
of the arrow on the emitter. The arrow on an NPN points out,
and on the PNP it points in. A useful mnemonic for
remembering which is which is:
Transistor Construction
Transistors rely on semiconductors to work their magic. A
semiconductor is a material that’s not quite a pure conductor
(like copper wire) but also not an insulator (like air). The
conductivity of a semiconductor – how easily it allows
electrons to flow – depends on variables like temperature or
the presence of more or less electrons. Let’s look briefly
under the hood of a transistor. Don’t worry, we won’t dig too
deeply into quantum physics.
NPN PNP
B.
There are three states we can use a valve in, each of which
has a di"erent e"ect on the flow rate in a system.
1) On – Short Circuit
A valve can be completely opened, allowing water to flow
freely – passing through as if the valve wasn’t even present.
2) O! – Open Circuit
When it’s closed, a valve can completely stop the flow of
water.
Amplifying Power
There’s another analogy we can wrench into this. Imagine if,
with the slight turn of a valve, you could control the flow rate
of the Hoover Dam’s flow gates. The measly amount of force
you might put into twisting that knob has the potential to
create a force thousands of times stronger. We’re stretching
the analogy to its limits, but this idea carries over to
transistors too. Transistors are special because they can
amplify electrical signals, turning a low-power signal into a
similar signal of much higher power.
Kind of. There’s a lot more to it, but that’s a good place to
start! Check out the next section for a more detailed
explanation of the operation of a transistor.
Operation Modes
Unlike resistors, which enforce a linear relationship between
voltage and current, transistors are non-linear devices. They
have four distinct modes of operation, which describe the
current flowing through them. (When we talk about current
flow through a transistor, we usually mean current flowing
from collector to emitter of an NPN.)
Saturation Mode
Saturation is the on mode of a transistor. A transistor in
saturation mode acts like a short circuit between collector
and emitter.
Cuto! Mode
Cuto" mode is the opposite of saturation. A transistor in
cuto" mode is o! – there is no collector current, and
therefore no emitter current. It almost looks like an open
circuit.
Active Mode
To operate in active mode, a transistor’s VBE must be greater
than zero and VBC must be negative. Thus, the base voltage
must be less than the collector, but greater than the emitter.
That also means the collector must be greater than the
emitter.
Reverse Active
Just as saturation is the opposite of cuto", reverse active
mode is the opposite of active mode. A transistor in reverse
active mode conducts, even amplifies, but current flows in
the opposite direction, from emitter to collector. The
downside to reverse active mode is the β (βR in this case) is
much smaller.
In summary:
Switches
One of the most fundamental applications of a transistor is
using it to control the flow of power to another part of the
circuit – using it as an electric switch. Driving it in either
cuto" or saturation mode, the transistor can create the binary
on/o" e"ect of a switch.
Transistor Switch
Let’s look at the most fundamental transistor-switch circuit:
an NPN switch. Here we use an NPN to control a high-power
LED:
Our control input flows into the base, the output is tied to the
collector, and the emitter is kept at a fixed voltage.
While a normal switch would require an actuator to be
physically flipped, this switch is controlled by the voltage at
the base pin. A microcontroller I/O pin, like those on an
Arduino, can be programmed to go high or low to turn the
LED on or o".
When the voltage at the base is greater than 0.6V (or whatever
your transistor’s Vth might be), the transistor starts saturating
and looks like a short circuit between collector and emitter.
When the voltage at the base is less than 0.6V the transistor is
in cuto" mode – no current flows because it looks like an
open circuit between C and E.
Similar to the NPN circuit, the base is our input, and the
emitter is tied to a constant voltage. This time however, the
emitter is tied high, and the load is connected to the
transistor on the ground side.
Base Resistors!
You’ll notice that each of those circuits uses a series resistor
between the control input and the base of the transistor.
Don’t forget to add this resistor! A transistor without a resistor
on the base is like an LED with no current-limiting resistor.
The series resistor between our control source and the base
limits current into the base. The base-emitter node can get
its happy voltage drop of 0.6V, and the resistor can drop the
remaining voltage. The value of the resistor, and voltage
across it, will set the current.
Digital Logic
Transistors can be combined to create all our fundamental
logic gates: AND, OR, and NOT.
These gates (which we’ll talk more about in the next class)
form the basis of operations on Boolean values, which you’ll
be familiar with from both C (where they’re written as && ,
|| , and ! ) as well as Scheme (where the operators are the
more intellegible and , or , and not ).
Inverter
Here’s a transistor circuit that implements an inverter, or
NOT gate:
Here a high voltage into the base will turn the transistor on,
which will e"ectively connect the collector to the emitter.
Since the emitter is connected directly to ground, the
collector will be as well (though it will be slightly higher,
somewhere around VCE(sat) ~ 0.05-0.2V). If the input is low, on
the other hand, the transistor looks like an open circuit, and
the output is pulled up to VCC
AND Gate
Here are a pair of transistors used to create a 2-input AND
gate:
OR Gate
And, finally, here’s a 2-input OR gate:
This website was built using Jekyll, Twitter Bootstrap, and the Bootswatch
Cosmo Theme.