Skip to content

Light-emitting Diodes (LEDs)

Published On:
Sep 5, 2011
Last Updated:
Aug 19, 2024

Light-emitting diodes (LEDs) are basic active (non-linear) electronic components which when provided with voltage and current, emit light. Although there are many ways to make light from electricity (hot filaments, lasers, plasma, e.t.c.), by-definition LEDs are built from a basic diode. They typically have two electrical connections, just like a standard diode. They emit light when forward biased, and block reverse current just like normal diodes (a warning here: some LEDs DO NOT like being reverse biased, please read the datasheet).

A diffused-lens, red, 5mm through-hole LED.

Schematic Symbol

The schematic symbol for a LED looks like a diode symbol, but with arrows added to indicate that it gives of light. The schematic symbol for a LED is shown in This is a placeholder for the reference: fig-led-diode-schematic-symbol. As with a normal diode, the anode is on the left, and the cathode on the right.

Schematic symbol for an LED (light emitting diode).

A more positive voltage is needed on the anode w.r.t to the cathode for current to flow through the LED and it emit light.

Important Parameters

Parameters are sorted alphabetically.

Dominant Wavelength

  • Symbol: λdom\lambda_{dom}
  • Units (typical): nmnm

This is the wavelength of the apparent color the human eye “sees” the LED as. It is a photometric quantity, and is not the same thing as the peak wavelength. Normally measured in nanometres (nmnm).

Flux

This will be used as a shorthand for either radiometric flux, spectral flux or rarely, photon flux. You will have to deduce which based on the context.

Forward Current

  • Symbol: IFI_F
  • Units (typical): mAmA

This is the maximum forward current the LED continuously be driven at. For small indicator LEDs, the maximum forward current is typically 20-30mA. Normally an indicator LED with a max. forward current of 20mA would be driven at less than the max., somewhere between 2-10mA.

Forward Surge Current

  • Symbol: IFMI_{FM}
  • Units (typical): mAmA

Normally rated at a fixed temperature, duty cycle, and pulse length.

Forward Voltage

  • Symbol: VFV_F
  • Units (typical): VV

Rated at a fixed forward current.

LED forward voltages for common LED colours are listed in This is a placeholder for the reference: tbl-led-forward-voltages. You will notice that the forward voltage increases with the increasing frequency of the light (in simple terms, it takes more input energy to create photons with a higher energy), and the forward voltage is largely independent on the manufacturer or manufacturing process of the LED.

ColourForward Voltage
Red2.0V
Orange2.0V
Yellow2.1V
Green2.2V
Blue3.3V
UV3.0V (UVA) to 7.5V (UVC)
Forward voltages for common LED colours.

Irradiance

  • Symbol: EE
  • Units (typical): mW/m2mW/m^2

Irradiance is the power received per unit area of a surface which is illuminated by a light source. Irradiance is usually denoted with the symbol EE as II is already used for radiant intensity. It is a radiometric quantity.

Peak Wavelength

  • Symbol: λpeak\lambda_{peak}
  • Units (typical): nmnm

The wavelength at the peak of the spectral density curve. This is the wavelength at which the LED emits the most power (or flux). It is a radiometric quantity, and is not the same thing as the dominant wavelength.

Photon Flux

  • Symbol: ϕe\phi_e
  • Units (typical): umol/sumol/s

The number of photons emitted per second by the LED. This is a not a common property to be listed on LED datasheets, more typically the radiometric flux is given.

Photosynthetic Flux

  • Symbol: PPFPPF
  • Units (typical): umol/sumol/s

Very similar to photon flux, except only photons within the photosynthetic active region (PAR) of 400-700 nm are considered. Commonly used for LED light sources that will be used in agriculture for plant growth (e.g. high-pressure sodium lamps). Typical values range from 100-200 umol/s.

Radiation Pattern

  • Symbol: n/a
  • Units (typical): Relative intensity (0-1)

The radiation pattern (aka spatial distribution) is usually given on a semi-circular graph, showing the relative intensity of the emitted light vs. the angle from looking directly forward.

Radiant Flux

  • Symbol: ϕe\phi_e
  • Units (typical): Watts, mWmW

The radiant flux (also called the radiant power) is the total amount of light energy per unit time radiated from one region to another. In the context of an LED it is typically used to describe the total amount of light energy emitted by the LED each second. You can divide the radiant flux by the input power to calculate the efficiency of the LED, and to find out how much power will be lost as thermal energy. It is different to the photometric flux.

