# What resistors do I need for my LED? [duplicate]

I don't really know the whole technology thing so this is why I'm asking. I bought "20PCS 5mm IR infrared LED 940nm Lamp High Power" for head tracking and I don't know what resistors will be good for it. can someone can explain to me how it works or what resistors for example? Thx

• Why do you think you need resistors? What are they intended to do? What does the data sheet for the LED tell you? May 13, 2020 at 11:52
• A link to the LED data sheet would help so we know how much voltage and current it needs also what is your supply voltage? The simplest circuit is just a resistor in series. The voltage across the resistor is just the supply voltage minus the LED voltage and if you know the current you want just use ohms law. May 13, 2020 at 11:56
• R = (Vin - Vf)/If May 13, 2020 at 12:24
• You need to provide more information. An IR LED usually drops about 1.5V. Apart from that, we don't know your supply voltage, or what current the LEDs are rated for. Without knowing that, it's impossible to calculate the resistor. May 13, 2020 at 12:41
• And surely this is not the first question here that is about how to calculate resistor for LED. Even Wikipedia has an article on that, so there is literally no effort made trying to find an answer. May 13, 2020 at 16:05

Because I looked up "20PCS 5mm IR infrared LED 940nm Lamp High Power" and found them on ebay, I am using that information to try to help you. Let's proceed experimentally.

Hook up a 10K resistor and a 9-volt battery (or 9 volts DC from a power supply) to one of your LED's, and measure the voltage across the LED. (You can use any 10K resistor you can find). V=IR, so I=V/R which is 9 / 10K which is 0.9 mA or about one thousandth of an Amp. If we do it more properly (include the forward voltage of the LED in the calculation), then assuming a forward voltage of 1.2 Volts, then it would still be about the same amount of current (9-1.2)/(10,000) = 7.8/10000 = 0.78 mA -- still about one mA. And if the LED should have a 3-volt forward voltage, then the answer is (9-3)/(10,000) = 0.6 mA -- STILL about one mA. So this is a good setup to try in your case, when you may not know much about the LED yet. The reason the current was in each case about one milliamp was because most of the voltage was dropped by the resistor.

This gives you a starting point for what the forward voltage might be under "high power" whatever that is. Unfortunately, the light is infrared, so you can't see it with your eye, but you can either put a white LED in series with it, so you can have some kind of visual indication. Or you can try using a digital camera, which should be able to "see" the infrared LED shining. Or try it out in whatever your application is.

Your goal now that you have the LED working, is to increase the power to the LED until either you are satisfied with it, or it burns out (sorry -- without a datasheet, there may be no other way to know). We increase the power to the LED by decreasing the resistance relatively slowly so that we can see what's going on. Let's do the calculations for 1K, then try that. With a white LED and one infrared LED in series, it would be about (9-3-1.2)/1K = 4.8/1000 = 4.8 mA. Without the white LED it would be (9-1.2)/1K = 7.8/1000 = 7.8 mA so in either case it should be safe to try as most LED's can handle at least 30mA (and these are supposedly high-power LED's). This should be significantly brighter, but still not burn out the infrared LED. Go ahead and try it. (You can use any 1K resistor you can find). Measure the voltage across the LED and also the voltage across the 1K resistor (they should add up to the total battery voltage -- about 9 volts -- measure that, too).

Let's say the voltage across the resistor is 6 volts. Power is VI, and since V=IR and I=V/R, power is also = V*V/R = 6*6/1000 which is 36 mW so a tenth-of-a-watt resistor (100mW) would be able to handle this. Power is often what you have to worry about with resistors and whether they can handle what you're asking them to do.

Now let's say you're satisfied with that level of output, and let's say the measured forward voltage is 1.7 -- the more power you put through the LED, the higher the forward voltage will go. (It will also change with temperature -- that's why some form of constant current is often used).

At 1.7 forward voltage, if you wanted to make a flashlight, you could either use 2 x AA for 1.5-to-3.0 volts range, some of which is unusable. Or it might be better to use 3 x AA for 2.2-to-4.5 volt range, which should be able to maintain the brightness of the LED's through the full life of the batteries. Let's assume you're using Lithium batteries which are very stable with their voltage, so we can just assume 4.2 volts. Then V=IR and we're after R, so R=V/I = (4.2-1.7)/4.8mA = 2.5/0.0048 = 520.83 so we'll use a resistor in the neighborhood, say 510 ohms. So, if you hook every single LED up to a 510 ohm resistor, they should all be about the same brightness. Through hole resistors can be gotten for less than 10 cents apiece, and if you do it that way, if one LED burns out, it won't increase current to the others, causing an avalanche effect making them burn out faster. The total current would be 20 LED's x 4mA = 80mA -- not too bad. Power = VI = 4.2 * 0.080 = 0.336 W about a third of a watt from the batteries, again, not too bad.

If you keep reducing the resistance of your LED and let's say it dies at 100mA. Then you should significantly cut that back -- perhaps to 50mA, and use that resistance. Though you might also test that out by using that resistance hooked up to the LED for a long time to make sure it's still okay at 50mA. Also, you may want to heat sink and cool the LED's to make them last longer if they are truly "high power" LED's.

If you report back on your progress, then we can steer you in the right direction to help you to be successful. Let us know how it goes!

• Wow, thank you so much I've just searched the necessary things I will tell my progress if another question will pop up. you explained that perfect thank you for taking your time Btw thank you all of you guys that tried to help me. and about the sheet data, I didn't know what was it before so I didn't think I need to add it to my question but all is clear now thank you all!!! May 14, 2020 at 6:42
• @לידורבובה -- If you liked my answer, please vote it up. It helps improve my reputation, and I work hard for it. Thanks. May 14, 2020 at 14:36

LED resistor calculation is in general simple enough.

$$R = \frac{V_F-V_s}{I_F}$$

Where $$\V_F\$$ is the LEDs forward voltage at the desired forward current, $$\V_S\$$ is the supply voltage and $$\I_F\$$ is the desired forward current.

Normally you would get figures like maximum forward current forward voltage at different currents form the datasheet. Unfortunately from the product name you post and some searching it seems you bought your LEDs on ebay or similar. This means you have no clue what their specifications are.

Forward voltage is easy enough, hook it up to a supply (exact voltage not too critical, anything from 5V to 12V is probably fine) through a 1K or so resistor and measure the voltage across the LED. This won't be perfect, but it should be good enough to base your next calculation on and you can iterate if you find the forward voltage under final operating conditions is a bit different from that under your initial test.

Maximum forward current is more of a problem to determine. For "normal" LEDs 20ma is usually the recommended maximum, LEDs designed for illumination can be much higher but you have no clue whether the "high power" on the ebay listing actually means anything or is just marketing bullshit slapped on a generic indicator LED. So if you run at more than 20ma you run the risk of significantly shortening the life of the LED.