### Author Topic: How to calculate how long until a circuit drains a battery.  (Read 4555 times)

0 Members and 1 Guest are viewing this topic.

#### zorthgo

• Regular Contributor
• Posts: 108
• Country:
##### How to calculate how long until a circuit drains a battery.
« on: July 11, 2013, 11:19:42 pm »
Hi guys, I am working on a project for a friend. Basically he is a photographer and wants to add an LED to the frame of his pictures so that it lights up when the room gets dark.  The circuit that I have in mind, employs a photoresistor (GL5516), and your run of the mill LED for active components. Off the top of my head, I think the circuit will eat up about 50mA - 70mA (20mA for the LED and about 20mA for the photoresistor). If I use 4 AAA batteries (a combination of parallel and series to get 3.0V), how can I calculate how long could the circuit stay continuously on for?

Thanks!
Slow and steady wins the race!

• Super Contributor
• Posts: 1425
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #1 on: July 11, 2013, 11:27:28 pm »
How about you show a schematic for what you plan on doing...
'cause if you plan on doing what I think you're going to do, not a chance it'll work...
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.

#### zorthgo

• Regular Contributor
• Posts: 108
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #2 on: July 11, 2013, 11:45:17 pm »
Basically what I am thinking is that if I consider the Photoresistor as a simple resistor, I can use voltage division to calculate the correct voltage through the LED to turn it on. I think this might work (but I wouldn't bet  money on it). Also, if anyone has any other ideas that might be more efficient, I am all ears!
Slow and steady wins the race!

#### kizzap

• Supporter
• Posts: 477
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #3 on: July 11, 2013, 11:50:43 pm »
pretty much what you are thinking of doing is what I would do, simple voltage divider, with the photo resistor connected at ground, then use a NPN transistor (and possibly a MOSFET - I don't know about them, they just seem to mythical to me for some reason) and have the transistor control the load.

-kizzap
<MatCat> The thing with aircraft is murphy loves to hang out with them
<Baljem> hey, you're the one who apparently pronounces FPGA 'fuhpugger'

#### HackedFridgeMagnet

• Super Contributor
• Posts: 1914
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #4 on: July 11, 2013, 11:52:48 pm »
Light resistance at 10 Lux   5-10 Kohm, so you wont get much current.

probably the photoresistor into the gate of a fet and the fet swithches the diode on. Maybe a resistor or two.

This is a perfect project to test in a breadboard.

• Super Contributor
• Posts: 1425
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #5 on: July 12, 2013, 12:20:03 am »
Basically what I am thinking is that if I consider the Photoresistor as a simple resistor, I can use voltage division to calculate the correct voltage through the LED to turn it on. I think this might work (but I wouldn't bet  money on it). Also, if anyone has any other ideas that might be more efficient, I am all ears!
That's what I thought you were going to do...
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.

#### digsys

• Supporter
• Posts: 1773
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #6 on: July 12, 2013, 12:24:52 am »
Quote from: zorthgo
... about 50mA - 70mA (20mA for the LED and about 20mA for the photoresistor). If I use 4 AAA batteries (a combination of parallel and series to get 3.0V),
how can I calculate how long could the circuit stay continuously on for?
As others have said, don't put the LED in series, use it to trigger a transistor of FET. Second, you can get LEDS that are full brightness at 1mA and less.
That will save you shitloads (yes, it's a proper technical term :-)) of current. Plus I'm sure there's Photodetectors out there that work on much less
current as well. So you could possibly end up with 5mA max, which already increases the run time 14X
Hello <tap> <tap> .. is this thing on?

#### IanB

• Super Contributor
• Posts: 9251
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #7 on: July 12, 2013, 12:26:54 am »
If I use 4 AAA batteries (a combination of parallel and series to get 3.0V), how can I calculate how long could the circuit stay continuously on for?

(running time) = (capacity of battery) / (current draw)

You can find the capacity of the battery in the data sheet from the battery manufacturer. (It varies with load, but the data sheet has charts covering this.)
I'm not an EE--what am I doing here?

#### zorthgo

• Regular Contributor
• Posts: 108
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #8 on: July 12, 2013, 12:41:38 am »
@digsys: Could I perhaps replace the photoresisor with a phototransistor (which draws 1mA). I kind of remember working with phototransistors in the lab, but I don't know if I can adjust it to turn on the LED at a specific light intensity!

@IanB: Thanks for the formula! That is one of the formulas I came up with when I was trying to figure it out. But I didn't think it would work because I thought I would have to do some integration or something. I am glad it is that simple!
Slow and steady wins the race!

#### Psi

• Super Contributor
• Posts: 6477
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #9 on: July 12, 2013, 12:57:29 am »
It gets more complicated when you take into account the fact that as batt volts fall so does the current draw which slows down discharge.

I had a ID tag project that used a CR2032 coincell + led + 330R resistor.

CR2032 Battery spec is 3V 0.2Ah
So quick and dirty equation says.. 0.2Ah /  (  (3Vbat - 1.6Vled)  /330R)  = 47Hours

However, in real life it lasted more like 4 days at reasonable brightness but was still glowing even after 3 weeks.
Greek letter 'Psi' (not Pounds per Square Inch)

#### zorthgo

• Regular Contributor
• Posts: 108
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #10 on: July 12, 2013, 01:01:02 am »
@Psi: That is exactly why I thought the the equation might involve "e^x"!
Slow and steady wins the race!

#### digsys

• Supporter
• Posts: 1773
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #11 on: July 12, 2013, 01:02:41 am »
Quote from: zorthgo
@digsys: Could I perhaps replace the photoresisor with a phototransistor (which draws 1mA). I kind of remember working with phototransistors in the lab,
but I don't know if I can adjust it to turn on the LED at a specific light intensity!
As far as you're concerned, works exactly the same. If you find one that works at 1.2-1.5V, even better. The LED needs app 1.2V, so you could
run 4x in parallel.  Any voltage above that is wasted energy.
Hello <tap> <tap> .. is this thing on?

#### Jeff1946

• Regular Contributor
• Posts: 84
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #12 on: July 12, 2013, 01:06:45 am »
Go to the Eveready web site and look the voltage vs time as a function of output current.  Note the voltage will drop pretty quickly below 1.5 volts before most of the battery capacity is used.  Good choice for white leds is 3 AA or AAA batteries in series.  This way you light the LEDS til the batteries drop below 1.1 volts where you have used up most of the their energy.

A low turn on voltage n type FET would be a good choice controlled by a photoresistor between its gate and source and an appropriate resistor between the gate and drain.  Assuming you are putting several LEDs in parallel, each one should have a current limiting resistor.

For extra credit try putting a resistor between the FET source and ground (negative battery terminal) in this case the photoresistor should be between ground and gate.   This will provide a more constant current source.

Play around as a learning exercise.

An alternate method would be to use an LM339 comparator, with this circuit is straightforward to add hysteresis if you want.

#### olsenn

• Frequent Contributor
• Posts: 993
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #13 on: July 12, 2013, 02:07:09 am »
If your circuit is drawing 20mA when the LED's are off then you're doing something wrong. The phototransistor can have a high impedance and switch on another transistor when it gets dark. The low impedance output of this second stage will be what drives the LED's

#### zorthgo

• Regular Contributor
• Posts: 108
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #14 on: July 12, 2013, 03:15:00 am »
Going by what you guys are saying, do you think this approach would be better? (I haven't put values because I would still have to work them out)
Slow and steady wins the race!

#### Christopher

• Frequent Contributor
• Posts: 429
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #15 on: July 12, 2013, 03:19:05 am »
mAh capacity of battery divided by ( adv current draw of circuit times derating factor of ~1.5-2 )

Simple enough?

#### mariush

• Super Contributor
• Posts: 3324
• Country:
• .
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #16 on: July 12, 2013, 04:11:04 am »
A member of this forum tested lots of AA batteries, both classic and alkaline at constant current of 200mA and 1A ... he posted the tests here:

http://www.batteryshowdown.com/results-lo.html

#### zorthgo

• Regular Contributor
• Posts: 108
• Country:
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #17 on: July 12, 2013, 04:16:08 am »
Those graphs are just what the doctor ordered. Thanks!
Slow and steady wins the race!

#### mariush

• Super Contributor
• Posts: 3324
• Country:
• .
##### Re: How to calculate how long until a circuit drains a battery.
« Reply #18 on: July 12, 2013, 04:22:24 am »
Yes, but do keep in mind those are for 200mA.

200mA is kinda big current draw for the zinc chemistry, but they may behave better at 10-50mA compared to this graph. Alkaline batteries may not do much better.

Either way, you should be able to find LEDs with forward voltage less than 2.5v, which should allow you to use just a couple of AA batteries. Otherwise, yeah, I guess 4 AA or AAA batteries would definitely do the trick.

Smf