USD

Another Teaching Moment - How to Select a Resistor for an LED

Light Emitting Diodes (LEDs) are an inevitable stepping stone when diving into electronics. Whether you’re using them for indication, communication, lighting, or just for some added cool factor to a project, all LEDs have one thing in common: they are unable to regulate current. Without a limited current flow, LEDs will eventually fail. Sometimes catastrophically. For most cases, this is solved by simply adding a resistor (of appropriate size) in series with the LED. In high power applications you may see current-limiting power supplies or current limiting ICs. Let’s explore how resistors can be used to save the day!

If you’re not already familiar with Ohm’s law, let me introduce you now. This law defines the relationship between voltage, amperage, and resistance with the formula V = I * R. If you have any two of the elements, this formula can be rearranged to find the missing element. In the following example we’ll start with a supply voltage of 9 V, a resistor with unknown values, and an LED with a forward voltage of 2.4 V and 20 mA rated current.

When components are connected in series, each component will have the same amount of current pass through. So, if the LED is drawing 20 mA, the resistor will as well. Another law applied to components connected in series is that the voltage drop across each component will add up to the source voltage value. The source voltage in this circuit is 9 V, the LED’s forward voltage is 2.4 V; so we’ll need 9 minus 2.4 volts to drop across the resistor, which equals 6.6 V. Now Ohm’s law comes into play. We don’t yet know the resistance required for the resistor, but we know the voltage drop across the resistor is 6.6 V and amperage is 0.02 A (20 mA). Let’s put these values into the Ohm’s law equation: 6.6 V = 0.02 A * R

With some rearrangement we get: R = 6.6 V / 0.02 A

Solve for R: 330 Ω = 6.6 V / 0.02 A

Now that we’ve solved for resistance, there’s one more step. Not just any 330 Ω resistor will work for us, we need the resistor to meet or exceed the resulting power dissipation. Note: A resistor’s power is rated in watts. The formula for electrical power is P (Watts) = I (Amperage) * V (Volts)

We’ll use our resistor’s values of 0.02 A and 6.6 V to calculate wattage: P = 0.02 A * 6.6 V

0.132 W (132 mW) will be the power dissipated by the resistor.

A common value for resistors is ¼ or 0.25 W which will work perfectly. Using resistors with higher wattage than this is okay as well, they just typically cost more. If you’d like to simplify this process, Digi-Key has a calculator that will provide you with both the resistance and wattage for these resistors.

Happy blinking!

About this author

Image of Kyle Meier

Kyle Meier is an Applications Engineering Technician that has been with Digi-Key Electronics since 2013. He holds a Bachelor’s degree in Business Administration from Bemidji State University and an Associate of Applied Science degree in Electronics Technology & Automated Systems from Northland Community & Technical College. Kyle’s current role is assisting in the creation of unique technical projects, documenting the process and ultimately participating in the production of video media coverage for the projects. Prior to joining Digi-Key, he was an electronics lab instructor at BSU for 4 years. In his spare time, Kyle enjoys woodworking, automotive writing projects and avoiding Minnesota’s cold weather.

More posts by Kyle Meier