Hardware Academy
Semiconductors

The p-n junction and diodes

The depletion region, the exponential I-V law, and the diode family you will meet on every board.

Day 1 · 50 min

After this lesson

  • You can explain how the depletion region forms and why a silicon diode drops about 0.7 V.
  • You can read Vf, If, Vr and trr off a datasheet and pick a rectifier, Schottky, Zener or LED.
  • You can size a series resistor for an LED and test a diode with a multimeter.

Where p meets n

Put p-type and n-type silicon side by side in one crystal and something happens at once. The n side has about 10¹⁶ free electrons per cm³ and the p side almost none, so electrons diffuse across the boundary while holes diffuse the other way. Near the junction they meet and recombine. What they leave behind are the dopant ions, which cannot move: positive donor ions on the n side, negative acceptor ions on the p side. This strip, emptied of mobile carriers, is the depletion region, typically 0.1 to 1 µm wide.

The uncovered ions create an electric field pointing from n to p, which pushes electrons back toward the n side and holes back toward the p side. Within picoseconds the drift current from that field cancels the diffusion current, and the junction settles with a potential step across it, the built-in potential V_bi = (kT/q) · ln(N_A·N_D / n_i²). For N_A = N_D = 5 × 10¹⁵ cm⁻³ that is 0.026 × ln(2.5 × 10¹¹) ≈ 0.68 V; moderately doped silicon junctions sit around 0.6-0.7 V and heavily doped ones approach 0.9 V. You cannot read V_bi with a voltmeter, because the contact potentials at the metal leads cancel it.

The width follows from the charge: W = sqrt(2ε(V_bi − V)/q · (1/N_A + 1/N_D)), about 0.59 µm for the junction above, with a peak field near 23 kV/cm. The depletion region reaches further into the more lightly doped side, so in a p⁺-n junction it lives almost entirely on the n side.

p-n junction cross-section with its depletion region and band diagramp-type (holes)n-type (electrons)depletion region−+−+−+−+−+−+−+−+−+−+−+−+built-in field E (n to p)EcEvE_FqV_bi ≈ 0.68 eVElectrons on the n side face an uphill climbFermi level flat: no net current
A p-n junction at equilibrium. Diffusion uncovers fixed ions whose field balances further diffusion; the bands bend by qV_bi across the depletion region while the Fermi level stays flat.

Forward bias: the exponential diode

Make the p side positive by V and the barrier drops to V_bi − V. The number of carriers energetic enough to climb it depends exponentially on its height, so electrons pour into the p side and holes into the n side, where they become minority carriers, diffuse a few micrometres and recombine. The result is the Shockley equation, I = I_s(exp(V / nV_T) − 1), where V_T = kT/q = 26 mV at 300 K, I_s is the tiny saturation current (around 10⁻¹⁴ A for a small silicon diode) and n is the ideality factor, between 1 and 2.

Two consequences follow. Current rises tenfold for every 60 mV (2.3 × 26 mV), and the famous 0.7 V is not a threshold, just the voltage where current becomes useful. With I_s = 10⁻¹⁴ A, 1 mA flows at 0.65 V and 10 mA at 0.71 V, while at 0.4 V only about 50 nA flows. A power diode carrying 1 A, such as a 1N4007, shows about 0.9-1 V once its internal resistance is included. The forward drop also falls about 2 mV per °C, which is how many on-chip temperature sensors work.

Reverse bias: leakage and breakdown

Make the p side negative and the barrier grows to V_bi + V_R. The depletion region widens as W ∝ sqrt(V_bi − V), so going from 0 V to −5 V widens our example from 0.59 to 1.71 µm. Only a small leakage flows, carried by minority carriers and by pairs generated thermally inside the depletion region: picoamps to nanoamps in a small silicon diode at 25 °C, roughly doubling every 10 °C.

Push hard enough and the junction breaks down. In lightly doped junctions the field accelerates carriers until they knock new electron-hole pairs loose, an avalanche that dominates above about 6-7 V and has a positive temperature coefficient. In heavily doped junctions the depletion region is only about 10 nm thick and electrons tunnel straight through, the Zener effect, dominant below about 5 V with a negative coefficient. Between them, 5.1-6.2 V Zeners drift least with temperature. Breakdown is not destructive as long as something limits the current.

The depletion region is two slabs of fixed charge separated by an insulating gap, so it is also a capacitor, C_j = εA/W, falling as reverse bias widens W. Varactor diodes use this to tune oscillators; in fast circuits it is a parasitic to charge on every edge. A 1N4148 has up to 4 pF at zero bias.

The diode family

