What are LEDs?LEDs (light emitting diodes) are semiconductor devices that convert electricity into light. Like almost all semiconductors (diodes, transistors, computer chips etc) they use DC current to operate. However, unlike other light sources, they are current driven, not voltage driven.
This is what confuses most people. When you buy a lightbulb, it is rated for a specific voltage - you apply that voltage, and it lights up, drawing only the current it needs.
With LEDs, it works the other way around. You must apply the rated current, and the LED will set the voltage across itself - usually between 1.8 and 4 volts. For small changes in the voltage across the LED, you get huge changes in current flowing through it.
This is why, if you place a LED directly across a voltage source like a battery or a power supply, it will draw a huge amount of current and will usually die pretty much instantly. The only exception is where the power supply itself has quite a bit of internal resistance which limits the current through the circuit, such as when LEDs are connected directly across button batteries.
How do you drive LEDs?The simplest way to drive a LED is using a resistor to limit the current. Resistors are simple and cheap (about 5 cents each is the most you should pay) and work fine when there is a reasonably large difference between the supply voltage and the rated LED voltage, or when the supply voltage is stable, such as when using a regulated plugpack. For instance, when running a single 20mA (0.02 amp) rated LED from a 12 volt battery, often a 470 ohm resistor is used. However, to make such a circuit more efficient, you would normally use at least 3 LEDs in series, so that most of the power is consumed by the LEDs rather than the resistor.
A better method is to use a constant current circuit. The simplest type use just 3 or 4 components and will regulate the current through the LED quite well, regardless of supply voltage variations. For examples of circuits, just do a web search on 'simple constant current' or similar.
You can also use a switchmode driver to run your LEDs. These are generally the most efficient method, but are more expensive and can make electrical noise due to their high switching frequencies. You can buy these both in kit form or pre-built, and there are even units designed to allow you to run LEDs straight from mains power.
LED specsI get a lot of questions asking about the Vf (forward voltage drop) and current ratings for my LEDs, but that fact is that most LEDs of a particular colour fall into the same range. Almost all 1.6, 1.8, 3, 5, 8 and 12mm LEDs are designed for a maximum continuous current of 20mA, so if a LED doesn't have a current specification, you can assume 20mA as a working value. Vf values are very similar for LEDs of the same colour, typical values are:
White and warm white: 3.2 to 3.8 volts
Blue (up to 480nm or so): 3.2 to 3.8 volts
Green and aqua (up to 530nm): 3.0 to 3.8 volts
Green and yellow-green (up to 570nm or so): 2 to 2.4 volts
Red, amber and yellow (up to 660nm or so): 1.8 to 2.4 volts
Infrared: 1.4 to 2 volts
UV: 3.2 to 4 volts
Pinks, purples and other LEDs using phosphors: same as blue - they are based on blue LEDs
These values will vary between manufacturers, LED of different part number, and even between LEDs from the same batch, so if you want accurate figures you should always measure the LEDs you are working with at the time.
How long do LEDs last?This is a bit of a tricky one, as LED lifetime is often exaggerated on many websites. The often quoted figure is 100,000 hours, but many LEDs, especially the white and shorter wavelength ones such as blue, green and especially UV, have a shorter lifetime, sometimes only a few hundred hours. This is true of almost all manufacturers, but more so of the cheaper LEDs from China.
However, a lot depends on how the LEDs are treated, including whether they are run at rated current or higher (or lower), how well they are heatsinked, whether they are exposed to direct sunlight etc. Generally, for most of the shorter wavelength LEDs you can expect to get 1000 to 10,000 hours of life. For longer wavelengths, such as amber and red, you should get the full 100,000 hours or more.
In most cases, when they are driven correctly, LEDs don't just die. They usually slowly degrade in colour and light output until it becomes noticable. When this degradation reduces light output by 25%, the LEDs are considered to have reached the end of their useful life (some manufacturers use 50% to get a longer lifetime figure). Of course, at 25% degradation your LEDs might still be fine for their intended purpose, so you should just use them until they are no longer bright enough. In some cases, the LEDs may well outlive their owners!
Can LEDs damage your eyes?For most of the LEDs on this site, the answer is yes, if you look directly at them at close range for any reasonable period of time. My LEDs are intensly bright, and will certainly cause temporary blindness with direct close-range exposure.
UV LEDs are particulary dangerous as they generally don't appear that bright, but still put out considerable light energy.
The simple rule is, don't look directly at any high-brightness LED for more than a second at a time, and don't make a habit of it.
A note on mcd valuesThere is a huge amount of confusion regarding mcd values and what this actually means. Mcd stands for millicandela, so 1000mcd is one candela. The candela is an intensity rating, and must be used in conjunction with a beam angle, otherwise the figure is pretty meaningless. As an example, you might have 2 LEDs, both with identical LED die inside, yet one has a 20 degree angle and the other 40 degrees. The 20 degree LED will have a higher mcd rating than the 40 degree LED, even though they have identical LED chips. The total light output from both LEDs is the same, just the apparent brightness when you look directly down the barrel will be different.
The total light output of a LED is usually given in Lumens. If you are using LEDs for general lighting, this is the important figure as it specifies how much total light you will get.
There is now an amazing amount of misinfomation and just blatantly false specifications being bandied about by LED resellers and manufacturers alike. For example, a quick search on ebay will find "40,000 mcd blue 40 degree 20mA LEDs" and "125,000 mcd 20 degree 20mA white LEDs". These figures are absolute rubbish, the light output of such devices will be more like 4,000mcd and 12,000mcd. I have tested such devices, and the figures are stupidly overinflated. I suspect that the people who put these up on ebay etc have no idea what the ratings mean, they have just gotten into a specifications war with rival manufacturers, so anything goes, so long as it sells LEDs...
Unfortunately, this practise of overstating and falsifying specs has become so common now that you really can't believe any ratings being given for Chinese sourced LEDs. So, be warned if you think you have found some amazing LED bargains on ebay and similar site - you will be disappointed...
For some useful information on light source ratings, see this document.