Tool 07 · Transistor Guide · Bipolar
NPN bipolar transistor
A small current into the base lets a current about times larger flow from collector to emitter.
- Controlled by
- Current into the base
- With no drive
- Off: it conducts only when driven
- Fully on
- A small fixed drop, of 0.05 to 0.4 V
- Terminals
- B base, C collector, E emitter
- Used for
- Low-side switches for LEDs, relays, small motors; Small-signal amplifiers; Current sources, mirrors, differential pairs
How it works
An NPN is three layers of silicon: an N-type emitter, a very thin P-type base, and an N-type collector. Forward-biasing the base-emitter junction, about 0.65 V, pushes electrons from the emitter into the base. The base is so thin that almost all of them cross it, and the reverse-biased collector-base junction (collector above base) sweeps them into the collector; only a small fraction leave through the base wire.
So the base current sets a collector current times larger:
, written on a datasheet, is between 100 and 300 for a 2N3904 at 10 mA, with only 30 guaranteed at 100 mA. It also changes with temperature and from one part to the next. A circuit that works only for one value of is a fragile circuit.
Seen from the base-emitter voltage instead, the collector current is exponential, like a diode:
, the saturation current, is a tiny scale factor (6.7 fA in the 2N3904 SPICE model). is the thermal voltage: is Boltzmann's constant, the absolute temperature and the electron charge. Ten times more current takes only mV more on the base. That is why hardly moves, about 0.6 to 0.72 V from 0.1 mA to 10 mA, and why a design can treat it as a fixed 0.65 V. At a fixed current it also falls by about 2 mV for every degree of warming.
Regions of operation
| Region | Base-emitter | Base-collector | What happens | Used as |
|---|---|---|---|---|
| Cutoff | under about 0.5 V | reverse | only leakage flows | open switch |
| Active | about 0.65 V, forward | reverse | , nearly independent of | amplifier, current source |
| Saturation | forward | forward | down to 0.05 to 0.4 V, set by the load, | closed switch |
| Reverse active | reverse | forward | collector and emitter swap roles, gain near 1 | rarely |
"Saturation" means opposite things for a BJT and a MOSFET. In a BJT it is the fully-on switch, with almost no voltage across it. A MOSFET's "saturation" is its flat, current-source region, the equivalent of the BJT's active region.
Small-signal model
Around an operating point in the active region the transistor behaves, for small signals, like a controlled current source. Four numbers describe it: the transconductance , the resistance seen looking into the emitter, the resistance seen looking into the base, and the output resistance . The first two follow from the current alone, also needs , and needs the Early voltage :
At mA: mS, , kΩ for , and with V (the 2N3904 SPICE model) kΩ. The gain of a common-emitter stage or a follower is then a ratio of resistors to .
Relatives
A resistor-equipped transistor (also sold as a digital or pre-biased transistor) has its base resistor, and often a base-emitter resistor, built in: a logic pin drives it directly. Its resistors are only ±30 %, so it is used as a switch, never to bias an amplifier.
Matched pairs and arrays put two or more transistors in one package, often on one die, so their match (2 mV at most for a BCM847BS at 2 mA, 0.45 mV typical and 5 mV at most for an LM3046 at 1 mA) and track in temperature: the parts for current mirrors and differential pairs that have to be accurate.
The curves
interactiveThe output curves a curve tracer draws, from the Ebers-Moll model of a small NPN (). The red line is the load line of on : the transistor can only sit where its curve crosses it.
active: V_CE = 6.73 V, I_C = 3.27 mA, V_BE = 0.683 V, I_C / I_B = 163, P = 22.0 mW
The base current picks a curve and the curve is nearly flat: is about ( about 150 here) whatever does. The resistor turns that current into a voltage, which is how the transistor amplifies.
Circuits to try
Falstad's simulator, one at a timeEach circuit runs in Paul Falstad's CircuitJS, loaded only on request. The sliders are in the panel on the right of the simulator, switches toggle with a click, and hovering a part shows its voltages, currents and state at the bottom right.
NPN switch lighting an LED
A 5 V supply, an LED with its 330 Ω resistor in the collector, and a base resistor fed by an adjustable input voltage.
- Drag Input voltage in the right-hand panel slowly from 0 to 5 V.
- Stop near 0.9 V and hover the transistor: it reads fwd active, and the LED is dim.
- Go on to 5 V and hover again: it reads saturation, with under 0.1 V.
What to see. Below about 0.6 V no current flows. Between 0.6 and about 1.1 V the LED current grows with the base current: the active region. Past that the LED current stops at about mA however hard the base is driven, because the resistor sets it, not the transistor: that is saturation, the closed switch.
Common-emitter amplifier
A divider biases the base, sets the collector current, and a 20 mV sine at 1 kHz comes in through a capacitor. The output is taken from the collector through another capacitor.
- Compare the two scopes under the drawing: the output is larger and upside down.
- Drag Transistor beta from 50 to 400 and hover the transistor: the collector current hardly moves.
- Click the switch next to to connect the 100 µF bypass capacitor, and watch the output grow and flatten on one side.
What to see. Without the bypass capacitor the gain is about : the emitter resistor feeds back and fixes it, and it fixes the bias too, which is why can change eightfold and move the collector current only from about 1.3 to 1.47 mA. Bypassing removes that feedback for the signal: the gain jumps to about , near 250, and the output flattens at the bottom, where the transistor saturates against the emitter voltage. High gain, but no longer set by resistors.
Emitter follower
The base gets a 2 V sine around 6 V, the collector sits on 12 V, and the output is the emitter, across 1 kΩ. A switch adds a heavy 100 Ω load.
- Compare the two scopes: the output has the same shape as the input, about 0.6 V lower.
- Click the switch to add the 100 Ω load, and look at the output again.
What to see. The emitter stays one below the base whatever the load does, so the voltage gain is about 1. What the follower gives is current: the base supplies only , so a weak source can drive a 100 Ω load through it. That is the buffer used after a high-impedance stage.
Design rules
A saturated switch: a base current of
To be sure the transistor saturates whatever its , the base gets about a tenth of the collector current: a "forced beta" of 10, which is also the ratio the 2N3904 and PN2222A datasheets test at (the BC547 sheet uses 20).
A 2N3904 switching 100 mA from 5 V logic: mA and V, read off the typical curve at 100 mA (the table guarantees values only up to 50 mA), so , 390 Ω in the E12 series. 10 mA is a lot for a logic pin. A forced beta of 20 halves it (820 Ω) at the cost of margin when cold, and a Darlington, a ULN2003 or a logic-level MOSFET needs far less drive.
An inductive load needs a flyback diode
A relay coil, a solenoid or a motor keeps its current flowing when the transistor turns off, and the collector flies far above the supply until something breaks down. A diode across the coil, cathode to the supply, gives that current a path and clamps the collector one diode drop above the supply.
The coil's inductance sets the voltage it makes when its current changes, the energy it stores at a current , and the time constant of the current dying away through its own resistance :
A 5 V relay coil of 100 Ω and 100 mH carries 50 mA. Cut off in 50 ns, the maximum fall time of a 2N3904, it would need kV to keep that current flowing. The transistor is rated 40 V () and breaks down long before, and the 0.125 mJ stored in the coil ends up in its junction at every turn-off. With the diode the collector stops one diode drop above 5 V, and the current dies away with ms.
An amplifier is biased by resistors, not by beta
A divider sets the base voltage and an emitter resistor turns it into a current: . With about 1 V across and a divider "stiff" enough, , the collector current moves by a few percent over a threefold spread of .
On the +15 V lab rail, for 1 mA: kΩ puts 1.5 V on the emitter and 2.15 V on the base. kΩ on top and kΩ below act as 2.27 V in series with 8.5 kΩ, under the 15.2 kΩ limit for . is then 1.024 mA at and 1.062 mA at , 3.7 % apart.
The gain of the common-emitter stage is then set by resistors too:
Heat: power times thermal resistance
A TO-92 part has °C/W: 0.5 W already lifts the junction 100 °C above the room, and 0.625 W takes it from 25 °C to its 150 °C limit. A datasheet's derating line (5 mW/°C for the 2N3904) is just .
The base-emitter junction breaks down at only 5 to 6 V in reverse
is 6 V on a 2N3904. An op-amp output swinging to -13 V on ±15 V rails, driving a base through its resistor, takes the junction into breakdown, which lowers at low current over time. A 1N4148 from emitter (anode) to base (cathode) clamps the reverse voltage near 0.7 V, and the base resistor limits the op-amp current through it.
Real parts and their datasheets
Pinouts as seen from the front, legs down. Every value comes with the condition it is measured at: a number from a datasheet means nothing without it.
flat face toward the viewer; a BC547 has the reverse order
2N3904
NPN, small signalonsemi, TO-92. Datasheet (PDF), onsemi.com
| Line | Value | Measured at |
|---|---|---|
| 40 V max | base open | |
| 200 mA max | continuous | |
| 100 to 300 | mA, V | |
| 30 min | mA, V | |
| 0.2 V max | mA, mA | |
| 0.3 V max | mA, mA | |
| 0.65 to 0.85 V | mA, mA | |
| 6 V max | emitter-base, reverse | |
| 300 MHz min | mA, V, MHz | |
| , | 625 mW, 200 °C/W | °C, derate 5.0 mW/°C |
What to read first. at the current of the job: 100 minimum at 10 mA but only 30 at 100 mA, and the "typical 300" quoted online is the 10 mA maximum. Then , measured at , which is the forced beta to design a switch with.
flat face toward the viewer; the onsemi P2N2222A, also sold as "2N2222A", is C B E
PN2222A
NPN, small signal, higher currentonsemi (Fairchild), TO-92. Datasheet (PDF), onsemi.com
| Line | Value | Measured at |
|---|---|---|
| 40 V max | base open | |
| 1.0 A max | absolute maximum, steady state | |
| 100 to 300 | mA, V, pulsed | |
| 50 min | mA, V | |
| 40 min | mA, V | |
| 0.3 V max | mA, mA | |
| 1.0 V max | mA, mA | |
| 0.6 to 1.2 V | mA, mA | |
| 300 MHz min | mA, V, MHz | |
| , | 625 mW, 200 °C/W | °C, derate 5.0 mW/°C |
What to read first. The 1 A on page 1 is a stress limit: at 500 mA the table guarantees an of only 40 and allows 1.0 V of , so a relay or LED switch is designed from the 150 mA rows. Then the body marking, since the PN2222A and the P2N2222A have opposite pinouts.
flat face toward the viewer; the reverse of a 2N3904
BC547B
NPN, small signalonsemi (Fairchild), TO-92. Datasheet (PDF), onsemi.com
| Line | Value | Measured at |
|---|---|---|
| 45 V max | base open | |
| 100 mA max | continuous | |
| 500 mW max | absolute maximum; no thermal resistance in this document | |
| 200 to 450 | mA, V, B grade (A: 110 to 220, C: 420 to 800) | |
| 0.58 to 0.70 V | mA, V (0.66 V typ) | |
| 0.25 V max (0.09 typ) | mA, mA | |
| 0.6 V max (0.25 typ) | mA, mA | |
| 300 MHz typ | mA, V, MHz; no minimum given | |
| 6.0 pF max (3.5 typ) | V, , MHz |
What to read first. The suffix first: A, B and C are gain grades of the same die, and the pinout, which is the reverse of the 2N3904. The often-linked onsemi bc546-d.pdf is marked obsolete on every page; this bc550-d.pdf is the current document.
On the bench
Meter check. On the diode range, red lead on the base: 0.6 to 0.7 V to the emitter and to the collector, nothing with the leads swapped, nothing between collector and emitter either way. The base-emitter reading is usually a few millivolts higher than the base-collector one, which tells the emitter from the collector.
First build. The LED switch above on a breadboard: 2N3904, 4.7 kΩ to the base, 330 Ω and an LED from 5 V to the collector. Fully on, the meter reads about 0.75 V from base to emitter and under 0.1 V from collector to emitter.
Common traps
The base current flows on to the collector.
The base current leaves through the emitter. The collector current comes from the collector supply, enabled by the base current; the emitter carries both.
is a design value.
varies two- to threefold between parts of the same number and with current and temperature. A good design depends on resistors and uses only as a minimum.
is exactly 0.7 V.
It runs from about 0.6 V at 0.1 mA to about 0.72 V at 10 mA and drops about 2 mV/°C at a fixed current. 0.65 V is a starting guess, never a constant to subtract precisely.
Saturation is the most amplification the transistor can give.
It is the opposite: in saturation the transistor no longer amplifies, is set by the load and falls below .
All TO-92 transistors have the same pinout.
A 2N3904 is E-B-C seen from the flat face, a BC547 C-B-E, and a TO-92 "2N2222A" can be either: the PN2222A is E-B-C, the P2N2222A C-B-E. The drawing in the datasheet of the exact part number, then a diode-test check, settle it.
Check yourself
answers fold outA 2N3904 has to switch a 50 mA load from a 3.3 V logic pin. What base resistor?
Answer
Forced beta 10 gives mA. The datasheet guarantees V at exactly 50 mA and 5 mA, so , an E12 value. Check that the pin can source 5 mA.
A transistor with carries mA for mA, with V. Which region?
Answer
Saturation: is far below and the collector sits at 0.1 V. The load, not the transistor, sets the current.
Why does an emitter resistor keep the bias of an amplifier stable?
Answer
depends on resistors and on , not on . With V and kΩ, mA. Warming by 50 °C takes 0.1 V off , and only rises to 1.07 mA. With no and the base held at a fixed voltage, the same 0.1 V would multiply the current by about . The mechanism is negative feedback: if the current rises, the emitter voltage rises and cuts .