Reverse Voltage

  • Symbol: VRV_R
  • Units (typical): Volts, VV

The maximum voltage the LED can withstand when reverse biased. Typically LEDs are forward biased but in some applications their diode property of only allowing current to flow in one direction is used.

View Angle

  • Symbol: 2θ122\theta_{\frac{1}{2}}
  • Units (typical): Degrees, ^{\circ}

The viewing angle (a.k.a. view angle) is the total angle that the LED light output encompasses before the light radiance drops down to 50% of it’s peak. This should be less than 180° as most LEDs emit light of a planar surface. The smaller this value the more focused the LED is. Some LEDs come package with a lens to focus the light. It is called 2θ122\theta_{\frac{1}{2}} because θ12\theta_{\frac{1}{2}} is the angle measured from the center to where the radiance falls to half the peak, thus the total angle is twice this. It is assumed that the view angle is the same for any cross-sectional plane of the LED, for most LEDs this is true as their radiation pattern is rotationally symmetric (around the axis pointing forwards).

Another definition of this is the angle until the light radiance drops down to 50% of what it emitted from center1. This is the same as the above definition as long as the LED emits the most amount of light directly forward, which is true for a large number of LEDs.

Limiting The LED Current

A common mistake when working out the value of a current limiting LED resistor is to forget to include the forward voltage drop of the diode into the equations. This has a bigger effect when running the LED at lower voltages. The equation for working out the resistance needed to limit the current in an LED is:

R=VddVled,fIled\begin{align} R = \frac{V_{dd} - V_{led,f}}{I_{led}} \end{align}

where:
RR is the resistance required in series of LED to limit current, in Ω\Omega
VddV_{dd} = supply voltage driving the LED (typ. 3.3, 5, 12V), in VV
Vled,fV_{led,f} = forward voltage drop of the led (typ. 2.0V), in VV
IledI_{led} = required current through the led (typ. 5-20mA), in AA

Reverse Mounting

Reverse mounting LED’s are SMD LEDs which have the light source emitting in the reverse direction, e.g. toward the PCB they are mounted on. A hole is drilled in the PCB to let the light through to the other side. They are useful when using a PCB as a user interface panel, or when you want to use light guides (since the light guides can be mounted up against flat PCB).

An Osram reverse-mount LED (P47K series).

Multiplexing

Multiplexing is a way of connecting LED’s in an arrangement so that it minimises the number of microcontroller pins required to drive them. There is also a even greater pin-saving method, known as Charlieplexing.

Multiplexing is normally done in a row/column configuration, where the LED’s are connected in a grid-like fashion, and one microcontroller output pin is used for each row and column. This gives the following equation linking the number of pins used and the number of LEDs:

y=(x2)2\begin{align} y = (\frac{x}{2})^2 \end{align}

where:
yy = number of LEDs
xx = number of microcontroller pins

Charlieplexing

Charlieplexing is a more efficient (in terms of number of drive signals used) way of driving LEDs, compared to multiplexing.

The following equation is given linking the number of pins used and the number of LEDs:

y=x2x\begin{align} y = x^2 - x \end{align}

ESD

Even though all LEDs are susceptible to ESD damage, it is the GaN based LEDs (blue, white and some green colors) that are more sensitive to surge voltages caused by ESD.

The susceptibility for LEDs to ESD is low enough that no extra ESD protection measures (aside from the current-limiting resistor which acts somewhat as a ESD suppressor also) are taken for LEDs used for general purposes.

Light Detection With A LED

A little known fact about LEDs is that they can be used for light detection. Although not as sensitive as purpose-built photo-diodes, with a few external components, can be interfaced with a microcontroller and be used to detect variations in the light level.

The schematic in This is a placeholder for the reference: fig-led-connected-to-micro-for-light-detection-schematic shows how to connect an LED up to a general microcontroller for light detection. The LED and resistor are connected up to GPIO pins.

Schematic showing how to connect an LED to a general microcontroller for light detection. The LED and resistor are connected to GPIO pins.

The photocurrent of an LED is about 10-100 times smaller that that of a purpose-built photo-diode. The wavelength of peak sensitivity is usually a little less than the peak wavelength that it emits light at.HighLED is binned according to flux output. There are 5 bins:

RGB LEDs

