# Calculating the Right Resistor Value for Your LED Circuit

Welcome to our comprehensive guide on leveraging Ohm’s Law to calculate the correct resistor values for your LED circuits in props, robots, and animatronics projects. Whether you’re lighting up a single LED, working on a series setup, or dealing with a parallel circuit, getting the resistor value right is crucial for optimal performance and longevity of your LEDs. Without the right resistor connected to your LED, your lighting effect may get too much current and burn out or too little current to even light up. In this LED circuits tutorial, I’ll show you exactly how to calculate the value of a resistor for a single LED as well as multiple LEDs connected in series and parallel configurations empowering you to create brilliant, reliable, and safe illuminations for your creations. Let’s light up your projects the right way!

## LED Basics: Understanding Forward Voltage (Vf) & Forward Current (If)

An LED, or Light Emitting Diode, is a special type of diode that emits light when an electrical current is passed through it. Diodes are semiconductor devices that allow current to flow in one direction only.

In the case of LEDs, they are designed so that when current flows through them (in the “forward” direction), they emit photons, which we perceive as light. This light can be of different colors depending on the specific materials used in the LED. For example, an LED made with certain materials may emit red light, while another may emit green light, blue light, and so forth.

LEDs have a variety of applications and are used widely due to their efficiency, long life, and the fact that they produce less heat compared to other types of lighting. To choose the right resistor for your LED, it’s essential to have a basic understanding of how LEDs work including their voltage and current requirements.

• Forward Voltage (Vf): This is the voltage that is dropped across the LED when current flows in the correct, or “forward” direction. It’s a specific property of the LED and depends on the material from which the LED is made. Each LED requires a certain forward voltage to begin conducting electricity and emitting light. Typical values can range from around 1.2V up to about 3.3V or more. Some colors, like blue or white LEDs, typically have higher forward voltages than others, like red or green LEDs.
• Forward Current (If): This is the current that flows through the LED when it’s operating in the forward direction (it’s lit up). The LED will have a specified maximum forward current, often around 20 milliamperes (mA) for common LEDs. Exceeding this value can cause the LED to become too hot and can significantly reduce its lifespan or cause immediate failure. LEDs can usually be operated at less than their maximum forward current, but this will decrease their brightness.

It’s important to understand these two parameters when designing a circuit with LEDs. The forward voltage is used to calculate the necessary power supply voltage, and the forward current is used to calculate the necessary current-limiting resistor value. Both of these parameters can usually be found on the LED’s datasheet.

### LED Datasheets

Here’s an example of a chart pulled from an LED manufacturer’s datasheet. It provides a lot of information about the characteristics of the LED including its forward voltage (Vf). You can see that this LED operates within a forward voltage range of 2 – 2.5V with a forward current (If) of 20mA.

When connecting an LED to a power source, it’s crucial to limit the current flowing through the LED to what is specified in the datasheet to prevent damage. This is where resistors come into play.

## Why do LEDs need a current-limiting resistor?

Before learning how to calculate the resistor value for an LED, you might want to understand why we need to connect a resistor in the first place.

The amount of current going through an LED is directly proportional to how brightly it shines. If you increase the current, the LED will shine brighter. Likewise, if you decrease the current, the LED will appear dimmer. By picking the correct resistor, you have full control over how bright the LED shines.

What happens if we connect an LED directly to a power supply without a resistor?

Suppose we connect a 9V battery to a red LED that requires a forward voltage of 2V. Since no other components are connected in this circuit, the LED will receive more voltage than it requires, and a current much greater than the required current will flow through it. Ultimately, the LED will burn out because of the excessive forward current.

For most LEDs, the forward current is typically 20mA. So, if you are connecting an LED to a power source, you need to connect a suitable resistor that would limit the current to 20mA. The objective is to calculate the smallest resistor you can get away with to get as much brightness as you can out of the LED without damaging it. How do we do that? Let’s find out.

## How to Calculate the Resistor Value for an LED Using Ohm’s Law

To choose the right resistance value, you need to know the source voltage (Vs), the LED’s forward voltage (Vf) which you can find on its datasheet, and the desired LED current in Amperes (I). Once you know these values, you can use this version of the Ohm’s Law formula to find the ideal resistor value for your LED:

Resistor Value (Ohms) = (Source Voltage – LED Forward Voltage) / Desired LED Current

Or, more simply put:

Resistor Value = (Vs – Vf) / I

Ohm’s Law is a fundamental principle in electrical and electronic engineering that describes the relationship between voltage, current, and resistance in an electrical circuit. For a deeper look at the equation and its applications for building electrical circuits check out my comprehensive Ohm’s Law tutorial. Otherwise, the formula above is all we’ll need to proceed with the LED circuit examples below.

