A red LED powered by a coin battery next to props I wired LED eyes for.

LEDs 101: How to Wire & Power LED Circuits to Light Up Your Creations

Imagine stepping into a world where your creations come to life with a simple flicker of light. That’s the magic of LEDs – a painter’s palette for the modern tinkerer. From the heartwarming twinkle in a homemade robot’s eyes to the eerie glow that haunts your favorite Halloween prop, these tiny lights are the secret to making your projects truly shine. I know the thought of soldering wires and building LED circuits can send shivers down a beginner’s spine – it did for me too, once! But this beginner-friendly guide will illuminate the path from selecting the perfect LEDs for your project to the moment you power them on and watch them light up.

We’ll delve into the nuances of choosing the right color, brightness, and type for your specific needs, ensuring your creations captivate and impress. Next, we’ll guide you through the process of safely powering your LEDs, an often-overlooked but crucial step in bringing your project to life. Finally, we’ll walk you through the practical aspects of wiring your LEDs, complete with a step-by-step approach to calculating the correct resistor value to protect your luminous investment. By the end of this journey, you’ll be well on your way to mastering the art of LED circuitry, ready to light up your imagination!

In this LED Wiring Tutorial:

How to Choose LEDs for your Prop or Robot

There are several types of LEDs that come in different sizes, styles and colors. For this LED wiring tutorial, we’re going to be focusing on standard two-lead LEDs because they’re inexpensive, easy to get started with and no matter what color, size or style you choose, you wire them exactly the same way.

There are a variety of LED characteristics to consider when trying to create the right lighting effect that enhances the style and personality of your project. Different LED sizes, casings and colors can give the same project drastically different moods. Some LEDs can even produce animations like flashing, flickering or color changes without the need for programming or extra components and circuitry!

LED Sizes

Standard LEDs come in a range of sizes but the most common are 3mm, 5mm, and 10mm. The 5mm LED is the most common size for hobbyist projects and DIY crafts, offering a good balance between brightness and power consumption.

3mm and 5mm LEDs in red, blue, green and white ready to be wired in an LED circuit.
A few 5mm and 3mm LEDs from my kit of assorted colors.

The 3mm LEDs are compact and great for small props and lighted control panels, dashboards and when you need a small indicator light for your circuit. But because of their size, they don’t put out as much light as larger diodes.

Kit of LEDs in assorted colors for wiring LED circuits.
Kit of 3mm and 5mm LEDs in assorted colors.

If you’re just getting started with LEDs, the 5mm size is probably the one you’ll use the most so I recommend picking up a kit of 5mm LEDs that comes in an assortment of colors. Many of them have both the 3mm and 5mm sizes so it will last you through several projects.

The larger 10mm LEDs spreads the light out even further because of the chunkier casing. They’re a great choice for larger props, robots, signs, displays and decorations where you need a more prominent lighting feature. They’re not necessarily brighter than the 5mm LEDs because most are just a 5mm with a larger casing on it.

And speaking of LED casings…

Diffuse vs. Clear LED Casing

Covering the actual LED chip, is an outer dome-shaped epoxy resin casing and the makeup of this case can affect how the LED glows when lit.

Diffused LEDs have a colored, translucent case that diffuses the light, softening the intensity and spreading it over a wider angle. These are the LEDs you normally see in store-bought Halloween props and decorations.

Then, as the name suggests, clear LEDs have a clear, colorless case that allows the light to pass through directly, resulting in a more focused and intense beam of colored light that comes out of the top of the dome. The light is not as intense when viewing the LED from the sides than it is when viewing it head on from the top.

One clear case red LED and one diffuse case red LED for wiring LED circuits.

Both of these LEDs are red. The one with the clear casing will glow more intensely from the top whereas the LED with the diffuse casing will spread the light .

LED Colors

Standard LEDs are available in a wide range of colors, the most common being red, green, blue, yellow and white. Most LED assortment kits will contain these colors.

5mm LEDs in 5 assorted colors including red, blue, yellow, green and white for wiring LED circuits.

