How to calculate how long until a circuit drains a battery. - Page 1
Forum section: electronics / beginners

author: zorthgo
author_rank: Regular Contributor
timestamp: July 11, 2013, 01:19:42 pm
content: 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!

author: Skimask
author_rank: Super Contributor
timestamp: July 11, 2013, 01:27:28 pm
content: 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...

author: zorthgo
author_rank: Regular Contributor
timestamp: July 11, 2013, 01:45:17 pm
content: 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!

author: kizzap
author_rank: Unknown
timestamp: July 11, 2013, 01:50:43 pm
content: 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

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: July 11, 2013, 01:52:48 pm
content: 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.

author: Skimask
author_rank: Super Contributor
timestamp: July 11, 2013, 02:20:03 pm
content: Quote from: zorthgo on July 11, 2013, 01:45:17 pmThat's what I thought you were going to do...

author: digsys
author_rank: Unknown
timestamp: July 11, 2013, 02:24:52 pm
content: Quote from: zorthgoAs 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 lesscurrent as well. So you could possibly end up with 5mA max, which already increases the run time 14X

author: IanB
author_rank: Super Contributor
timestamp: July 11, 2013, 02:26:54 pm
content: Quote from: zorthgo on July 11, 2013, 01:19:42 pm(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.)

author: zorthgo
author_rank: Regular Contributor
timestamp: July 11, 2013, 02:41:38 pm
content: @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!

author: Psi
author_rank: Super Contributor
timestamp: July 11, 2013, 02:57:29 pm
content: 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.2AhSo quick and dirty equation says.. 0.2Ah / ( (3Vbat - 1.6Vled) /330R) = 47HoursHowever, in real life it lasted more like 4 days at reasonable brightness but was still glowing even after 3 weeks.

author: zorthgo
author_rank: Regular Contributor
timestamp: July 11, 2013, 03:01:02 pm
content: @Psi: That is exactly why I thought the the equation might involve "e^x"!

author: digsys
author_rank: Unknown
timestamp: July 11, 2013, 03:02:41 pm
content: Quote from: zorthgoAs 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 couldrun 4x in parallel. Any voltage above that is wasted energy.

author: Jeff1946
author_rank: Regular Contributor
timestamp: July 11, 2013, 03:06:45 pm
content: 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.

author: olsenn
author_rank: Frequent Contributor
timestamp: July 11, 2013, 04:07:09 pm
content: 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

author: zorthgo
author_rank: Regular Contributor
timestamp: July 11, 2013, 05:15:00 pm
content: 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)

author: Christopher
author_rank: Frequent Contributor
timestamp: July 11, 2013, 05:19:05 pm
content: mAh capacity of battery divided by ( adv current draw of circuit times derating factor of ~1.5-2 )Simple enough?

author: mariush
author_rank: Super Contributor
timestamp: July 11, 2013, 06:11:04 pm
content: 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

author: zorthgo
author_rank: Regular Contributor
timestamp: July 11, 2013, 06:16:08 pm
content: Those graphs are just what the doctor ordered. Thanks!

author: mariush
author_rank: Super Contributor
timestamp: July 11, 2013, 06:22:24 pm
content: 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.