RGB LED
The RGB LED part models a common-cathode package with three separate Shockley diode channels. Red, green, and blue each draw their own nonlinear current. The rendered colour is a teaching visualisation of those channel currents, not a calibrated optical-spectrum, efficacy, or colour-mixing model.
Pinout
| Pin | Label | Description |
|---|---|---|
| r_a | R+ | Red anode |
| g_a | G+ | Green anode |
| b_a | B+ | Blue anode |
| com_k | K | Common cathode (shared GND) |
Default forward voltages
| Channel | Vf |
|---|---|
| Red | 1.8 V |
| Green | 2.0 V |
| Blue | 3.0 V |
These can be overridden via the Inspector properties panel.
Current limiting
The LED has no internal series resistance. You must connect a resistor on each anode pin to prevent overcurrent. A 220 Ω resistor with a 5 V supply gives approximately 14 mA per channel.
The engine accumulates an I²-shaped overcurrent stress from the highest channel current. Enough sustained stress above the default 20 mA rating latches the whole RGB package open for the rest of the failure session; it does not fail individual colour dice independently. Use Clear failures or start a fresh session to reset this simulated damage state. The threshold is a deterministic teaching rule, not a real LED lifetime or pulse-rating curve.
Common-cathode only
de:volt models only common-cathode polarity. Connect com_k to GND.
Example circuit
Arduino D3 ─── 220 Ω ─── R+
Arduino D5 ─── 220 Ω ─── G+ ── [RGB LED] ── K ─── GND
Arduino D6 ─── 220 Ω ─── B+Load the built-in RGB Colour Cycle example from the Sketch panel to see PWM-driven channel-current visualisation.
Model limits
Included: one nonlinear junction, solved forward current, and current-based brightness input for each colour, plus package-level accumulated overcurrent failure.
Not included: optical spectrum, calibrated luminous intensity or gamma, package optics, channel thermal coupling, junction self-heating, reverse-breakdown damage, pulse SOA, wavelength drift, and time-to-failure prediction. Select the LED to see the same Included / Not included disclosure in the Inspector.