RGB LEDs are LED’s which have three diodes inside them, one red, one green, and one blue. Whats neat with these is, when controlled correctly they can produce almost any visible colour (remember primary colours in science class?).

RGBs usually have at least four pins, one each for one side of the red, green, and blue diodes (either all anode or all cathode), and a common which connects all three of the other sides of the diodes. They are more complicated to control than a normal LED, normally requiring 3 different PWM signals, and a bit of firmware to calculate the appropriate duty cycles.

You can get RGD LEDs which already have the control and drive circuitry (e.g. the constant current source) for the LEDs inside them. These are normally connected to a microcontroller via a digital communication bus (e.g. SPI), or sometimes a custom protocol).

One popular example, the Worldsemi WS2811, uses it’s own custom communications protocol running at 800kHz.

The WS2811, a popular RGD LED, with integrated controller and drive circuitry (constant current supply). Communicates via a custom 800kHz protocol to a microcontroller.

Overview of Worldsemi’s RGB LED product offering:

  • WS8211: LED driver IC, no-built in LEDs.
  • WS2812: Combined RGB LED and driver IC.
  • WS2812b: Upgraded version of the WS2812. This includes added reverse polarity protection, higher brightness and colour uniformity, better pinout (a drop from six pins in the WS2812 to only four pins in the WS2812b), better heat dissipation (lower junction to case thermal resistance)2.

The WS28xx series of LEDs uses a custom, 1-wire, daisy-chainable protocol for communication. This is a placeholder for the reference: fig-ws2812b-typical-application-schematic shows an example application schematic showing how they can daisy-chained together. Microcontroller SPI peripherals running at 16x the WS28xx bit rate can be used to generate the data stream.

Typical application schematic of the WS2812B RGB LED, showing how they can be daisy-chained together.

For information on how a MCU SPI peripheral can be used to send data to a WS2812 LED, see the SPI Communication Protocol page.

UV LEDs

UV LEDs are used for applications such as:

  • UV curing (UVA: 365-405nm)
  • 3D printing/additive manufacturing
  • Disinfection and sterilization (UVC: 220-280nm)
  • Fluorescence

LED Controllers

LED controllers are ICs designed specifically to make driving LEDs easier, by providing the correct current for the LEDs to operate and off-loading the processing power which would otherwise have to be done on a microcontroller. They normally allow you to control both the current and the PWM rate for each LED (to control both the brightness and colour). Some are specially designed for RGB LEDs.

Some feature logarithmic current output levels to best match up with what the human eye perceives.

PWM vs Current Control

There are two main ways to dim an LED, either by changing the current or with PWM. Since PWM only varies how long the LED is on for, and keeps the current through the LED the same, it does not really affect the colour of the LED, while the current-changing method does (the colour depends on the forward current).

Examples

The PCA9634 8-Channel 25mA I2C LED Controller by NXP is a simple LED driver for up to 8 single low-power (20mA) LEDs.

Lens Shapes

LEDs come with a variety of lens shapes. The major thing that the len shapes influences is the radiant intensity or radiation pattern of the light. Some lens shapes focus the light around a small angle (e.g. 10°), while others spread the light over nearly 180°.

Most standard LEDs used on circuit boards are either encapsulated or hemispherical.

Hemispherical lens concentrates the light into a tight beam, while the flat and encapsulated lens types spread the light more evenly than an LED with no lens at all.

Laser Diodes

Laser diodes are LEDs which emits ‘lasered’ light using a similar method to standard-light LEDs.

Some laser diodes have integrated switching FETs and capacitors for high-speed, high-power applications (such as laser range finding).

A laser diode with an integrated FET and capacitor for high-seed, high-power switching.

Pulse-Width Extending

A common use for an LED is to connect it to a digital output pin of a microcontroller/IC which goes active upon a certain event (say the microcontroller receives a packet of data).

The problem with this is that the length of time that the output pin is active for can be a really short amount of time, e.g. microseconds or even nanoseconds. It the events are rare enough, this may make it impossible to see the LED flicker.

One way to fix this with hardware to to use a simple pulse-width extender circuit as shown in This is a placeholder for the reference: fig-led-pulse-extending-circuit-schematic-annotated-rc-mosfet.

The schematic for a LED pulse width extending circuit. It converts a short pulse that would not be seen into a longer pulse which is visible.