## Single LED Circuits

To understand how the formula works, let’s take a look at some real-world examples for a single LED circuit using some of the more common power supply options you’ll use. Smaller LED projects can easily be powered by batteries like coin or AA alkalines but we’ll also take a look at how using 9V batteries or even a 12V power supply affects the resistor value you’ll need.

#### 3V Power Supply for Single LED Circuit

Let’s consider an example where a 3V power supply like a coin battery or 2 AA batteries are connected to an LED with a forward voltage of 2V. What would be the resistor value if the desired LED current is 20mA?

Values we know:

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

Plugging these values into the Ohm’s Law formula gives us:

Resistor Value = (3 – 2) / .02 = 50Ω

By using the Ohm’s Law equation, we learn that an LED with a forward voltage of 2V needs a 50Ω resistor to limit the current to 20mA if it is connected to a 3V power supply. Since a 50Ω resistor is not a standard value, you might use a 56Ω resistor or connect multiple smaller value resistors in series such that their resistances add up to 50 Ohms.

In most cases, you’ll end up with a resistor value from the formula that is not among the standard values that you can buy off the shelf. Sometimes you’ll be able to combine resistors to get an exact match but most of the time you’ll have to choose the next highest common value. Never choose a value that’s below what you’ve calculated using Ohm’s Law.

#### 5V Power Supply for Single LED Circuit

Many microcontrollers like the Arduino have pins that can provide 5V power to a component connected to it. Some of the first Arduino projects you’ll build will be LED projects where you can control blinking and fading patterns to create a variety of lighting animations. What resistor value would you use in this scenario?

Assuming we’re using the same LED from the previous example with a forward voltage of 2V and we want to limit the current to 20mA (.02A), here are the values we’ll plug into the formula:

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

Resistor Value = (5 – 2) / .02 = 150Ω

It turns out that 150 Ohms is a standard value! Increasing the power supply voltage means you need a larger resistance to limit the LED current to 20mA. In this case, you may connect a 150 Ohm resistor, or if you don’t have one in your kit, connect resistors of lesser value in series such that they add up to 150 Ohms or more.

#### 6V Power Supply for Single LED Circuit

A 4-pack AA battery holder will give you 6V and is a popular power supply choice for hobby servos and small motors. What if you want to add an LED to that power supply, what resistor value will you need?

Here’s what we know:

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

Resistor Value = (6 – 2) / .02 = 200Ω

Since 200 Ohms isn’t a standard resistor value, I’d opt for the next highest one which is 220 Ohms. Alternatively you can place two 100Ω resistors in series to get an exact match.

#### 9V Power Supply for Single LED Circuit

Perhaps the most popular power supply choice for beginning electronics hobbyists and robot builders is the 9V battery. It can power servos, motors, microcontrollers and more for adequate lengths of time. If we hook up an LED to a 9V power source, what resistor value would we need to limit the current going from the battery to the LED to 20mA?

Let’s plug these numbers into the Ohm’s Law formula:

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

Resistor Value = (9 – 2) / .02 = 350Ω

Again, the resistor value increased upon increasing the power supply voltage, which proves that you need higher resistance values when you connect an LED to a high-voltage power supply. In this case, you can use a 390Ω resistor because a 350Ω resistor isn’t a standard value.

#### 12V Power Supply for Single LED Circuit

As your projects get larger and more complex so too will your power requirements. You’ll be able to power larger motors, servos and lighting circuits. Let’s increase the power supply voltage one last time before we move towards other LED configurations. Connecting a 12V power supply to an LED with a 2V forward voltage will require a large resistance value if we choose to limit the current to 20mA.

Let’s use the Ohm’s Law formula to find out the resistance value:

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

Resistor Value = (12 – 2) / .02 = 500Ω

Connecting an LED to a 12V power supply would require a 500 Ohm resistor. Again, you won’t find a 500Ω resistor, so it would be best to use the closest resistance value, 560Ω.

## Series LED Circuits

It won’t be long before you’ll want to add even more LEDs to your projects. After all, you can never have too many LEDs! It’s not practical to power each LED individually so you’ll want to connect them all together to a single power source. One of the simplest ways to connect multiple LEDs together is to wire them in series.

A series LED circuit is one where the LEDs are connected end-to-end in a single line. In this configuration, the same amount of current flows through each LED in the series. The power supply’s total voltage would then be divided among the LEDs.

Here’s how a series LED circuit works:

