C5 · Lesson 6 · Diode characterization lab
Extracting a diode's parameters from measurements, in Python
Datasheets give a diode's typical curve; a design that depends on the real part, such as a temperature sensor, a varactor tuner or a solar charger, starts by measuring it. Measured points don't come labeled with and n: you fit them. In this lab you'll write the fits a characterization engineer uses: the exponential law on a semilog plot, the series resistance that bends it at high current, the temperature slope, the capacitance law, and a solar cell's maximum power point.
Play
- The line is a diode's voltage against the logarithm of its current. Without series resistance it's straight: per decade.
- Raise the series resistance. The top of the line bends upward, where adds to the junction's voltage.
- Change n and . Which one changes the slope, and which one shifts the line?
Predict
A diode with 0.5 Ω of series resistance carries 100 mA. How much higher is its voltage than the exponential law alone predicts?
50 mV: the resistor drops = 0.1 A × 0.5 Ω. At 1 mA the same resistor drops only 0.5 mV, invisible next to the junction's 60 mV per decade, so low-current points fix and n, and high-current points fix R.
Name it
Fitting the exponential
Well above , is a straight line in V. A least-squares line through gives the slope and the intercept . Fit only points where the series resistance is negligible, typically below a milliamp for a small diode.
Series resistance
With the junction known, each high-current point gives
and a least-squares fit of the excess voltage against current, through the origin, combines them: .
Temperature slope
At a fixed current, lesson 4's result is
with = 1.12 eV for silicon and evaluated at T.
Capacitance
becomes linear in logarithms: . With known (or swept to find the best fit), a line through the points gives m, ½ for an abrupt junction and ⅓ for a linearly graded one.
Maximum power point
A solar cell's power, , peaks where = 0. The derivative falls steadily with V, so bisection on its sign finds the peak.
Worked example
Five points measured on a small diode at 300 K, from 0.40 V to 0.60 V in 50 mV steps, have currents rising by a factor of 6.3 per step. What are n and , if the 0.50 V point carries 31.5 µA?
Show the solution
- Slope from the ratio. A factor of 6.3 per 50 mV means
- Ideality factor.
- Saturation current. Use the 0.50 V point:
- Why five points help. With five points instead of two, the least-squares line averages out measurement noise; with points that disagree, its residuals show which ones are suspect.
Answer n = 1.05 and A.
Worked example
The same diode reads 0.774 V at 100 mA, where the fitted law predicts 0.724 V. What's its series resistance, and what will it read at 300 mA?
Show the solution
- Series resistance. The excess is 50 mV at 100 mA, so
- Junction voltage at 300 mA.
- Add the resistor's drop. The resistance adds 0.15 V:
- Why R matters. A model without R would predict 0.754 V and be 150 mV low, which matters for a rectifier's loss and a sensor's calibration.
Answer the series resistance is 0.5 Ω, and the diode will read 0.904 V at 300 mA.
Worked example
A small solar cell has = 30 mA and A. Find its maximum power point by bisection on .
Show the solution
- Differentiate the power.
- Bracket the root. At 0.3 V it's positive and at 0.5 V negative.
- Bisect. Halving the interval 50 times pins the root at 0.4304 V, where the cell gives 28.30 mA: a fill factor of 0.805.
- Compare with stepping. Lesson 4 found the same point by stepping V; bisection gets there in a fraction of the evaluations, which matters in a charger's firmware.
Answer the maximum power point is at 0.4304 V and 28.30 mA, giving 12.18 mW and a fill factor of 0.805.
Check
Step 1. Write fit_diode(V, I, VT=0.02585) returning (IS, n) from a least-squares line through .
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 2. Write series_resistance(V, I, IS, n, VT=0.02585) returning R from the excess voltages by least squares through the origin.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 3. Write dvdt(V, T, Eg=1.12) returning a silicon diode's voltage slope in volts per kelvin at a fixed current, with = 8.617e-5 × T.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 4. Write cv_fit(VR, C, V0) returning (Cj0, m) from a least-squares line through .
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 5. Write solar_mpp(Iph, IS, VT=0.02585) returning (Vmp, Imp, Pmp) by bisection on the sign of between 0 and the open-circuit voltage.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A diode's current rises by a factor of 6.3 for every 40 mV at 300 K.
(a)
What's its ideality factor?
(b)
How many millivolts per decade of current?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
Check
At 30 mA a diode reads 50 mV above its fitted exponential law. What's its series resistance?
Write units the way you normally would: 1.5 Ω, 1500 mΩ and 0.0015 kΩ are the same answer.
Explain why
Why do you fit a diode's exponential law using only its low-current points?
At low current the series resistance drops almost nothing, so the measured voltage is the junction's voltage alone, and the points fall on a straight line on a semilog plot whose slope gives the ideality factor and whose intercept gives the saturation current. At high current the resistance adds a drop proportional to the current, which bends the line upward; including those points would tilt the fit and give a wrong n and . Once the junction is fitted from clean points, the high-current points' excess over the fitted line gives the series resistance cleanly.
Practice
Keep practicing
4 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.