---
title: Transport lab
heading: Doping for a target resistivity, Hall analysis, diffused junctions and lifetimes from data
eyebrow: B9 · Lesson 21 · Transport lab
xp: 50
---

::: hook
A process engineer works backward: the device needs a certain resistivity, so what doping gives it? A Hall measurement returns a voltage and a resistance, so what kind of carriers, how many, how mobile? A diffusion furnace runs for an hour, so how deep is the junction? A photoconductor's signal decays after a flash, so what is the lifetime? In this lab you'll write the small tools behind each of these questions, using the mobility fit of lesson 17, Hall analysis from lesson 19, diffusion from lesson 18 and recombination from lesson 20.
:::

::: play
- The curve is n-type silicon's resistivity against doping, from the standard mobility fit, on log scales.
- Over most of the range it falls as $\frac1N$, but bends where impurity scattering lowers the mobility.
- Move the marker: the readouts give the mobility and resistivity at that doping. Step 1 inverts this curve, finding the doping for a target resistivity.
:::

```sim plot
view: graph
x: N = 1e13..1e20 log
y: rho = 0.001..1000 log
slider: x0 = 13..20 step 0.1 = 15.7
plot: 1/(1.602e-19*N*(92 + 1268/(1 + (N/1.3e17)^0.91))) | label: resistivity, Ω·cm | samples: 400
point: 10^x0, 1/(1.602e-19*10^x0*(92 + 1268/(1 + (10^x0/1.3e17)^0.91)))
readout: mobility, cm² per V·s = 92 + 1268/(1 + (10^x0/1.3e17)^0.91) | digits: 4
readout: resistivity, Ω·cm = 1/(1.602e-19*10^x0*(92 + 1268/(1 + (10^x0/1.3e17)^0.91))) | digits: 4
```

::: predict
## A wafer must have a resistivity of 1 Ω·cm. Roughly what donor density does that take?

- [ ] About 10¹³ cm⁻³
- [x] About 5 × 10¹⁵ cm⁻³
- [ ] About 10¹⁸ cm⁻³
- [ ] It depends on the wafer's thickness

::: reveal
About $4.8 \times 10^{15}$ cm⁻³. At that doping the mobility is still near its maximum, about 1300 cm²/(V·s), so $N \approx \frac{1}{q\mu\rho}$. Resistivity is a property of the material, not of the wafer's size, which is why wafers are sold by their resistivity.
:::
:::

::: nameit
## Inverting a monotonic curve

Resistivity falls steadily as doping rises, so the doping for a target resistivity can be found by bisection. Because the doping spans many decades, bisect on $\log_{10}N$: each halving of an interval from $10^{13}$ to $10^{20}$ narrows the answer by a fixed ratio, and 50 halvings pin it to many digits.

## Hall analysis

A Hall coefficient $R_H$ and a resistivity ρ give the carrier type from the sign of $R_H$ (negative for electrons), the density $n = \frac{1}{q|R_H|}$, and the **Hall mobility** $\mu = \frac{|R_H|}{\rho}$.

## Diffused junctions

A dopant diffusing from a surface held at concentration $C_s$ into a wafer for time t spreads as $C(x) = C_s\,\text{erfc}\frac{x}{2\sqrt{Dt}}$. The junction lies where it falls to the background doping $N_B$: $x_j = 2\sqrt{Dt}\,\text{erfc}^{-1}\frac{N_B}{C_s}$, found by bisection. The diffusion equation can also be stepped on a grid (FTCS), stable for $\frac{D\Delta t}{\Delta x^2} \le \frac12$, and checked against the erfc.

## Lifetime from decay

After a flash, excess carriers decay as $e^{-t/\tau}$. Taking the logarithm turns the decay into a line, $\ln\Delta n = \ln\Delta n_0 - \frac t\tau$, so a least-squares fit to $\ln\Delta n$ against t gives the lifetime from noisy data.
:::

::: example
## A Hall sample measures ρ = 2.0 Ω·cm and $R_H$ = +3125 cm³/C. What are its carriers?

::: solution
1. **Carrier type.** The positive coefficient means holes.
2. **Hole density.**
   $$\begin{aligned} p &= \frac{1}{q|R_H|} \\ &= \frac{1}{1.602 \times 10^{-19} \times 3125} \\ &= 2.0 \times 10^{15}\ \text{cm}^{-3} \end{aligned}$$
3. **Hall mobility.**
   $$\begin{aligned} \mu &= \frac{3125}{2.0} \\ &= 1560\ \text{cm}^2/(\text{V·s}) \end{aligned}$$
