I want to take an LED and power it with a 9V battery. I just don't seem able to get the math right.

Taking an average 9V battery and a 10mm LED, what kind of resistor would I need and how do I know for how long the LED will run on the battery?

Also, can infrared LEDs be "seen" (using a camera?) from a distance?

  • 1
    \$\begingroup\$ Don't forget to accept the answer that best solves your problem. Once you have 15 rep you can also upvote useful answers. Do so, it shows appreciation. \$\endgroup\$ – Federico Russo Jul 24 '12 at 13:58

10 mm is not an electrical specification, you should consult the datasheet to find out how much current it needs. For an indicator LED that's often 20 mA. The LED will have a voltage across it, what's called the voltage drop. We also need that, it's also in the datasheet. The voltage drop mainly depends on the color, for a red LED 2 V is a typical value.

So with 2 V and 20 mA we can get to work. We're going to place a resistor in series with the LED to control the current. At 9 V battery voltage and a 2 V drop across the LED we'll have 7 V remaining for the resistor. Then according to Ohm's Law Voltage = Current x Resistance, we can calculate the resistor value as

\$ R =\dfrac{V}{I} = \dfrac{7 V}{20 mA} = 350 \Omega \$

The closest E12 value is 390 Ω. To know how long the battery will light the LED we want to know the battery's capacity, expressed in mAh, for mA-hours. An alkaline barry may have a capacity of 560 mAh. Then at 20 mA it will work for about 28 hours, maybe somewhat less.

And yes, a camera will see IR, from how far depends on the LED's power output.

| improve this answer | |
  • \$\begingroup\$ maybe longer if its voltage sags and the current output decreases! \$\endgroup\$ – Kortuk Jul 24 '12 at 12:42
  • \$\begingroup\$ Thank you for your explanation, I really apreciate it. I looked into the datasheet and will now make the calculations. sonigate.com/uploads/product_pdfs/… \$\endgroup\$ – TheNewGuy Jul 24 '12 at 13:52
  • \$\begingroup\$ @TheNewGuy - Can you find it? Datasheets can be daunting the first time you look at them. What you need is on page 3: Forward voltage (minimum, typical, maximum) and at which current. \$\endgroup\$ – stevenvh Jul 24 '12 at 16:43

Use Ohm's law. First you have to know the voltage drop accross the LED when lit to its desired level. For typical green LEDs, that's usually about 2.1 V. Red LEDs are lower, and IR LEDs even lower still. Blue and white are higher, like a bit over 3 V.

Let's say for sake of example you have a typical 20 mA green LED that drops 2.1 V. The battery puts out 9 V, so that leaves 9V - 2.1V = 6.9V accross the resistor in series with the LED. These LEDs can take 20 mA of current, but unless you expect to use it in a bright environment that will be overkill. Let's aim for about 10 mA LED current. Since the LED and resistor are in series, the LED current and the resistor current will be the same.

The question now is, what resistance drops 6.9 V at 10 mA? This is what Ohm's law is about. 6.9V / 10mA = 690Ω. The standard value of 680 Ω will be fine.

To calculate the run time, look at the battery Amp-hours spec. 9 V batteries have poor energy density for their size, and they are not a good choice for running a LED efficiently. I rarely use them so I don't remember what the capacity is, so I'll use 1 A-h for example only (could be quite off from a real 9 V battery.

The A-h capacity is in theory the current you can draw for 1 hour from a fresh battery until it is dead. You are drawing 10 mA, which is 1/100 Amps, so in theory a 1 A-h battery will last 100 hours. In practise less, as low as half that in cold for example.

| improve this answer | |
  • \$\begingroup\$ Thank you. If I uderstood correctly I can use a "higher" resistor and make the battery last longer albeit at the expense of the led brigthness, right? The battery you mention:" 1 A-h battery" it means a 1 ampere per hour battery and not a specific kind of battery I think. The objective is to keep the led going for as long as possible while maintaining a decent brigthness. THe battery should be cheap and not very big (hence the 9v) any recommendation? \$\endgroup\$ – TheNewGuy Jul 24 '12 at 13:57
  • 1
    \$\begingroup\$ @TheNew: Yes, a higher resistor causes less current, which causes less brightness but also longer battery life. If efficiency is a concern, then use two AA batteries. They will be closer in to the LED voltage so proportionally less power will be wasted in the resistor. They also have higher capacity than the 9V battery. For best efficiency, use a switching power supply. My KnurdLight project is a good example of that: embedinc.com/pic/knli/index.htm \$\endgroup\$ – Olin Lathrop Jul 24 '12 at 16:03
  • \$\begingroup\$ @TheNewGuy: it's not ampere per hour but ampere times hour. 10 Ah = 10 ampere during 1 hour or 1 ampere during 10 hours, or 100 milliampere during 100 hours. \$\endgroup\$ – Federico Russo Jul 24 '12 at 18:14

Instead of wasting power with a large voltage drop across the resistor, you can also put more LEDs in series. Red and yellow LEDs are typically 1.6 V, and blue and white are 3.2 V in low currents less than 20 mA. This assumes modern high intensity parts are selected.

This means you could put red, white, and blue LEDs in series with a 9 V to 9.5 V battery as you suggested.

9.2 V Battery (~ mid life), then subtract:

  • red        1.6 V
  • white    3.2 V
  • blue      3.2 V

The remainder is 1.2 V, which we want across the current limiting resistor for say 10 mA, which is half of most 5 mm LEDs rated at 20 mA.

  • 1.2V/10 mA = 0.12 kΩ = 120 Ω
  • 1.2V * 10 mA = 12 mW or 10% of rated 1/8th W resistor

Naturally, tolerances of 10% on resistors and 10% on LEDs will be safe when you operate at the 50% rating.

A bigger resistor will be proportionally less current and last longer.

LEDs with a larger luminous intensity (Iv) have smaller beam width angles that use the same chip, such that Theta of 20 degrees is twice as bright as Theta of 45 degrees.

| improve this answer | |

When it comes to IR LED part of your question, Your camera can see IR light whether its day or night. Something like in this video:


Warning: Please check the safety instructions before proceeding: https://en.wikipedia.org/wiki/Laser_safety

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.