... but how do I work out what size resistor I need to use when working with an LED? I have looked around on Google but I can't find a formula / answer?
Please can someone advise?
... but how do I work out what size resistor I need to use when working with an LED? I have looked around on Google but I can't find a formula / answer?
Please can someone advise?
Ohmmmmm
You need to know what current can run through your LED safely. Most 5 mm LEDs accept 20 mA easily.
The resistor in series with your LED will restrict the current through the entire circuit. As if the LED was not there. Apply Ohm’s law.
V = I · R
V = your supply voltage
I = desired current
R = resistance of the circuit (of your resistor)
For example in a 5 Volt circuit and a 20 mA desired current, your R needs to be:
5 = .002 · R
or
R = 5 / .002 = 2500 Ohm
Find one in your parts box that comes close to 2500 Ohm or 2.5 kilo Ohm. If you cannot find 2.5 kOhm, go higher. More resistance means lower current and that means better survival chances for your LED.
Next time, please give your post a more meaningful subject.
Totally forgot about the voltage drop
Tuna is right. If your supply voltage (in my example) is 5 Volts, subtract some 1.5 or 2.0 V from that and then apply Ohm’s law.
(5 - 1.5) / .002 = 1750 Ohm
You have to use Ohm’s
You have to use Ohm’s Law.
First thing your LED has a voltage drop which depends on the type of LED you are using and on its color. Once you know it you need to subtract it from the voltage given by the batteries. You have to put this “remaining” voltage into ohm’s law.
EG: you have a battery pack giving out 5V and your red LED has a vdrop of 2V, you end up with 5-2 = 3V. Depending on how much current you want to have in your LED you find out the resistor.
Say you want a current of 20mA to go into the led, then you get: V=I*R R= V/I R= 3V/0.020A = 150 Ohm
You may want to have mure current entering the LED or less, that’s up to you, just remember not to exceed, and in this the LED’s datasheet, if you have one, may help. (20mA is a good starting point for testing the brightness)
One other thing i forgot, the wattage rating of the resistor must be (following the above example):
5V - 2V = 3V (as done before)
150 Ohm (resistance calculated before)
P = I * V (power formula) or P = I * I * R
P = 0.020 A * 3V = 0.06 W
this means it must be at least rated 0.06 W (in practice you’ll find them rated 1/8, but a more common 1/4 rated resistor works the same way. So don’t bother buying 1/8 W rated resistors when you can buy 1/4 which you’ll use more)
Datasheets
We cannot answer all questions about your specific situation, because we do not know the voltage drop and the highest safe current in your LEDs. Voltage drop 2 V and safe current of 20 mA are ballpark figures. LEDs are dirt cheap, go with these numbers. Or better yet: learn how to Google datasheets for your parts. And then show us your datasheet and maybe we can teach you how to read those.
And then you really are no beginner anymore!
20mA is .02 I can
20mA is .02
I can understand…bed time
Darn, I am off my game tonight
20 milli Ampere equals .020 Ampere. But you knew that!
**Search for “smoke emitting diodes” **
And you will understand how I could get this wrong sometimes.
You guys all FAIL!!!
This is the correct answer***
Spot on - thanks Chris!
Spot on - thanks Chris!
Or…
Or, if you feel like being extremely lazy check this out:
http://led.linear1.org/1led.wiz
It does the same thing as the formula, except it is automatic and a calculator.
Resistor Value
I’d go with a 330 ohm resitor in series with the LED. The color code for it is Orange, Orange, Brown with Gold or Silver in the fourth band.
Wow, how did I miss that
Wow, how did I miss that posting?!?!?
Thanks for posting that ctc, great ref material.
Thanks to OB as well, excellent material!!!
Well you can’t really say
Well you can’t really say that… what if he’s using a 20v battery? Better be more than 330!