---
title: The Fermi level, doping and the built-in potential
heading: Where the Fermi level sits, how it moves with temperature, and what it builds at a junction
eyebrow: B11 · Lesson 38 · The Fermi level, doping and the built-in potential
xp: 50
---

::: hook
The Fermi level is the single number that summarizes a semiconductor's carriers: where it sits in the gap tells you n, p and which carriers dominate. It moves with doping and with temperature, freezing toward the donor level when the material is cold, settling a few hundred meV below the band at room temperature, and sliding to midgap when the material gets hot enough to turn intrinsic. Put p and n material together and their Fermi levels must line up (lesson 16); the bands bend to make it happen, and the bending is the junction's **built-in potential**, the voltage every diode, solar cell and transistor is built on.
:::

::: play
- n-type silicon with donor density $N_D$ (fully ionized). The solid curve is the Fermi level's height above the valence band against temperature; the dashed lines are the band edges and the intrinsic level.
- At room temperature the Fermi level sits near the conduction band, closer for heavier doping. As T rises, $n_i$ catches up with $N_D$ and the Fermi level slides down to the intrinsic level.
- The sim leaves out freeze-out, below about 100 K, where electrons fall back onto the donors and the Fermi level climbs toward the donor level (example 2).
:::
:::

```sim plot
view: graph
x: T = 150..900 K
y: E = 0..1.2 eV
slider: N = 1e13..1e18 = 1e16 cm^-3 log
plot: 1.12 - 0.000086173*T*ln(3.2e19*(T/300)^1.5/(N/2 + sqrt(N^2/4 + 5.76e38*(T/300)^3*exp(-1.12/(0.000086173*T))))) | label: Fermi level
plot: 1.12 | dashed | label: E_c
plot: 0.56 + 0.000086173*T/2*ln(1.8/3.2) | dashed | label: E_i
readout: E_c − E_F at 300 K, eV = 0.025852*ln(3.2e19/(N/2 + sqrt(N^2/4 + 1e20)))
```

::: predict
## A silicon diode has $N_A = 10^{17}$ on the p side and $N_D = 10^{16}$ cm⁻³ on the n side. What's its built-in potential at 300 K?

- [ ] 0.36 V
- [x] 0.77 V
- [ ] 1.12 V, the gap
- [ ] 0.026 V

::: reveal
$V_{bi} = \frac{kT}{q}\ln\frac{N_AN_D}{n_i^2} = 0.02585\ln\frac{10^{33}}{10^{20}}$ = 0.77 V. It's the difference between the two sides' Fermi levels before contact. It can't exceed the gap (both Fermi levels must stay inside it unless the doping is degenerate), and a voltmeter across an unbiased diode reads zero, because the contacts' own built-in potentials cancel it.
:::
:::

::: nameit
## Fermi level from the carrier densities

From lesson 37, in the nondegenerate range:

$$E_c - E_F = kT\ln\frac{N_c}{n}, \qquad E_F - E_v = kT\ln\frac{N_v}{p}, \qquad E_F - E_i = kT\ln\frac{n}{n_i}$$

## Three regimes in temperature (n-type)

- **Freeze-out** (low T): not all donors are ionized. Neutrality with the donor occupancy of lesson 16 gives, when few are ionized, $n \approx \sqrt{\frac{N_DN_c}{2}}e^{-E_d/2kT}$, with $E_d$ the donor binding energy. $E_F$ lies between the donor level and $E_c$.
- **Extrinsic** (around room temperature): n ≈ $N_D$, and $E_F$ falls slowly as $N_c$ grows with T.
- **Intrinsic** (high T): $n_i$ exceeds $N_D$, and $E_F$ approaches $E_i$. For silicon at $10^{15}$ cm⁻³ that's about 590 K with the gap held at 1.12 eV, and about 550 K with the real gap, which shrinks as the crystal warms.

## The built-in potential

Bring p and n material into contact. Their Fermi levels must align, so the bands shift by the original difference in Fermi levels:

