---
title: Diode models and circuit analysis
heading: Choosing how much of the exponential you need
eyebrow: C5 · Lesson 3 · Diode models and circuit analysis
xp: 40
---

::: hook
Put a diode in series with a resistor and a battery and ask for the current. Ohm's law gives the current from the diode's voltage, and the diode's exponential gives the voltage from the current, so you can't write down a simple formula for the answer. Engineers handle this with a set of models of increasing accuracy: an ideal switch, a fixed 0.7 V drop, a drop plus a small resistance, and the full exponential. The skill is picking the simplest one that's good enough, and knowing when it isn't.
:::

::: play
- The diode's exponential curve and the resistor's **load line**, $I = (V_s - V)/R$. The circuit's operating point is where they cross: it's the only point that satisfies both.
- Raise $V_s$ or lower $R$: the load line moves, but the diode voltage hardly changes. That's why a fixed 0.7 V drop works so well.
- Bring $V_s$ down near 1 V and compare the readouts: the 0.7 V estimate gets noticeably worse when the supply is close to the drop.
:::
:::

```sim plot
view: graph
x: V = 0..5 V
y: I = 0..10 mA
slider: Vs = 1..5 step 0.1 = 5 V
slider: R = 0.5..5 step 0.1 = 1 kΩ
plot: 1e-14*(exp(V/0.025864) - 1)*1000 | label: diode
plot: (Vs - V)/R | label: load line | dashed | color: ch2
marker: x = 0.7 | label: 0.7 V
readout: 0.7 V model, mA = (Vs - 0.7)/R | digits: 4
readout: after two iterations, mA = (Vs - 0.025864*ln((Vs - 0.025864*ln((Vs - 0.7)/R*1e-3/1e-14))/R*1e-3/1e-14))/R | digits: 4
```

::: predict
## A diode with $I_S = 10^{-14}$ A is in series with 1 kΩ across 5 V. The 0.7 V model gives 4.30 mA. How far off is that?

- [ ] About 30%
- [ ] About 10%
- [ ] About 3%
- [x] Less than 1%

::: reveal
Less than 1%. The exact answer is 4.307 mA at 0.693 V. Because the diode's voltage changes only 60 mV for a tenfold change in current, almost any reasonable guess for its voltage gives nearly the right current when the supply is several volts.
:::
:::

::: nameit
## A hierarchy of models

| Model | Conducting | Blocking | Use it for |
|---|---|---|---|
| ideal | a short, $V_D = 0$ | an open circuit | which diodes conduct; supplies much larger than 0.7 V |
| constant drop | $V_D = 0.7$ V | open | most hand analysis |
| piecewise linear | $V_D = V_{D0} + r_DI$ | open | currents over a wide range |
| exponential | $I = I_S(e^{V/nV_T} - 1)$ | $-I_S$ | small supplies, precise work, temperature |

The piecewise-linear model fits a straight line to the curve near the expected current: for a small silicon diode, $V_{D0} \approx 0.65$ V and $r_D$ of tens of ohms.

## Solving with the exponential

**Graphically:** draw the load line from $(0, V_s/R)$ to $(V_s, 0)$ across the diode's curve and read the crossing.

**By iteration:** guess $V_D$ (0.7 V), compute $I = (V_s - V_D)/R$, then a better voltage $V_D = nV_T\ln(I/I_S)$, and repeat. Each step's voltage error shrinks by roughly the factor $\frac{nV_T}{IR}$, so two or three steps give millivolt accuracy. A computer does the same thing more robustly with Newton's method (lesson 14).

## Several diodes: assume and check

1. Guess which diodes conduct.
2. Replace each with its model (on: a 0.7 V source; off: an open circuit) and solve the linear circuit.
3. Check: every "on" diode must carry forward current, and every "off" diode must have less than 0.7 V across it. If not, change the guess and repeat.
:::

::: example
## Solve the 5 V, 1 kΩ circuit ($I_S = 10^{-14}$ A) by iteration.

::: solution
1. **First pass, from 0.7 V.** The current is $I = 4.300$ mA, so
   $$\begin{aligned} V_D &= 0.02586\ln\frac{4.3 \times 10^{-3}}{10^{-14}} \\ &= 0.6928\ \text{V} \end{aligned}$$
2. **Second pass.**
   $$\begin{aligned} I &= 4.307\ \text{mA} \\ V_D &= 0.6929\ \text{V} \end{aligned}$$
