Curve tracer and load lines
Trace diodes, LEDs, Zeners, BJTs, Darlingtons, MOSFETs and JFETs from a library of datasheet models — I–V, collector and drain families with the Early effect, β against Ic, √Id and Vth, Rds(on) against Vgs — design a stage on its DC and AC load lines with a draggable Q point, watch a sine clip, and fit Is, n, Rs, β, VA, Vth and K to your own measured curves (with an Arduino tracer sketch).
Added
Works with
- Circuit simulator Electronicsthe same Shockley, Ebers–Moll and square-law models in whole circuits, whose DC sweep traces curve families too
- Transistor and MOSFET switches Electronicsthe switch side of the curves — base resistor, forced β, Rds(on) at your gate drive, losses
- Electronics handbook Electronicsthe diode equation, BJT biasing and MOSFET losses, as quick formulas
- Semiconductor explorer Electronicswhy the curves look like this — junctions, carriers and the MOSFET channel, animated
- Transistor amplifier designer Electronicsdesigns the bias and works out gain, impedances and bandwidth for a chosen Q point
How to use it
A curve tracer is the instrument that draws a semiconductor’s characteristic curves: it sweeps the voltage across the device while stepping its base current or gate voltage, and plots the current. This one does the same with models of real parts — or with your own measurements — and adds the load-line design you do on top of the curves: where the operating point sits, how far the output can swing, and when it clips.
The library has the parts people actually have in the drawer: 1N4148, 1N4007 and 1N5819 diodes; red, green, blue and white LEDs; 3.3 V, 5.1 V and 12 V Zeners; 2N3904, 2N3906, BC547B, 2N2222A and BD139 transistors and a TIP120 Darlington; 2N7000, BS170, IRLZ44N, IRF540N and AO3400A MOSFETs; J201 and 2N5457 JFETs. Editing any parameter makes a custom device, and a fit to your measurements can become one.
How to use it
-
Pick a device at the top, and a temperature. Model parameters and limits shows its SPICE
.modelline (copy it into any SPICE), every parameter (edit one to make your own part) and the Pmax, Imax and Vmax used for the safe operating area. -
Curves draws the families for that kind of part:
-
diodes — the I–V curve on linear or log axes, the reverse/Zener region, and a −25 to 125 °C temperature family;
-
BJTs — collector curves (Ic against Vce for stepped Ib) with the Early lines extended back to −VA, the input curve (Ib against Vbe), the transfer curve (Ic against Vbe, log axis optional) and β against Ic;
-
MOSFETs and JFETs — drain curves (Id against Vds for stepped Vgs) with the edge of saturation, the transfer curve, √Id with the threshold extracted from its tangent, and Rds(on) against Vgs at a test current.
Step values are chosen from the part’s ratings; type your own list (
20u 40u 60u, or3 3.5 4) to override them.
-
-
Load line designs a common-emitter or common-source stage: the supply, collector (drain) and emitter (source) resistors, the load, and the bias — a base current or gate voltage set directly, a base resistor, or a divider (leave R1 blank for JFET self-bias). The plot shows the DC load line, the Q point where it meets the device’s own curve, the AC load line through Q (slope −1/(Rc ‖ RL), the emitter bypassed), the largest symmetrical swing, and the power hyperbola with Imax and Vmax. Drag the Q point along the load line; Move Q to the centre of the swing puts it where the swing is largest. Below, an input sine runs through the curves: play it and raise the amplitude to see the output flatten at saturation (bottom) and cutoff (top), with the clipped part marked. Examples load working stages.
-
Measure & fit takes a CSV from a real curve tracer, a source-measure unit, or the Arduino sketch — columns
V,Ifor a diode,Vce,Ic,Ibfor a BJT family,Vgs,Id,Vdsfor a MOSFET — and fits Is, n and Rs; β and VA; or Vth and K (and λ, given several Vds values). Measured points and the fitted curve are drawn together. Units can be named in the header (I (mA)). Synthetic example makes noisy data from the selected part to try it on; Use as the custom device brings the fit back into the other tabs. -
Arduino tracer has the wiring and a sketch: two PWM outputs smoothed by RC filters and buffered by an op-amp, a sense resistor for the current, and the analogue inputs on both ends of it. Send
d,bormover serial and paste the CSV it prints.
The models
Diode. I = Is·(expV − I·Rs)/(n·Vt − 1), Vt = kT/q. With a series resistance the equation is implicit; the tool solves it for the junction voltage with a bracketed root finder (the residual rises monotonically, so it always converges). Is scales with temperature as SPICE does, Is(T) = Is·(T/Tnom)^(XTI/n)·expT/Tnom − 1)·EG/(n·Vt, which gives silicon’s familiar −2 mV/°C. Zeners add a breakdown current IBV·exp(−(V + BV)/(NBV·Vt)) with BV(T) = BV·(1 + TBV1·ΔT), plus a reverse-only bulk resistance so the knee can be sharp while the impedance at the test current matches the datasheet’s ZZT. The LED models are fitted to a typical VF at 20 mA; their EG is a fit parameter that reproduces the datasheet’s VF temperature coefficient, not the band gap.
BJT. A Gummel–Poon-style transport model without the ohmic resistances and charge storage: the transport current Is·(exp(Vbe/(NF·Vt)) − exp(Vbc/(NR·Vt))) divided by the base charge qb = q1/2·(1 + √(1 + 4·q2)), where q1 = 1/(1 − Vbc/VAF − Vbe/VAR) is the Early effect and q2 the high injection set by IKF; the base current adds the ideal terms Is/BF and Is/BR and the recombination terms ISE/NE and ISC/NC. With VAF, IKF = ∞ and ISE = 0 it is exactly the Ebers–Moll model in circuit-sim (the tests check the two against each other). Collector curves are traced the way a curve tracer does it: for each Vce the tool finds the Vbe that draws the stepped base current. The TIP120 is two such transistors with the datasheet’s internal 8 kΩ and 120 Ω resistors, solved node by node. Because the ohmic resistances are left out, power transistors saturate more sharply here than the real part at amperes.
MOSFET and JFET. The square law with channel-length modulation, the same as circuit-sim’s MOSFET: Id = kp/2·(Vgs − Vth)²·(1 + λVds) in saturation and kp·((Vgs − Vth)·Vds − Vds²/2)·(1 + λVds) in the triode region. Power MOSFETs add a series drain resistance RD (which sets the Rds(on) floor) and an optional mobility reduction THETA. Vth falls 2 mV/°C and kp as (T/Tnom)^−1.5. A JFET is the same law with Vth = VTO < 0 and kp = 2·BETA (SPICE’s NJF), so IDSS = BETA·VTO².
Sources. Where a part has a SPICE model in wide circulation — the Fairchild/onsemi 2N3904 and 2N3906, the Philips/NXP BC547B, the 2N2222 model circuit-sim already uses, the LTspice library’s 1N4148 and 1N5819, the common 1N4007 and 2N5457 models — the tool uses it and says so in the device note. The rest (LEDs, Zeners, BD139, TIP120, the MOSFETs, J201) are fitted here to the typical figures in their datasheets, and the note says which figures. Typical is not guaranteed: the spread between parts of the same number (hFE 100–300, Vth 1–3 V) is far larger than any model error, which is why the fitting tab exists.
Load lines
With the emitter resistor carrying Ic + Ib, the DC load line is Vcc = Vce + Ic·Rc + (Ic + Ib)·Re; the Q point is where it meets the curve for the bias drive. A divider bias is solved self-consistently — the base current, Vbe and the emitter voltage all depend on each other — by finding the base current that closes the loop Vth = Ib·Rth + Vbe + (Ic + Ib)·Re. For a FET there is no gate current, so Vgs = VG − Id·Rs.
For signals the emitter (source) resistor is taken as bypassed and the load as capacitor-coupled, so the AC load line has slope −1/rac with rac = Rc ‖ RL. From Q the output can rise by Iq·rac before the transistor cuts off and fall by Vq − Vsat before it saturates; the largest symmetrical swing is twice the smaller, and it is largest when Ic = (Vcc − Vsat)/(Rdc + rac). The sine animation runs the instantaneous drive through the real curves and the AC load line at each step, so the distortion you see before hard clipping — the uneven gain of an exponential device — is the model’s, not a sketch’s.
The power hyperbola is Ic·Vce = Pmax. For small parts Pmax is the 25 °C free-air rating; for the BD139, TIP120 and the power MOSFETs it is the rating at a 25 °C case, which needs a large heatsink — derate it (the thermal tool works out by how much). Real SOA curves also have a second-breakdown limit for BJTs at high voltage that this tool does not draw.
Fitting your measurements
The fits are least squares, and each starts from an exact linear version of the problem:
-
Diode. Well above Is the diode law is V = n·Vt·ln I − n·Vt·ln Is + Rs·I — linear in its three unknowns, so ordinary least squares gives n, Is and Rs directly. Levenberg–Marquardt then refines the full law on the voltage residuals.
-
BJT. In the active region Ic = β·Ib·(1 + Vce/VA) = β·Ib + (β/VA)·Ib·Vce, linear in β and β/VA, fitted across all the curves at once. β is the value extrapolated to Vce = 0 and −VA is where the lines meet the Vce axis; as a SPICE VAF it is VA plus about Vbe.
-
MOSFET. A transfer curve in saturation gives √Id = √(K/2)·(Vgs − Vth), a straight line through the upper part of the curve; LM then fits Id itself. With several Vds values (an output family) λ is fitted too, over the triode and saturation regions together.
The tests generate data from known parameters, add noise, and check the fits recover them.
The Arduino tracer
Two PWM pins at 31 kHz, each through 10 kΩ and 10 µF and an op-amp follower (LM358 or MCP6002), give two slow, stiff voltage sources. One drives the device through a 100 Ω sense resistor; analogue inputs on both ends of the resistor give the current (I = (A0 − A1)/RS) and the device voltage (A1). The other feeds a transistor’s base through 100 kΩ (Ib = (A2 − A3)/RB) or a MOSFET’s gate directly. Measure your 5 V rail and the resistors and put the values in the sketch; the readings are averaged sixteen times per point. It is limited to 0–5 V and tens of milliamps, which covers small-signal diodes, LEDs, small transistors and logic-level MOSFETs at low current — enough to measure your own part’s β, threshold or ideality and design with it rather than with the datasheet’s typical.
The semiconductors tool explains the physics behind these curves — junctions, carriers, band gaps — and the amplifier designer takes a biased stage further, into gain, impedances and frequency response.
Sharing
Share link copies a URL that opens this tool with your current settings — the device (and a custom
device), the views and the load-line circuit — packed into ?s=. Opening a link replaces your saved
settings for this tool. Pasted measurement data travels with it, so keep the CSV short or leave it out.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.