$$qV_{bi} = (E_F - E_i)_n + (E_i - E_F)_p = kT\ln\frac{N_DN_A}{n_i^2}$$

Electrons on the n side see a barrier $qV_{bi}$; only the Boltzmann tail crosses it, which, with a forward bias lowering the barrier, gives the diode's exponential law.

## Degenerate doping

If the doping exceeds about $N_c$ (n-type) or $N_v$ (p-type), $E_F$ enters the band. Then the formulas above fail, the band gap shrinks a little (bandgap narrowing), and tunnel diodes and ohmic contacts become possible.

## Metals in contact

Two metals in contact also align Fermi levels, leaving a **contact potential** equal to the difference of their work functions. Thermocouples (lesson 28) work despite it because it's the same at every temperature to first order; the Seebeck effect is the part that isn't.
:::

::: example
## Find $E_F - E_i$ for silicon with $N_D = 10^{16}$ cm⁻³ at 300 K, and $E_c - E_F$.

::: solution
1. **Fermi level above intrinsic.**
   $$\begin{aligned} E_F - E_i &= 0.02585\ln\frac{10^{16}}{10^{10}} \\ &= 0.357\ \text{eV} \end{aligned}$$
2. **Distance below the band edge.**
   $$\begin{aligned} E_c - E_F &= 0.02585\ln\frac{3.2 \times 10^{19}}{10^{16}} \\ &= 0.209\ \text{eV} \end{aligned}$$
3. **Check.** They add to 0.566 eV, which with the 7 meV offset of $E_i$ below midgap matches half the 1.12 eV gap.

**Answer:** $E_F - E_i$ = 0.357 eV and $E_c - E_F$ = 0.209 eV.
:::
:::

::: example
## Silicon with $N_D = 10^{16}$ cm⁻³ and phosphorus donors ($E_d$ = 45 meV) is cooled to 50 K. What fraction of donors is ionized?

::: solution
1. **Conditions at 50 K.** kT = 4.31 meV and
   $$\begin{aligned} N_c &= 3.2 \times 10^{19}(50/300)^{3/2} \\ &= 2.18 \times 10^{18}\ \text{cm}^{-3} \end{aligned}$$
2. **Electron density in freeze-out.**
   $$\begin{aligned} n &\approx \sqrt{\frac{10^{16} \times 2.18 \times 10^{18}}{2}} \\ &\quad \times e^{-45/(2 \times 4.31)} \\ &= 5.6 \times 10^{14} \end{aligned}$$
3. **Fraction ionized.** That's about 5.6% (solving neutrality exactly gives 5.5%).
4. **For cryogenic devices.** Silicon devices meant for cryogenic use need heavier doping or designs that tolerate freeze-out.

**Answer:** about 5.6% of the donors are ionized (5.5% from the exact neutrality solution).
:::
:::

::: example
## Silicon is doped with $10^{15}$ donors per cm³. At what temperature does the intrinsic density catch up with the doping? Use $N_c = 3.2 \times 10^{19}$, $N_v = 1.8 \times 10^{19}$ cm⁻³ at 300 K (both growing as $T^{3/2}$) and a fixed 1.12 eV gap.

::: solution
1. **The condition.** We need
   $$\begin{aligned} n_i(T) &= 2.4 \times 10^{19}\left(\frac{T}{300}\right)^{3/2} \\ &\quad \times e^{-1.12/2kT} \\ &= 10^{15} \end{aligned}$$
2. **Solve by bisection.** The exponential dominates: at 550 K $n_i = 4.4 \times 10^{14}$, at 600 K $1.3 \times 10^{15}$, and the crossing is at 586 K, about 313 °C.
3. **Above the crossing.** Thermally made electron–hole pairs swamp the doping, the material behaves intrinsically and a junction loses its rectification.
4. **Real silicon.** The gap actually shrinks as silicon heats, which lowers the crossing somewhat. Lightly doped regions, such as a power device's drift layer, reach it first, which is one reason silicon power devices are rated to about 150 to 175 °C.

