Lets get right to it:
Each of the steps do the same thing. Step 1 is the simplest and we go downhill from there.
No mater what way you choose you must first know these three things:
- Supply voltage This is how much power you're putting into the circuit. Batteries and wall warts will have the output voltage printed on them somewhere. If you're using multiple batteries*, add the voltage together.
- LED Voltage Sometimes "Forward Voltage" but usually just abbreviated "V".
- LED Current Sometimes "Forward Current". This is listed in milliamps or "mA".
Red LED: 2V 15mA
Green LED: 2.1V 20mA
Blue LED: 3.2V 25mA
While LED: 3.2V 25mA
Okay, lets get started!
* Batteries in series.
Introduction photo credits:
LED photo by Luisanto.
Resistor photo by oskay.
Step 1: The Web Way
The easiest way is to use one of the online calculators provided below.
Just click on one and enter the info from the previous step and you're set! You only need to go to one.
The LED Center (For single LEDs)
The LED Center (For arrays of LEDs)
LED Calculator.net (For single or arrays of LEDs)
LED Calculator.com (For single or arrays of LEDs)
Step 2: The Retro Way
Go to Evil Mad Scientist Labs web page at this link and print and make your own slide rule-like calculator.
PDF, assembly and usage instructions are all on the page linked above.
It's pretty nifty and ends up being about business card size so you can keep one in that box with the rest of your LEDs.
Step 3: The Hard Way (Math!)
All the calculators in step 2 are just doing some simple math that you can do at home:
The formula to calculate resistance in a circuit is: R=V/I or, more relevant to what we're doing:
(Source Volts - LED Volts) / (Current / 1000) = Resistance*
So if we have a 12v battery powering a 3.5V 25mA LED our formula becomes:
(12 - 3.5) / (25 / 1000) = 340ohms.
But wait! (you might say) When I use one of the other calculators I get 390 ohms! And indeed you do. That's because its hard to buy a 340 ohm resistor and easy to buy a 390 ohm one. Just use the nearest one you can easily find.
To learn more about this magic formula read about Ohms Law.
* We're dividing the current by 1000 because our listing in in miliaps, or 1/1000th of an amp.
dsandy3 made it!