# Electronics dopers, a hand

**URL:** <https://boards.straightdope.com/t/electronics-dopers-a-hand/423933>\
**Category:** Factual Questions\
**Created:** [October 25, 2007, 5:35am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933 "2007-10-25T05:35:45Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![drachillix](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@drachillix](https://boards.straightdope.com/u/drachillix)\
**Post date:** [October 25, 2007, 5:35am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/1 "2007-10-25T05:35:45Z")

</div>

I have a little project I am trying to put together, I can solder, but im not real electronics fluent.

I know small batteries are rated for a number of milliamp hours

I need to power some LED’s

is there a simple way to extrapolate an approximate lifespan for a battery with a specified LED.

example:  
[http://superbrightleds.com/specs/WW7035\_specs.htm](http://superbrightleds.com/specs/WW7035_specs.htm)

is the info needed to make this calculation present? I will need to find a balance between cost/brightnesss/draw and want to come up with a rule of thumb for what is too much draw for battery X with a needed battery life of Y.

I understand some basics, but this chart is throwing me.

Thanks

---

<div class="post-metadata">

**Author:** ![treis](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@treis](https://boards.straightdope.com/u/treis)\
**Post date:** [October 25, 2007, 5:54am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/2 "2007-10-25T05:54:25Z")

</div>

The key number is 120 mW. Convert the power of the battery into miliJoules and then divide that number by 120. That will give you the operation time in seconds. If you give us the battery specs we can help you further.

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [October 25, 2007, 5:55am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/3 "2007-10-25T05:55:45Z")

</div>

Well, the LED you linked to is rated at 30 mA. You probably don’t want to push it to its limit, so figure 15 mA, maybe 20 at the most. Batteries are rated in mA-hours, so just divide the mA-hour rating by the mA value and you’ll get hours. Then, since this is just a quick and dirty calculation and you aren’t taking into account things like battery discharge curves, just arbitrarily cut that number in half.

It won’t be an incredibly accurate number, but it will be in the right ballpark.

---

<div class="post-metadata">

**Author:** ![drachillix](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@drachillix](https://boards.straightdope.com/u/drachillix)\
**Post date:** [October 25, 2007, 6:04am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/4 "2007-10-25T06:04:39Z")

</div>

[QUOTE=engineer\_comp\_geek]  
Well, the LED you linked to is rated at 30 mA. You probably don’t want to push it to its limit, so figure 15 mA, maybe 20 at the most. Batteries are rated in mA-hours, so just divide the mA-hour rating by the mA value and you’ll get hours. Then, since this is just a quick and dirty calculation and you aren’t taking into account things like battery discharge curves, just arbitrarily cut that number in half.

It won’t be an incredibly accurate number, but it will be in the right ballpark.  
[/QUOTE]

So one of these [Li-Ion Rechargeable 2450 Button Cells: Two LR2450 , 3.6V 120 mAh ( 24d x 5t mm, 0.43Wh each )](http://www.batteryspace.com/index.asp?PageAction=VIEWPROD&ProdID=2419)

should mean 120mAh battery/20mA draw = 6 hours /2 = approx 3 hours.

---

<div class="post-metadata">

**Author:** ![panamajack](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@panamajack](https://boards.straightdope.com/u/panamajack)\
**Post date:** [October 25, 2007, 6:24am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/5 "2007-10-25T06:24:09Z")

</div>

**engineer\_comp\_geek** gave a good way to estimate it.

You do know you can’t just hook up the LED straight to 3.3 Volts worth of batteries, right? You need to limit the current somehow.

---

<div class="post-metadata">

**Author:** ![drachillix](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@drachillix](https://boards.straightdope.com/u/drachillix)\
**Post date:** [October 25, 2007, 6:30am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/6 "2007-10-25T06:30:17Z")

</div>

[QUOTE=panamajack]  
**engineer\_comp\_geek** gave a good way to estimate it.

You do know you can’t just hook up the LED straight to 3.3 Volts worth of batteries, right? You need to limit the current somehow.  
[/QUOTE]

I swear that was gonna be my next question… will I need another device in the circuit other than a switch?

Basically I am making a glorified flashlight, just a special application housing/mounting bracket.

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [October 25, 2007, 6:46am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/7 "2007-10-25T06:46:53Z")

</div>

I would hope you wouldn’t try to directly power the LEDs from the batteries. The battery voltage on the linked batteries is 3.6 volts. The max forward voltage on the LED is 3.4 volts. Your LED will likely become a DED (what we electronic geeks call a Dark Emitting Diode, aka a burnt out LED).

LEDs are very non-linear devices. They go from too dim to POOF over a very narrow voltage range. It’s much easier to drive them with a current than a voltage. An easy way to regulate the current is to use a higher battery voltage and a resistor in series with the LED to limit the current.

R = ( Battery Voltage - LED Forward Voltage ) / LED current

You could also get fancy and use a current regulator like an LM317.

---

<div class="post-metadata">

**Author:** ![drachillix](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@drachillix](https://boards.straightdope.com/u/drachillix)\
**Post date:** [October 25, 2007, 6:36pm UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/8 "2007-10-25T18:36:26Z")

</div>

[QUOTE=engineer\_comp\_geek]  
I would hope you wouldn’t try to directly power the LEDs from the batteries. The battery voltage on the linked batteries is 3.6 volts. The max forward voltage on the LED is 3.4 volts. Your LED will likely become a DED (what we electronic geeks call a Dark Emitting Diode, aka a burnt out LED).  
[/quote]

Gotcha

> [@](#):
>
> LEDs are very non-linear devices. They go from too dim to POOF over a very narrow voltage range. It’s much easier to drive them with a current than a voltage. An easy way to regulate the current is to use a higher battery voltage and a resistor in series with the LED to limit the current.

If I am extrapolating correctly here this will give more of a buffer before the battery will provide insufficent voltage to light the LED by having excessive voltage stepped down by a resistor.

next Q, will the resistor just shave off X amount of voltage at all times or will the reduced pressure of the lower voltage result in less resistance to it.

> [@](#):
>
> R = ( Battery Voltage - LED Forward Voltage ) / LED current

so in this case 3.6 - 3.4 = .2 /20 = .01 (ohms?)

> [@](#):
>
> You could also get fancy and use a current regulator like an LM317.

Why do I think I would fry a dozen of those trying to figure it out…

---

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [October 25, 2007, 6:46pm UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/9 "2007-10-25T18:46:00Z")

</div>

[QUOTE=drachillix]

so in this case 3.6 - 3.4 = .2 /20 = .01 (ohms?)

[/QUOTE]  
I think you are missing a factor of 1000 here. I assume the 20 is 20mA of current. so really you want .2/.020 = 10 ohms.

---

<div class="post-metadata">

**Author:** ![buckgully](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@buckgully](https://boards.straightdope.com/u/buckgully)\
**Post date:** [October 25, 2007, 7:50pm UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/10 "2007-10-25T19:50:13Z")

</div>

I use this all the time when doing simple LED stuff:

[http://led.linear1.org/led.wiz](http://led.linear1.org/led.wiz)

In this case, you can make an “array” of 1 led. Also, it tells you the resistor color codes you need.

Edit: just noticed that there is a 1 led version:  
[http://led.linear1.org/1led.wiz](http://led.linear1.org/1led.wiz)

---

<div class="post-metadata">

**Author:** ![Belrix](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Belrix](https://boards.straightdope.com/u/Belrix)\
**Post date:** [October 25, 2007, 8:51pm UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/11 "2007-10-25T20:51:56Z")

</div>

[QUOTE=drachillix]  
Basically I am making a glorified flashlight, just a special application housing/mounting bracket.  
[/QUOTE]

The quick and dirty way to do this would be to tear apart an existing, cheapie flashlight.

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [October 26, 2007, 12:38am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/12 "2007-10-26T00:38:49Z")

</div>

[QUOTE=drachillix]  
so in this case 3.6 - 3.4 = .2 /20 = .01 (ohms?)  
[/QUOTE]

Well… um… sorta. These equations are modeling diodes as a constant voltage device, which diodes aren’t. There are several ways to model a diode to make the math a bit easier. A constant voltage drop isn’t a terribly accurate model, but it makes the math easy. The equations are more accurate when the battery voltage is significantly higher than the forward voltage of the LED.

Also, as was previously mentioned, 20 mA is 0.020 amps.

[QUOTE=drachillix]  
Why do I think I would fry a dozen of those trying to figure it out…  
[/QUOTE]

[http://www.cresttech.com.au/led\_info\_notes.html](http://www.cresttech.com.au/led_info_notes.html)  
Scroll down to “Driving LEDs with a 3 terminal regulator” down near the bottom of the page. Note that the LM317 is going to need a higher battery voltage (at least 6V).

---

<div class="post-metadata">

**Author:** ![scr4](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@scr4](https://boards.straightdope.com/u/scr4)\
**Post date:** [October 26, 2007, 1:37am UTC](https://boards.straightdope.com/t/electronics-dopers-a-hand/423933/13 "2007-10-26T01:37:34Z")

</div>

[QUOTE=engineer\_comp\_geek]  
Well… um… sorta. These equations are modeling diodes as a constant voltage device, which diodes aren’t.  
[/QUOTE]

Another serious problem is that the _battery_ isn’t a constant-voltage device either. In fact, if you look at the datasheet on that page, you’ll see the voltage varies quite a bit depending on charge status, current and temperature. It can be as high as 4.2 volts.

So your choices are:  
[ul]  
[li]Use a resistor, and choose its value by assuming battery voltage of 4.2 V. And accept the fact that the LED will only be at max brightness with a freshly charged battery. [/li][li]Use a regulator, like the LM317 suggested above.[/li][/ul]
