Skip to content

Level 9 · Chapter 9.2

Semiconductors, doping and the p-n junction

Why silicon: the band gap and intrinsic carriers, electrons and holes, n-type and p-type doping with phosphorus and boron, the p-n junction and its depletion region, the diode's exponential current (and its 60 mV per decade), LEDs and photodiodes — every number computed.

The previous chapter ended with a material that is neither a good conductor nor a good insulator: pure silicon, with a band gap of 1.12 eV and about 10¹¹ times copper's resistivity. That in-between position is what makes it useful. Silicon's conductivity can be changed by a factor of a million by adding a few impurity atoms, and changed locally, so that one crystal holds regions of different kinds side by side. Where two kinds meet, you get a p-n junction: the diode, the LED, the solar cell, and half of every transistor.

Tanenbaum stops just above this level: his gates chapter says only that "a transistor can be made to operate as a very fast binary switch", and leaves how to the device level. This chapter and the next are that how.

Silicon's crystal

Silicon is in column IV of the periodic table: each atom has four outer (valence) electrons. In a crystal, each atom shares one electron with each of four neighbours, forming four covalent bonds arranged as a tetrahedron. The pattern repeats every 0.5431 nm (the lattice constant), with eight atoms per cubic cell:

a = 0.5431e-7                      # lattice constant, cm
n_Si = 8 / a**3
print(n_Si)                        # 4.99e+22 atoms per cm³

Every valence electron is used in a bond. That's the band picture of the previous chapter in chemical terms: the bonding electrons fill the valence band, and freeing one — breaking a bond — takes at least the band-gap energy, 1.12 eV at room temperature.

Electrons and holes

When heat does break a bond, it creates two carriers, not one. The freed electron wanders into the conduction band and carries current. The bond it left behind is missing an electron: a hole. A neighbouring bonding electron can hop into the hole, which moves the hole the other way. In practice a hole behaves like a particle with charge +e moving through the valence band. A semiconductor conducts with both.

In pure (intrinsic) silicon, electrons and holes are created in pairs, so there are as many of each. Their density at 300 K, the intrinsic carrier concentration nᵢ, is about 10¹⁰ per cm³:

ni = 1e10                          # cm⁻³ at 300 K
print(ni / n_Si)                   # 2.0e-13

About one atom in five trillion has lost an electron. That's why pure silicon is such a poor conductor. The count is also very sensitive to temperature — it follows the exp(−Eg / 2kT) factor of the previous chapter — which is why intrinsic silicon is useless for reliable circuits. We need a way to set the number of carriers deliberately.

Electrons and holes don't move equally easily. Their mobility — drift speed per unit of electric field — is about 1,400 cm²/(V·s) for electrons in lightly doped silicon and about 450 for holes. Electrons are roughly three times as mobile, a fact that shows up in the sizes of the transistors in Building gates from CMOS, one level up.

Doping: n-type and p-type

Doping means replacing a tiny fraction of the silicon atoms with atoms from a neighbouring column:

  • Phosphorus (or arsenic), from column V, has five valence electrons. Four go into bonds; the fifth is barely held, by about 45 meV, less than twice kT at room temperature. Practically every phosphorus atom gives it up to the conduction band. Phosphorus is a donor, and silicon doped with it is n-type: its current is carried mostly by negative electrons.
  • Boron, from column III, has only three. One bond is left short an electron, and a neighbouring electron fills it easily (again about 45 meV), creating a mobile hole. Boron is an acceptor; silicon doped with it is p-type, conducting mostly with positive holes.

In both cases the dopant atom itself stays fixed in the lattice, as an ion: positive for a donor that gave away its electron, negative for an acceptor that took one.

Doping levels in chips range from about 10¹⁵ to over 10²⁰ atoms per cm³. Take a moderate 10¹⁶:

e = 1.602176634e-19
Nd = 1e16                           # phosphorus atoms per cm³
print(n_Si / Nd)                    # 5.0e+06: one P atom per 5 million Si atoms
rho_n = 1 / (e * Nd * 1250)         # electron mobility at this doping ≈ 1250
rho_i = 1 / (e * ni * (1400 + 450))
print(rho_n, rho_i, rho_i / rho_n)  # 0.50 ohm·cm, 3.4e+05 ohm·cm, ratio 6.8e+05
print(ni**2 / Nd)                   # 1e+04 holes per cm³

