Costume LED basics

Want to add lights to your costume? This article covers the basics of how LEDs work. Later this month, I'll add more articles showing step by step how to design and build simple cosplay LED projects.

If you'd like to try these yourself, you'll need:

  • A 9-volt battery (preferably a brand-new one - the voltage goes down as you use them)
  • Metal alligator clips with wires
  • An assortment of resistors (eBay has huge packages for cheap; get ½ watt, which is the most common wattage)
  • LEDs (again, pennies apiece on eBay)

Take a look at a battery, and you'll typically find a + and a - label. On the 9-volt battery we'll be using for this demonstration, the two metal snap parts on top (the terminals) will be labelled. On a cylindrical battery like an AA1, the labels will be at opposite ends of the battery – the nubby end is + and the flat end is -.

Batteries usually have the + terminal marked

You've probably heard about grounding electrical devices - for example, by connecting a jumper cable to a car's frame to do a jumpstart. With small electronics like the LEDs we'll be looking at, ground refers to the - side of the battery. You don't need to connect it anywhere else.

Connecting the + to the - forms a circuit - a pathway for electrons. A circuit can – in fact, should – go through whatever you want to power (in this case, an LED).

If you connect the + and - terminals directly to each other without anything in between – in other words, if you short circuit the battery – the battery will overheat. Some batteries will explode when they're short-circuited. So don't do that.

The + side of an electrical device is the cathode and the - side is the anode. To keep this article light on jargon, though, I'll be sticking with + and -.

Batteries aren't the only things that have a + and a - side. LEDs do, too. One leg of an LED is typically longer than the other. The long leg is +, and the short leg is -. Larger LEDs often have a flat edge on the - side, though smaller ones might not.

When you put an LED in your circuit, you'll connect the + side in the + direction on your circuit, and the - in the - direction. I say "direction" because your LED might not be wired directly to your battery! In more advanced circuits, you might have other components in between that make your LED flash or pulse.

So let's hook up an LED! But let's do it wrong. Just for fun. What if we hook up the LED backwards, with its - end connected to the battery's +, and vice-versa?

We get …

… nothing. LEDs only let current flow in one direction2. Put them in backwards, and nothing happens – at least at the low voltages we get from an alkaline battery. (If the current was 20 volts or higher, that might be a different story.)

If your circuit seems to be constructed correctly, but your LEDs don't light, it's possible that they're connected backwards. (I once adjusted a circuit layout so it would fit better on a perfboard and forgot to reverse the directions of all three LEDs. By the time I realized what the problem was, they were all soldered in place.) Keep this in mind when you're installing and troubleshooting LEDs!

Not all electronic components can be safely connected backwards. Microchips can burn out, and electrolytic capacitors can EXPLODE. Check your wiring before you turn the power on!

On the bright side, many components – such as resistors and ceramic capacitors – can be connected either way.

Okay, let's light our LED. We hook it up correctly, + to + and - to -, and …

… the LED flashes and dies. It doesn't just turn off – it's burned out and ruined. (It happens so fast that shooting a video would be a waste of time.) What went wrong?

An LED works with a specific range of voltages. Too little, and it won't turn on at all; too much, and it burns out. In between, you get a range of brightness

The exact voltages typically depend on the color of the LED. Some LEDs come with a data sheet that tells you what voltage they need, but if they don't include one, here's a general chart you can use.

LED colorVoltage drop
Red 1.8
Orange 1.8
Yellow 1.8
Green 3.2
Blue 3.2
White 3.2
If you have a multimeter, you can measure the actual voltage drop for your LEDs instead of using a typical color value.

Because LED brightness depends on voltage, you might find that your costume LEDs are dimmer by the end of the day than they were when you turned them on. Alkaline (non-rechargeable) batteries drop in voltage as they run down, so LEDs connected to them will get dimmer. Rechargeable batteries have a steadier voltage, so you might consider using rechargeables instead.

So our yellow LED in the picture wants 1.8 volts, but we're giving it 9 – far more than it can take. We need to limit the voltage.

Sometimes you don't know what color your LEDs are (when these two light up, one's red and one's green — and they came in the same baggie). There's nothing wrong with using a larger resistor than you need, so you can try unknown LEDs with a 1K resistor and a six-volt power supply. They won't be bright, but you'll be able to see what color they are and calculate a more precise value for the resistor in your final project.

You might be wondering "Why not just use a smaller battery?" There are two reasons. First, it can be inconvenient to find batteries that give those specific voltages3. Second, even if a specialized battery exists, will you be able to find one during an out-of-town convention? It's more convenient to use nine-volt and AA batteries for costuming.

As you probably guessed if you read the parts list at the top, we're going to add a resistor to limit the voltage to the LED. Resistance is measured in ohms, and you can calculate the size of the resistor you need using Ohm's Law.

While Ohm's Law is worth knowing, you don't need it to get started wiring up LEDs – you can use an online calculator. (This is especially convenient because resistors don't come in every possible value you might want, and you'll need to go up to the next largest value. That's tricky when you're starting out and don't know what the next largest value is.) There are lots of LED calculators online; I like the ones at linear1.org.

Our source voltage from the battery is 9, and our diode forward voltage for a yellow LED is 1.8. Most small LEDs have a forward current of 20mA.

The calculator says we want a 390 ohm resistor. When we add one between the + terminal of the battery and the + leg of the LED, our LED lights up!

I like to use red wires for connections to power, black wires for connections to ground, and other colors for everything else. There's nothing special about the wires; the colors just help me keep track of what connects where.

The circuit still works just fine. You can connect the resistor on either side of the LED. (This is handy when finding room for all your components on your perf board.)

Let's try one last experiment. What do you think will happen if we add a second LED, with its own resistor, to the battery?

Poker chip optional

You might have guessed that both LEDs would dim, but in fact, they both shine brightly. The battery delivers 9 volts to everything connected to it, whether that's one component or several. (With two LEDs, the battery will run down twice as fast, though.)

If the battery can supply nine volts to multiple components, what's to stop us from adding a hundred or a thousand LEDs?

In addition to needing a certain voltage, each LED consumes a certain amount of current. That's the 20mA (or "milliamperes") we entered in the LED calculator. A typical 9-volt battery provides 550 milliamp hours, so it can power 550 milliamps for an hour, or 50 mA for eleven hours, etc.

The next few posts will cover a project with multiple LEDs, and your options for lighting them all. See you soon!

(I got the idea to burn out LEDs as a demonstration from Charles Platt's Make: Electronics, though I've taken it in a slightly different direction. I recommend the book, not least because Platt is fond of destroying cheap parts to get you over your fear of destroying cheap parts. It is a wonderfully freeing feeling.)

1. It's pronounced "double A", but "a AA battery" still looks wrong to me. (back to article)

2. LED stands for "light-emitting diode". Diodes only allow current to flow in one direction (within limits). (back to article)

3. There are some other reasons to use a resistor with even a "right-size" battery, but they start getting technical . (back to article)

Written on April 6, 2016