Table of contents
What is an LED? How the LED works Polarity Current and resistors Forward voltage Types of LEDTable of contents
Pretty much everywhere you look, you will see some kind of LED (Light emitting diode) in use. They come in many colors, shapes and sizes. One of the first Arduino projects being tought is usually making a LED blink.
What is an LED?
An LED is an electronics component that emits light when it is powered. Since it is a diode, and diodes only let the current flow in ode direction, an LED must be wired correctly for it to work.
When connecting an LED it is important to be able to distinguish which lead is the anode (positive) and which is the cathode (negative). To make it easier to identify the leads, all LEDs are manufactured with two physical properties. The first one is that LEDs have one lead that is longer than the other. This longer lead is the anode (+), and the shorter one is the cathode. The second feature is a small flat notch on the side of the LED. The lead that is closer to the notch is always the cathode. This is important to remember since the leads may have been clipped.

How the LED works
if you take a closer look at an LED, you will see it's made of everal parts. The case or housing of the LED is usually made from epoxy or plastic material. This makes it more durable to fall or similar damage. The inside of the LED consists of two main parts, post and anvil. The postis the positive side of the LED, the anode side and the anvil is the negative side, the cathode. A die is inside a little divot on the anvil, and the bond wire leaps from anvil to post, connecting the two.
For the light to be emitted, the diode has to be made from special material. The semiconductor die, the thing that makes LED emit light, is made from gallium arsenide (GaAs), gallium phosphide (GaP), gallium arsenide phosphide (GaAsP), silicon carbide (SiC), gallium indium nitride (GaInN), aluminum gallium indium phosphide (AlGaInP), and similar chemical compounds. The color of the LED will depend on the compound used.
To understand how to work with LEDs, we have to know some things about them.
Polarity
In electronics, polarity indicates the symmetry of a component, meaning that it will matter how you connect it if it's polarized. Non-polarized components can be connected either way and they will work properly (e.g. resistors). As mentioned, a diode will allow the current to flow in only one direction. Thus, an LED is polarized and will only emit light if it's connected correctly. For it to work properly, the current must flow from anode to cathode. he anode must be connected to the positive end and the cathode to the negative. If it’s the other way around, the LED will remain off. It won’t break, it just won’t work, and it might stop the whole circuit. On a schematic diagram, the anode should be the line coming to the broad side of the triangle.
Current and resistors
The light emitted will depend on the current the LED draws. The more light it emmits, the more power it uses, thus the more batteries it drains. Diodes in general do not limit current and will destroy themself if they consume too much of it. Resistors are used to prevent this from happening. They will restrict the electrons' flow in a circuit and prevent the LED from drawing to much power. For most LEDs, using 330ohm resistors will do just fine, but keep in mind that the stronger the resistor is used, the less brighter LED will be.
Forward voltage
A term you'll likely see often when working with LEDs is the forward voltage. It is a number that will help you with the voltage your circuit needs to suppy to LEDs. This number becomes especially important if you have more than one LED connected to one power source. If you provide 5V to your to your circuit, your components put together shouldn't exceed that number.
Here's a list of the most common forward voltages for LEDs depending on the color:
- Red: 1.6V
- Orange: 2V
- Yellow: 2.1V
- Green: 1.9V
- Blue: 2.4V
- Ultraviolet: 3V
- Clear white: 3.5V
Types of LED
We've talked about regular, one-color, simple LEDs thus far. But LEDs have come much further than that and there are a bunch of types today. Here are some of the LED diodes we find particularly interesting to work with:
Bi-color and tri-color
Bi-color and tri-color LEDs will light up in a color depending on the current flow direction. Regular bi-color LED has two wires that are connected to the back, anode to cathode. The color of the light will depend on the anode which is provided with positive voltage.

Tri-color LEDs are a bit different. They have three wires, one for each anode and the middle one for the cathode. Like with the bi-color LED, depending on the anode provided with a positive voltage, that color will light up, but here is a catch, because the two anodes are wired separately, you can apply a positive voltage to both wires. If you do, the LED will light up in a third color, which is a mixture of both.

RGB LED
RGB is short for red, green, blue. Combining those colors, RGB LED can produce almost any color, but it struggles with shades of pink and brown. With legs for each of the three colors, an RGB LED will have a fourth leg, for anode or cathode.

Depending on whether you have anode or cathode RGB LED, you’ll supply power differently. If you have an anode one, you’ll connect the anode wire on the power supply to the positive terminal. A low signal will need to be applied to red, green, and blue wires. However, if you have a cathode one, you’ll connect the cathode wire on the power supply to the negative terminal. A high signal will need to be applied to the red, green, and blue wires.


Infrared LED
An infrared LED, or IR LED, looks like a normal LED at first and can be hard to distinguish. The main difference is that it emits light in the infrared range. This is outside of the normal visible spectrum so you won’t see this type of LED emit light. They allow for the cheap production of infrared light and enable wireless communication between devices and sensors. That is why they are common in machine-to-machine environments, as well as Internet of Things applications.
You’ve likely seen this type of LED in real use. A TV remote control is a prime example of an infrared LED. Some older cell phones that still used physical buttons had IR LEDs to transfer data to other devices.
SMD LED
When you look at an Arduino board, you will notice a few SMDs (surface-mount-devices). Like other components, LEDs can also be surface mounted. The RX and TX LEDs on Arduino are, as you might have guessed, examples of SMD LEDs. These types of LEDs don’t require any wiring and are soldered directly onto a circuit board.
OLED
OLED stands for organic light-emitting diode. Unlike other LEDs we’ve talked about so far, OLED is a conductive sheet of organic compounds that emits light when an electric current passes through. This layer, grouped with some others, is placed between two electrodes. The “organic” compound means that it contains carbon-hydrogen bonds, and doesn’t refer to materials harvested from nature.