**Answer:** the intrinsic density catches up at about 586 K (313 °C).
:::
:::

::: check
given: a = 1e15 | 1e17 | 1e19; d = 1e15 | 1e16 | 1e18; i = 1e10 | 2.1e6
answer: 0.025852*ln(a*d/i^2)
unit: V
tolerance: 0.5%

## A junction has $N_A$ = {a} and $N_D$ = {d} cm⁻³, with $n_i$ = {i} cm⁻³ at 300 K. What's its built-in potential?

::: right
Right. $\frac{kT}{q}\ln\frac{N_AN_D}{n_i^2}$ = {answer} V.
:::

::: misses
- [0.025852*ln(a*d/i)] Divide by $n_i^2$.
- [0.025852*log(a*d/i^2)] Use the natural log.
- [any] Not yet. kT/q = 0.02585 V.
:::
:::

::: check
given: p = 1e15 | 1e17; v = 1.8 | 0.83; T = 200 | 250 | 350
answer: 0.000086173*T*ln(v*1e19*(T/300)^1.5/p)
unit: eV
tolerance: 0.5%

## p-type material has p = {p} cm⁻³ and $N_v$ = {v} × 10¹⁹ cm⁻³ at 300 K (∝ $T^{3/2}$). How far above the valence band is the Fermi level at {T} K?

::: right
Right. $kT\ln\frac{N_v}{p}$ = {answer} eV.
:::

::: misses
- [0.000086173*T*ln(v*1e19/p)] Scale $N_v$ to the temperature.
- [any] Not yet. Invert $p = N_ve^{-(E_F - E_v)/kT}$.
:::
:::

::: check
given: N = 1e15 | 1e16 | 1e17; T = 40 | 60; E = 45 | 54
answer: sqrt(N*3.2e19*(T/300)^1.5/2)*exp(-E/(2*0.086173*T))
unit: cm^-3
tolerance: 1%

## Silicon with {N} donors per cm³ ($E_d$ = {E} meV, $N_c$ = 3.2 × 10¹⁹ at 300 K) is at {T} K, deep in freeze-out. About how many electrons are free?

::: right
Right. $\sqrt{\frac{N_DN_c}{2}}e^{-E_d/2kT}$ = {answer} cm⁻³.
:::

::: misses
- [sqrt(N*3.2e19*(T/300)^1.5/2)*exp(-E/(0.086173*T))] With few donors ionized the exponent is $-E_d/2kT$, like intrinsic carriers.
- [any] Not yet. Neutrality with the donor occupancy, in the low-ionization limit.
:::
:::

::: check
given: n = 1e12 | 1e15 | 1e18; i = 1e10 | 1e11
answer: 0.025852*ln(n/i)
unit: eV
tolerance: 0.5%

## A sample has n = {n} cm⁻³ and $n_i$ = {i} cm⁻³ at 300 K. How far is the Fermi level above the intrinsic level?

::: right
Right. $kT\ln\frac{n}{n_i}$ = {answer} eV.
:::

::: misses
- [any] Not yet. $n = n_ie^{(E_F - E_i)/kT}$.
:::
:::

::: check
given: a = 4.3 | 4.7 | 5.1; b = 4.1 | 4.5
answer: a - b
unit: V
tolerance: 0.5%

## Metals with work functions {a} eV and {b} eV touch. What contact potential appears between them?

::: right
Right. The difference of work functions: {answer} V.
:::

::: misses
- [a + b] It's the difference that the Fermi levels must make up.
- [any] Not yet. Align the Fermi levels.
:::
:::

::: check
kind: choice

## Silicon is doped n-type to 3 × 10²⁰ cm⁻³. Which statement is true?

- [ ] $E_c - E_F = kT\ln(N_c/n)$ still holds
- [x] The Fermi level is inside the conduction band, and Boltzmann statistics no longer apply
- [ ] The material is intrinsic
- [ ] The Fermi level is at midgap

