ELECTRONICS
How an LED works
An LED converts electrical energy into light. Change voltage, series resistance, color and PWM to inspect current, operating point and waveform. Test reversed polarity and an open circuit.
Who communicates with whom?
No bus messages are sent in this example. The circuit contains a DC source, a series resistor and one LED. The anode (A) faces the positive side and the cathode (K) the negative side. PWM controls the fraction of each period during which the source is enabled.
Voltage and waveform
An LED is a semiconductor diode: charge carriers recombine under forward current, releasing some energy as light. Its current-voltage characteristic is nonlinear. Forward voltage depends on color, material, current and temperature. This demo uses example values at 10 mA (red 2.0 V, green 2.2 V, blue/white 3.0 V) and a simplified diode model, not a measured datasheet curve.
Measuring with an oscilloscope
The I–V graph shows the model curve, the source/resistor load line and the calculated operating point. The PWM plot shows LED current at an example frequency of 1 kHz. At 50% duty cycle, average current is half the peak current, but peak current is unchanged. PWM therefore does not automatically make excessive peak current safe.
The principle
A voltage source needs current limiting: a series resistor or a suitable constant-current driver. An initial estimate is R ≈ (Vsupply − Vf) / Itarget. Check resistor power P = I² × R, LED limits and temperature too. Parallel LED branches should have individual current limiting. The graph solves the diode equation together with the series resistor; R = 0 does not provide reliable limiting and no safe current is predicted.
An example
A red LED on 5 V with approximately 2 V forward voltage and 330 Ω draws about 9 mA. Increase the resistance to reduce current. Next change duty cycle without changing resistance: peak current stays the same and average current drops. Test an open circuit, a shorted LED and reversed polarity as well.
Important
The 20 mA threshold is an example limit, not a universal LED rating. Modern indicators often need much less current. Reverse voltage can damage an LED; do not assume reversing it is harmless. Use the actual datasheet for Vf, maximum current, reverse voltage, pulse conditions and thermal limits. Displayed brightness is schematic.