Driving LEDs – things everyone needs to know

Light Emitting Diodes more frequently known as LEDs are semiconductor devices that convert electricity into light. It was hard to find a gadget or other device that doesn’t use LEDs. They are cheap; they are simple to use, and they are small. LEDs can emit different light color depending on different chemical compound material in a semiconductor.


LED symbol

One and universal LED symbol is as standard diodes but with couple arrows indicating that it emits light:


There can be few differences between different standards – some require unfilled diode symbol, other require filling. You can also find LEDs or other semiconductors that have a circle around them. Probably simple unfilled and without circle version is the best choice as it requires less ink and time to waste in drawing it.

Recognizing LED pins

It is easy with standard LEDs – they have unique shape that allows detecting pins easily.


As you can see cathode side has a flat cut on fiber glass. Also cathode pin as shorter comparing to the anode, but don’t rely on it- especially if the diode is already used somewhere. But this is with standard through-hole diodes. We know that there are other types – so be sure to check pins in a datasheet or simply test before soldering.

Selecting a resistor for the LED

First of all – don’t drive any LED without a resistor. The resistor is needed to limit electrical current that flows through the LED. Without it, diode will fry – especially in higher voltages. So always keep in mind general rule – don’t drive semiconductor without a resistor. So what resistor do you need?

For indicating purposes, there is no big deal. Usually, 0,5k or 1k resistor in series works just perfect for standard voltages like 5V. But what if you want to sure and drive LED optimally with any voltage… You have to do some math – nothing more than Ohm’s law. If you will look at diodes datasheet, you will find that LED needs about 10 to 20mA of current and it has a forward voltage drop about 1,8V. To be more specific voltage drop depends on the wavelength emitted. Starting from Infrared voltage drop is about 1,5V while Ultra Blue reaches 3,8V drop. And current usually depends on LED power can be hundreds of milliamps or even several amps.


OK, let us take a standard 5mm diode (20mA and 2V) and find right resistor for it if the supply voltage is 5V. If you look in an any LED datasheet, you will see following chart indicating relation between LEDs forward current and forward voltage drop. This is the main characteristics in determining LED voltage drop under the desired current. And as you see the brightness of LED directly depends on the current flowing through it.

So let’s find a working point keeping in mind not to exceed maximum allowed current which is 20mA in our case, and find forward voltage drop which is equal to 20. So now let’s calculate resistor value.


It’s easy. First of all, subtract LED drop voltage from supply voltage:


This means that 3V has to drop on the resistor. Now by using simple Ohms law, we can easily calculate resistor value:


Lets put these calculations in a straightforward formula:


Here you can see that VS – stands for Supply voltage; VD – Diode forward voltage drop; ID – forward diode current;

This way we can calculate resistor value at any circumstances. Of course, be sure not to drive LED at maximum current for a long time. Large currents shorten its life. Leave some reserve by selecting a more significant resistor value. You can always double resistor value like up to standard 330Ohm. Your eye won’t see the difference in intensity change, but this will be much healthier to LED. More about LEDs here.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.