>
section 2 of 1114 min read

2. The pn Junction: Where Almost Everything Starts

If you understand only one device in this entire curriculum, make it the pn junction. The diode, the BJT, the photodiode, the LED, the solar cell, the varactor — they are all variations of one or two pn junctions playing different roles. Understanding why the junction has a 0.7 V drop, and why it conducts asymmetrically, gets you most of the way to understanding everything else.

2.1 What happens when n-type and p-type meet

Imagine taking two slabs of silicon side by side: one doped n-type (lots of free electrons floating around in the conduction band, plus a matching set of immobile positive donor ions left behind in the lattice), the other doped p-type (lots of free holes wandering in the valence band, plus matching immobile negative acceptor ions). Bring them into intimate contact along a flat boundary. (In a real chip, of course, you do not bring two slabs together — you make both regions inside one continuous piece of silicon by selectively implanting different dopants, but the physics is identical.)

The instant they touch, two things happen simultaneously:

  1. Electrons diffuse from the n-side to the p-side, because there is a huge electron concentration gradient: the n-side is full of electrons, the p-side has almost none. Diffusion always pushes from high to low concentration.
  2. Holes diffuse from the p-side to the n-side, for exactly the same reason — there are far more holes on the p-side than the n-side.

Perfume analogy. Open a bottle of perfume in one corner of an unventilated room. Even with no air movement, the smell eventually fills the room. Molecules are bouncing around randomly, and on average there are more bouncing out of the high-concentration corner than back into it. Same physics for electrons and holes diffusing into a region where there is room to spread out.

When the diffusing electrons cross into the p-side, they meet a local sea of holes and quickly find one to recombine with. The electron and hole annihilate (in a sense — the electron drops back down to the valence band, filling the hole). The same thing happens to holes diffusing the other way. So after a short time, near the junction, both kinds of mobile carriers are missing. The carriers have recombined.

But what gets left behind is not nothing. On the n-side, near the junction, the electrons that drifted away leave behind their parent donor ions — phosphorus atoms locked in the lattice that have lost their fifth electron. Those donor ions are now positively charged. Symmetrically, on the p-side near the junction, the holes that drifted away leave acceptor ions (boron atoms with one extra electron now stuck to them) that are negatively charged.

So near the junction we now have:

  • A thin region on the n-side with no mobile carriers, just exposed positive donor ions.
  • A thin region on the p-side with no mobile carriers, just exposed negative acceptor ions.

This sandwich of fixed charge — positive on the n-side, negative on the p-side, with a "neutral zone" in between — is called the depletion region (or "space charge region" in older literature). The "depleted" name refers to the absence of mobile carriers; the region is depleted of electrons and holes.

Crowd-control analogy. Imagine a corridor connecting two adjacent stadiums. One stadium is a rock concert (lots of fans, the n-side), the other is empty (the p-side). Open the corridor and fans start streaming through. But each fan that crosses leaves behind their ticket counter-foil at the original stadium — those stay put. After a while there is a halo of empty space around the corridor on the rock-concert side (no fans there anymore) but the counter-foil bills are still there, and the entry-stadium has filled with fans plus a buildup of "incoming fan tags" that document who came in. The system has set up an internal asymmetry — even though every individual move was just diffusion.

2.2 The built-in field: why diffusion does not eat the whole crystal

Once the depletion region forms, the exposed donor and acceptor ions create an electric field across it — pointing from the positive (n-side) ions toward the negative (p-side) ions. This field has a critical effect: it opposes further diffusion.

An electron that tried to diffuse from n to p now has to push against a field pointing from the n-side (positive) to p-side (negative), and the field shoves the electron back the way it came. Symmetrically for holes.

So as more and more carriers diffuse across, the depletion region widens, the built-in field grows stronger, and the field eventually becomes strong enough to exactly cancel the diffusion tendency. Equilibrium has been reached: drift current (carriers being pushed back by the field) exactly cancels diffusion current (carriers diffusing forward). The net current is zero, but it is the dynamic equilibrium of two large currents canceling, not the static absence of any current.

The voltage across the depletion region at equilibrium is called the built-in voltage VbiV_{bi} (sometimes ϕ0\phi_0). For typical silicon doping levels it works out to about 0.7 V — and yes, this is exactly where the famous "silicon diode forward drop" comes from, although we will see it more clearly in a moment.

The exact formula:

Vbi=kTqlnNANDni2.V_{bi} = \frac{kT}{q}\ln\frac{N_A N_D}{n_i^2}.

The thermal voltage kT/q26kT/q \approx 26 mV at room temperature; the log of NAND/ni2N_A N_D / n_i^2 for typical doping values around 101610^{16} each comes out to about ln(1032/2×1020)27\ln(10^{32}/2 \times 10^{20}) \approx 27; multiply: 0.7 V. There is nothing magical about the 0.7 — it is just doping, kT, and ratios.

