This part has a page of its own, with a note on using it and a circuit to try: the part page.

LED

A light emitting diode: a real diode with a forward drop, not a resistor that glows.

Two legs on the breadboard: A the anode, C the cathode. Current has to flow from A to C to light it, and the color property is red, green, blue, yellow or white. It changes the forward voltage as well as the color, because a real LED's drop depends on what it is made of.

Pins

Pin What it does
A Anode. Current goes in here.
C Cathode, the shorter leg on a real part. Current comes out here.

Properties

color: red, green, blue, yellow or white. It changes the picture and the die: each color is specified by its drop at 20 mA, which is how a datasheet specifies one. Red 1.8 V, yellow 2.0 V, green 3.0 V, blue 3.0 V, white 3.1 V.

The split is the die, not the lens: red and yellow are AlGaInP and sit under 2.2 V, green, blue and white are InGaN and sit near 3. That volt of difference is why a series resistor is worked out per color rather than copied, and it is what decides whether a lamp will run at all off a 3.3 V board. A modern 5 mm green is InGaN; the 2.1 V green of the textbooks is a GaP die.

What the model gets right

The LED is a diode and the diode is the Shockley equation, I = Is (exp(Vj / (N Vt)) - 1), with N = 2 and 12 ohm of bulk resistance, and the color's drop at 20 mA is what sets Is. So the drop is not a number the part carries around: it is whatever the curve gives at the current the circuit is passing. A 5 V rail through 220 ohm lights a red LED at 14.9 mA with 1.72 V across it, and the same LED on 3.3 V through 220 ohm passes 7.7 mA at 1.60 V. The drop falls with the current, which is what a real LED does and what a fixed drop could never show.

Blue and white changed on September 17, 2026. They were 2.2 V while the model was a fixed drop and they are 3.0 V and 3.1 V now, because that is what a real blue die does, so a blue LED on 5 V through 220 ohm passes 9.8 mA where it used to pass 11.9 mA: about a fifth less light, and correct. On a 3.3 V rail the difference is much larger: 2.8 mA against the 7 mA the old model claimed, which is the real reason a blue LED looks dim on a 3.3 V board.

The LED loads the net it is on, the way a real diode does, and below about a nanoamp of forward current it lets go of both nets entirely: no leakage, no reverse current. The probe is not the instantaneous brightness either: it is an 8 ms rolling average of it, the same time constant your own retina uses, so a PWM-dimmed LED reads as dimmed rather than as a random flicker.

What it does not model

One curve per color, and no spread. Real LEDs of the same color vary by a couple of hundred millivolts from part to part; every red LED here is the same red LED. The bulk resistance is 12 ohm and the emission coefficient 2 for every color, which is the middle of the range indicator LEDs sit in rather than a measurement of any one part.

No junction capacitance and no temperature. The junction is at 27 C and stays there, where a real LED's drop moves about 2 mV a degree, and it switches in nothing flat. There is no reverse breakdown either: reverse biased it passes its saturation current, which is femtoamps, however much you put across it.

Full brightness is 20 mA and the probe stops there. Brightness is the forward current divided by 20 mA and clamped at 1, so 20 mA and 200 mA look identical on the canvas even though the probe reports the current honestly.

No maximum current and no burnout. Wire an LED straight across a 5 V rail with nothing in series and it lights at whatever current the diode drop allows, and the probe will tell you that current honestly. A real LED would not survive it. There is no smoke here on purpose: a mistake you can read off the probe teaches more than a part that silently vanishes.

Common mistakes

The one everybody makes once: no series resistor. An LED with nothing limiting its current is not "a bit bright", it is a short dressed up as a component, and the resistor that should be next to it is the whole of Ohm's law protecting the LED.

See it in action

Blink is the first sketch on every board Mokxi has, and Hello, breadboard, Knight Rider and LED bar chaser all build on nothing more than an LED and a resistor. Browse the full set at /templates, or read how faithfully a part behaves for what the canvas models and what it leaves out.

How many LEDs can one Arduino pin drive? measures one to eight LEDs on one pin, and ten on ten pins, against the ATmega328P's limits.