FB pixel

How do I choose the correct resistor for my LED?

Published


LEDs are amazing! They use very little power for the light they produce. When you are using an LED to indicate the status of a circuit, they may be using only 20mA (or even only 1mA!). An early lesson in electronics is to connect an LED into a circuit, similarly one of the most common first activities while learning about Arduino is to blink an LED. Something that must be considered when powering a LED is the current it is rated for in operation, called Forward Current.

latex!encoded:base64,XHRleHRybXtMRUQgRm9yd2FyZCBWb2x0YWdlfSBcbGVmdCAoIFx0ZXh0cm17Vn1fe1x0ZXh0cm17Rn19IFxyaWdodCApIDogXHRleHRybXsyVi0zVn0gXGxlZnQgKCBcdGV4dHJte3R5cGljYWxseX0gXHJpZ2h0ICk=
latex!encoded:base64,XHRleHRybXtMRUQgRm9yd2FyZCBDdXJyZW50fSBcbGVmdCAoIFx0ZXh0cm17SX1fe1x0ZXh0cm17Rn19IFxyaWdodCApIDogXHRleHRybXsxMG1BLTIwbUF9IFxsZWZ0ICggXHRleHRybXt0eXBpY2FsbHl9IFxyaWdodCAp

An LED in a circuit without a limiting resistor can exceed its operating current rating quite easily and burn out in a short time. For many projects a resistor rated at 1/8W or 1/4W will be fine, but you may want to check for long term or high power use to make sure. To calculate the resistor values needed to protect the LED, use Ohm’s Law.

latex!encoded:base64,XHRleHRybXtWfT1cdGV4dHJte0l9IFx0aW1lcyB7XHRleHRybXtSfSBcO1w7XDtcO1w7XFJpZ2h0YXJyb3cgXDtcO1w7XDtcOyBcdGV4dHJte1J9PVxmcmFje1x0ZXh0cm17Vn0gfXtcdGV4dHJte0l9fQ==

Your essential Ohm’s Law equation V=IxR is used to calculate the resistor value you’ll need in the circuit. In this case we’ll rearrange it to R=V/I, and we have to add terms for LEDs (and standard diodes) called Forward Voltage and Forward Current. The forward voltage is the voltage drop across the LED. It is typically in the range of 2-3V. This forward voltage is important to consider using one LED and even more important when using many LEDs since your circuit will not work if the combined forward voltage exceeds your supply voltage.

latex!encoded:base64,XHRleHRybXtSfV97XHRleHRybXtMRUR9fT1cZnJhY3tcdGV4dHJte1Z9X3tcdGV4dHJte1N9fS1cdGV4dHJte1Z9X3tcdGV4dHJte0Z9fX17XHRleHRybXtJfV97XHRleHRybXtGfX19

Adding forward voltage (VF), explicitly stating our supply voltage (VS), and forward current (IF), our R=V/I equation becomes RLED=(VS-VF)/IF. We’re almost ready to plug and chug! To find your resistor value, you’ll just need the VF and IF for the LED (again typically 2-3V and 10-20mA depending on type), and your chosen supply voltage (Vs).

latex!encoded:base64,XHRleHRybXtSfV97XHRleHRybXtMRUR9fT1cZnJhY3s1XHRleHRybXtWfS0yXHRleHRybXtWfX17MjBcdGV4dHJte21BfX09MTUwXE9tZWdh

Let's use a red LED with a VF of 2V and IF of 20mA, powered by 5V for example: RLED=(5V-2V)/20mA => RLED=150Ω, so in this case you can connect a 150Ω resistor in series with your LED and have just the right amount of current to light up your project.

Authored By

Gary Crowell

Avid biker, audio enthusiast, tinkerer, and radio/autonomous car racer. Also work with PCBs, electronic/mechanical design, and programming, so I really get interested if the project is mechatronic.

Make Bread with our CircuitBread Toaster!

Get the latest tools and tutorials, fresh from the toaster.

What are you looking for?