In this tutorial, we'll learn all about using LEDs in electronics projects. Don't worry if you don't know what that means! You'll learn. You'll learn what an LED is, what a resistor is, how to choose a resistor for your LED, how to read the color code on a resistor, and the correct way to plug an LED in so that it will light up.

Ready to make some lights? Let's get started!

## Step 1: What Are Those Thingys Anyways?

"Wait a second!" You cry, "What in the world is an LED and what is this resistor thingy?!" Don't worry, I'll show you right here.

LEDs: LED stands for Light Emitting Diode, which basically means it does the same thing as a lightbulb. LEDs are somewhat different from lightbulbs, though. First, they work differently and are much smaller. Second, power can only pass through them one way- Like a one way street, and if you try going backwards, you don't get any light and no power passes through. That's what a Diode is, and the LED is just a special type of diode that also makes light. Pretty nifty, eh?

Resistors: Think of resistors like a dam on a river. Instead of letting all the water flow through, it 'resists' the water, holding part of it back. In electricity, there are two different aspects you'll be looking at: Amperage and Voltage. Amperage is like how fast the river is flowing, Voltage is how wide the river is. Resistors slow the current (Amperage) down. Resistors can be of different values, so some resistors will resist more than others.

## Step 2: Ohms Law and Color Codes

You'd probably like to get started on using the LED right away, but there's a few more things.

Ohms Law: This is a formula for calculating resistance, current, or voltage, based on the other of the two. It's often represented as the triangles in the picture. The picture explains how to use it based on what you want to find out. V is Voltage, I is Current, and R is resistance (In Ohms). Resistors are measured in ohms, so this will be useful.

Color Codes: You've probably noticed by now that resistors have bands of color on them. This is how the value (In Ohms) of the resistor is marked. Some resistors are called "4 Band", and some are "5 Band". They're read the same, but the 5 band version has one more band for extra precision. The notes on the pictures explain how to read them.

## Step 3: Calculating Resistors

Now that we know these things, we can calculate the value of the resistor to use with our specific LED.

There are two formulas we need to use.

Formula 1:

First, what's you supply voltage? If you're using an Arduino, a USB power supply, or a 3xAA battery holder, it'll be 5V. If you're using a 2xAA battery holder, then it's 3V. A breadboard power supply can output either 3.3V or 5V. Check the jumper on the pins to see which it's set to.

Second, what's your LED's voltage drop? We can usually use standard values here, since most LEDs are pretty similar. If it's red, use 1.8V. Orange/Yellow/Green is 2V, and Blue/White is 3.3V.

Finally, plug those numbers into the equation. For example, if you had a 5V supply voltage and a Blue LED, the formula looks like this: 3 - 1.8 = 1.2. So the voltage to use in the next equation is 1.2.

Formula 2:

This one is pretty easy to do. We can use standard value for everything but the value we just figured out. The formula looks like this: R = V / I. Replacing those letters with out values, R = 1.2 / 0.015, or 80 = 1.2 / 0.015. The V (Voltage) in the equation is replaced with the number we found in our earlier equation, and the I (Current) is replaced with 0.015, or 15 mAh, which is a good generalization for most LEDs. So, in this case we'd use an 80 Ohm resistor (Or whatever we can find closest to it).

## Step 4: Parts Needed:

Ready to go? Excellent! Here's what you'll need:

Step 2 will help you figure out specific values, but if you've got an
Arduino kit, then just use the lowest value resistor that comes with the kit. Don't worry if it's 220 or even 330 Ohms, LEDs will work with those resistors. If you've gotten an Arduino kit, these will likely all be included.

## Step 5: Step 4: the Breadboard

Now that you've got everything, let's take a quick look at the breadboard. This is what we'll prototype our circuit on.

It's pretty easy to understand. The picture shows yellow lines along some of the holes, and red and blue lines. The lines indicate where the breadboard is connected underneath. The yellow lines are the workspace, where we'll build the circuit, and the Red/Blue lines are the power and ground buses. Red is power, Blue is ground. The bottom half is the same as the top half.

That's it!

## Step 6: Power Supply:

One of the first things you'll need to power an LED is the power.

I'm using a 2xAA battery holder to power my breadboard, but some of you may be using an Arduino or a breadboard power supply, so I'll go over each of those.

2xAA Battery Holder: Take the red wire (Positive, Power), and plug it into the power bus on one side of the breadboard. Take the black wire and plug it into the ground bus on the same side.

Arduino: Take two jumper wires, preferably a combo of Blue/Red, or Black/Red. You can use any color wire, but it's good practice to have the power and ground wires follow these colors. Find the pins on the Arduino labeled "GND" and "5V". Those are your 5 volts output and ground. The red wire goes into 5V, the Black/Blue/Grey wire goes into GND. Then, the red wire goes to your breadboard power bus, the black/grey/blue wire to the ground bus on the same side.