• Connection: The first LED’s anode (positive lead) is connected to the power supply. Its cathode (negative lead) connects to the anode of the next LED, and so on, forming a chain or series. That’s why components wired as series circuits are often considered being “daisy-chained” together. The total circuit then runs from the positive terminal of the power supply to the anode of the first LED and then out the cathode of the last LED to the negative terminal of the power supply, making a loop.
• Current Flow: In a series circuit, the same current flows through all the components, including all the LEDs. If one LED fails (opens), it breaks the circuit and all the LEDs in the series will turn off.
• Voltage Requirements: The total voltage required for the series circuit is the sum of the forward voltages of all the LEDs in the series. For example, if you have four LEDs in series, each with a forward voltage of 2V, you’ll need a power supply of at least 8V (4 LEDs x 2V) to light up all the LEDs.
• Resistor: A single current limiting resistor is often used in a series LED circuit to control the total current flowing through the circuit. The value of this resistor can be calculated based on the total forward voltage drop of the LEDs and the desired current. The resistor can either be placed just before the anode of the first LED or after the cathode of the last LED.

The advantage of series LED circuits is that they require the same current as just one LED, and you can control the brightness of all LEDs in the series with a single resistor. However, they require a higher total voltage, and a failure in one LED will affect all others in the series.

### How to Calculate the Resistor Value for Series LED Circuits

If we’re trying to power four LEDs wired in series (each with a 2V forward voltage), then we can immediately rule out any power supply below 8V because it won’t provide enough voltage to light up that many. Let’s take a look at how Ohm’s Law would work with the next suitable power supplies: 9V and 12V.

#### 9V Power Supply for Series LED Circuit

In this example, we have four LEDs connected in series to a 9V battery. Each one has a forward voltage of 2V and we want to limit the current to 20mA to each LED. To solve this problem, we will use the same Ohm’s law formula, but this time, we will add up the forward voltages because the LEDs are connected in series.

Let’s plug these values into the Ohm’s Law formula:

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

Resistor Value = (9 – 8) / .02 = 50Ω

This circuit would need a single 50 Ohm resistor to limit the current for each LED to 20mA. The next highest standard value is 56Ω.

#### 12V Power Supply for Series LED Circuit

We would expect that if we increase the power supply voltage to the same series LED circuit, then the resistor value we need will increase as well. Let’s take a look:

Vs = 12V

Vf = 8V (sum of LED forward voltages)

I = .02

Resistor Value = (12 – 8) / .02 = 200Ω

Since a 200 Ohm resistor isn’t available, I’d opt for a 220 Ohm resistor. Remember that you only need one resistor for series LED circuits, but that’s not the case when LED’s are connected in parallel.

## Parallel LED Circuits

Another popular method for wiring multiple LEDs to a single power source is to arrange them in a parallel circuit. A parallel LED circuit is one in which each LED is directly connected to the power source independently, similar to how multiple appliances in your home might be connected to the same power source. The voltage across each LED is equal to the voltage of the power supply, but the current from the power supply gets divided among the LEDs in the circuit.

Here’s how a parallel LED circuit works:

• Connection: The anode (positive lead) of each LED is connected to the positive side of the power supply, and the cathode (negative lead) of each LED is connected to the negative side of the power supply.
• Current Flow: In a parallel circuit, the current from the power supply is divided among each of the LEDs. If one LED fails (opens), the current can still flow to the other LEDs, so they remain lit.
• Voltage Requirements: The voltage requirement for each LED in a parallel circuit is the same as the forward voltage of the LED. For example, if you have four LEDs in parallel, each with a forward voltage of 2V, you’ll need a power supply of at least 2V to light up all the LEDs.
• Resistor: Since each LED is independent, each must have its own resistor. The resistor for each LED can either be placed just before its anode or just after its cathode.

The advantage of parallel circuits is that each LED operates independently, so a failure in one LED doesn’t affect the others. They also allow you to use a power source with a lower voltage. However, parallel circuits require a power source that can supply a higher total current, and they require more resistors.

### Why can’t you use one resistor for all the LEDs in a parallel circuit?

In theory, you could use a single resistor in a parallel LED circuit. There are several Ohm’s Law tutorials out there that do just that. Rather than use .02A for the I value, you would add up all the forward currents of the LEDs. For instance, if you have 6 LEDs wired in parallel and you only wanted to use one resistor, then you would use .12A (.02 x 6 LEDs) for the I value. If you run this through the Ohm’s Law formula for a 6V power supply then you’d get:

Resistor Value = (6 – 2) / .12 = 33Ω

But I highly advise against using just one resistor in a parallel LED circuit for a variety of reasons. Current doesn’t always distribute evenly among the LEDs. Even if your LEDs are from the same brand, there will always be slight manufacturing variations that could result in different forward voltages and therefore different current draws for each LED. This could result in some LEDs being brighter than others, or worse, some LEDs being driven with too much current, which can reduce their lifespan or even cause an immediate burn out.