This circuit uses an RC network to form a time delay. When the short pulse arrives, the MOSFET is turned on almost immediately, and the LED lights up. When the pulse stops, the diode prevents the capacitor from discharging immediately, and instead has to discharge slowly through the resistor. The MOSFET/LED remain on until the voltage on the capacitor drops below the MOSFET’s gate-source threshold voltage (or something close to that).

Peak vs. Dominant Wavelength

LEDs are usually given with two different quantifiers regarding their wavelength, both the peak wavelength and the dominant wavelength.

Most LEDs emit a narrow spectrum of light (as opposed to filament-style bulbs, which emit a broad spectrum of light). The spectral shape is approximately Gaussian (a.k.a. the normal distribution).

A graph of the relative intensity vs. wavelength for a 0603 green LED (LTST-C190KGKT). It has a peak wavelength of 574nm and a dominant wavelength of 571nm.

The peak wavelength is the wavelength at the peak of the spectral density curve. The dominant wavelength is a colorimetric quantity that describes the perceived colour of the LED with respect to the human eye. The human eye essentially sees a weighted average of all the wavelengths emitted by the LED, and perceives a single colour based on this averaging.

The dominant wavelength is important for user interface designers as it determines the “colour” the user perceives.

Converting Between uW/cm2 and PAR

Many grow lights (lights that provide a “fake sun” for plants to trigger photosynthesis, typically used in indoor growing environments) now use LEDs (sodium lamps were a popular choice before LEDs became both powerful and cheap enough). In these agricultural applications, you might have to convert between irradiance given in mWcm2mW{\cdot}cm^{-2} and PAR given in umolm2s1umol{\cdot}m^{-2}{\cdot}s^{-1}.

The Planck-Einstein equation gives a direct relationship between the frequency of a photon and it’s energy3:

E=hf\begin{align} E &= hf \\ \end{align}

where:
EE is the energy of the photon, in JJ
hh is the Planck constant, 6.62607015×1034JHz16.62607015{\times}10^{-34} J{\cdot}Hz^{-1}4
ff is the frequency of the photon, in HzHz

Of course you can use c=fλc = f\lambda to write this in terms of the wavelength instead of frequency:

E=hcλ\begin{align} E &= h\frac{c}{\lambda} \\ \end{align}

where:
cc is speed of light in a vacuum, 3×108ms13{\times}10^{8}ms^{-1}

Knowing this, you can convert an energy from mWmW into a number of photons. One issue however is that the light from an LED is not emitted all at one precise frequency, it is usually spread across a small band of wavelengths known as it’s spectrum. One approximation is to just pretend all the light is emitted at peak wavelength. A more precise method is to take the spectrum, digitize it, and then calculate the proportion of photons for each small increment in wavelength.

So number of photons per second per meter squared, based on the irradiance IrrIrr (I’m not using EE here for irradiance as that will get confused with the energy EE in the Planck-Einstein equation) is:

photons/s/m2=Irr[W/m2]λpeakhc\begin{align} photons/s/m2 &= \frac{{Irr}_{[W/m2]}\lambda_{peak}}{hc} \\ \end{align}

We now need to convert from number of photos to number of moles, which we can use Avogadro constant NA=6.022×1023N_A = 6.022 \times 10^{23} for.

PAR[mols/s/m2]=Irr[W/m2]λpeakhcNA\begin{align} PAR_{[mols/s/m2]} &= \frac{{Irr}_{[W/m2]}\lambda_{peak}}{hcN_A} \\ \end{align}

That is the basic equation done. But if we want to be lazy an not convert to SI units before punching the numbers in, we can compensate for this in the equation:

PAR[mols/s/m2]=Irr[uW/cm2]λpeakhcNA1e41e6PAR[umols/s/m2]=Irr[uW/cm2]λpeakhcNA1e4×1e61e6PAR[umols/s/m2]=Irr[uW/cm2]λpeakhcNA×1e4\begin{align} PAR_{[mols/s/m2]} &= \frac{{Irr}_{[uW/cm2]}\lambda_{peak}}{hcN_A} \frac{1e^4}{1e^6} \nonumber \\ PAR_{[`umols`/s/m2]} &= \frac{{Irr}_{[uW/cm2]}\lambda_{peak}}{hcN_A} \frac{1e^4 \times 1e^6}{1e^6} \nonumber \\ PAR_{[umols/s/m2]} &= \frac{{Irr}_{[uW/cm2]}\lambda_{peak}}{hcN_A} \times 1e4 \nonumber \\ \end{align}

