LEDs (Single Color)

An LED (Light Emitting Diode) is a semiconductor light source that emits light when electrical current passes through it in the forward direction.

Actuators10 blocksMicroPythonC++
LED

At a glance

Pins and properties exactly as the circuit editor and simulator define this part. The text below explains how to use them.

Pinout

Pinout of the LED, drawn as in the circuit editor. Select a label to see that pin in the table below.

Pins

Pins of this part
PinLabelType
ANODE+Signal in
CATHODE−cathode

Properties

What you can change in the Property Inspector.

Properties of this part
PropertyRange or choicesDefault
Color#ff3333
Forward Voltage1.2 to 4 V1.8 V
Max Current5 to 100 mA30 mA

An LED (Light Emitting Diode) is a semiconductor light source that emits light when electrical current passes through it in the forward direction. In Open Maker Studio, LEDs are the most common output device used to indicate system power, display diagnostic codes, or build visual alarm systems.


1. Schematic Symbol

Standard schematic symbol for an LED — a diode (triangle + bar, current flows anode → cathode) with two small arrows indicating light emission:

A K

2. Pin Configuration (Anode vs. Cathode)

As a polarized semiconductor diode, an LED must be connected in the correct orientation to function:

  • Anode (+): The positive terminal.
    • Physical Identification: The longer leg of the LED package.
    • Schematic Symbol: Mapped to the flat base of the triangle pointing in the direction of current flow.
  • Cathode (-): The negative terminal.
    • Physical Identification: The shorter leg of the LED package, aligned with a flat notch cut into the round plastic collar of the LED body.
    • Schematic Symbol: Mapped to the vertical blocking bar of the diode symbol.

3. Specifications by Color (Forward Voltage & Current)

An LED behaves as a non-linear load. Once the forward voltage threshold (VfV_f) is exceeded, resistance drops rapidly, and current must be limited. The forward voltage varies by the chemical composition of the semiconductor:

LED ColorForward Voltage Drop (VfV_f)Target Forward Current (IfI_f)Max Safe Current (ImaxI_{max})
Red~1.8V to 2.0V15mA (0.015A)30mA
Yellow / Orange~2.0V to 2.1V15mA (0.015A)30mA
Green~2.1V to 2.2V15mA (0.015A)30mA
Blue~3.0V to 3.2V20mA (0.020A)40mA
White~3.1V to 3.3V20mA (0.020A)40mA

Note: OMS's LED component doesn't auto-adjust its maxCurrent prop per color — it defaults to a fixed 30mA regardless of which color you pick (matching the Red/Yellow/Green row above). For Blue/White, raise maxCurrent to 40mA yourself in the Property Inspector, or the simulator will flag an OVERCURRENT fault at real Blue/White operating currents below their true safe limit.


4. Core Calculations & Math

To calculate the series current-limiting resistor required to run a specific LED color:

Rlimit=Vcc−VfIfR_{limit} = \frac{V_{cc} - V_f}{I_f}

  • Example (Red LED on 5V Arduino Uno):

    Rlimit=5.0V−2.0V0.015A=3.0V0.015A=200 ΩR_{limit} = \frac{5.0\text{V} - 2.0\text{V}}{0.015\text{A}} = \frac{3.0\text{V}}{0.015\text{A}} = 200\ \Omega (use a standard 220 Ω resistor)

  • Example (Blue LED on 3.3V ESP32):

    Rlimit=3.3V−3.1V0.020A=0.2V0.020A=10 ΩR_{limit} = \frac{3.3\text{V} - 3.1\text{V}}{0.020\text{A}} = \frac{0.2\text{V}}{0.020\text{A}} = 10\ \Omega (use a standard 10–47 Ω resistor)


5. Component Properties (Property Inspector)

When you select an LED on the canvas, you can modify the following parameters in the Property Inspector panel:

  • Color (ledColor): Sets the visual color emitted by the LED on the canvas.
    • Default: #ff3333 (Red)
    • Range: Hexadecimal color picker panel
  • Forward Voltage (forwardVoltage): Sets the threshold voltage drop before the diode conducts.
    • Default: 1.8 V
    • Range: 1.2 V to 4.0 V (step size 0.1 V)
  • Max Current (maxCurrent): Sets the maximum forward current limit in milliamperes. Exceeding this rating causes a simulator burnout event.
    • Default: 30 mA
    • Range: 5 mA to 100 mA (step size 1 mA)

6. Supported Blockly Blocks

Drawing the blocks…

7. Simulator Behavior

  • Dynamic Illumination: Active LEDs glow with their chosen color, with brightness scaling to the simulated forward current via a perceptual gamma curve (γ ≈ 2.2, so it matches how the eye actually perceives brightness rather than raw current linearly).
  • Over-Current Damage: There's no separate burst/explosion graphic — exceeding maxCurrent (by more than 5%) recolors the LED's epoxy body and glow halo red as a fault tint (same visual language as other faulted components), and logs an OVERCURRENT fault ("LED current {value}mA exceeds rated maximum — junction destroyed") to the Circuit Inspector's Faults tab — not a generic on-canvas "debugger."
  • Reverse Polarity: Wiring the LED backwards triggers a real POLARITY fault too ("check the flat side (cathode) and longer leg (anode)"), separate from the overcurrent case above.

LEDs (Single Color) — OMS Parts