But you can also find them in orange, pink, purple, cyan and many more shades! These more unique colors will tend to have clear casings rather than diffuse ones. You can either buy just the color you want or look for a 10-color LED kit which will give you more choices over the more common 5-color kits.

Some LEDs are even designed to produce a color-changing effect by incorporating multiple color diodes that can blend colors internally and create different hues.

Speaking of which…

Animated / Special Effects LEDs

In addition to the traditional solid-color, constant-light LEDs, there are a variety of special effects LEDs that can enhance the personality of your prop, robot or decoration. Best of all, since they have an integrated circuit built into the LED package to control the animation effect there’s no extra circuitry or programming you have to do. You wire these the same way as regular LEDs.

Flickering red LED to wire into an LED circuit.
Flickering red LED with a clear casing.

  • Flashing LEDs are designed to turn on and off (flash) at a particular interval, usually a few times per second.
  • Flickering LEDs simulate the random, soft, and warm glow of a traditional candle flame. The flicker pattern is not consistent like the flashing LED; instead, it varies in intensity and duration to mimic a natural flicker.
  • Multicolor blinking LEDs are a type of LED that can change colors as they blink on and off. They contain multiple light-emitting chips of different colors within a single LED package along with an integrated circuit that controls the timing of the blinking.

LED Polarity and Identifying the Leads

LEDs have polarity, which means they will only work when electrical current passes through them in the correct direction, from positive to negative. This is because an LED is a diode – a type of electronic component that allows current to flow in one direction but not the other. Your typical LED has two metallic leads coming out from the bottom of the case, one is positive and the other is negative.

Which is which?

A close up of a blue LED showing the longer anode and shorter cathode so you know which way to wire it into your LED circuit.

Here’s how you can tell:

  • Anode (+): The anode is the positive lead of the LED. It’s the longer of the two leads when the LED is new and untrimmed. When current is applied to the anode, it flows through to the cathode, and the LED will light up.
  • Cathode (-): The cathode is the negative lead and is shorter than the anode. In some LEDs, you might also find a flat spot on the side of the LED’s casing on the same side as the cathode. Honestly, I always have trouble seeing the flat spot so I just go by the lengths of the leads.

When connecting an LED to a power source, make sure the positive voltage is applied to the anode and the ground or negative voltage to the cathode. If the LED is connected backward, it will not light up, but unlike other components that may be damaged if connected incorrectly, standard LEDs usually won’t be damaged if you briefly reverse the polarity.

Now that you know how to identify the positive and negative leads of an LED, how do you power it?

How to Power LED Circuits

Since LEDs need very little current, they’re often powered by batteries. I have a variety of AA holders and 9V battery clips with wires I can solder to. Some of these holders have a switch, which is convenient for turning your LEDs on and off without having to pop the batteries out.

AA and 9V battery holders to power LED circuits.

You can also run your LED project off a wall adapter too, especially if you’re creating custom string lights or you need the LEDs to stay lit for long periods of time without having to swap out batteries.

How Many Batteries Do I Need to Power LEDs? What Wall Adapter Should I Get to Power Larger LED Projects?

To determine the correct power supply for your LED project, you’ll need to know the LED’s forward voltage (Vf) and forward current (If). These specifications are typically provided by the LED manufacturer and can be found on the packaging or in the LED’s datasheet. Most 5mm LEDs operate with a forward current of about 20 milliamps (mA) and a forward voltage that generally ranges between 1.8V and 3.3V depending on the color and material of the LED.

What is an LED’s forward voltage?

The term “forward voltage drop” refers to the voltage that is required to turn on and allow current to flow through an LED or any diode in the forward direction. It’s the voltage loss that occurs when the diode conducts electricity, and it is a characteristic unique to each type of diode.

  • Red LEDs typically have a lower forward voltage drop (around 1.8V to 2.2V).
  • Blue, green, and white LEDs have higher forward voltage drops (around 3.0V to 3.3V).

When an LED is connected to a power source, the forward voltage is the minimum voltage that must be applied for the LED to begin conducting current and emit light. Any voltage applied that is less than the LED’s forward voltage drop will result in no light being emitted, as the diode will block the current flow.

For quick reference, here are the typical forward voltage ranges for popular LED colors:

LED ColorVf Range
Red1.8 – 2.1 Volts
Amber2.0 – 2.2 Volts
Orange1.9 – 2.2 Volts
Yellow1.9 – 2.2 Volts
Green2.0 – 3.1 Volts
Blue3.0 – 3.7 Volts
White3.0 – 3.4 Volts

What is an LED’s Forward Current?

This is the current that flows through the LED from positive to negative when sufficient forward voltage is applied. As the current passes through the LED, it begins to emit light. The amount of current flowing through the LED is important because it directly affects the intensity of the light. The more current an LED gets, the brighter it will glow. But too much current …and poof! You’ll burn out your LED.

For example, if an LED datasheet specifies a forward current (If) of 20mA, that means the LED is designed to operate optimally with a current of 20 milliamperes flowing through it. Operating the LED at a current higher than its rated forward current can result in overheating and failure, while operating at a lower current will produce less light output.

How to Choose an LED Power Supply

The power supply you use for your LED project must provide a voltage that is equal to or greater than the forward voltage of the LEDs and enough current to power all of them adequately.

Power Supply for a Single LED

If you’re wiring a single LED, then look up its forward voltage requirement and pick a battery configuration that exactly matches or exceeds the value slightly.

Wiring diagram of how to wire a single LED with resistor, powered by batteries.

For instance, if you need to wire a single blue LED and it has a forward voltage of 3V, then using two AA batteries (1.5V each) in a battery holder is a great option. Heck, you can even use a 3V coin battery, but it won’t last as long because coin batteries have lower capacities. Using a wall adapter for a single LED would be a bit overkill so I’d rule that option out.

Power Supply for Multiple LEDs

Deciding on the best power supply when wiring more than one LED is also pretty easy. The first decision you have to make is whether to wire your LEDs in series or in parallel. Each configuration will have slightly different power requirements.

Since this LED tutorial is geared towards beginners, let’s assume you only need to wire up a handful of LEDs. In this case, let’s do it in parallel. When wiring LEDs in parallel, each LED operates independently of the others, so the voltage across each LED will be the same, but the current will be the sum of the currents through each LED.

Wiring diagram of how to wire multiple LEDs with resistors, powered by batteries.

Let’s say you want to wire two red LEDs together in parallel, each with a forward voltage of 2V and forward current of 20mA. In this case you’d need a power supply that delivers at least 2V and 40mA. Again, the two AA battery option is probably best because it will provide 3V and this is more than enough to power both of them.

When wiring up different color LEDs together in parallel, where each one has slightly different forward voltages, use the highest value of the bunch to pick your power supply.

For the rest of this tutorial we’re going to stick with parallel wiring. But if you want to explore series vs. parallel LED wiring configurations further, check out my in-depth tutorial on wiring LEDs in series and parallel along with the pros and cons of each configuration and how to make the best choice for your LED project.

Current-limiting Resistors in LED Circuits

Rarely will you be able to come up with a battery combination that will exactly match your LED’s forward voltage requirements. Most of the time, your power supply will deliver a slightly higher voltage which usually means more current too.

LEDs typically require a resistor to limit the current that runs through them. This is because they have very low resistance and without a resistor, the current can rise to levels that can quickly overheat and burn out the LED. This is especially true when you’re using a power supply that delivers a higher voltage than the LED’s forward voltage.

The relationship between voltage and current in LEDs is non-linear and as you can see from the graph below, even a small increase in voltage beyond the LED’s forward voltage rating can lead to an even larger increase in current.

IV (current-voltage) curve for LEDs of various colors.
Image source: Digikey

Very little current flows until the forward voltage is reached. Above this value the current increases exponentially with increasing voltage.

Resistors play several important roles in LED circuits, so don’t skip them when wiring up your LEDs:

  • Preventing Excess Current: The resistor prevents too much current from passing through the LED. LEDs typically operate at around 20 milliamps (mA), and supplying a current much higher than the rated forward current can burn out the LED.
  • Matching Voltage Levels: The resistor helps to match the voltage of the power supply with the forward voltage of the LED. If the supply voltage is higher than the LED’s forward voltage, the resistor absorbs the excess voltage to a level that is safe for the LED to handle.
  • Consistent Light Output: Using a resistor stabilizes the current flowing through the LED, which results in a consistent light output, especially important in environments where the supply voltage might fluctuate.
  • Prolonging LED Life: Operating an LED within its recommended current range by using the correct value resistor will prolong the life of the LED.