hh (the Planck constant), cc (the speed of light in a vacuum), and NAN_A (the Avogadro constant) are all constants, so we can simplify them with the 1e41e4 to:

PAR[umols/s/m2]=83593Irr[uW/cm2]λpeak\begin{align} PAR_{[umols/s/m2]} &= 83593*{Irr}_{[uW/cm2]}\lambda_{peak} \\ \end{align}

Since we’re trying to make it easy, let’s put λpeak\lambda_{peak} in units of nmnm instead of mm also:

PAR[umols/s/m2]=8.36e5Irr[uW/cm2]λpeak[nm]\begin{align} PAR_{[umols/s/m2]} &= 8.36e^{-5}\cdot {Irr}_{[uW/cm2]} \cdot \lambda_{peak[nm]} \\ \end{align}

If you use the equation before we compensated for the different popular units of cm2cm^2 for irradiance and m2m^2 for PAR, you can use also use this equation for radiance (e.g. output light power from an LED or collection of LEDs).

Basic UI Uses

LEDs are commonly used for basic user interface (UI) purposes in embedded systems.

Because of their simplicity, they are often a fall-back mechanism if there is no other form of error reporting available to the application at that time. For example, even if a microcontroller has a debug serial port and a LCD display for indicating errors during normal operation, there is still a few situations in where these would be unavailable:

  1. During the boot process, before the serial port and LCD are initialized.
  2. If the microcontroller is in a low-power mode, and the serial port and LCD are turned off.
  3. During an error condition such a segmentation fault. In certain errors you cannot rely on the firmware to work correctly (memory could be corrupted). Attempting to indicate this error to the user using the serial port of LCD may fail due to the driver code being corrupted. There is a much higher chance that writing to a single register to turn the LED on will work.

One example of this is the Zynq 7000 SoC’s BootROM. The BootROM is the basic code that runs on startup that loads the FSBL. To indicate an error, it toggles a pin high and low. It is designed so that you can connect an LED to this pin and see the error code. The waveform of the LED error code output by the Zynq 7000 BootROM is shown in This is a placeholder for the reference: fig-zynq-7000-bootrom-led-error-code-waveform.

The waveform of the LED error code output by the Zynq 7000 BootROM5.

Packaging

You can get LED’s in a variety of SMD packages. Common SMD LED packages include the 0603 on 0402 chip packages.

A picture of a 0603 LED up close on a PCB. You can see the filament running into the middle of the pad (the part which emits the light).

Lifetime And Reliability

The expected lifetime and reliability is not typically given on standard-issue LED datasheets, mainly due to:

  • Typical LEDs last so long that lifetime of any product they are used in is determined by other factors
  • It is expensive and time-consuming to measure LED reliability
  • Lifetime and reliability information is considered somewhat confidential

However, some LED manufacturers to give lifetime and reliability information. This is typically done for higher power, specific purpose LEDs such as powerful illumination LEDs (think streetlights, car headlights) or agricultural growing lights. The lifetime is typically expressed as a curve of power maintenance over time (in terms of hours the LED has been on for). Power maintenance is how powerful the LED (in terms of light output power) compared to when it was new. Typical single-value lifetimes can be described as the number of hours until the LED light outputs power reduces to 70 or 50% of it’s initial output power (a 70 ro 50% power maintenance).

Footnotes

  1. Street Co. How Is Viewing Angle An Important Asset Of LED Displays. Retrieved 2022-06-19, from https://streetcommunication.com/how-is-viewing-angle-an-important-asset-of-led-displays/.

  2. Worldsemi. WS2812 vs. WS2812B. Retrieved 2024-01-13, from https://cdn.sparkfun.com/assets/learn_tutorials/1/0/5/WS2812B_VS_WS2812.pdf.

  3. Wikipedia (2022, Jan 15). Planck relation. Retrieved 2022-02-23, from https://en.wikipedia.org/wiki/Planck_relation.

  4. Wikipedia (2022, Feb 6). Planck constant. Retrieved 2022-02-23, from https://en.wikipedia.org/wiki/Planck_constant.

  5. AMD. Zynq 7000 SoC Technical Reference Manual (UG585). Retrieved 2024-08-19, from https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/BootROM-Error-Codes.