Why the depletion region settles down. Picture a hill of sand collapsing into a valley. As sand slides into the valley, the slope flattens, and the rate of new sliding decreases. Eventually the slope is shallow enough that no further sliding occurs — equilibrium. The depletion region is the silicon analog: as more carriers cross, the field that develops slows the next crossing, and the rate falls until exactly canceling. The final shape (the depletion width) is the geometry of the equilibrium.

2.3 Forward bias: knocking down the wall

Now apply an external voltage VV across the diode, with the positive terminal connected to the p-side and the negative to the n-side. This is called forward bias.

The applied voltage adds opposite to the built-in voltage. The total potential barrier that carriers must climb is now VbiVV_{bi} - V. As VV increases toward VbiV_{bi}, the barrier shrinks. Diffusion, which had been balanced by drift in equilibrium, now wins out — carriers flood across the junction.

Once across, the carriers are minority carriers in their new neighborhood. Electrons that crossed into the p-side are now minority carriers there, and they recombine with holes within a characteristic distance called the diffusion length (LnL_n, typically tens of microns). The flux of injected minority carriers, recombining steadily, is the diode's forward current.

The detailed math (you can derive it from the diffusion equation plus the boundary condition that the carrier concentration at the edge of the depletion region is multiplied by eqV/kTe^{qV/kT} — the law of the junction) gives:

I=Is(eqV/kT1)I = I_s\left(e^{qV/kT} - 1\right)

This is the Shockley diode equation, named after William Shockley, one of the inventors of the transistor. IsI_s is the reverse saturation current — a tiny constant set by the device geometry and doping, typically around 101210^{-12} A for a small-signal silicon diode.

For practical work, two limits matter:

  • Large forward bias (VkT/q26V \gg kT/q \approx 26 mV): the eqV/kTe^{qV/kT} term dominates. Current grows exponentially with voltage. Every additional 60 mV of forward bias multiplies the current by 10. (More precisely, ln10kT/q60\ln 10 \cdot kT/q \approx 60 mV.)
  • Reverse bias: the eqV/kTe^{qV/kT} term goes to zero, and the current is just Is-I_s. A tiny, almost voltage-independent leakage current.

The voltage at which the current rises to a "noticeable" level (say, 1 mA) is what we call the forward voltage VFV_F — for silicon, around 0.7 V. But notice: there is no actual threshold in the equation. Current flows even at zero bias (just very, very little). The "0.7 V drop" is a useful engineering approximation, not a physical wall.

Climbing-a-hill analogy for forward bias. The depletion region's built-in voltage is like a hill that carriers must climb to cross to the other side. In equilibrium, only a few high-energy carriers (in the thermal-tail of the Boltzmann distribution) make it. Apply forward bias and you effectively lower the hill. Many more carriers can now climb over. Each additional 60 mV lowering of the hill lets ten times more carriers across — the exponential of the diode equation. By the time the hill is lowered by ~0.7 V (built-in voltage), it is essentially gone, and the current is only limited by the bulk resistance of the material plus whatever is in series.

2.4 Reverse bias: making the wall taller

Apply external voltage with negative on the p-side and positive on the n-side. Now you are adding to the built-in voltage; the barrier is taller. Diffusion is choked off entirely. The only current is from the few minority carriers that get thermally generated near the junction and get swept across by the built-in field — that is IsI_s, an extremely small leakage. Plot it on a normal scale and it looks like zero.

What grows in reverse bias is the depletion region itself: it widens to support the larger applied voltage. Wider depletion region → less capacitance (we will see this in a moment).

If you keep increasing reverse bias, eventually one of two things happens (or both):

  • Avalanche breakdown. The few minority carriers being swept across the depletion region pick up enough kinetic energy from the strong field to ionize lattice atoms when they collide, freeing more carriers, which themselves get accelerated and ionize more atoms, in an avalanche. Above a critical voltage (the breakdown voltage VBV_B), the current rises catastrophically.
  • Zener breakdown. At very heavy doping, the depletion region is so thin that the field becomes high enough to directly tunnel electrons across the band gap, even at lower voltages.

Up to maybe 5 V breakdown, the Zener mechanism dominates. Above that, avalanche dominates. We exploit both deliberately in Zener diodes (next section).

Reservoir-and-dam analogy. In equilibrium, the dam (depletion region) holds back a particular amount of water (carriers). Forward bias is like pumping water over the dam from the reservoir side — easy once you exceed the dam height. Reverse bias is like pumping water back over the dam — but the pump cannot reach all the way up; only a tiny trickle from rainfall (thermal generation) makes it. Push the reverse bias too far and the dam itself fails — that is breakdown.

2.5 The diode V-I curve: the picture to memorize

Here is the canonical I-vs-V curve for a real diode:

plaintext
    I
    |
    |              forward conduction
    |              (exponential)
    |              .
    |             /
    |            /
    |           /
    |          /
    |         /
    |        /
    | ___ ./_____________________
    +----0.7V------------------ V
    |                   ↘
    |                   reverse leakage (~−Is, tiny)
    |
    |
    | breakdown ↘
    | ________________________
    |