If one LED fails (stops conducting), the current that was flowing through that LED will redistribute to the other LEDs. This will increase the current flowing through the remaining LEDs, which could cause them to fail as well. If an LED short-circuits (becomes a direct path without resistance), it could result in all the current flowing through that path, leading to the other LEDs turning off and too much current through the failed LED path.

As tedious as it may seem to have to solder a resistor to every LED, it’s better in the long run. This ensures that the correct amount of current flows through each LED regardless of the performance of the other LEDs in the circuit. It’s a more reliable and robust way to design the circuit, and it can help ensure the longevity of the LEDs.

### How to Calculate the Resistor Value for Parallel LED Circuits

For the following examples, let’s stick with our four LEDs, each with a 2V forward voltage, wired in parallel. We want to limit the current drawn by each LED in our circuit to 20mA. Since each LED in our circuit receives the same voltage as the power supply, we’d need something that can provide at least 2V and 80mA (20mA x 4 LEDs) of current.

#### 3V Power Supply for Parallel LED Circuit

You can get 3V from a coin cell or two AA batteries. For a parallel LED circuit, I’d ditch the coin cell and go for the two AA batteries because they have a better current rating and will be able to power your parallel LED circuit for longer. So if our parallel four-LED circuit is hooked up to a 3V power supply, what resistor value do we need for each LED? Let’s find out:

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

Resistor Value = (3 – 2) / .02 = 50Ω

Each resistor must have a value of 50 Ohms, or 56 Ohms if you use the closest (higher) standard value. Interestingly, we got the same resistor value in this parallel circuit as we did when we calculated the resistor value for a single LED circuit in the example above. That’s because when you wire components in parallel, you’re essentially connecting a bunch of single circuits to the same power source.

#### 6V Power Supply for Parallel LED Circuit

I imagine we’ll need a 200Ω resistor for each LED wired up in parallel because this is the number we got from our single LED circuit above. But let’s double check the math using Ohm’s Law:

• Vs = 6V
• Vf = 2V
• I = .02

Resistor Value = (6 – 2) / .02 = 200Ω

As we suspected, each LED in the parallel circuit will need a 200 Ohm resistor. If you use a resistor for every LED, calculating the resistor value is very easy.

## How Resistor Tolerance Affects LED Circuits

Manufacturing resistors with absolute precision is not only technologically challenging but also economically impractical. Several factors, such as variations in material properties, manufacturing processes, and environmental conditions during the fabrication process, can introduce minor inconsistencies in the resistance values.

Tolerances are a way of quantifying this expected variation. A resistor’s tolerance is the amount by which its actual resistance value may vary from its stated resistance. Tolerance values are often denoted by the color of the last band on a resistor. For example, a gold band signifies a tolerance of ±5%, and a silver band signifies a tolerance of ±10%. Resistors without a fourth band have a default tolerance of ±20%.

For example, a 220-ohm resistor with a tolerance of 5% could actually have a resistance anywhere between 209 ohms (220 – 5% of 220) and 231 ohms (220 + 5% of 220).

When you’re selecting a resistor value for your LED circuit, it’s important to account for this tolerance in your calculations. If your circuit is very sensitive to the exact amount of current flowing through the LED, you may need to use a resistor with a low tolerance (like 1%) to ensure the current stays within a narrow range.

In many LED circuits, there’s actually a fair amount of flexibility in the amount of current that you can use. LEDs often have a range of current values over which they will light up reliably. As long as you stay within this range, your LED should work fine, even if your resistor’s actual value is a bit different from its stated value due to tolerance. So in many cases, a standard 5% tolerance resistor will work perfectly well.

While tolerance does matter, for most simple LED projects it won’t make a significant difference. It becomes more critical in precise electronic design where small deviations from expected values can have larger impacts on the circuit behavior.

## The Importance of Selecting the Correct Resistor for the Best LED Performance

Understanding how to calculate the correct resistor value for single, series, and parallel LED circuits is a fundamental skill in electronics for getting the best performance while maximizing the longevity of your LEDs. Whether you’re working with a single LED, a series configuration, or a parallel circuit, remember that the resistor plays a crucial role in regulating current and protecting an LED from burning out prematurely. In order to use the Ohm’s Law formula to determine your resistor value, all you need is the LED’s forward voltage, forward current, and the voltage of your power supply. Also, consider the resistor’s tolerance when selecting from among the standard values for your project, as real-world values can vary from their nominal ones. With these principles in mind, you’ll be well-equipped to design effective and reliable LED circuits for your projects, whether they’re simple props or more complex animatronic designs.

Ready to start wiring your LEDs together, check out my LED tutorial on how to wire LEDs in series and parallel and how to choose the best type of LED circuit for your project.