LEDs are mostly used for two things: illumination and indication. These are technical words but are good to understand because if you want an LED for one thing and you buy the wrong thing you'll be pretty bummed.

Headlights should be bright!

Illumination means to "shine light onto something" - like a flashlight or headlights. You want your headlights to be bright as heck.

Brake lights should be bright enough to see, but don't need to light up the road!

Indication mean to "point something out" - like a turn signal or brake lights on a car. You don't want your car's turn signal to blind people!

If you get the wrong type you could end up with a DIY flashlight that is dim, or a control panel that burns people's eyes!

Diffused LEDs are really good at indication, they look soft and uniform and you can see them well from any angle.

Clear LEDs are really good at illumination, the light is direct and powerful - but you can't see them well from an angle because the light is only going forward.

Let's verify this. On this breadboard I've connected two LEDs, one Red Diffused and one Clear Bright Blue LED. Both have the same resistor (which means they're basically using the same amount of power). You should follow along, wiring up one of each. Use a 1.0K or so resistor from the cathode (shorter pin) to Ground and connect the anode (longer pin) to +5V.

When lit, you will see the the diffused LED is softly lit, but the blue LED is harsh and ultra bright.
If you look from the side, you'll see the diffused LED looks pretty much the same. The blue LED however is not nearly as bright from the side, if you look carefully you can sort of see how there is a thin 'cone' of bright light from the cup that holds the piece of silicon off the lens.
One way to tell how bright your LED is before you buy it is to look for the milli-candela rating, sometimes shortened to mcd. Its a little tough to explain how bright something is with text or even photos (since in person it looks different). What we're going to do is instead give you some rough numbers for how bright LEDs will seem to be for most people.
MilliCandela Brightness 10 "Dim" indicator, about the brightness of a tiny diffused indicator on a cheap electronic toy.

Probably not visible in daylight.  200 "Somewhat dim" indicator, about the brightness of the red diffused LED in the example above. Not visible in bright daylight.

You can easily look at these 500 "Kinda bright". About the brightness of the red diffused LED if you powered it up all the way (we'll do that later).

You can look at these if you're more than a few inches away, otherwise you'll see spots. 1,000 "Fairly bright", about the brightness of the clear LED in the previous example, maybe about the brightness of those cheap LED keychain flashlights.

You can look at these if you're more than a few inches away, otherwise you'll see spots. 5,000 "Bright!" - these are as bright as ultra-bright 5mm LEDs get. If you powered the clear LED all the way (we'll do that later). Expensive 5mm LED flashlights, when new, are about this bright.

Looking directly at this is not pleasant. 20,000 "Really Bright" - 5mm LEDs cant get this bright, but if you get the "1 Watt" LEDs, they'll easily give you 20 candela of light. These are good for bicycle headlamps, big bright flashlights, and such.

Don't look straight at these, it'll hurt your eyes.
So a ultra-bright LED may advertise itself as "5000 millicandela!") - that's the maximum brightness you'll get out of it. In general, the brighter the LED the more expensive it is.

Changing the brightness with resistors

OK so now that we know about clear and diffused LEDs and a little about brightness. Now is a good time to let you know that if you bought an Arduino Starter Pack or ARDX from us, the diffused green or red LEDs are about 500mcd and the bright clear LEDs are about 5000mcd. That's a little approximate, since we sometimes get LEDs from different factories.

Lets go back to our basic LED setup: one LED and one resistor connected from 5V to ground. This time we will duplicate it so that we have three LEDs except that each resistor is going to be different. LED #1 will have a 100 ohm resistor (Brown Black Brown), LED #2 will have 1.0K (Brown Black Red) and LED #3 will use a 10K (Brown Black Orange).

Power up the Arduino and examine how each LED is lit differently. Time for a quick quiz!
Which LED is brightest (what is the resistor)?
The one with the 100 ohm resistor.
Which LED is dimmest (what is the resistor)?
The one with the 10K resistor.
If we had an LED with a resistor that was 5K ohms, which LED would it be brighter than? Which LED would it be dimmer than?
With a 5K resistor, it would be brighter than the 10K resistor-LED, but dimmer than the 1K resistor-LED.
As you have seen with this experiment, the resistor we use with the LED makes a difference in how bright it is. The larger the resistor (more resistance) the dimmer the LED. A small resistor (less resistance) makes for a brighter LED.

Changing the brightness with voltage

Having learned a little about how to use resistors to change the brightness of an LED, we will now try experiment #2. This time we will use only 1.0K resistors but connect the anodes to different voltages. One LED anode will go to 3.3 volts another will go to 5.0 volts and the third will go to Vin (which, if you have one of our starter packs, goes to a 9V wall adapter, so its 9.0 volts
Power up the Arduino and examine how each LED is lit differently. Time for a quick quiz!
Which LED is brightest (what is the voltage)?
The one connected to Vin (9 volts).
Which LED is dimmest (what is the voltage)?
The one connected to 3.3v.
If we had an LED with a 1.0K resistor connected to a 4.2v supply, which LED would it be brighter than? Which LED would it be dimmer than?
Connected to 4v, it would be brighter than the 3.3v LED and dimmer than 5v.
As you have seen with this experiment, the voltage we use to connect to the LED makes a difference in how bright it is. The higher the voltage the brighter the LED. A lower voltage will lead to dimmer LEDs.

Max brightness!?

Lets do another quick experiement. Lets say we had a magical resistor with a knob, that we could change the resistance of from 0 resistance (like a piece of wire) to infinite resistance (something that does not conduct, like rubber).
We connect our LED to the resistor, as we turn it from infinite to to zero, what happens?
As the resistor gets smaller, from infinity to zero, the LED will get brighter and brighter.
Likewise, lets say we have a machine that can change the output voltage, from 0 volts to infinite volts.
We connect our LED through a 1K resistor, as we adjust the voltage from 0 volts to infinite volts, what happens?
As the voltages goes higher and higher, the LED will get brighter.

It would seem, then, that if we want a really really bright LED, we should just use a zero ohm resistor and connect to the highest voltage we can, right? And who wouldn't want an LED thats as bright as possible?

Lets build an LED circuit with a zero ohm resistor (also known as a wire) to Vin so be sure to plug in the Arduino into the wall with a plug-pack/wall-wart. (For somewhat detailed reasons we'll cover in another tutorial, using the 3.3V or 5V power pins won't do what we want, we need to use Vin).

Warning! Spoiler! This following experiment will probably destroy your LED, so don't use one of the nice clear LEDs. If you happen to have an LED sitting around that's not being used this is a good time to use it. If you aren't ready to sacrifice an LED, just watch the video!
Plug the LED into the arduino so that the long pin goes toVin and the short pin goes to ground.
What happened?
The LED blinked for a split second and then went dark.
The LED is now permanently damaged. The lesson? There are limits to how much voltage and resistance, if we go over the limits, the LED will die!

This guide was first published on Feb 11, 2013. It was last updated on Feb 11, 2013.

This page (What are LEDs used for?) was last updated on Feb 11, 2013.

Text editor powered by tinymce.