Three regions:

  • Forward: above ~0.7 V, current rises exponentially. Diode is "on."
  • Reverse: below 0 V (and above breakdown), current is essentially zero (a few nanoamps of leakage). Diode is "off."
  • Breakdown: below the breakdown voltage, current rises sharply. Diode dies (in normal diodes) or operates as a voltage reference (in Zeners).

For circuit design, two simplified models are commonly used:

  • Ideal diode: zero drop when on, infinite resistance when off.
  • Constant-voltage-drop: a 0.7 V battery in series with an ideal diode. (For Schottky diodes, use 0.3 V; for LEDs, 1.7–3.5 V depending on color.)

These models are wrong by a few percent — the real exponential matters in some applications — but they are great starting points for hand analysis.

2.6 Diode capacitance: the often-overlooked detail

A diode has two kinds of capacitance, each dominating in different bias conditions.

Junction capacitance CjC_j dominates in reverse bias. The depletion region is a parallel-plate capacitor: two regions of charge separated by an insulating zone. The wider the depletion region, the smaller the capacitance. And because the depletion region widens as reverse bias increases, CjC_j decreases with reverse voltage.

This is exploited in varactor diodes (also called varicaps): diodes designed for use in reverse bias as variable capacitors. The capacitance can be tuned over a 3:1 or so range by varying the reverse voltage. Used in:

  • Voltage-controlled oscillators (VCOs) inside every PLL.
  • Tuning circuits in old AM/FM radios — turning the dial sweeps a variable capacitor.
  • RFID-tag backscatter modulation.

Diffusion capacitance CdC_d dominates in forward bias. When a diode is conducting, there is a steady population of minority carriers stored in the regions just past the depletion region. If you suddenly change the voltage, that stored charge has to be supplied or removed — it acts like a capacitance. This is the main reason real diodes do not switch infinitely fast.

The most consequential effect is the reverse-recovery time trrt_{rr}: when you abruptly switch a diode from forward conduction to reverse bias, the diode does not turn off instantly. It first conducts in reverse for some nanoseconds (or microseconds in slow rectifier diodes!) while the stored minority carriers are swept out. Until they are gone, the diode looks like a low-impedance short circuit even in reverse bias. This is why high-speed switching power supplies use Schottky diodes (which have no minority carrier injection — the junction is between metal and semiconductor, with no carriers to store) and recover in picoseconds.

2.7 Temperature dependence: the second-most-important practical fact

The reverse saturation current IsI_s doubles roughly every 10 °C in silicon. This means that at a fixed forward current, the forward voltage drops by about 2 mV per °C as temperature rises. Heat the diode by 100 °C and its 0.7 V drop becomes 0.5 V.

This sounds small but matters enormously:

  • Linear voltage regulators use this slight temperature dependence to make precision references. The classic bandgap reference combines a VBEV_{BE} that drops with temperature and a different signal that rises with temperature — they cancel almost perfectly, giving a flat 1.2 V reference good to a few millivolts over the full automotive temperature range.
  • Thermal runaway in transistors: as a transistor heats up, its VBEV_{BE} drops, more current flows, more heat is generated, more current flows... a feedback loop that can destroy the device. Designers add emitter resistors (which provide local negative feedback) specifically to prevent this.
  • Thermal side-channel attacks on chips: an attacker monitors the chip's temperature (with an external IR camera or by measuring some on-die thermal sensor) and infers what computations are happening. Because VBEV_{BE} shifts with temperature, even a constant-current bias circuit will leak data via its temperature-sensitive node.

2.8 A practical aside: where diodes are used in real hardware

Now you understand the physics, here is where diodes show up. Open any consumer device and you will find dozens.

  • Bridge rectifiers (four diodes in a square pattern) inside every wall-wart adapter — turning AC mains into pulsing DC. We will design one in section 4.
  • Flyback diodes across every relay coil and motor winding, catching the inductive voltage spike when the coil current is interrupted. Forget this diode and the spike (often hundreds of volts) blows your driver MOSFET or microcontroller pin.
  • ESD protection on every pin of every modern IC: a pair of diodes from each pin to VDD and GND, ready to clamp away any static-electricity transients.
  • Schottky diodes in switch-mode power supplies, where their fast recovery and low forward drop minimize losses.
  • TVS (transient voltage suppression) diodes on USB, HDMI, and Ethernet connectors — beefier ESD protection.
  • Zener diodes as voltage references and overvoltage clamps.
  • LEDs as the universal indicator.
  • Photodiodes in cameras, optical receivers, and barcode scanners.
  • Tunnel diodes in some microwave oscillators (mostly historical now).
  • PIN diodes as RF switches in cellphone antenna front-ends.
  • Varactor diodes in tuning circuits and PLLs.

By volume, the most-produced semiconductor device in the world is probably the small-signal diode. The 1N4148 (the canonical jellybean signal diode) has been in production since 1968 and remains a front-of-line stock item at every distributor. Trillions of them have been built.