3. **Converged.** The voltage has settled to a tenth of a millivolt in two steps.

**Answer:** after two steps the diode sits at 0.6929 V with 4.307 mA flowing.
:::
:::

::: example
## Two signals, 5 V and 2 V, each feed a diode whose cathodes join at an output loaded by 1 kΩ to ground. Find the output with the constant-drop model.

::: solution
1. **Guess which diode conducts.** Assume the 5 V diode conducts and the 2 V one doesn't:
   $$\begin{aligned} V_\text{out} &= 5 - 0.7 \\ &= 4.3\ \text{V} \end{aligned}$$
   and $I = 4.3$ mA.
2. **Check the guess.** The 2 V diode has $2 - 4.3 = -2.3$ V across it, so it's off as assumed.
3. **What the circuit is.** This is a diode OR gate: the output follows the highest input.

**Answer:** the output is 4.3 V, with 4.3 mA in the load and only the 5 V diode conducting.
:::
:::

::: example
## A diode in series with 1 kΩ hangs from the midpoint of a 10 kΩ, 10 kΩ divider across 12 V. Find its current with the 0.7 V model, then refine it with the exponential ($I_S = 10^{-14}$ A).

::: solution
1. **Thévenin equivalent.** The divider becomes 6 V behind 5 kΩ, so the diode sees 6 V through 6 kΩ in all.
2. **Constant-drop estimate.** With a 0.7 V drop,
   $$\begin{aligned} I &= \frac{6 - 0.7}{6\ \text{k}\Omega} \\ &= 0.883\ \text{mA} \end{aligned}$$
3. **First iteration.**
   $$\begin{aligned} V_D &= 0.02585\ln\frac{0.883 \times 10^{-3}}{10^{-14}} \\ &= 0.6515\ \text{V} \end{aligned}$$
   so $I = 0.8914$ mA.
4. **Second iteration.** Once more gives 0.6518 V and 0.8914 mA, converged.
5. **Compare.** The 0.7 V guess was 1% low, because below a milliamp this diode drops nearer 0.65 V. Thévenin's theorem turns any resistive network around a single diode into this one-loop problem.

**Answer:** the 0.7 V model gives 0.883 mA, and the exponential refines it to 0.8914 mA at 0.6518 V.
:::
:::

::: check
given: Vs = 3 | 5 | 12; R = 0.47 | 1 | 4.7
answer: (Vs - 0.7)/R
unit: mA
tolerance: 0.5%

## A silicon diode and {R} kΩ are in series across {Vs} V. What current flows, with the 0.7 V model?

::: right
Right. $(V_s - 0.7)/R$ = {answer}.
:::

::: misses
- [Vs/R] That's the ideal model; take off the 0.7 V drop.
- [any] Not yet. Subtract the diode's drop, then use Ohm's law.
:::
:::

::: check
given: Vs = 2 | 5 | 10; R = 1 | 10
answer: 0.025864*ln((Vs - 0.7)/(R*1000)/1e-14)
unit: V
tolerance: 0.1%

## For a diode with $I_S = 10^{-14}$ A in series with {R} kΩ across {Vs} V, what voltage does the first iteration give, starting from 0.7 V? Use $V_T$ = 25.864 mV.

::: right
Right. $I = (V_s - 0.7)/R$, then $V_T\ln(I/I_S)$ = {answer}.
:::

::: misses
- [any] Not yet. Find the current from the 0.7 V guess, then the voltage that current needs.
:::
:::

::: check
given: Vs = 3 | 5; R = 0.22 | 1; rD = 10 | 30
answer: (Vs - 0.65)/(R*1000 + rD)*1000
unit: mA
tolerance: 0.5%

## Use a piecewise-linear model, 0.65 V plus {rD} Ω, for a diode in series with {R} kΩ across {Vs} V. What current flows?

::: right
Right. $\frac{V_s - V_{D0}}{R + r_D}$ = {answer}.
:::

::: misses
- [(Vs - 0.65)/(R*1000)*1000] Include $r_D$ in series with R.
- [any] Not yet. The model is a 0.65 V source in series with $r_D$.
:::
:::

::: check
given: I = 0.1 | 3 | 20; n = 1 | 2
answer: 0.7 + n*0.025864*ln(I)
unit: V
tolerance: 0.1%

## A diode with ideality factor {n} drops 0.70 V at 1 mA. What does it drop at {I} mA?

