Every active device — diode, transistor, LED, solar cell, thyristor — is built from one trick: take pure silicon and dope it to create spare electrons or spare holes. Sandwich the two and the junction becomes a one-way gate. Two layers make a diode, three make a transistor, four make a latching switch. The whole chapter reduces to two recurring numbers: the ~0.6 V junction drop and a device's gain.
You have a 9 V battery, a red LED that glows happily at 20 mA, and a microcontroller output pin that can source only 5 mA. Two things go wrong the instant you wire it the obvious way.
First, connect the LED directly across 9 V and it flares brilliant for a fraction of a second — then dies. A diode does not obey Ohm's law: once it conducts, its voltage barely rises while current runs away. Without something to limit the current, the LED draws hundreds of milliamps and cooks itself.
Second, even if you tame the current, your control pin can deliver only 5 mA. The LED wants 20 mA. The pin physically cannot push four times its rated current without browning out the chip. You need a way for a tiny control signal to command a large load current — the core move behind every relay driver, motor controller, and logic gate ever built.
Slide the series resistor up from 0 Ω. At 0 Ω the LED current rockets past its 20 mA rating into the danger zone. Find the resistor that lands the LED right at 20 mA. (Red LED, VF ≈ 2.0 V across a 9 V supply.)
The numbers we will nail down: the LED current limiter works out to 330 Ω, and the transistor's base resistor to 10 kΩ. But to size those parts you first have to understand why a diode drops 0.6–2 V and how a transistor multiplies current. That is the whole chapter — built up from a single crystal of silicon.
Pure silicon is almost useless as a conductor. Silicon sits in group IV of the periodic table with four valence electrons, and in a crystal each atom shares those four electrons in covalent bonds with four neighbours. Every electron is locked into a bond — none are free to roam — so pure ("intrinsic") silicon conducts only feebly. Its conductivity sits between a metal and an insulator, roughly 10−7 to 103 mho/cm depending on how we treat it. That tunability is the whole point.
Now sprinkle in a few atoms of phosphorus, which has five valence electrons. Four of them join the covalent lattice; the fifth has no bond to fill and drifts free. Add millions of phosphorus atoms and you get a sea of mobile electrons. This is N-type silicon — "N" for the negative charge of its majority carriers. The dopant is called a donor because it donates a free electron.
Instead dope with boron, group III, only three valence electrons. Now there is a missing electron in one of the bonds — a vacancy called a hole. A neighbouring electron can hop into the hole, which moves the hole the other way. The hole behaves like a mobile positive charge. This is P-type silicon, and boron is an acceptor.
Worked count. Silicon has about 5×1022 atoms/cm³. A typical doping of one dopant per 107 silicon atoms gives ~5×1015 free carriers/cm³. That is one impurity atom in ten million — a whisper of contamination — yet it raises conductivity by orders of magnitude. Semiconductor fabrication is, at heart, the art of controlling impurity to parts-per-billion precision.
Toggle between intrinsic, N-type, and P-type. Watch free electrons (teal) and holes (warm) appear as dopant atoms join the lattice.
Take a slab of P-type and a slab of N-type and join them. At the boundary, the crowd of free electrons on the N side spills into the hole-rich P side, and holes spill the other way. Where an electron meets a hole they recombine and both vanish as mobile carriers. A thin zone right at the junction is swept clean of free carriers — the depletion region.
But the dopant atoms stay put. The N side now has exposed positive donor ions; the P side has exposed negative acceptor ions. These fixed charges build an internal electric field — a built-in potential of about 0.6 V for silicon — that pushes back and stops further diffusion. The junction settles into equilibrium with a barrier in the middle. That barrier is the secret to one-way conduction.
Connect the battery's + terminal to the P side and − to the N side. The external field opposes the built-in field, narrowing the depletion region. Once the applied voltage exceeds ~0.6 V, the barrier collapses and carriers flood across: the diode conducts. Current flows easily, limited only by the external circuit.
Flip the battery. Now the external field adds to the built-in field, pulling carriers away from the junction and widening the depletion region. The barrier grows, and essentially no current flows — just a tiny leakage of minority carriers (nanoamps). The junction blocks. A diode is therefore a one-way valve: forward = open, reverse = shut.
Toggle the bias. Under forward bias the depletion region narrows and carriers flood across; under reverse bias it widens and current stops. Watch electrons (teal) and holes (warm).
A resistor's I–V graph is a straight line through the origin — double the voltage, double the current. A diode's graph is nothing like it. Below the knee voltage almost no current flows; above it, current rises near-vertically. The diode is the textbook nonlinear device.
For a silicon diode the knee sits at VF ≈ 0.6 V. Germanium knees earlier at ~0.2 V; a Schottky diode (metal–semiconductor junction) at ~0.4 V, which is why Schottkys are prized for low-loss rectification and fast switching. In the reverse direction the diode blocks — until the reverse voltage exceeds the Peak Inverse Voltage (PIV), where it breaks down. For a rectifier diode you pick a part whose PIV comfortably exceeds the worst-case reverse voltage.
For hand analysis we usually ignore the curve's exact shape and say: a conducting silicon diode drops a constant 0.6 V, full stop. Series diodes add: two in series drop 1.2 V, three drop 1.8 V. This approximation is good enough for designing nearly every circuit in the book.
Worked example. A 5 V supply drives a silicon diode in series with a 220 Ω resistor. The diode drops 0.6 V, leaving 5 − 0.6 = 4.4 V across the resistor. So I = 4.4 V / 220 Ω = 20 mA. Notice we never solved the exponential diode equation — we just asserted the 0.6 V drop and let Ohm's law handle the resistor. That is the whole trick of diode circuit analysis.
Sweep the applied voltage and watch the operating point ride the curve. Switch material to see the knee shift (Ge 0.2 V, Si 0.6 V, Schottky 0.4 V). Reverse voltage stays flat — the diode blocks — until PIV breakdown.
The wall socket gives you alternating current — a sine wave swinging positive and negative 50 or 60 times a second. Almost every gadget wants steady DC. The diode's one-way nature is the tool: let current through on the positive swings, block it on the negative ones. That is rectification.
One diode in series with the load. Positive half-cycles pass (minus one 0.6 V drop); negative half-cycles are blocked entirely. The output is a train of positive humps with gaps between them — lumpy, and it wastes half the waveform. Simple, but poor.
To use both halves, flip the negative swings up. A center-tapped transformer with two diodes does it, but needs that special transformer. The bridge rectifier — four diodes in a diamond — does it from any single winding and is the workhorse of power supplies. The cost: current always flows through two diodes in series, so you lose two 0.6 V drops (~1.2 V) instead of one.
Worked example. A transformer delivers 12 Vrms. The peak is 1.414 × 12 ≈ 17.0 V. Through a bridge, two diode drops cost 1.2 V, so the smoothing capacitor charges to about 17.0 − 1.2 ≈ 15.8 V DC peak. Through a single half-wave diode you would lose only 0.6 V (giving ~16.4 V) but suffer twice the ripple. The bridge's extra drop buys you smoother, more efficient DC — a trade-off worth making for anything above a few volts.
Pick a rectifier topology and adjust the input amplitude. The faint sine is the AC input; the bold trace is the rectified output (with diode drops removed). Toggle the smoothing capacitor to see ripple collapse.
Ordinary diodes treat reverse breakdown as failure. The Zener diode is engineered to break down at a precise, repeatable reverse voltage VZ — and to survive it indefinitely. Run a Zener in reverse and it clamps the voltage across itself to VZ almost regardless of current. That makes it a dead-simple voltage regulator.
Picture a pressure-relief valve. A series resistor RS feeds current toward the load; the Zener sits across the output like a valve set to pop at VZ. If the input rises or the load draws less, excess current dumps through the Zener instead of letting the output climb. The output stays pinned at VZ. Zeners come in standard values from about 1.8 V to 200 V (e.g. the 1N4733A is a 5.1 V part).
RS must pass enough current to keep the Zener in breakdown even at the lowest input and heaviest load. Size it for the worst case:
Worked example. Regulate to VZ = 5.1 V. Input wanders 8–12 V; the load draws up to IL,max = 20 mA; keep at least IZ,min = 5 mA in the Zener. Then RS = (8 − 5.1) / (0.005 + 0.020) = 2.9 / 0.025 = 116 Ω (use 100–120 Ω). Worst-case Zener power, at 12 V in with the load disconnected: PZ = 5.1 × (12 − 5.1) / 116 ≈ 0.30 W, so choose at least a 0.5 W Zener with margin.
Drag the input voltage and the load resistance. The Zener pins the output at 5.1 V while it stays in regulation. Watch IZ, IL, and resistor/Zener power. Push the load too hard or the input too low and regulation collapses (output droops).
An LED is just a PN junction tuned so that recombination releases its energy as a photon instead of heat. Use a wide-bandgap compound (gallium arsenide, gallium nitride) and the emitted light's colour follows the bandgap energy. Because the bandgap is bigger than plain silicon's, the forward voltage is higher: a red LED drops ~2.0 V, green/blue/white drop 3–3.4 V.
An LED is still a diode — it pins its voltage and lets current run away. So it must have a current limiter. LEDs are happiest around 20 mA (modern indicator LEDs are bright at 5–10 mA). Sizing the series resistor is the most common calculation in all of hobby electronics, and it is pure Ohm's law applied to the leftover voltage.
Worked example (the chapter's opening problem, part a). Supply 9 V, red LED VF = 2.0 V, target ILED = 20 mA. The LED eats 2.0 V, leaving 9 − 2.0 = 7.0 V for the resistor. R = 7.0 / 0.020 = 350 Ω — round to the nearest standard 330 Ω (or 360 Ω to be gentle). When we add the transistor switch later there is also a ~0.2 V collector drop, giving R = (9 − 0.2 − 2.0)/0.020 = 340 Ω → still 330 Ω.
Set the supply, the LED forward voltage, and the resistor. The bar shows where the current lands relative to the 20 mA happy zone. Too small a resistor → over-current (red); too large → dim.
Stack three doped layers instead of two and you get a bipolar junction transistor (BJT). An NPN transistor is N–P–N: the three terminals are the emitter, base (the thin middle layer), and collector. A PNP is the mirror image. The magic: a small current into the base controls a much larger current from collector to emitter.
Here is the intuition. The base–emitter junction is a forward-biased diode — push it past VBE ≈ 0.6 V and it conducts. But the base is made very thin and lightly doped, so most carriers injected from the emitter sail straight through it to the collector instead of leaving via the base. The result: the collector current is a fixed multiple of the base current. That multiple is the current gain, β (also written hFE), typically 10–500; we will use 100.
Worked example. A transistor with hFE = 100 has a base current of 0.5 mA. Then IC = 100 × 0.5 mA = 50 mA, and the emitter current is IE = IC + IB = 50.5 mA. The 0.5 mA of control commands 50 mA of load — a 100× lever. Flip it around: to get 20 mA through the collector you only need 20/100 = 0.2 mA into the base. That is the answer to the chapter's opening problem (part b).
Adjust the base current and the gain β. The thin base stream fans out into a collector stream β times larger. The readout shows IB, IC, and IE.
Now we solve the whole opening problem. We want a 5 V / 5 mA microcontroller pin to switch 20 mA through a red LED on a 9 V rail. A transistor used as a switch lives at two extremes of its operating range, never in the middle.
With no base current the transistor is in cutoff: no collector current, the switch is open, all 9 V appears across it. Drive the base hard and it slams into saturation: the collector–emitter voltage collapses to VCE(sat) ≈ 0.2 V, the switch is closed, and the load resistor sets the current. In between is the active region where IC = βIB holds — great for amplifiers, but for switching we blow right through it.
Sizing is a recipe. First the collector resistor (here, the LED's limiter) sets the load current. Then pick a base current that guarantees saturation — comfortably more than Iload/β.
The full worked design. VCC = 9 V, red LED VF = 2.0 V, Iload = 20 mA, hFE = 100, VCE(sat) = 0.2 V, pin Vctrl = 5 V.
Drag the base current IB. The operating point (yellow dot) slides along the load line through cutoff → active → saturation. As it saturates, VCE collapses toward 0.2 V and the LED brightens. The diagonal is the load line VCE = VCC − ICRC.
A switch lives at the two ends of the transistor's range. An amplifier parks it in the middle — the active region — and lets a small AC signal wiggle around that resting point. The resting point is the Q-point (quiescent operating point), and choosing it well is the whole game.
Bias the transistor so that, with no signal, the collector sits around half the supply. Then an input swing can push the output up and down equally before hitting a rail. A small voltage change at the base produces a much larger, inverted voltage change at the collector — that inversion is the signature of the common-emitter amplifier. Push too hard and the output flattens against VCC or ground: clipping.
Worked example (from the book). VCC = 20 V, base biased to VB = 5.6 V, RC = 4.7 kΩ, RE = 3.3 kΩ, hFE = 100.
The Q-point sits at (VC, IC) = (13 V, 1.5 mA). The voltage gain is roughly −RC/RE = −4.7k/3.3k ≈ −1.4 — modest, but rock-steady because the emitter resistor's feedback cancels β's variation. Bypass RE with a capacitor and the gain leaps to −RC/rtr where rtr = 0.026/IE ≈ 17 Ω, giving a gain near −270.
A small sine (teal) enters the base; the amplified, inverted output (warm) appears at the collector around its DC Q-point. Crank the input amplitude until the output clips against the rails. Adjust gain to see the trade with headroom.
The BJT is current-controlled: you spend base current to command collector current. The field-effect transistor (FET) is voltage-controlled — a voltage on its gate shapes a conducting channel between source and drain while drawing essentially zero gate current. That is a profound practical difference: no base resistor to compute, no current budget to manage.
A JFET has a channel of doped silicon with a gate junction along it. Reverse-biasing the gate widens a depletion region that pinches the channel narrower, throttling the current — like pressing a garden hose. At VGS,off the channel pinches off entirely. JFETs are depletion-mode: normally ON, you turn them off.
The MOSFET insulates the gate from the channel with a thin oxide layer, so gate current is truly negligible — gate impedance exceeds 1014 Ω. Enhancement-mode MOSFETs are normally OFF: no channel exists until the gate voltage exceeds a threshold VGS,th, which builds a channel. This is the dominant power-switching and logic device on Earth — every chip is a sea of enhancement MOSFETs.
Worked example. An enhancement N-MOSFET has VGS,th = 2 V and k = 0.5 A/V². Drive the gate to VGS = 4 V: ID = 0.5 × (4 − 2)² = 0.5 × 4 = 2 A — and the gate sank essentially no current to command it. To switch the same 2 A with a BJT at β = 100 you would need 20 mA of continuous base current. The MOSFET's voltage control is why it dominates power switching.
Switch between an enhancement MOSFET (normally OFF, channel builds past threshold) and a depletion JFET (normally ON, channel pinches off). Sweep the gate voltage and watch the channel and drain current respond.
One more layer. Stack four doped regions (P–N–P–N) and you get a thyristor. The classic SCR (silicon-controlled rectifier) is a latching switch: a brief pulse on its gate turns it on, and it stays on even after the gate signal is removed. To turn it off you must interrupt the main anode current — the gate has no further say. A triac is two SCRs back-to-back, conducting in both directions, which makes it the standard device for switching AC power (light dimmers, motor controls).
Every device in this chapter is the same junction physics restacked, and almost every calculation reduces to subtracting a 0.6 V drop and multiplying by a gain.
| Device | Layers | Key equation / number | Role |
|---|---|---|---|
| Diode | 2 (PN) | VF ≈ 0.6 V (Ge 0.2, Schottky 0.4) | One-way valve |
| Rectifier | 2×1–4 | Vpk = 1.414 Vrms; bridge −2×0.6 V | AC → DC |
| Zener | 2 (PN) | RS = (Vin,min−VZ)/(IZ,min+IL,max) | Voltage regulator |
| LED | 2 (PN) | R = (VS−VF)/ILED; ~20 mA | Light emitter |
| BJT | 3 (NPN/PNP) | IC = βIB; VBE = 0.6 V | Current amplifier |
| BJT switch | 3 | VCE(sat) ≈ 0.2 V; RB = (Vctrl−0.6)/IB | Logic-level switch |
| BJT amp | 3 | VC = VCC−ICRC; Av ≈ −RC/RE | Analog amplifier |
| JFET | 3 | ID = IDSS(1−VGS/VGS,off)² | Normally-ON valve |
| MOSFET | 3 | ID = k(VGS−Vth)²; gate >1014Ω | Voltage switch |
| SCR / Triac | 4 (PNPN) | Latches on; off only by Ianode→0 | AC power switch |
You can now protect an LED, switch 20 mA from a 5 mA pin, design a Zener regulator, and read a transistor's load line. In Chapter 5 we run the junction in reverse and let light do the controlling.