One impurity atom per five million lowers the resistivity by a factor of about 680,000. And the other carrier nearly disappears: in equilibrium the product of electron and hole densities stays equal to nᵢ², so with 10¹⁶ electrons per cm³ there are only 10⁴ holes. In n-type silicon, electrons are the majority carriers and holes the minority carriers; in p-type, the reverse.

Doping is done by ion implantation — firing dopant ions into the wafer at a controlled energy — followed by heating to repair the crystal, through openings in a mask. That's how a single silicon crystal gets n and p regions a few nanometres apart. The whole process belongs to From sand to chips, on the device level above.

Two ways to move: drift and diffusion

Carriers move for two reasons:

  • Drift: an electric field pushes them — electrons against the field, holes along it. That's the Ohm's-law current of the previous chapter.
  • Diffusion: where carriers are more concentrated, their random thermal motion spreads them out toward regions where they're scarcer, like ink in water. No field is needed.

In a uniform piece of doped silicon only drift matters. At a boundary between n and p regions, diffusion takes over.

The p-n junction

Put n-type and p-type silicon side by side in one crystal. The n side is full of electrons, the p side full of holes. Electrons diffuse into the p side, holes into the n side, and they meet and recombine: an electron drops into a hole, and both disappear.

That leaves a thin layer on each side of the boundary emptied of mobile carriers: the depletion region. What remains there are the fixed dopant ions: positive donors on the n side, negative acceptors on the p side. Their charge creates an electric field pointing from n to p, which pushes back against further diffusion. Equilibrium is reached when the field's push exactly balances diffusion. The voltage across the depletion region is the built-in potential:

V_bi = (kT/q) × ln(N_A × N_D / nᵢ²)

import math
Vt = 1.380649e-23 * 300 / e                  # kT/q = 0.02585 V
Na = Nd = 1e16
Vbi = Vt * math.log(Na * Nd / ni**2)
eps_si = 11.7 * 8.8541878128e-14             # F/cm
W = math.sqrt(2 * eps_si * Vbi / e * (1/Na + 1/Nd))
print(Vbi, W * 1e4)                          # 0.714 V, 0.43 µm
# with Na = Nd = 1e18: Vbi = 0.95 V, W = 50 nm

For 10¹⁶ on both sides, the junction builds up about 0.71 V across a depletion region 0.43 µm wide. Heavier doping makes the region thinner: about 50 nm at 10¹⁸ on both sides. You can't measure this voltage with a voltmeter — the contacts to the metal cancel it — but it controls everything the junction does.

The diode

Apply an external voltage and the junction behaves very differently in the two directions. That's a diode:

  • Reverse bias (+ on the n side): the external voltage adds to the built-in one. The barrier grows, the depletion region widens, and almost no current flows — only a tiny saturation current IS from the few minority carriers that wander into the field. Push hard enough (a few volts to hundreds, depending on doping) and the junction breaks down, conducting heavily.
  • Forward bias (+ on the p side): the external voltage cancels part of the built-in barrier. The number of carriers energetic enough to cross grows exponentially, following the Boltzmann factor of the previous chapter.

The result is the diode equation:

I = I_S × (exp(qV / nkT) − 1)

where n, the ideality factor, is between 1 and 2 (1 for an ideal diode). An exponential means that each fixed step in voltage multiplies the current by a fixed factor. For n = 1, the step that multiplies current by 10 is:

print(Vt * math.log(10) * 1000)             # 59.5 mV per decade at 300 K

Every 59.5 mV of forward voltage multiplies the current by ten. Take a small silicon diode with IS = 10⁻¹⁴ A (a typical order of magnitude; it depends on the junction area):

Is = 1e-14
for I in (1e-6, 1e-3, 1e-2):
    print(I, Vt * math.log(I / Is + 1))
# 1 µA: 0.476 V    1 mA: 0.655 V    10 mA: 0.714 V

Between 1 µA and 10 mA — four decades — the voltage only moves from 0.48 to 0.71 V. That's why a conducting silicon diode is said to "drop about 0.6 to 0.7 V": below that the current is negligible, above it it's huge. The same 60 mV-per-decade exponential, born from the Boltzmann factor, will return in the MOSFET chapter as the leakage limit that ended decades of voltage scaling.

The forward voltage at a fixed current also drops by about 2 mV per degree Celsius. Chips use this: an on-die temperature sensor is typically a junction whose voltage is compared with a reference. Diodes also guard every pin of a chip against electrostatic discharge, steering a static spark into the power rails instead of through the transistors.

Tanenbaum's inverter figure uses a bipolar transistor, which is two junctions back to back (n-p-n or p-n-p) with a thin middle layer; the book notes that MOS has largely taken over, and today essentially all logic is built from MOSFETs, the subject of the next chapter. Bipolar transistors survive in analog and radio circuits.