TypeExampleKey numbersUsed for
Rectifier1N40071 A, 1000 V; Vf about 1 V at 1 A; trr about 2 µsMains rectification at 50/60 Hz
Small signal1N4148100 V; trr 4 ns; 4 pFLogic, clamps, fast detectors
SchottkyBAT54, SS34Vf 0.2-0.4 V at modest current; no stored charge; µA to mA leakageLow-loss rectifiers, converter catch diodes, polarity protection
ZenerBZX84C5V15.1 V ± 5% at 5 mASimple references and clamps
LEDAlGaInP red, InGaN bluePhoton energy ≈ Eg: red about 1.8 eV, blue about 2.7 eVIndicators, lighting, displays
PhotodiodeSilicon PINReverse biased; about 0.5-0.6 A/W near 850-900 nmLight sensors, optical links, lidar receivers

A Schottky diode replaces the p side with a metal. Only majority carriers cross, so it turns on at 0.2-0.4 V and stores no minority charge, but its leakage is two to three orders of magnitude higher. An LED is a junction in a direct-gap material where each recombination can emit a photon with energy close to Eg: wavelength in nm ≈ 1240 / Eg in eV, so red at 1.8 eV is about 690 nm and blue at 2.7 eV about 460 nm. Blue InGaN LEDs earned Akasaki, Amano and Nakamura the 2014 Nobel Prize, and a white LED is a blue one under a yellow phosphor. A photodiode runs the process backwards: photons above Eg create pairs that the depletion field sweeps out as current.

Interactive: bias the junction

The p-n junction under bias

Drag the bias. Forward bias lowers the barrier and carriers pour across (the number of moving carriers grows with the log of the current); reverse bias widens the depletion region and blocks. Switch to a Schottky to see a lower turn-on voltage and higher leakage.

Si p-n junction at 0.00 V: current 0 A00p-type, 5 × 10¹⁵ cm⁻³ (anode)n-type, 5 × 10¹⁵ cm⁻³ (cathode)W−+−+−+−+−+−+Electron energy across the junctionEcEvbarrier 0.68 eV0.20.40.60.81.0−1−2−3−4−51020304050−1−2I (mA)I (µA), reverseV, 0.2 V/divV, 1 V/divSi p-nSchottky
Diode
Current I
0 A
Depletion width W
0.59 µm
Barrier q(V_bi − V_j)
0.68 eV
Built-in potential V_bi
0.68 V
Junction capacitance (0.1 mm²)
17.5 pF
State
Equilibrium: drift balances diffusion

Things to try:

  • Silicon at 0.3 V, then switch to Schottky: about 1 nA becomes about 17 mA at the same voltage.
  • Sweep from 0 to −5 V and watch W grow as a square root while the capacitance falls from 17.5 to 6 pF.
  • Above about 0.8 V the silicon curve straightens: the 2 Ω series resistance, not the junction, starts to set the current.

In practice

Practice

Test a diode with a multimeter

Set the meter to diode mode: it pushes about 1 mA through the part and displays the voltage. Put the red probe on the anode and the black probe on the cathode (the end with the band), then swap.

text
Silicon diode, forward   0.5-0.7 V     (1N4148 about 0.6 V)
Schottky, forward        0.15-0.3 V
Red LED, forward         1.6-1.9 V     (may glow faintly)
Any good diode, reversed OL            (open)
Shorted diode            ~0 V both ways
Open diode               OL both ways
Leaky diode              low reading both ways

Answer: a good silicon diode reads about 0.6 V one way and OL the other. Measuring in circuit, a parallel resistor or another junction can fake a reading, so lift one leg before you condemn a part.

Practice

Size the series resistor for an LED

A red LED with Vf = 2.0 V should run at 10 mA from a 5 V rail. Choose the resistor, then check the real current and both power dissipations.

text
R     = (V_supply − Vf) / I = (5 − 2) / 0.010 = 300 Ω
pick  330 Ω (E12, next value up)
I     = (5 − 2) / 330 = 9.1 mA
P_R   = I² × R = (9.1e-3)² × 330 = 27 mW   → a 0402 (63 mW) is fine
P_LED = Vf × I = 2.0 × 9.1e-3 = 18 mW

Answer: 330 Ω, giving about 9.1 mA, with 27 mW in the resistor. The 270 Ω value would give 11 mA, slightly above target. With only 0.3 V of headroom, as for a 3.0 V blue LED on 3.3 V, the same method fails: a 0.1 V spread in Vf changes the current by a third, so use a constant-current driver.

Real-world scenario

Real-world scenario

Reverse-polarity diode runs hot at 1 A

A 12 V robot controller takes power from a lead-acid battery through a 1N4007 in series with the positive lead, so a reversed battery cannot destroy the board. The board draws about 1 A on average. During a 40 °C enclosure soak for a customer, the thermal camera picks out one part far hotter than everything else, and after 500 hours the laminate under it has started to brown.

