A Light Emitting Diode, or LED, is a great way to add light to an electronic project. LEDs are quite sensitive and need resistors to limit the current so they do not get damaged. However, sometimes it can be confusing on how to connect a resistor to a LED.

# So, does a resistor go before or after a LED?

A resistor can go before or after a LED. The current before and after the LED (and any other point in the circuit) remains the same, so it does not matter whether you place the resistor before or after the LED. The resistor will still limit the current the LED receives so it does not get damaged.

## Why it doesn’t matter if a resistor goes before or after a LED

To better understand why it doesn’t matter whether a resistor goes before or after a LED, we need to learn about current in a circuit.

In electrical and electronic theory, when it comes to closed loop circuits, the current flow out of a battery is equal to the current that flows back into the battery. So what this tells us is that the current at any point along the closed loop is going to be the same. The image below shows a simple closed loop series circuit with a battery source and a LED (let’s assume the battery is supplying the right voltage and current so no resistor is needed). The current before and after the LED (or any point in the circuit) remains the same at 100mA.

Now if we increase the voltage of the battery, we will need to maintain the 100mA of current so the LED does not get damaged. To this we are going  to require a resistor. The main purpose of a resistor is to limit the current in a circuit to protect components like a LED. By adding a resistor to the previous circuit, we are simply dropping the amount of current.

But, the placement of the resistor does not matter because the current leaving the battery is still going to equal the current re-entering the battery. All the resistor is doing is limiting the amount of current that will flow out of the battery.

This is why it does not matter whether a resistor goes before or after a LED.