How to Choose a Resistor for your LED Circuit

The brightness of an LED is largely determined by the current flowing through it. The value of the resistor in an LED circuit is crucial because it limits this current, thereby controlling the brightness of the LED. The objective is to choose a resistor value that gives you as much brightness as possible without exceeding the maximum current rating for the LED.

100 ohm, 220 ohm, 330 ohm and 470 ohm current-liming resistors for LED circuits.

So how do you figure out what resistor value you need to get the most brightness out of your LED without burning it out?

How to Calculate the Correct Resistor Value for your LED Circuit Using Ohm’s Law

Ohm’s Law describes the relationship between voltage (V), current (I), and resistance (R) in an electrical circuit. It’s named after the German physicist Georg Simon Ohm who formulated this relationship in the 1820s.

The law is usually expressed with the formula:

V = IR

Where:

  • V is the voltage across the resistor in volts (V).
  • I is the current flowing through the resistor in amperes (A).
  • R is the resistance of the resistor in ohms (Ω).

This formula can be re-arranged to solve for resistance and looks like this:

R = V / I

Or, more specifically:

R = (Vs – Vf) / I

Where:

  • Vs is the voltage of the power supply (battery pack or wall adapter).
  • Vf is the forward voltage of the LED.
  • I is the desired current flowing through the LED in Amps (A).
  • R is the resistor value in ohms (Ω).

Let’s put this equation to work with a few examples using different power supplies. We’ll assume the LEDs are wired in parallel so each LED is individually connected to the power source and will each need its own resistor. For the current (I) value, we’ll use 20mA, or .02A, because for 99% of the standard LEDs you’ll work with, this is what will be in the datasheet.

Example 1: Calculate the Resistor Value for 2 LEDs Wired in Parallel Connected to a 3V Power Source

Let’s say that the datasheet for my red LEDs say they need a forward voltage of 2V. Sometimes, you won’t get a concrete Vf number but an operating range instead. In that case, I just use an average. Let’s plug in what we know into the Ohm’s Law formula:

  • Vs = 3V
  • Vf = 2V
  • I = .02A

R = (3-2) / .02 = 50Ω

You’ll need a minimum of a 50Ω resistor for each LED in your circuit.

Resistors come in a variety of common values and many times, you’ll notice that the number you calculate isn’t always available to buy. It turns out that a 50Ω resistor is one of them.

In this case you have two options:

  • Use the Next Higher Common Resistor Value (recommended): It’s always good practice to use a resistor that’s slightly higher than what you calculate. Differences in manufacturing produces resistors with different tolerances, or allowable deviations from their true value. Tolerance is expressed as a percentage and typically ranges from 1% to 10% for most commercial resistors.
  • Combine Resistors in Series: You can wire multiple resistors in series that add up to the value you need. I’m not as much a fan of this method because your circuit will be bulkier than necessary and those extra resistors could be used for other projects.

The next highest common resistor value for this example is 56Ω.

Example 2: Calculate the Resistor Value for 2 LEDs Wired in Parallel Connected to a 9V Power Source

Now let’s take the same circuit and power it with a 9V battery. What value resistor for each LED should we use?

  • Vs = 9V
  • Vf = 2V
  • I = .02A

R = (9-2) / .02 = 350Ω

A 350Ω resistor is also not one of the standard or common values so you can jump to a 390Ω or 470Ω resistor instead.

By using a power source with a lot more voltage than what the LEDs need, we have to compensate by using a larger value resistor. The resistor not only absorbs the extra volts in the circuit but also limits the current entering each LED to the 20mA (.02A) rating.

How to Wire an LED Circuit

Okay, enough theory and formulas! Let’s light up a pair of LEDs!

