How to Wire an LED: A Beginner's Guide with Formulas

This guide explains the basics of how to wire an LED. We will focus on a single LED setup and show you how to calculate the correct resistor. Following these steps will give you the knowledge to wire LEDs in almost any scenario. Additionally, you can use the video below to follow along.

The very basics of wiring an LED involve three parts. First is your power supply (DC/Direct Current is best). Second is a resistor, which helps protect your LED from burning up. Finally, the third part is the LED itself.

Questions to Ask Before You Wire an LED

Before you begin, you should ask yourself a few key questions:

  • What is the maximum voltage my power supply will provide?
  • How many LEDs do I want to wire?
  • What colors are the LEDs? (For instance, different colors have different voltage needs).

Example: How to Wire an LED in a Car

Let's say you want to wire a single LED in a vehicle, perhaps as an indicator light. Most people know that a car system is 12v DC. However, when the car is running and charging the battery, it can see higher voltages. For this reason, we usually say the system should not go over 15v. That might be a bit high, but it is a safe number for our calculations.

In our example, we have one red 5mm round top LED. We want to wire it to the car's "12v" source. Looking at the tech specs for this LED, we know it needs 1.9-2.1v at 20mA to work at its peak brightness. For simplicity, we will use 2v in our formula. If we connect the LED directly to the 12v power, it will instantly burn out and be ruined forever.

This is where a simple resistor comes into play. A resistor will let you use the LED on a higher voltage without damaging it. There are many online LED calculators that can find the right resistor for you. Nevertheless, we can easily do the math by hand to show you what is happening behind the scenes.

Calculating the Resistor for LED Wiring

Here are the formulas you will need to select the correct resistor for your LED project.

Understanding the Resistor Formulas

  • Ohm's Law: V = I x R (Voltage = Current x Resistance)
  • Power Law: P = I x V (Power = Current x Voltage)

Also, remember these units:

  • Power (P) is measured in Watts (W)
  • Current (I) is measured in Amps (A) or milliamps (mA)
  • Resistance (R) is measured in Ohms (Ω)

Step 1: Calculate the Resistance Value (Ohms) for your LED

First, we rearrange Ohm's Law to solve for resistance (R):

R = V / I

In this formula, 'V' is the voltage that the resistor must handle. It is *not* the total power supply voltage. Instead, it is the voltage left over AFTER the LED takes what it needs. Our maximum voltage is 15v. The LED needs 2v. This leaves 13v for the resistor to manage.

The LED uses 20mA of current, which we must convert to Amps for the formula. Specifically, 20mA is the same as 0.020 Amps.

Now, let's solve for Resistance:

  • R = (15v - 2v) / 0.020A
  • R = 13v / 0.020A
  • R = 650 Ohms

The result is 650 Ohms. This is a very important value. You must choose a resistor with a rating of 650 Ohms or higher.

Step 2: Calculate the Power Rating (Watts)

The next very important part of selecting a resistor is its power rating. This rating tells you how much power (in the form of heat) a resistor can handle safely. As a rule, a larger difference between your supply voltage and the LED's voltage requires a higher power resistor.

For this calculation, we use the Power Law:

P = I x V

Here, the current (I) is what goes through the resistor (0.020A). The voltage (V) is the voltage drop across the resistor, which we already found is 13v.

  • P = 0.020A x 13v
  • P = 0.26 Watts

The result is 0.26 Watts. Consequently, this is slightly more than a standard 1/4 watt (0.25w) resistor can handle. Although these are theoretical values, it is always best to be safe.

How to Choose the Right Resistor for Your LED

Now we must choose the correct resistor. Since the power dissipation (0.26w) is over 1/4 watt, we must choose the next size up. Therefore, we should use a 1/2 watt rated resistor.

If we look at the available 1/2 watt rated resistors, we can see that the closest value to 650 Ohms or higher is the 680 Ohm 1/2 watt resistor.

Ultimately, the best resistor for this specific scenario is a **680 Ohm, 1/2 watt resistor**. This choice will give your LED a very long and safe life.

Final Notes for How to Wire an LED

Here are a few final tips for **how to wire an LED** with its resistor:

  • First, resistors do not have polarity. This means you can put them in either direction in your circuit.
  • Second, it is often easiest to put the resistor on the positive side of the LED. This is the longer of the two legs on most LEDs.
  • Third, soldering is always the best and most reliable way to attach the LED and the resistor.