::: misses
- [1] With n above $N_c$ that formula gives a negative distance: the gas is degenerate.
- [3] It's very far from intrinsic.
- [4] It's far above midgap.
:::
:::

::: check
kind: parts
given: D = 10000000000000000 | 30000000000000000; A = 5000000000000000 | 9000000000000000

## Silicon at 300 K ($n_i = 10^{10}$ cm⁻³, kT = 25.85 meV) has {D} donors and {A} acceptors per cm³.

::: part
answer: D - A
unit: cm⁻³
tolerance: 0.5%

### What's its electron density?

::: misses
- [D] The acceptors take some of the donors' electrons.
- [any] $n = N_D - N_A$.
:::
:::

::: part
answer: 0.025852*ln((D - A)/1e10)
unit: eV
tolerance: 0.5%

### How far is the Fermi level above $E_i$?

::: misses
- [0.025852*ln(D/1e10)] Use the net doping.
- [any] $kT\ln\frac{n}{n_i}$.
:::
:::

::: part
answer: 1e20/(D - A)
unit: cm⁻³
tolerance: 0.5%

### What's its hole density?

::: misses
- [any] $p = \frac{n_i^2}{n}$.
:::
:::
:::

::: check
kind: derivation
vars: d = 100000000000000..1000000000000000000, a = 100000000000000..1000000000000000000

## Silicon at 300 K ($n_i = 10^{10}$ cm⁻³) with d donors and a acceptors per cm³, all ionized.

::: step
answer: (d - a)/2 + sqrt(((d - a)/2)^2 + 1e20)

### Combining neutrality with $np = n_i^2$, what's n?
:::

::: step
answer: 1e20/((d - a)/2 + sqrt(((d - a)/2)^2 + 1e20))

### What's p?
:::

::: right
Right. The same formula covers n-type, p-type and nearly compensated material.
:::
:::

::: explain
## Why does the built-in potential of a p–n junction equal the difference between the two sides' Fermi levels before they touch?

::: model
Before contact, the n side has its Fermi level near the conduction band and the p side near the valence band. Once they touch, electrons flow from the higher Fermi level to the lower one, and holes the other way, leaving ionized donors and acceptors behind near the junction. That charge creates a field and an electrostatic potential step, which raises the p side's bands relative to the n side's. Flow stops when the step makes the Fermi levels equal, which is the condition for equilibrium. The size of the step, measured as a potential, is therefore the original difference in Fermi levels divided by q, which works out to $\frac{kT}{q}\ln\frac{N_AN_D}{n_i^2}$.
:::
:::

::: practice

::: check
given: a = 3e15 | 3e18; d = 1e14 | 5e17; i = 1e10 | 1.8e6
answer: 0.025852*ln(a*d/i^2)
unit: V
tolerance: 0.5%

## $V_{bi}$ for $N_A$ = {a}, $N_D$ = {d}, $n_i$ = {i}?

::: misses
- [any] $\frac{kT}{q}\ln\frac{N_AN_D}{n_i^2}$.
:::
:::

::: check
given: N = 5e14 | 5e16; T = 30 | 70; E = 45 | 54
answer: sqrt(N*3.2e19*(T/300)^1.5/2)*exp(-E/(2*0.086173*T))
unit: cm^-3
tolerance: 1%

## Freeze-out electrons: {N} cm⁻³, {E} meV donors, {T} K?

::: misses
- [any] $\sqrt{N_DN_c/2}e^{-E_d/2kT}$.
:::
:::

::: check
given: n = 1e13 | 1e17; i = 1e10 | 3e9
answer: 0.025852*ln(n/i)
unit: eV
tolerance: 0.5%

## $E_F - E_i$ for n = {n}, $n_i$ = {i}?

::: misses
- [any] $kT\ln(n/n_i)$.
:::
:::
:::