What you’ll need to wire your LED circuit:

  • 5mm LEDs: The 5mm sized standard LEDs are among the most popular for DIYers and hobbyists. It’s far less expensive to buy them in bulk of the color you want or a kit of assorted LED colors.
  • Soldering Pen Kit: Even if you are new to soldering, wiring an LED circuit is a great first project and quite forgiving to beginner soldering skills. When I first started, I picked up an inexpensive soldering pen kit and that tool took me through years of electronics projects.
  • 22-gauge Hookup Wire: You’ll also need some 22-gauge hookup wire to connect all the components together. If I’m using LEDs that are all the same color, I like using red for positive and black for negative. But if I’m using different colors, sometimes I’ll try to match the positive wire’s color to the color of the LED it goes to and use black for negative. This helps me trace wires much more quickly. Coming up with a system for color coding your circuits is a big help later on, if you decide to come back months later to add onto your design or troubleshoot a problem.
  • Heat Shrink Tubing: Before soldering each component together, don’t forget to slip on a piece of heat shrink tubing to cover up any exposed wire or component leads. This not only protects your circuit from environmental elements, but it also prevents any potential short circuits that can happen with two or more metal portions of your circuit touch that aren’t supposed to.
  • Wire Strippers: You don’t need anything fancy, just a basic wire stripper tool to remove the insulation off the ends of your wires.
  • Heat Gun: In order to get your heat shrink tubing to shrink down, you’ll need to heat it up. A heat gun will get the job done fast. Alternatively, you can hold a flame from a lighter near the tubing to get it to shrink.

Step 1: Connect Resistors to LED Anodes

Use the Ohm’s Law formula to calculate what value resistors you need for your LEDs. If you are using a reasonable power source and want to dive deeper into using Ohm’s Law at a later date, resistor values of 330Ω or 470Ω are popular go-to values for LED circuits.

Wiring diagram showing how to wire resistors to LEDs.

Both LEDs and resistors have long leads so depending on where you’re installing them, you may need to trim them down first.

Solder one of the resistor leads to one of the LED leads, it can be the anode or cathode. Resistors don’t have polarity so it doesn’t matter what lead of the resistor you choose. By convention, most people solder the resistor to the anode (positive), which is the longer LED lead. This is how I show it in the diagram above. Which ever one you pick, just keep it consistent for all the LEDs in your circuit. This will help you troubleshoot faster should the need arise later on.

It’s always best practice to place the resistor as close to the LED as possible in the circuit and that’s why you usually solder it right to the LED’s anode. But there are certain installations where space is tight and the resistor would be in the way. In those cases, you’ll have to solder a wire to the anode and then place the resistor further down.

Step 2: Connect the Free Resistor Leads to the Positive Battery Terminal with Wires

Strip a small portion of insulation off the ends of two lengths of wire, preferably red for positive. The lengths of wire you use to create your LED circuit will depend on the design of your prop, character or robot as well as how far each LED is from one another. Before cutting your wire, mock up your design on your project and cut each length of wire a little longer than you think you need.

Wiring diagram showing how to connect the positive wire to an LED anode.

Assuming you soldered a resistor to the anode of each LED, solder one end of each length of wire to the remaining lead of each resistor. Don’t forget to add your heat shrink tubing to cover your connection.

Wiring diagram showing how to wire the positive wire from a battery holder to the resistor and anode of an LED.

The objective is to connect both of these positive wires to the positive wire of the battery pack. I usually solder the positive wires coming from the anodes (via the resistors) of the LEDs together early on and then send one positive wire to the battery pack so you don’t end up with a tangled nest.

Step 3: Connect the LED Cathodes to the Negative Battery Terminal

Using a similar strategy to how you connected the positive side, solder a length of wire to the cathode of each LED (shorter leads) and combine them into a single wire that gets soldered to the negative wire of the battery pack.

Wiring diagram showing how to wire the negative wire of a battery holder to the cathode of an LED.

Step 4: Test Your LED Circuit

Now for the moment of truth! Insert two AA batteries into the battery holder and see what happens. Did your LED circuit light up?

