How to wire an LED, Tutorial and Calculator
This tutorial article describes how to use LEDs in electronics circuits, and how to calculate the current limiting resistor, and relates other useful hints on using LEDs.
Small incandescent lights, such as as flashlight bulbs may be directly connected to a voltage source such as a battery with out causing damage to the bulb, this is not the case with LEDs.
LEDs are current controlled devices, meaning that the intensity of their light output is proportional to the current passing through them. They also have a maximum current rating which may not be exceeded, otherwise they can be damaged. To limit the amount of current through an LED a current limiting resistor is typically inserted in series with it. The question then arises as to what the value of this resistor should be.
The calculations are simple and based on ohms law. But first it should be noted that LEDs are rated with a nominal forward voltage drop. If an LED is connect up such that it is emitting light, a multimeter can be used to measure a voltage drop across the LED. This voltage drop usually varies from 1.5V up to 5V, depending on the power output of the LED, and also the color. Low power LEDs tend to have low voltage drops, and high power LEDs have the higher voltage drops. Likewise blue or white LEDs tend have higher voltage drops, than red LEDs.
Another important reason we need to know the forward voltage drop is that it tells us the voltage we need to use in order to drive the LED. For example a 1.5V battery will not be able to drive an LED with a 2.5V voltage drop. The LED will simply not emit light.
Most LED datasheets will tell you the forward voltage drop. If a datasheet is not available it can be measured, as already described. Given the voltage of the source, the forward voltage drop, the maximum LED current, it is easy to compute the resistor based on Ohms Law:
LED Resistor Calculator:
Determining LED Polarity:
LEDs have a positive and negative terminal, also know as the anode and cathode. The cathode should be connected towards the ground or negative side of the driving voltage source, and the anode toward the positive side. LEDs usually have their cathode marked in some manner. On round through hole LEDs the cathode is usually denoted with a flat indentation on it's side, and the anode lead is often the longer lead.
It's usually harder to tell with smaller surface mount (SMT) LEDs. The best way to determine the polarity, is to use a multimeter, set to the diode/continuity setting. In most cases the multimeter will inject enough of a current into the LED to slightly light it, the black lead (or common) on the multimeter designates the cathode, and the red lead the anode.