::: right
Right. $0.70 + nV_T\ln(I/1\text{ mA})$ = {answer}.
:::

::: misses
- [0.7] The voltage changes slowly with current, but it does change.
- [any] Not yet. $\Delta V = nV_T\ln(I_2/I_1)$.
:::
:::

::: check
given: V1 = 5 | 9; V2 = 1 | 3; R = 1 | 2.2
answer: (V1 - 0.7)/R
unit: mA
tolerance: 0.5%

## A diode OR gate has inputs of {V1} V and {V2} V and a {R} kΩ load. What current flows in the load?

::: right
Right. Only the {V1} V diode conducts: {answer}.
:::

::: misses
- [(V1 + V2 - 1.4)/R] Only one diode conducts; the other is reverse biased.
- [any] Not yet. Assume the higher input's diode conducts, then check the other.
:::
:::

::: check
kind: choice

## Three diodes in a circuit are assumed on. After solving, one shows a current of −2 mA. What next?

- [ ] Accept it: diodes can carry small reverse currents
- [x] Change the guess: that diode is off, so solve again with it open
- [ ] Reverse the diode in the circuit
- [ ] Use the exponential model instead

::: misses
- [1] A conducting diode can't carry several milliamps backward; the assumption was wrong.
- [3] The circuit is what it is; the guess about it is what changes.
- [4] The model isn't the problem; the on/off guess is.
:::
:::

::: check
kind: parts
given: V = 9 | 12 | 15; Rd = 4.7 | 10; R = 1 | 2.2

## A diode in series with {R} kΩ hangs from the midpoint of two {Rd} kΩ resistors across {V} V.

::: part
answer: Rd/2 + R
unit: kΩ
tolerance: 0.5%

### What resistance does the diode see in all?

::: misses
- [Rd + R] The two divider resistors are in parallel as seen from the midpoint.
- [any] Thévenin: $R_d \| R_d + R$.
:::
:::

::: part
answer: (V/2 - 0.7)/(Rd/2 + R)
unit: mA
tolerance: 1%

### What current flows, with the 0.7 V model?

::: misses
- [(V - 0.7)/(Rd/2 + R)] The Thévenin voltage is half the supply.
- [any] $\frac{V/2 - 0.7}{R_d/2 + R}$.
:::
:::
:::

::: check
kind: derivation
vars: E = 1..20, R = 100..100000, S = 1e-16..1e-12, v = 0.02..0.03, x = 0.5..0.8

## A diode (saturation current S, thermal voltage v) in series with R across a source E. One iteration starts from a guess x for the diode voltage.

::: step
answer: (E - x)/R

### What current does the guess give?
:::

::: step
answer: v*ln((E - x)/(R*S))

### What diode voltage does that current need?
:::

::: step
answer: v*R/(E - x)

### What's the diode's small-signal resistance at that current?
:::

::: right
Right. Each pass shrinks the error by about $r_d/R$, which is why the iteration converges so fast.
:::
:::

::: explain
## Why does the iteration for a diode circuit converge so quickly?

::: model
Each step turns a current into a voltage through a logarithm, and the logarithm is very flat: a 10% error in the current changes the computed voltage by only about 2.5 mV. So even a rough first current gives a voltage close to right, and that voltage gives a current with a much smaller error, since the resistor sees nearly the full supply minus a nearly correct drop. Each pass shrinks the error by roughly the ratio of the thermal voltage to the voltage across the resistor, a small number whenever the supply is a few volts.
:::
:::

::: practice

::: check
given: Vs = 1.5 | 3.3 | 9; R = 0.1 | 1
answer: (Vs - 0.7)/R
unit: mA
tolerance: 0.5%

## A diode in series with {R} kΩ across {Vs} V: what current, with a 0.7 V drop?

::: misses
- [any] $(V_s - 0.7)/R$.
:::
:::

::: check
given: Vs = 3 | 12; R = 1 | 4.7
answer: Vs/R
unit: mA
tolerance: 0.5%

## Where does the load line for {Vs} V and {R} kΩ cross the current axis?

::: misses
- [any] At $V = 0$, $I = V_s/R$.
:::
:::

::: check
given: k = 2 | 10 | 100
answer: 25.864*ln(k)
unit: mV
tolerance: 0.5%

## By how much does a diode's voltage rise when its current is multiplied by {k}?

::: misses
- [any] $V_T\ln k$.
:::
:::
:::
