It was just a coincidence that I bought an LED that was 1.7V and that it ended up working being able to be powered by my 1.5V power supply without the use of a resistor. For this second setup I decided to use the same LED, but up my power supply to the three AA batteries wired together which output 4.5V - enough power to burn out my 1.7V LED, so I would have to use a resistor.

To figure out which resistor to use I used the formula:

R = (V1 - V2) / I

where:

V1 = power supply voltage

V2 = LED voltage

I = LED current (usually 20mA which is .02A)

Now there are lots of calculators online that will do this for you - and many other instructables reference

this as a good one, however, the math really isn't too hard and so I wanted to go through the calculation myself and understand whats going on.

Again, my LED is 1.7V, it takes 20mA (which is .02 A) of current and my supply is 4.5V. So the math is...

R = (4.5V - 1.7V) / .02 A

R = 140 ohms

Once I knew that I needed a resistor of 140 ohms to get the correct amount of voltage to the LED I looked into my assortment package of resistors to see if I could find the right one.

Knowing the value of a resistor requires reading the code from the color bands on the resistor itself. The package didn't come with a 140 ohm resistor but it did come with a 150 ohm one. Its always better to use the next closest value resistor greater than what you calculated. Using a lower value could burn out your LED.

To figure out the color code you basically break down the first two digits of the resistor value, use the third digit to multiply the first two by and then assign the fourth digit as an indicator of tolerance. That sounds a lot more difficult than it really is.

Using the color to number secret decoder website found

here, a 150ohm resistor should have the following color code...

Brown because the first digit in the value resistor I needed is 1

Green because the fifth digit is 5

Brown because in order to get to 150 you have to add one 0 to 15 to get to 150.

Gold - the resistors I got all have 5% tolerance and 5% is represented by gold

Check out the decoder page link above if this isn't making sense.

I looked through all the resistors, found the one that was brown, green, brown, gold, and wired it in line on the positive electrode of the LED. (Whenever using a resistor on an LED it should get placed before the LED on the positive electrode).

Low and behold, the LED lit up once again. The 150 ohm resistor stopped enough of the 4.5V power supply from reaching the 1.7V LED that it lit up safely and kept it from burning out.

This is just the process that I went through to figure out what resistor to use with my particular LED with my particular power supply. You can easily use the formula above to figure out what value resistor to use with whatever LED and power source you happen to be using.