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 -.
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).
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.)
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 color||Voltage drop|
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.
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!
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?
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)