An LED circuit with two LEDs wired to resistors and a battery power supply.
An LED circuit with two glowing LEDs wired to resistors and a battery power supply which is turned on.

If so, congratulations! Now that you’ve wired two LEDs together, you can wire many more to create custom lighting designs.

I intentionally left some of my heat shrink off so you can see how I soldered the wires. Since I needed my LEDs to be close together, I ended up twisting the tails of my resistors together and then soldering a single green wire to them both.

Depending on your LED design, you may have to move the resistor further down, elongate some wires and shorten others. The circuit will work just the same so long as you keep the components in the right order to create an electrical loop.

If your LED circuit doesn’t light up, or the LED lighting doesn’t seem right let’s see if we can identify the problem.

Troubleshooting Your LED Circuit

When you’ve spent so much time crafting the perfect circuit and it doesn’t work the first time, it can be really frustrating. Troubleshooting is a natural part of working with electronics and the more you do it, the faster you get at identifying problems. I learn more from troubleshooting my circuits than from any resource I could find online. Work step-by-step, and test one thing at a time so you can rule it out as you go.

Let’s take a look at some of the common issues you’ll run into when working with LEDs.

LEDs Not Turning On

  • Check Connections: Ensure all wires are securely connected and there are no loose ends.
  • Examine the Power Supply: Verify that the power supply is working and providing the correct voltage.
  • Test LEDs with a Multimeter: Use a multimeter to test the LED itself to make sure it isn’t faulty.
  • Inspect the Polarity: Confirm that the LEDs are connected in the correct orientation, with the positive to positive and negative to negative.
  • Look for Short Circuits: Check for any signs of shorting, such as wires touching that shouldn’t be.

LEDs Too Dim

  • Assess the Power Voltage: Make sure the voltage aligns with the LED specifications. Too low a voltage will result in dim lighting.
  • Check the Resistor Value: Make sure its value is calculated correctly for the desired brightness. If the resistor value is too high, your LED will glow dimly or not at all.
  • LED Manufacturing: Some LEDs may be inherently dimmer than others; consider replacing it with one from another manufacturer.

LEDs Too Bright

  • Add/Increase Resistor: If the LED is too bright, you might need to add a resistor with a higher resistance value to limit the current.
  • Adjust the Power Supply: Lower the voltage from the power supply.
  • Pulse-Width Modulation (PWM): For finer control, use a microcontroller with PWM to reduce perceived brightness without changing the voltage.

LEDs Burning Out

  • Check the Resistor Value: Double-check that the resistor value is correct to prevent excessive current from passing through the LED.
  • Overvoltage: Ensure the voltage doesn’t exceed the LED’s rated maximum; even small spikes can be damaging.

Flickering LEDs

  • Use a Stable Power Source: Flickering often results from an unstable power supply; ensure your power source is not fluctuating.
  • Loose Connections: A common culprit is loose wiring. Check all connections to ensure they’re tight.

Uneven Brightness in LEDs

  • Current Sharing: Ensure that each LED in the circuit has its own current-limiting resistor, so all LEDs receive the same current.
  • Consistent Power Distribution: Verify that the power distribution is even across the circuit.
  • LED Matching: Use LEDs from the same batch or manufacturer to ensure consistent brightness and color.

General Tips

  • Keep a Log: Documenting each step as you build and test can help backtrack and isolate problems.
  • One Change at a Time: When troubleshooting, make one adjustment at a time to understand what fixes the issue.
  • Swap Test: Replace the suspected faulty component with one that you know works to confirm it is the problem.

Troubleshooting often requires patience and a methodical approach. By going step by step and eliminating each potential cause, you can diagnose and solve most issues that come up with LED installations in props and robots.

Glow Ahead, You’re Ready to Wire Your First LED Circuit

And there you have it – the foundation to starting your own light-filled journey into the world of LEDs. Remember, every expert was once a beginner, just like you, with a spark of curiosity and a bunch of components. With the basics of LED wiring now in your toolkit, the only limit is the brightness of your imagination. Don’t get discouraged by initial hiccups; every mistake is a step towards mastery. Start simple and as your LED circuits become more intricate, watch your props, robots, animatronics and attractions glow your mind!