Breadboard Power Supply: These things are pretty easy to use. Just take it and stick it in the end of your breadboard. Note! Make sure the "+" pin is plugged into the power bus, and that the "-" pin is plugged into the ground bus! Otherwise, if you plug anything into power that's damaged by reversing the power, it'll blow!

## Step 7: Wiring: LED and Resistor

Ready to actually do stuff? Let's go!

Take your chosen resistor, and plug it into the breadboard as shown in the pictures. One lead (Wire) needs to be in the power bus, and the other lead in one of the yellow buses. (In the work area).

Plug the LED into the breadboard, with the Anode (Longer wire, this indicates the positive side) into the same bus as the resistor is plugged into. The cathode (Shorter wire, negative, ground side) can plug into the next bus over.

Take your jumper wire, plug one end into the bus that the cathode of the LED is connected to (The one that the resistor is not connected to), and plug the other end into the ground bus.

If all goes well, you should have an LED lighting up! If not, here's a few things to try: Make sure your LED is plugged in the right way around, if not, it won't work. Check your power connections too, make sure they're plugged in correctly. If you're using batteries, check to see if they're any good.

## Step 8: Finshed!

Hopefully now you've gotten an LED lit up on your breadboard, and you also know how to read resistors, calculate resistor values for LEDs, and how a breadboard works.

If you have any problems, suggestions, or found any errors, please inform me in the comments!

<p>Ok so quick question.</p><p>Always wondered this.</p><p>If the leds are 3 volt each and I use four with a 12 volt supply.</p><p>Would I still need resistors?</p><p>Thanks you :)</p>
<p>Hmm, that's a very interesting question! I think we can likely treat 4 LEDs with a 3v drop (12v when combined) as one big LED with a 12v voltage drop, and 3 times the current needed. So using R = V / I, that's R = 0 / 0.06- Which is 0. I <em>think</em> we can safely say we don't need a resistor. </p><p>Hope this helps, and thanks for making my day with an interesting question!<br></p>
<p>I am a red head. It is what we do.</p><p>Make lives interesting lol.</p><p>Ok then will try it.</p><p>Thanks :)</p>
<p>Sounds good! Tell me how it goes!</p>
<strong>Crystal clear!</strong><p>Thank you.</p><p>Now I would like something similar dealing about <strong>Watts</strong>. </p><p>That is another key element when building circuits.</p><p><em>THKs</em></p><p>Alberto</p>
<p>Thanks for reminding me! I should add something to help with resistor wattage size.</p>
<p>Reminds me of my physics teacher!</p>
<p>Haha, is that a good thing? ;)</p>
nice ! easy to understand thanks for your effort !
<p>Thanks! And it's good to hear it's easy to understand, I was wondering, what with all the technical details I put in there.</p>
Your calculation of the resistor needs a bit of refining as it assumes the use of a voltage around 5v. Your idea of generalisation is fine but I think you have got a bit confused when it comes to where you give the 1.8v. This is the volt drop that a red LED has, other colours vary. Limiting the current to about 15mA is a good generalisation. Now the calculation for the resistor. Let's say you have a 5v supply, The LED drops 1.8v so we need the resistor to drop 5-1.8 that requires 3.2v Using your ohms last v/i= r gives 3.2/0.015 = 213.333 so a 220 ohm resistor would be fine.<br>Now look if you use a 2.4v supply, 2 batteries. The calculation now becomes 2.4 - 1.8 = 0.6. The resistor 0.6/0.015 = 40 ohms, much smaller. <br>Looking again using a larger power supply say 24v. The calculation now becomes 24 - 1.8 = 22.2. The resistor 22.2/0.015 = 1480. Very much larger.<br>Looking at the calculations you can see that calculating the voltage the resistor has to drop is more important when the power supply is just a bit bigger that the volt drop off the diode. <br>If you use say a blue LED, this has a volt drop off about 3.3v so do the same calculations but use 3.3 instead of 1.8. An interesting point. If you use 2 batteries then you can light a red LED. But if you have a blue LED, the volts are only about 2.4v but the LED drops 3.3v so it would not light.<br> Also, if you use a higher voltage you must be careful that the resistor can handle the power when it drops the voltage. In the last case, the power is v x I = 22.2 x 0.015 = 0.33 so you have to use at least a resistor variable of handling a third of a watt. As the power supply volts go up, so the value of the resistor goes up and also the amount of power the resistor has to get rid of goes up.<br>Handy things LEDs, but you still have to do the maths.
<p>Thanks a lot for your excellent and detailed reply! I cannot say I am an expert on the subject, having really only used 220 Ohm resistors with a 5v power supply, so your input is very helpful. I'll see what I can do about changing my instructable to account for different LED colors and power supply voltages. As for the wattage of the resistor, I don't know if it will be totally necessary for the scope of this particular instructable, as I'm assuming they're using a 3-5V power supply. However, I can briefly touch the subject, as there could be some people wishing to use higher voltages. Again, thanks a lot for your constructive critisism. </p>