Light: LEDs and photodiodes

When an electron drops across the band gap into a hole, the energy it gives up, about Eg, has to go somewhere. In some semiconductors it leaves as a photon, a particle of light whose wavelength is set by its energy: λ = hc/E, or, in handy units, λ (nm) = 1239.84 / E (eV).

That's a light-emitting diode (LED): a forward-biased junction in a material where recombination produces light. The material has to have a direct band gap, where an electron can drop straight into a hole. Silicon's gap is indirect: the transition also needs a lattice vibration to balance momentum, which is so unlikely that the energy almost always ends up as heat. That's why LEDs aren't made of silicon, but of compounds from columns III and V:

MaterialBand gap (eV)λ = 1239.84 / E (nm)Use
silicon1.12 (indirect)1107not an emitter; absorbs up to 1107 nm
GaAs1.42873infrared LEDs, remote controls
AlGaInPabout 1.97about 630red LEDs
InGaNabout 2.76about 450blue LEDs
GaN3.4365near-ultraviolet

A white LED is a blue InGaN LED coated with a yellow phosphor: part of the blue light is absorbed and re-emitted as yellow, and the mix looks white. Making efficient blue LEDs took until the early 1990s; Akasaki, Amano and Nakamura received the 2014 Nobel Prize in physics for it. Every white backlight and phone flash depends on it.

Run the process backwards and you get a photodiode: a photon with energy above the band gap breaks a bond and creates an electron-hole pair, and the junction's built-in field sweeps them apart into a current. A camera sensor is millions of silicon photodiodes (see Keyboards, displays, printers and cameras, on the device level). A solar cell is a large one.

The table explains two practical details. Silicon absorbs light up to 1107 nm, beyond the red end of what we see (about 700 nm), so camera sensors see near-infrared, and cameras need an infrared-blocking filter to get colours right. And the 1310 and 1550 nm wavelengths used in fiber optics — photon energies of 0.95 and 0.80 eV — are below silicon's gap: silicon is transparent to them. Fiber receivers use detectors made of germanium or indium gallium arsenide instead, while silicon photonics turns the transparency into an advantage by guiding light through silicon waveguides on a chip. The chapter on signals covers the fibers themselves.

Why silicon?

The first transistor, built at Bell Labs in 1947 by Bardeen and Brattain, was made of germanium, which has a smaller gap (0.66 eV) and more mobile carriers. Silicon took over for two reasons. Its larger gap leaves far fewer thermal carriers, so its circuits leak less and keep working at higher temperatures: at room temperature germanium has about 2 × 10¹³ intrinsic carriers per cm³, some two thousand times more than silicon. And silicon has an excellent natural insulator: heated in oxygen, it grows a layer of silicon dioxide that is chemically stable, sticks perfectly, and has a 9 eV gap. Germanium's oxide dissolves in water. The MOSFET, the switch at the heart of every chip, is built on that oxide.

Takeaways

  • Silicon has four valence electrons and 5 × 10²² atoms per cm³. At 300 K, only about 10¹⁰ per cm³ are thermally freed, each leaving a hole — a mobile positive carrier.
  • Doping sets the carriers deliberately: phosphorus donates electrons (n-type), boron accepts them, creating holes (p-type). One dopant per 5 million atoms cuts resistivity by nearly a million; n × p stays equal to nᵢ².
  • Where n meets p, diffusion leaves a depletion region of fixed ions and a built-in potential (about 0.71 V for 10¹⁶/10¹⁶ doping) that stops further diffusion.
  • A diode conducts forward and blocks reverse. Forward current grows exponentially: ×10 every 59.5 mV at 300 K, which is why silicon diodes "drop" about 0.6–0.7 V.
  • In direct-gap III-V compounds, recombination emits light with λ (nm) ≈ 1240 / Eg (eV): LEDs. Reversed, a junction turns light into current: photodiodes, camera sensors, solar cells. Silicon absorbs below 1107 nm and is transparent at fiber wavelengths.
  • Silicon won over germanium thanks to its larger gap and its superb native oxide, SiO₂.

In this level

  1. 9.1Electrons, conductors and insulators
  2. 9.2Semiconductors, doping and the p-n junction
  3. 9.3How a MOSFET switches: the field effect
  4. 9.4Storing a bit: charge, magnetism and light
  5. 9.5Signals on wires and fibers
  6. 9.6The limits: heat, tunneling, Landauer and quantum computing