LED I-V curve
A supply across a red LED and a 10 ohm sense resistor: sweep the supply and the LED’s real exponential current curve comes out, knee and all. There is no microcontroller in it: the simulator solves the 3 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.
Teaching? Assign it to your class in one click.
Intermediate Runs in your browser. Free, and no account needed.
How it works
There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.
// An LED's I-V curve.
//
// A bench supply set to 2.0 V straight across a red LED and a 10 ohm sense
// resistor. No current-limiting resistor worth the name: the point is to
// see how the LED itself decides its current.
//
// An LED is a diode, and the engine models it as one: a Shockley junction
// with 12 ohm of bulk resistance (docs/help/parts/led.md). So its current is
// not a fixed "2 V drop". Well below the knee it passes almost nothing, and
// there every 0.1 V more multiplies the current. Past the knee the junction
// is wide open and what limits the current is resistance: the LED's own
// 12 ohm plus the 10 ohm sense resistor, so the curve straightens into a
// line of about 45 mA a volt.
//
// Draw the curve:
//
// 1. Analysis... in the more menu.
// 2. DC sweep: step vcc1's voltage from 1.0 V to 2.2 V in 0.02 V steps.
// 3. Watch the net between the LED and the sense resistor.
//
// The plot is the voltage across 10 ohm, so every 0.1 V on it is 10 mA
// through the LED. Download CSV for the LED's own current at every point.
// The x axis is the supply, which is the LED's voltage plus the little the
// sense resistor drops (0.2 V at 20 mA).
//
// At the 2.0 V the supply starts at, about 20 mA flows, which is the most a
// small LED is meant to carry, and the meter reads about 0.2 V. Click vcc1
// and try 2.5 V by hand: well over 30 mA, from half a volt more. That is
// why an LED always gets a series resistor.
Parts list
5 parts, plus the jumper wires. Every one is in the editor's parts bin.
- 1 × Full-size breadboard
- 1 × Power, 2 V
- 1 × LED, red
- 1 × Resistor, 10 Ω
- 1 × Multimeter
How it is wired
3 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.
- 2 V: LED, red pin A
- Ground: Resistor, 10 Ω pin 2; Multimeter pin COM
- LED, red pin C; Resistor, 10 Ω pin 1; Multimeter pin V
Change it and keep it
Open it in the editor, change the circuit or the code, and keep your version in a free account.