4. **Which material.** That mobility is far above holes' 450 or so in silicon, so this isn't silicon: germanium, whose hole mobility is about 1900, fits better.
5. **What Hall data give.** Hall data identify a material's carriers without knowing what the material is.

**Answer:** holes, $2.0 \times 10^{15}$ per cm³, with a Hall mobility of 1560 cm²/(V·s), which points to germanium rather than silicon.
:::
:::

::: example
## Boron is diffused from a surface held at 10²⁰ cm⁻³ into an n-type wafer with 10¹⁶ donors per cm³, with D = 10⁻¹³ cm²/s for one hour. How deep is the junction?

::: solution
1. **Diffusion length scale.**
   $$\begin{aligned} 2\sqrt{Dt} &= 2\sqrt{10^{-13} \times 3600}\ \text{cm} \\ &= 0.379\ \mu\text{m} \end{aligned}$$
2. **Where the boron meets the background.** The background is $10^{-4}$ of the surface concentration, and
   $$\text{erfc}^{-1}(10^{-4}) = 2.751$$
3. **Junction depth.**
   $$\begin{aligned} x_j &= 0.379 \times 2.751\ \mu\text{m} \\ &= 1.04\ \mu\text{m} \end{aligned}$$
4. **Why so far in.** The junction sits 2.75 times $2\sqrt{Dt}$ in because the surface concentration is ten thousand times the background.
5. **Control.** Doubling the time deepens it only by $\sqrt2$, so diffusion gives fine control over depth.

**Answer:** the junction is 1.04 µm deep.
:::
:::

::: example
## A photoconductor's excess conductance after a flash reads 1.01, 0.530, 0.287, 0.156, 0.0805 and 0.0439 (relative) at 0, 5, 10, 15, 20 and 25 µs. What is the lifetime?

::: solution
1. **Fit the logarithms.** Fitting a line to the logarithms gives a slope of $-\frac{1}{7.98\ \mu\text{s}}$, so
   $$\tau \approx 8.0\ \mu\text{s}$$
2. **Check.** Each 5 µs the signal falls by a factor of about 1.87, which is $e^{5/8}$.
3. **Why fit all six points.** Fitting all six points uses the whole decay, so a single misread point barely moves the answer, while dividing two readings would inherit their full error.
4. **Weighting.** The late points are small and noisy, which is why careful work weights them less.

**Answer:** the lifetime is about 8.0 µs.
:::
:::

::: check
kind: python

## Step 1. Write `mu_n(N)` (the electron mobility fit), `rho_n(N)` in Ω·cm, and `doping_for(rho)` that finds the donor density for a target resistivity by bisection on $\log_{10}N$ between 13 and 20, 100 times.

```python starter
def mu_n(N):
    return 1360.0

def rho_n(N):
    return 1 / (1.602e-19 * N * mu_n(N))

def doping_for(rho):
    return 1 / (1.602e-19 * 1360 * rho)

print(doping_for(1.0))
```

```python solution
def mu_n(N):
    return 92 + 1268 / (1 + (N / 1.3e17)**0.91)

def rho_n(N):
    return 1 / (1.602e-19 * N * mu_n(N))

def doping_for(rho):
    lo, hi = 13.0, 20.0
    for _ in range(100):
        mid = (lo + hi) / 2
        if rho_n(10**mid) > rho:
            lo = mid
        else:
            hi = mid
    return 10**((lo + hi) / 2)

print(doping_for(1.0))
```

```python tests
N = doping_for(1.0)
assert abs(N / 4.8018e15 - 1) < 1e-3, f"1 Ω·cm needs 4.80e15 donors/cm³; got {N:.4e}."
assert abs(rho_n(N) - 1) < 1e-9, "Putting the answer back in gives the target."
assert abs(doping_for(0.01) / 4.4196e18 - 1) < 1e-3, f"0.01 Ω·cm needs 4.42e18; got {doping_for(0.01):.4e}."
```

::: right
Right. At 0.01 Ω·cm the plain $\frac{1}{q\mu_{max}\rho}$ estimate would be off by a factor of 9.6, because the mobility has fallen to 141.
:::
:::

::: check
kind: python

## Step 2. Write `hall(rho, RH)` returning the carrier type (`'n'` or `'p'`), the density in cm⁻³ and the Hall mobility in cm²/(V·s), from ρ in Ω·cm and $R_H$ in cm³/C.

```python starter
def hall(rho, RH):
    return 'n', 1e16, 1000.0

print(hall(2.0, 3125))
```

