Transistors: How They Work as Switches and Amplifiers
The Device That Changed the World
Your phone contains billions of tiny switches, each one a transistor. Invented in 1947, the transistor replaced bulky, power-hungry vacuum tubes and made possible radios that fit in a pocket, personal computers and the internet. Transistors do two jobs: they act as fast electronic switches, the basis of all digital logic, and as amplifiers, making small signals larger. This tutorial covers transistors as taught in WAEC physics and in PHY 102 and introductory electronics: the structure of npn and pnp bipolar transistors, current gain, the three regions of operation, the transistor as a switch with sensor circuits, the common-emitter amplifier, characteristics and field-effect transistors. It builds on the tutorial on semiconductors and diodes.
Structure of a Bipolar Transistor
A bipolar junction transistor (BJT) is a sandwich of three layers of doped semiconductor, forming two p–n junctions:
- An npn transistor has a thin p-type layer between two n-type layers.
- A pnp transistor has a thin n-type layer between two p-type layers.
The three terminals are:
- The emitter (E), which is heavily doped and emits charge carriers.
- The base (B), which is very thin and lightly doped, and controls the transistor.
- The collector (C), which collects the charge carriers.
In the circuit symbol, the arrow on the emitter shows the direction of conventional current. It points out for an npn transistor and in for a pnp transistor. The npn type is the more common, and it is used in the examples below.
How a Transistor Works
For normal operation as an amplifier, the base–emitter junction is forward-biased and the base–collector junction is reverse-biased. For a silicon transistor, the base–emitter junction needs about 0.7 V before current flows, just like a silicon diode.
Electrons flow from the emitter into the base. Because the base is very thin and lightly doped, only a few of them recombine there to form the small base current. Most of them, typically over 99%, are swept across into the collector by its positive voltage, forming the much larger collector current.
The key point is that a small base current controls a much larger collector current.
Currents and current gain
By Kirchhoff's first law, the emitter current is the sum of the other two:
I(E) = I(B) + I(C)
The current gain β (also written h(FE)) is the ratio of the collector current to the base current:
β = I(C) ÷ I(B)
Typical values of β are between 50 and 500.
Worked example 1
A transistor with β = 150 has a base current of 20 μA. Find the collector and emitter currents.
I(C) = 150 × 20 μA = 3000 μA = 3.0 mA. I(E) = 3.0 mA + 0.02 mA = 3.02 mA.
Three Regions of Operation
- Cut-off: the base–emitter voltage is below about 0.7 V, so there is no base current and no collector current. The transistor is like an open switch (OFF).
- Active region: the collector current is proportional to the base current (I(C) = βI(B)). This is the region used for amplification.
- Saturation: the base current is so large that the collector current cannot rise any further. It is limited by the rest of the circuit, and the collector–emitter voltage falls to about 0.2 V. The transistor is like a closed switch (ON).
A switching circuit jumps between cut-off and saturation. An amplifier stays in the active region.
The Transistor as a Switch
A small current from a sensor or a microcontroller pin can switch on a much larger current through a lamp, motor, buzzer or relay connected in the collector circuit. A base resistor R(B) limits the base current to a safe value.
Worked example 2: choosing the base resistor
A 5 V signal is to switch on a relay that needs 60 mA, using a transistor with β = 100. Choose a suitable base resistor.
- Minimum base current: I(B) = 60 mA ÷ 100 = 0.6 mA.
- To make sure the transistor saturates fully, design for about twice this: I(B) = 1.2 mA.
- The voltage across R(B) is 5 − 0.7 = 4.3 V, so R(B) = 4.3 ÷ 1.2 × 10⁻³ ≈ 3600 Ω.
Choose the nearest standard value below this, 3.3 kΩ, which gives a slightly larger base current.
When switching a relay or motor, connect a diode across the coil (reverse-biased). When the current is switched off, the coil produces a large back e.m.f., and the diode gives it a safe path, protecting the transistor.
Sensor circuits
A transistor switch is often driven by a potential divider containing a sensor. The voltage at the junction of two resistors R₁ (top) and R₂ (bottom) across a supply V is:
V(out) = V × R₂ ÷ (R₁ + R₂)
- Light-operated switch (a dark-activated street lamp): place a light-dependent resistor (LDR) as R₂. In the dark, the LDR's resistance rises sharply, the base voltage rises above 0.7 V, and the transistor switches the lamp on.
- Temperature-operated switch (a fire alarm): use a thermistor, whose resistance falls as it gets hotter, as R₁. When it is hot, its resistance falls, the base voltage rises, and the transistor switches on a buzzer.
Swapping the sensor and the fixed resistor reverses the action, for example making a light-activated alarm instead of a dark-activated lamp.
Worked example 3
An LDR forms the lower half of a potential divider with a 10 kΩ resistor across a 9 V supply. Find the base voltage when the LDR's resistance is 2 kΩ (in daylight) and 50 kΩ (in darkness), and decide whether the transistor is on.
Daylight: V = 9 × 2 ÷ 12 = 1.5 V. Darkness: V = 9 × 50 ÷ 60 = 7.5 V.
Both readings are above 0.7 V, so the transistor would be on in both cases. The design does not work. The fixed resistor must be much larger, or the base voltage must be reduced, so that the daylight voltage stays below 0.7 V. With a 100 kΩ fixed resistor, for example, daylight gives 9 × 2 ÷ 102 ≈ 0.18 V (off), and darkness gives 9 × 50 ÷ 150 = 3 V (on). In practice, a variable resistor is used, so that the switching point can be adjusted.
The Transistor as an Amplifier
In the common-emitter amplifier, the emitter is connected to the 0 V line, which is common to both the input and the output. The input signal goes to the base, and the output is taken from the collector, which is connected to the supply V(CC) through a load resistor R(C).
- Resistors set a steady base current, called the bias, which keeps the transistor in the middle of its active region, so that the signal can swing both ways without distortion.
- A small change in the input voltage changes the base current, which causes a change β times larger in the collector current. This produces a large change in the voltage across R(C).
- The collector voltage is V(CE) = V(CC) − I(C)R(C). When the input rises, I(C) rises, so the output falls. The common-emitter amplifier inverts the signal, producing a phase shift of 180°.
Worked example 4
A transistor amplifier has V(CC) = 9 V and R(C) = 2 kΩ. With no signal, the collector current is 3 mA. Find the collector–emitter voltage.
V(CE) = 9 − (2000 × 0.003) = 9 − 6 = 3 V.
Voltage gain
The voltage gain of an amplifier is A(v) = output voltage ÷ input voltage. It is often given in decibels: gain in dB = 20 log₁₀(A(v)).
Worked example 5
An input signal of 20 mV produces an output of 2.0 V. Find the voltage gain in plain numbers and in decibels.
A(v) = 2.0 ÷ 0.020 = 100. In decibels: 20 log₁₀(100) = 40 dB.
Amplifiers are used in microphones, radios, hearing aids, sensors and audio systems.
Transistor Characteristics
Graphs called characteristics describe how a transistor behaves:
- The input characteristic (I(B) against V(BE)) looks like a diode curve: almost no current until about 0.7 V, then a steep rise.
- The output characteristic (I(C) against V(CE), for several fixed values of I(B)) shows nearly flat lines above a small V(CE). Each line corresponds to a particular base current, which shows that I(C) is controlled by I(B), not by V(CE).
- The transfer characteristic (I(C) against I(B)) is a straight line through the origin with gradient β, in the active region.
Field-Effect Transistors and Integrated Circuits
Modern chips mostly use field-effect transistors (FETs), especially MOSFETs. Their three terminals are the gate, source and drain. A voltage on the gate, rather than a current, controls the current from drain to source, and the gate draws almost no current, so MOSFETs waste very little power.
Billions of microscopic MOSFETs are built together on a single silicon chip, forming an integrated circuit. Combined in pairs, they form the logic gates (NOT, NAND, NOR) that are the building blocks of processors and memory, as described in the tutorial on logic gates.
Common Mistakes with Transistors
- Thinking a transistor creates energy. It controls a larger current drawn from the power supply. The extra energy comes from the supply.
- Forgetting the 0.7 V drop across the base–emitter junction when calculating the base resistor.
- Writing I(E) = I(C). The emitter current also includes the base current, although the difference is small.
- Leaving out the base resistor, which allows too much base current and destroys the transistor.
- Forgetting the phase inversion of the common-emitter amplifier.
Transistors: Practice Questions
- Name the three terminals of a bipolar transistor.
- A transistor has a collector current of 12 mA and a base current of 80 μA. Find its current gain and its emitter current.
- Explain how a transistor acts as a switch, naming the two regions of operation used.
- A 3.3 V microcontroller pin must supply a base current of 2 mA through a base resistor. Find the resistance needed.
- An amplifier gives an output of 1.5 V for an input of 5 mV. Find its voltage gain.
- In a fire alarm, should the thermistor be at the top or the bottom of the potential divider connected to the base? Explain.
Answers: 1. Emitter, base and collector. 2. β = 12 ÷ 0.08 = 150, and I(E) = 12.08 mA. 3. When the base voltage is below about 0.7 V, the transistor is cut off (an open switch). When enough base current flows, it saturates (a closed switch), so a small base current switches a large collector current. 4. (3.3 − 0.7) ÷ 0.002 = 1300 Ω. 5. 1.5 ÷ 0.005 = 300 (about 49.5 dB). 6. At the top. When heated, its resistance falls, so a larger share of the supply voltage appears across the bottom resistor, raising the base voltage and switching the transistor on.
Conclusion
A bipolar transistor is a three-layer semiconductor device (npn or pnp) with an emitter, base and collector, in which a small base current controls a much larger collector current: I(C) = βI(B), and I(E) = I(B) + I(C). Switched between cut-off and saturation, it acts as an electronic switch, often driven by an LDR or thermistor in a potential divider, with a base resistor sized using the 0.7 V drop. Biased in its active region, it acts as an amplifier, and the common-emitter amplifier inverts the signal. MOSFETs, controlled by voltage, are the transistors inside every modern chip.