Symptoms

  • The 1N4007 body reads 110 °C on the thermal camera in a 40 °C enclosure; every other part is below 60 °C
  • A meter across the diode reads 0.95 V at 1.0 A
  • Whole-board efficiency is about 8% below what the buck regulator's datasheet predicts
  • The diode was chosen because its 1000 V rating looked 'safe'

Interview questions

screenWhy does a silicon diode 'drop 0.7 V'?
The diode current is exponential, I = I_s(exp(V/nV_T) − 1), with V_T = 26 mV and I_s around 10⁻¹⁴ A for a small silicon junction. Solving for the voltage that gives milliamp currents lands between about 0.6 and 0.75 V, so on a linear plot the curve looks like it switches on near 0.7 V. It is not a threshold: the current changes tenfold for every 60 mV, and at 0.4 V tens of nanoamps already flow. The drop also falls about 2 mV per °C and grows with current through series resistance, which is why a 1N4007 shows about 1 V at 1 A.
screenWhat is the difference between a Schottky diode and a PN diode, and when would you choose each?
A Schottky is a metal-semiconductor junction that conducts with majority carriers only, so it has a lower forward drop, 0.2-0.4 V at modest current, and essentially no reverse-recovery charge. The price is much higher leakage that rises steeply with temperature, and lower voltage ratings, typically up to 100-200 V for silicon parts. I pick a Schottky for low-voltage rectification, switching-converter catch diodes and reverse-polarity protection where efficiency matters. I pick a PN diode where leakage must be low, the voltage is high, or cost matters more than the drop, such as a mains bridge rectifier.
deepWalk me through what happens inside a p-n junction when it switches from forward conduction to reverse bias.
In forward conduction the junction has injected minority carriers, holes into the n side and electrons into the p side, stored as charge within a few diffusion lengths of the junction. When the voltage reverses, that stored charge must leave before the depletion region can widen and block, so a large reverse current flows for a while; this is reverse recovery, specified as trr and Qrr. A 1N4007 takes about 2 µs, which is fine at 50 Hz but turns into heat and ringing in a 100 kHz converter, where an ultrafast UF4007 at 75 ns or a Schottky with no stored charge is the right part. Once the charge is gone, the depletion region widens as the square root of the voltage, the junction capacitance falls, and only thermal leakage flows.
deepHow does a Zener diode work, and why are 5-6 V Zeners the most stable with temperature?
A Zener is a diode designed to break down at a defined reverse voltage and survive it, as long as a resistor limits the current. Below about 5 V the junction is so heavily doped and the depletion region so thin, around 10 nm, that electrons tunnel straight across, and tunneling breakdown has a negative temperature coefficient. Above about 6-7 V the mechanism is avalanche multiplication, where the field accelerates carriers until they knock new electron-hole pairs loose, and that has a positive coefficient. Around 5.1-6.2 V the two effects cancel, so those parts drift least; for real precision I would still use a bandgap reference such as the TL431.
screenHow do you pick the series resistor for an LED, and why does it need one?
An LED is a diode, so its current rises exponentially with voltage, and a few tens of millivolts can multiply it several times; driven straight from a supply it will overheat. The resistor sets the current: R = (V_supply − V_f) / I, so 5 V, a 2 V red LED and 10 mA give 300 Ω, and I would fit the standard 330 Ω for about 9 mA. I also check the resistor's power, here about 27 mW, and the LED's absolute maximum current. If the headroom is small, such as a 3 V blue LED on a 3.3 V rail, I use a constant-current driver, because the spread in V_f would swing the current wildly.

Quiz

1. What is the thermal voltage kT/q at 300 K?
2. For an ideal diode (n = 1), how much must the forward voltage rise to increase the current tenfold?
3. A junction with V_bi = 0.7 V is reverse-biased by 6.3 V. Compared with zero bias, its depletion region is about:
4. Which of these has the lowest forward drop at 10 mA?
5. Why does a blue LED need about 3 V while a red one needs about 2 V?
6. On a diode datasheet, what does trr describe?
7. A red LED (Vf = 2 V) should run from 5 V at about 10 mA. Which standard resistor do you fit?

References and further reading

Where the ideas in this lesson come from, and what to read next. Books are the standard texts; papers are the original sources; standards are what employers work to.

  1. Paper

    William Shockley (1949). The Theory of p-n Junctions in Semiconductors and p-n Junction Transistors. Bell System Technical Journal 28(3), 435-489.doi:10.1002/j.1538-7305.1949.tb03645.x

    Read: Sections 1-3 for the depletion region and the diode equation in the original words.

  2. Book

    Ben G. Streetman and Sanjay K. Banerjee (2015). Solid State Electronic Devices. Pearson, 7th edition.

    Read: The p-n junction chapter: built-in potential, depletion width, breakdown.

  3. Book

    Adel S. Sedra and Kenneth C. Smith (2020). Microelectronic Circuits. Oxford University Press, 8th edition.

    Read: The diodes chapter and its problems; LED and Schottky examples.