Imagine a packed two-story parking garage: the ground floor (the valence band) is jammed with cars bumper to bumper so that none of them can move, while the upper floor (the conduction band) is wide open, and any car that gets up there can drive freely and create traffic (current). The height of the ramp separating the floors is the forbidden band \((E_{\text{gap}})\): in a conductor there is no ramp at all and the traffic flows freely, and in an insulator the ramp is a concrete wall ten stories high that no car can climb. A semiconductor is a garage with a relatively low ramp – on a calm day the cars are stuck downstairs, but when you give them a little "gas" (heat), some of them manage to leap to the upper floor and start driving. The problem is that a pure semiconductor is like an unsteady driver: it doesn't really block the traffic and doesn't really let it flow well, and its performance depends entirely on the weather (the temperature).
When an enormous number of atoms bond together into an ordered crystal, the discrete energy levels of the single atom split and merge into continuous energy bands. The model focuses on two main bands: the valence band (whose upper edge is \(E_v\)), in which the electrons are bound to the atoms, and the conduction band (whose lower edge is \(E_c\)), where the presence of electrons is the condition for producing an electric current. Between the two lies the forbidden band, whose width is defined as the energy gap \(E_{\text{gap}} = E_c - E_v\), and in which no electrons can be found.
The size of this gap determines the character of the material: in a conductor the conduction band is partially filled, so current flows easily; in an insulator the gap is huge \((E_g \sim 9\text{ eV})\) and prevents electrons from crossing; while in a semiconductor the gap is moderate \((E_g \sim 1\text{ eV})\).
In a pure semiconductor, thermal energy can kick some of the electrons above \(E_{\text{gap}}\) into the conduction band and leave "holes" in the valence band, where at equilibrium the concentration relation \(n \cdot p = n_i^2\) holds. However, since the concentration of free charge carriers is relatively low and depends extremely strongly on temperature, a pure semiconductor is neither a good conductor nor a good insulator – and so it is not useful on its own until it goes through a process of doping.
The crystal on the left is a lattice of 36 \(\mathrm{Si}\) atoms. Each atom is bonded to its 4 neighbors by two thin lines, and each bond holds a shared pair of electrons: two dim points of light that glide gently along it. So every atom has 8 electrons in its outer shell. The bonds at the edges of the lattice continue outward, because the crystal goes on beyond the window.
A bright turquoise-blue point with a trail that wanders freely between the atoms. An electron that leaves through the right edge comes back from the left, so their number does not change.
An empty orange-red ring of light where an electron is missing from a bond. The hole is a positive charge carrier.
An electron from a neighboring bond jumps into the hole and fills it, and the orange ring hops to the bond the electron left. The small point moving the opposite way is that neighboring electron.
A teal-green atom with a + at its center and a fixed dashed frame, in place of a \(\mathrm{Si}\) atom. The moment it enters, its fifth electron is released into the crystal.
A purple-red atom with a − at its center and a fixed dashed frame. The moment it enters, it snatches an electron from one of its bonds, and a hole is left there.
On the right: the conduction band on top (lower edge \(E_c\)), the valence band at the bottom (upper edge \(E_v\)), and the forbidden band between them, with a height arrow and the gap width \(E_{\text{gap}}\) in the yellow label. The dim points in the valence band are the bound electrons.
Every free electron in the crystal is a turquoise point in the conduction band, and every hole in the crystal is an empty circle in the valence band. When an electron breaks free from a bond, its point leaps from the valence band to the conduction band and leaves the empty circle behind.
Each ionized donor is marked by a small green + just below \(E_c\), and from there its electron leaps into the conduction band. Each ionized acceptor is marked by a purple − just above \(E_v\), and the electron it snatched from the valence band rises to it.
A free electron that meets a hole falls into it, and both disappear in a flash: in the crystal at the hole, and in the diagram as the point drops from the conduction band into the empty circle. This is how compensation looks when donors are added to a material with acceptors.
In the bottom bar: the + column is the total positive charge \(p + N_D^+\) (orange: holes, green: donors), and the − column is the total negative charge \(n + N_A^-\) (turquoise: electrons, purple: acceptors). The height of each color in a column is that component's share. The balance beam tilts by the difference, and below it is the live value of \(\rho\).
The large tag changes color and title by state: intrinsic semiconductor, n-type, p-type, conductor or insulator. Next to it are the concentrations \(n, p, N_D^+, N_A^-\) and \(n_i\) in \(\text{cm}^{-3}\), and the product \(n \cdot p\) against \(n_i^2\).
Under the doping sliders: ✓ when \(\lvert N_d - N_a \rvert \gg n_i\) holds (at least 100 times), ✗ when it does not, and under it the active formula. When the condition does not hold, the full calculation is shown.
Draws faint field arrows in the background of the crystal, a + electrode on the left and a − on the right. The electrons drift to the left, the holes hop to the right, and the ions \(N_D^+, N_A^-\) stay in place.
The slider runs from 150 K to 600 K (room temperature: 300 K). Heat increases the vibration of the atoms and the rate at which electrons break free from the bonds.
The crystal is a representative scale: the dominant kind gets up to 12 atoms or points according to the order of magnitude of its concentration, and everything else is in proportion to the same unit, so that always (electrons − holes) = (donors − acceptors). Minority carriers are shown as at least one point as long as their concentration is above \(100\text{ cm}^{-3}\). The exact values appear in the bottom bar.
The motion of the charge carriers, the jumps and the flashes run at the display pace. ⏸ freezes them, and the slider changes only the pace, not the concentrations.