```python solution
def hall(rho, RH):
    kind = 'n' if RH < 0 else 'p'
    return kind, 1 / (1.602e-19 * abs(RH)), abs(RH) / rho

print(hall(2.0, 3125))
```

```python tests
k, n, mu = hall(2.0, 3125)
assert k == 'p' and abs(n / 1.9975e15 - 1) < 1e-3 and abs(mu - 1562.5) < 1e-9, f"Expect holes, 2.0e15 cm⁻³, 1562 cm²/V·s; got {k}, {n:.4e}, {mu}."
k2, n2, mu2 = hall(0.05, -50)
assert k2 == 'n' and abs(n2 / 1.2484e17 - 1) < 1e-3 and abs(mu2 - 1000) < 1e-9, "A negative coefficient means electrons."
```

::: right
Right. The sign gives the type, the size the density, and dividing by ρ the mobility: three answers from two measurements.
:::
:::

::: check
kind: python

## Step 3. Write `junction_depth(Cs, NB, D, t)` that finds where $C_s\,\text{erfc}\frac{x}{2\sqrt{Dt}}$ falls to NB, by bisection on the argument of erfc between 0 and 10, using `math.erfc`. Return the depth in the units of $\sqrt{Dt}$.

```python starter
import math

def junction_depth(Cs, NB, D, t):
    return 2 * math.sqrt(D * t)

print(junction_depth(1e20, 1e16, 1e-13, 3600) * 1e4)
```

```python solution
import math

def junction_depth(Cs, NB, D, t):
    lo, hi = 0.0, 10.0
    for _ in range(100):
        mid = (lo + hi) / 2
        if math.erfc(mid) > NB / Cs:
            lo = mid
        else:
            hi = mid
    return 2 * math.sqrt(D * t) * (lo + hi) / 2

print(junction_depth(1e20, 1e16, 1e-13, 3600) * 1e4)
```

```python tests
import math
x = junction_depth(1e20, 1e16, 1e-13, 3600)
assert abs(x * 1e4 - 1.04396) < 1e-4, f"The junction is 1.044 µm deep; got {x * 1e4:.5f}."
assert abs(junction_depth(1e20, 1e16, 1e-13, 4 * 3600) / x - 2) < 1e-9, "Four times the time, twice the depth."
assert abs(1e20 * math.erfc(x / (2 * math.sqrt(1e-13 * 3600))) - 1e16) < 1e10, "At the junction the profile equals the background."
```

::: right
Right. The depth grows as $\sqrt t$, so the last minutes in the furnace move the junction least.
:::
:::

::: check
kind: python

## Step 4. Write `ftcs(D, t, L, N)` that steps $\frac{\partial C}{\partial t} = D\frac{\partial^2C}{\partial x^2}$ on N cells over length L with C = 1 held at x = 0, C = 0 at x = L, starting from zero, with time step $0.4\frac{\Delta x^2}{D}$ (adjusted to land exactly on t). Return the array of concentrations and the spacing.

```python starter
import numpy as np

def ftcs(D, t, L, N):
    c = np.zeros(N + 1)
    c[0] = 1.0
    return c, L / N

c, dx = ftcs(1.0, 1.0, 10.0, 200)
print(c[:5])
```

```python solution
import numpy as np

def ftcs(D, t, L, N):
    dx = L / N
    n = int(round(t / (0.4 * dx * dx / D)))
    dt = t / n
    c = np.zeros(N + 1)
    c[0] = 1.0
    r = D * dt / dx**2
    for _ in range(n):
        c[1:-1] = c[1:-1] + r * (c[2:] - 2 * c[1:-1] + c[:-2])
    return c, dx

c, dx = ftcs(1.0, 1.0, 10.0, 200)
print(c[:5])
```

```python tests
import numpy as np, math
c, dx = ftcs(1.0, 1.0, 10.0, 200)
x = np.arange(len(c)) * dx
exact = np.array([math.erfc(xi / 2) for xi in x])
assert np.max(np.abs(c - exact)) < 5e-4, f"The grid should match erfc(x/2√(Dt)) to 5e-4; worst {np.max(np.abs(c - exact)):.2e}."
assert abs(c[0] - 1) < 1e-15 and c[-1] == 0, "The boundaries stay fixed."
```

::: right
Right. The stepped profile matches the erfc to about 10⁻⁴, and it would handle a time-varying surface concentration or a two-step anneal, where the erfc has no simple form.
:::
:::

::: check
kind: python

