What are LEDs and how do LEDs Work?
What is an LED? How do LEDs work?
Many of us take the humble LED, or light emitting diode, for granted despite their ubiquity.
LEDs not only show up in many of your projects, they find a home in a myriad of consumer and commercial products and are now making headway into lighting, driving incandescent and fluorescent lighting into obsolescence.
Before we answer the question what is an LED or delve into how LEDs work, let’s do a quick history lesson on a few common types of light emitting devices you’re probably familiar with. After that, we’ll talk about what LEDs are made of and how they work. Then, we’ll get into the practical side of LEDs and how to use LEDs in your projects and designs.
LED & Lighting History 101
The incandescent light bulb was the first viable electric light on the scene (though arc lamps were demonstrated as early as 1835). Thomas Edison patented the device in 1879.
Modern incandescent bulbs use a tungsten filament to emit light. A glass envelope encloses the filament and a vacuum or inert gas fills the envelope. Many incandescent bulbs connect to the light socket using a screw base, but other types of bases exist.
Incandescent bulbs were the standard for a long time in homes and other places. They generate a fair amount of light and have an okay lifespan, as long as they’re not subject to abuse (like mechanical shock).
The problem is that they’re energy hogs. Much of the electric power the bulbs consume converts to heat rather than light. If you’ve ever touched an incandescent bulb that’s been on for more than a few seconds you know what I mean.
The bulbs are also fragile, and their lifespan is relatively short.
Before the advent of LEDs, small incandescent lamps were often used as indicators in various consumer and commercial products. Other variations of these lamps exist including halogen bulbs, high pressure sodium (think street lights), mercury vapor and metal halide. While the last three are not truly incandescent bulbs, we’ll lump them in here anyway as they deserve a mention. You may not be familiar with them, but they show up in commercial and industrial applications.
Fluorescent bulbs have been around since the 1930’s but the compact fluorescent bulb or CFL didn’t show up on the scene until much later.
CFLs are much more energy efficient than incandescent bulbs and have a longer life with the potential to last years, but they are also fragile. In addition, they contain mercury which is highly toxic. Once you flip the switch to turn a CFL bulb on, they tend to take a minute or two to “warm up” before they reach peak brightness. To many, this is a disadvantage.
LED bulbs boast a long life, are very efficient and contain no mercury. They are also more robust and not as fragile as incandescent lamps or CFLs. For these reasons, many people — including myself — have switched out the CFLs in their homes for LED bulbs as the prices keep falling. Another perk some LED bulbs sport are IoT capabilities. These “smart bulbs” can change colors (among other things) and are easy to control with an app on a smartphone.
Finally, LED bulbs progressively get dimmer over thousands of hours of use rather than failing suddenly as incandescent lamps do.
How LEDs Work
While LED bulbs are replacing incandescent and fluorescent lighting in buildings and architectural design, most electronics enthusiasts are going to work with the smaller, more traditional LEDs. They’re the main topic of this post, so let’s talk about what an LED is and how LEDs work.
Since an LED is a type of diode, the reader may wish to review How Diodes Work – An Introduction for a quick recap on diodes and semiconductors.
The basic operation of a typical LED follows below.
When an LED is forward biased, electrons cross the pn junction from the n-type material to the p-type material. The electrons recombine with holes in the p-type material. LEDs work by emitting light when this recombination takes place because the electrons release photons (energy in the form of light). Figure 1 depicts this process.
Figure 1: how an LED works.
This release of photons is due to fact that the electrons in the conduction band have a higher energy level than the holes in the valance band. To shed this excess energy, they release a little bit of heat and photons of electromagnetic radiation in various frequencies once they recombine with the holes. The frequency determines the color of light the LED emits. Some LEDs, like the type in a typical remote control, emit infrared radiation (or IR) which is invisible to the human eye.
This process, known as electroluminescence, is the basis on how LEDs work.
Different impurities are added during the doping process to establish the color of light the LED will emit.
Here’s another fun fact: electroluminescence was first observed in 1907.
How LEDs are Made
LEDs are semiconductors. However, designers usually do not use silicon or germanium because they are mainly heat producing materials and are poor at producing light.
Compounds like gallium arsenide (GaAs), gallium arsenide phosphate (GaAsP), gallium nitride (GaN), and gallium phosphide (GaP) usually comprise many LEDs.
GaAs LEDs produce IR radiation, while GaAsP LEDs emit either red or yellow light. GaP devices emit either green or red light and GaN LEDs emit blue light. There are other materials that also find use in LED fabrication.
A plastic epoxy lens of the same color the device emits encloses the semiconductor chip that makes up the LED. The lens protects the semiconductor chip and also helps focus the light the LED emits so it is easier to see. This gives the typical bench-top LED its dome-like shape you’re familiar with.
At first, a combination of red, green, and blue LEDs were used to make white light. Later phosphor based white LEDs showed up on the scene. Some of you may have a tri-color LED with red, green, and blue chips in the same package. Depending on the intensity of each color, a variety of different colors including white can be made.
Newer white LEDs usually consist of a blue LED chip with a coating of some sort of luminescent phosphor material. This phosphor converts some of the blue light into red, orange, and yellow light. When these colors mix with the blue light from the LED chip, it appears to the human eye as though the device is emitting white light.
How to Use LEDs – the Practical Stuff
This introductory tutorial assumes the reader knows nothing about LEDs, so we’re going to start with the basics and go from there.
Figure 2 depicts the schematic symbol for an LED.
Figure 2: schematic symbol for an LED.
Notice also that the two ends in figure 2 have labels. The anode is the positive side and the cathode is the negative side of the LED. Notice the perpendicular line at the right tip of the triangle. That’s the cathode. Remember this because the two terminals are often not labeled in schematics.
To get the LED to light, the anode must be more positive than the cathode. To do so, we apply a voltage to the anode and tie the cathode to a lower voltage, like ground. This is how LEDs work.
When looking at an actual LED, we can see that one of the legs is shorter than the other, as figure 3 shows. This is the cathode of the LED.
Figure 3: the anode and cathode of an LED.
You will also notice a flat spot on the rim below the LED’s dome. This is another way to tell which terminal is the cathode if you cannot see the leads. For instance, if I need to look at an LED which has already been soldered to a board, I can tell which lead is the cathode by looking at this flat spot.
LEDs have a forward (a.k.a. threshold) voltage below which they will not operate. This is usually denoted VF on data sheets and technical documents. The forward threshold voltage depends on the color of the LED but is significantly higher than the 0.7 V a silicon diode needs to conduct, regardless of the LED’s color. Conversely, the reverse breakdown voltage of an LED is considerably less than that of a typical silicon diode (usually around 3 V – 10 V for an LED).
The redder the light emitting diode, the lower the forward voltage with IR LEDs coming in at the lowest with a forward voltage of about 1.2 V.
In fact, the higher the frequency of radiation the LED emits, the higher this threshold forward voltage is. Since IR “light” has a low frequency with red coming in second-last, these LEDs have the lowest threshold voltages. Blue and white LEDs have the highest (blue light is higher in frequency than IR or red light) which is typically about 3.5 V. As with all components, there is a variation which depends on current, temperature and other factors.
The nifty chart in figure 4 shows the typical forward voltages for various LED colors.
Figure 4: LED forward voltages for different colors. The chart shows the typical and max values.
Figure 5: the electromagnetic spectrum with an emphasis on visible light. We can see IR right below red on the frequency spectrum with blue and purple on the high end of the visible portion of the spectrum. All the colors combined make white light.
LED Circuits and Current
Light emitting diodes have a maximum current rating, so you’ll always need a series resistor when using LEDs in your circuits. More on this in a minute.
The brightness of an LED is typically linear with current. That is, the more current you push through it, the brighter the LED gets. Too much current and the LED releases its magic smoke. Or the excessive current will reduce the life span of the device if it isn’t enough to destroy it. Too little current and the LED doesn’t light at all or is very dim.
LEDs do have a finite lifespan, even if you use the right amount of current. It’s long though and something like 11+ years of continuous use.
Reducing the current will increase the lifespan. The relationship between current and LED lifespan is exponential, so if we reduce the current by 50% the lifespan can increase by something like a factor of 50. This works both ways, so as we already know, too much current greatly reduces LED life.
A 50% reduction in brightness – and therefore current (remember the current-brightness relationship is linear) – is actually not very noticeable to humans but it will extend the life of an LED significantly. It’ll also be helpful if your project runs on batteries and will extend their life.
Earlier, we said you always need to use a current limiting resistor with LEDs, but how do we pick that resistor?
Circuits exist with values ranging from 100 Ohms to 1k Ohms or more, but 220 – 240 Ohms are common values that are often acceptable.
Let’s take a closer look at a simple circuit with an LED.
Ex: Consider the simple circuit in figure 6. The LED may look blue, but your eyes deceive you – it is actually red. What value resistor do we need to safely operate the LED without sending it to a premature grave?
Figure 6: LED circuit. We need to find a good value for R.
It’s a red LED so we’re going to use a forward voltage drop of 1.5 V. We want to keep our LED comfortable, so even though the data sheet says the maximum current is 20 mA we’re going to run it at about 10 mA as it should still be sufficiently bright for our purposes.
The circuit has a 9 V source and the LED will drop 1.5 V, so the resistor will drop 9 V – 1.5 V = 7.5 V.
We know we want 10 mA, so we’ll use Ohm’s Law: 7.5 V / 0.010 A = 750 Ohms for our resistor.
We’re lucky because 750 Ohms is a standard value for resistors with 5% tolerance. If our calculation gives us a non-standard value like 703 Ohms, we just pick a value that’s close. In this case, we can choose between the 750 Ohm resistor or a 680 Ohm resistor. Either of these would make the current close enough to our desired value.
In general, the formula to find the correct resistor value in a circuit like this is:
Eq. 1 (VSOURCE – VF) / IDESIRED = R
Or the source voltage minus the LED’s forward voltage divided by the amount of current we desire gives us our resistor value.
This is basic circuit analysis 101. For a good review on basic circuit analysis see Simple Circuit Analysis Techniques You Should Know.
Here’s something to think about: if our source voltage were lower, would the resistor value need to be bigger, smaller, or the same for 10 mA to flow through the LED?
If for some reason you need to run an LED at a current rating at or above the max, you can pulse the LED. To the human eye, the LED will appear to be on all the time (assuming the pulse rate is high enough). But the LED will actually switch on and off, giving the LED die time to cool.
One should consult the data sheet for details, but, as an example, if it says the max DC current is 10 mA you may be able to feed it 40 mA using a pulse with a 25% duty cycle (on vs off time). Of course, the pulses need to be short enough to prevent overheating and degradation of the LED.
This is an introduction to using LEDs, so that’s all were going to say about running LEDs like this for now.
Using Multiple LEDs
Our circuit with one LED and a resistor is pretty straight forward, but what if we have more than one LED?
You can’t parallel multiple LEDs with a single resistor like we see in figure 7.
This is because the LED with the lower forward voltage will pull the voltage down to that level. Remember, the voltage in a parallel circuit is the same across all legs of the circuit. In this case, the red LED pulls the parallel combination down to 1.5 V, so the blue LED doesn’t light. Even if you have two LEDs of the same color this is still not a good idea and may not work because the LEDs may not be perfectly identical.
Figure 7: the blue LED in this circuit doesn’t light because the red one pulls the voltage at the node near the top down to 1.5 V. This is because LEDs act like zener diodes which are another special type of diode often used for voltage regulation.
There are a couple options to using multiple LEDs in a circuit correctly.
First, each LED can have its own series resistor. This is the easiest and most common way to do things.
If you are desperate to save resistors, you can also put multiple LEDs in series with a resistor as in figure 8. The downside is that your source voltage needs to be higher than the sum of all the LEDs’ forward voltages. This can be a problem when using more than a few LEDs. The upshot (other than saving a resistor or two) is that equal current will flow through all the LEDs since they’re in series.
Figure 8: multiple LEDs in series with a resistor. The source voltage needs to be higher than the LEDs’ combined forward voltage, which in this case is 5 V. This set up also makes sure equal current flows through each LED.
Other Uses of LEDs
Another common application of LEDs that may show up in your projects and gadgets you buy is the 7-segment display.
Think of an old alarm clock with red numbers. These numbers are usually 7-segment displays which are in turn made of small LEDs. The appropriate segments are lit according to the number that needs to be displayed. Figure 9 depicts a typical 7-segent display. Displays that are capable of showing more than one digit are also available in one convenient package. Of course, similar devices with more than 7 segments in different patterns are available for displaying letters and different characters.
Figure 9: a typical 7-segment display.
One thing that may surprise those new to electronics is that an LED can find use as a photo detector. They are not extremely sensitive and respond best to the color of light they’re designed to emit but they’re cheap and can be used this way in certain applications.
LEDs also show up in optoisolators. These devices are good for electrically isolating different parts of circuits. Think of an optoisolator as a relay that uses light instead of a mechanical contact on the inside. Figure 10 shows such a device.
Figure 10: an optoisolator (a) and schematic representation of its insides (b). Terminals 3 and 4 connect to a phototransistor which has a light-sensitive base.
How LEDs Work: Summary & Recap
It’s time to try something new. All the skimmers will love this (though you should read the whole article ?). Below is a quick summary and recap of what we talked about.
- An LED or light emitting diode is a semiconductor device that emits light.
- LED lighting is starting to replace incandescent, fluorescent and other forms of lighting in homes and other buildings.
- The color of light the LED emits depends on the material the LED is made of.
- The cathode of an LED is the negative side and the anode is the positive side. To identify the cathode, look for the shorter leg and/or the flat spot on the epoxy case right below the dome. On a schematic, the cathode is identified by the perpendicular line on the tip of the triangle, just like a regular diode schematic symbol.
- IR LEDs have the lowest forward (or threshold) voltage with red coming in second lowest. Blue and white LEDs have the highest. The forward voltages typically range from 1.2 V on the low end to 3.5 V – 4 V on the high end.
- You NEED to use a series resistor with an LED to limit the current so it doesn’t burn out prematurely. The resistor’s value depends on the LED but it’s usually not hard to calculate. For details, see the example above.
- LEDs can often be pulsed which may allow you to use a higher current than what the data sheet recommends.
- It is not a good idea to put LEDs in parallel unless they each have their own series resistor.
- Several LEDs can be wired in series in with one resistor but the supply voltage needs to be high enough to overcome the sum of all the LED’s forward voltages plus a little more for the resistor drop.
- LEDs find use in 7-segment displays, optoisolators, and other things. An LED can make a cheap photodetector though it’s not extremely sensitive and responds best to the color of light the LED was designed to emit.
Shedding Some Light on How LEDs Work
Now that we’ve answered the questions what is an LED? and how do LEDs work?
It’s time to go forth and light the way…
…Ok, I just had to put that bad pun in there.
On a more serious tip, we’ve only scratched the surface. Just like all things in the world of electronics there is a lot more to say about LEDs. Many applications exist for them. There are other, newer types of LEDs like organic light emitting diodes (OLEDs) which can be used to make flexible displays. There’s a lot more behind the workings of even a typical bench top LED that we didn’t discuss in this introductory tutorial. And when it comes to diodes in general, there’s a whole myriad of types and applications and a ton to say about each.
For now though, we have a good starting point on LEDs, especially for those new to electronics.
Drop a comment and tell us about your latest super-cool projects or experiments involving LEDs. I’m sure we’d all love to hear about it!