LEDs

A light-emitting diode passes current in one direction and glows when it does. de:volt ships six single-colour indicator LEDs — the Red LED, Green LED, Blue LED, White LED, Yellow LED, and Amber LED — plus a Bicolour LED that packs a red and a green die into one body. Each is a 5 mm through-hole part with two leads: the anode (A) and the cathode (K). The colour-changing three-channel device lives on its own page, RGB LED.

How an LED behaves

An LED is a diode, so it only conducts when the anode is more positive than the cathode by at least its forward voltage (vf). Below that threshold almost no current flows and the LED is dark. Once you reach vf the diode conducts hard, and from there a tiny rise in voltage produces a large rise in current — the I-V curve is nearly vertical. That steepness is why you can never drive an LED straight off a voltage source: there is no value of supply voltage that lands you safely on the curve, so the current runs away and the part burns out.

The fix is always the same: put a series current-limiting resistor in line with the LED so the resistor, not the diode, sets the current.

Forward voltage by colour

Forward voltage tracks the colour of the emitter — shorter wavelengths (blue, white) need more energy per photon and so have a higher vf. The headline value for each part is its editable vf parameter:

ColourPartvf
Redled-red1.8 V
Amberled-amber2.0 V
Greenled-green2.0 V
Yellowled-yellow2.1 V
Blueled-blue3.0 V
Whiteled-white3.2 V

Every single-colour LED shares the same current limits: a maximum forward current (if_max) of 0.02 A (20 mA) and a forward-voltage tolerance (vf_tol) of 0.05 (±5%). The vf and color parameters are editable per instance in the Inspector, so you can model a part that sits between these defaults.

Pinout

PinLabelFunction
aAAnode (longer lead, to the + side through the resistor)
kKCathode (shorter lead, beside the flat on the lens rim, to GND)

Sizing the series resistor

Pick the resistor so the current sits comfortably under the 20 mA maximum — around 10 mA is a bright, safe target for an indicator. The resistor drops whatever supply voltage is left after the LED takes its vf:

R = (Vsupply − Vf) / I

For a red LED on a 5 V rail the diode takes 1.8 V, leaving 3.2 V across the resistor; 330 Ω then sets about 10 mA, a standard, safe indicator current. Higher-vf colours leave less headroom on the same rail, so they want a smaller resistor for the same current — a blue or white LED at 5 V has only ~1.8–2 V to drop and reaches 10 mA nearer 150–200 Ω.

Wire the anode to the positive/supply side through the resistor and the cathode to GND:

5V ─── 330 Ω ─── A [LED] K ─── GND

The simulator warns on a missing resistor

de:volt flags an LED wired with no series resistance: connecting an anode straight to a supply node trips an overcurrent warning rather than silently burning the part. Treat that warning as a real fault — add a resistor and re-run. The current limit is checked against if_max, so a part driven well past 20 mA will be reported as overdriven.

Bicolour LED

The Bicolour LED (led-bicolor) is two LEDs — a red die and a green die — sharing a single common cathode inside one package. It has three leads: two anodes and the shared cathode.

Pinout

PinLabelFunction
a1A1Red anode
a2A2Green anode
kKCommon cathode (shared, to GND)

Specs

PropertyValue
Red forward voltage (vf1)1.8 V
Green forward voltage (vf2)2.0 V
Rated current per channel (iRated)0.02 A (20 mA)

Because the two dice share a cathode but have separate anodes, each anode needs its own series resistor — one resistor cannot limit both channels at once. Drive A1 for red, A2 for green, and drive both at once for yellow, since the eye mixes the overlapping red and green output. The vf1, vf2, color1, and color2 parameters are editable in the Inspector.

+5V ─── 330 Ω ─── A1 ─┐
                      ├─ [Bicolour LED] ─ K ─── GND
+5V ─── 220 Ω ─── A2 ─┘

Tie the shared K pin to GND, exactly as a single-colour LED’s cathode.

  • RGB LED — three independent channels for full-colour mixing.
  • 7-Segment Displays — seven LED segments arranged to form digits.
  • Logic ICs — counters and decoders that drive LED indicators and displays.

New to placing and wiring parts? Start with Getting started.