## Step 5. Write `lifetime(t, signal)` that fits a line to $\ln(\text{signal})$ against t by least squares and returns τ.

```python starter
import numpy as np

def lifetime(t, signal):
    return (t[-1] - t[0]) / np.log(signal[0] / signal[-1]) * 2

t = np.array([0, 5, 10, 15, 20, 25]) * 1e-6
s = np.exp(-t / 8e-6) * np.array([1.01, 0.99, 1.0, 1.02, 0.98, 1.0])
print(lifetime(t, s))
```

```python solution
import numpy as np

def lifetime(t, signal):
    A = np.vstack([np.ones_like(t), -t]).T
    a, b = np.linalg.lstsq(A, np.log(signal), rcond=None)[0]
    return 1 / b

t = np.array([0, 5, 10, 15, 20, 25]) * 1e-6
s = np.exp(-t / 8e-6) * np.array([1.01, 0.99, 1.0, 1.02, 0.98, 1.0])
print(lifetime(t, s))
```

```python tests
import numpy as np
t = np.array([0, 5, 10, 15, 20, 25]) * 1e-6
tau = lifetime(t, np.exp(-t / 8e-6) * np.array([1.01, 0.99, 1.0, 1.02, 0.98, 1.0]))
assert abs(tau * 1e6 - 7.978) < 0.01, f"The fit gives 7.98 µs; got {tau * 1e6:.4f}."
assert abs(lifetime(t, 3 * np.exp(-t / 2e-6)) - 2e-6) < 1e-12, "Clean data give the lifetime exactly, whatever the starting amplitude."
```

::: right
Right. The logarithm turns the exponential into a line, so the amplitude drops out and only the slope matters.
:::
:::

::: check
kind: parts
given: rho = 0.5 | 5; RH = 500 | 3000; s = -1 | 1

## A Hall sample has ρ = {rho} Ω·cm and a Hall coefficient of {s} × {RH} cm³/C.

::: part
answer: 1/(1.602e-19*RH)
unit: /cm^3
tolerance: 0.5%

### What is its carrier density?

::: misses
- [any] $\frac{1}{q|R_H|}$.
:::
:::

::: part
answer: RH/rho
unit: cm²/(V·s)
tolerance: 0.5%

### What is its Hall mobility?

::: misses
- [rho/RH] Upside down: $\mu = \frac{|R_H|}{\rho}$.
- [any] $\mu = \frac{|R_H|}{\rho}$.
:::
:::
:::

::: check
given: D = 1 | 10; t = 1 | 4
answer: 2*sqrt(D*1e-13*t*3600)*1e4
unit: µm
tolerance: 0.5%

## A dopant with D = {D} × 10⁻¹³ cm²/s diffuses for {t} h. What is $2\sqrt{Dt}$, the profile's length scale?

::: right
Right. The junction lies a few of these lengths in, depending on how much the surface concentration exceeds the background.
:::

::: misses
- [sqrt(D*1e-13*t*3600)*1e4] The erfc's argument is $\frac{x}{2\sqrt{Dt}}$: include the 2.
- [any] Convert hours to seconds and centimeters to micrometers.
:::
:::

::: explain
## Why does bisection on the logarithm of the doping work better than bisection on the doping itself?

::: model
Useful doping levels span seven decades, from $10^{13}$ to $10^{20}$ cm⁻³. Bisecting on N itself, the first step would test $5 \times 10^{19}$, the next $2.5 \times 10^{19}$, and it would take many halvings to get down to the low decades where most answers lie; all the early steps are wasted near the top of the range. Bisecting on $\log_{10}N$ treats each decade equally, so every halving cuts the uncertainty by the same factor in ratio, which is how resistivity and doping actually vary. Each step then gains the same relative precision whether the answer is $10^{14}$ or $10^{19}$.
:::
:::

::: practice

::: check
given: N = 1 | 30 | 300
answer: 92 + 1268/(1 + (N*1e15/1.3e17)^0.91)
unit: cm²/(V·s)
tolerance: 0.5%

## Electron mobility at {N} × 10¹⁵ donors per cm³, from the fit?

::: misses
- [any] $92 + \frac{1268}{1 + (N/1.3 \times 10^{17})^{0.91}}$.
:::
:::

::: check
given: r = 1.5 | 2 | 3; dt = 2 | 5
answer: dt/ln(r)
unit: µs
tolerance: 0.5%

## A photoconductive signal falls by a factor of {r} every {dt} µs. What is the lifetime?

::: misses
- [any] $\tau = \frac{\Delta t}{\ln r}$.
:::
:::
:::
