34 years of battery life? Umm... help me with my brain please.

19 posts / 0 new
Author
Message

There's no way I have this math right, so please... show me where I'm being stupid.

I've got a simple circuit that all it does is wait for the micro to count up to some arbitrary number and then switch on a light.  Kind of like a water filter monitor.  That arbitrary number is yet to be determined, but probably in the order of months.  This needs to be battery operated, so I tried to design it for very low consumption.  I just took some measurements and did some math, and it suggests my circuit will run happily for over 34 years on a couple of AA batteries.  That can't possibly be right, so where am I going wrong?

First off, how I'm measuring the current (perhaps my flaw is there):  I have the Postive lead from the battery going to the positive terminal on the device.  I have the negative lead from the battery going to the black lead on my multimeter.  The red lead from the multimeter is going to the negative terminal on the device.  My meter shows me 5.75uA.

Now for the math, which is probably where I'm going wrong.

5.75uA = 0.00575mA

Assuming 2500mAh battery capacity

Assuming 70% efficiency

2500 / .00575 * .7 = 304,347.8 hours????

divided by 24 = 12,681 days

divided by 365 = 34.74 years

No bloody way, so where am I stupid please?  :)

The maths is fine, but read the specs of your battery to see what the self-discharge current is.
Self-discharge is dependent on battery chemistry and temperature.
Pollution build-up and moisture will cause leakage paths that will increase the drain on the battery.

mikech is correct.

There are a lot of parameters that are not provided in most of the battery data sheets. The leakage is one of those parameters. You may be able to get characteristic information from the manufacturer if you are a commercial customer.

In general, the shelf life is a good indicator of the aging characteristics of the battery.

In the last few years, battery manufacturers have been removing shelf-life claims from the battery datasheets. Because of this it is up to the designer to perform their own validations to determine the battery lifecycle in their device (This is a good idea anyways).

Keep in mind that accelerated aging of batteries via elevated temperature and humidity doesn't work very well in predicting life cycle. The manufacturers will tell you the same thing.

In your case, your battery life will purely depend on the shelf-life of the battery you choose. Well, that and how you implement the termination of the battery to your project making sure to minimize leakage paths.

If my calculations are OK, then can I realistically say that 6 months should be ok with alkaline AA if the theoretical is 34 yrs, without worrying too much about degradation?

You could probably push that to 5-to-10 years, which is the typical shelf-life of many top brand alkaline cells.

Of course, once the timing cycle completes and the light is turn on, current will increase dramatically.  You can mitigate this by using a high-efficiency LED and flashing it periodically at a very low duty cycle.  Driving it at 10 mA, and flashing once every 2 seconds for 100 ms will likely be plenty attention-grabbing, and will draw an average of 500 uA, which could be sustained for about 5 months.  You could likely get away with lower currents, and lower duty cycles, to extend that even further.

 "Experience is what enables you to recognise a mistake the second time you make it." "Good judgement comes from experience.  Experience comes from bad judgement." "Wisdom is always wont to arrive late, and to be a little approximate on first possession." "When you hear hoofbeats, think horses, not unicorns." "Fast.  Cheap.  Good.  Pick two." "We see a lot of arses on handlebars around here." - [J Ekdahl]

a multimeter may not provide an accurate reading of the "average" current used.  ~6uA is well below the rated current for most AVRs, so you're probably measuring the power-down mode consumption.  More current (probably hundreds of times more!) will be used whenever the chip wakes up.

westfw wrote:
a multimeter may not provide an accurate reading of the "average" current used.

+99999999999999999999 !!!

You need a proper current monitor to see what it really happening with the current drain on the battery!

If you have many tens of thousands of \$\$\$ - and do this stuff a lot - get one of these:

http://www.keysight.com/en/pc-11...

Failing that, you can get reasonable results with a scope and a small series resistor.

Somewhat better if you use a current-sense amplifier (CSA) - which is what I did here.

Many manufacturers - Atmel included - are now integrating current monitoring into their Dev Kits and IDEs; eg,

https://www.avrfreaks.net/forum/s...

http://www.nordicsemi.com/Produc...

http://community.silabs.com/t5/3...

Some 3rd-party tools

https://developer.sony.com/2016/...

http://baylibre.com/acme/

EDIT

I couldn't find it initially, but Atmel now has their Power Debugger available as a standalone product:

http://www.atmel.com/tools/atpow...

But it is rather expensive - >US\$200 at digikey!

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Sat. Apr 8, 2017 - 06:46 AM

Well do yourselves a favour and obtain one of Dave's microcurrents. I did.

https://www.eevblog.com/product/...

A\$89.

Ross McKenzie ValuSoft Melbourne Australia

I've heard that a good way to measure current (energy) consumption is to charge a mid-sized capacitor (exact value dependent on load; 10 to 1000uF or so?) to a known voltage, and then see how long it will run your project before decaying to an easily measurable decreased voltage.  Ie if it takes 10s for a 100uF cap to go from 4V to 3.5V, that would be about 5uA average consumption ( http://mustcalculate.com/electro... ).  I haven't actually tried it, but it seems like a reasonable idea.  Naturally, there are complications (like how much current your voltmeter uses, and how much current consumption changes as the voltage changes...)

That sounds a crazy way to measure anything. A BFC is likely to be electrolytic with a high leakage current. And almost certainly a very wide tolerance of capacitance value.
.
Having charged it to 5V, your target is going to be running from different voltages. e.g. 5V down to 2.5V
.
Most DMM are capable of measuring fairly low currents. At the same time, they have over-current protection. Even Analogue moving coil multimeters have a protection diode across the coil.
.
In practice, you can design with the manufacturer's data sheet. e.g. sleep currents
Just make a sanity check that you have not forgotten part of the datasheet advice.
.
David.

Last Edited: Sat. Apr 8, 2017 - 10:32 AM

I think charging a capacitor and then disconnecting the power supply and watching and timing the capacitor voltage drop is a good way to see the average energy consumption over time.

As others have said, measuring the current with a DMM doesn't tell you what you want to know if the AVR is spending most of it's time in power save sleep.  You need to see average current draw over a period of time that includes when the AVR is running and when it's sleeping.

By the way, I rarely, if ever, use the current setting of my DMM.  I put an appropriate resistor in series with the power supply and then measure the voltage drop.

While on the rarely, if ever, subject, I rarely, if ever, use the test prods that come with DMMs.  I make test prods using sewing pins.

Surely you know how long your device is active and how long it is asleep.

You can measure the current in both states.    Any long life battery app depends mostly on the Sleep current.

Yes,  if you have a regular duty-cycle app,   e.g. 20mA for 0.1ms, 5uA for 9.9ms then the capacitor discharge method is fine.

David.

I once calculated one at 600+ years.  I took that as "plenty long enough."

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut.

david.prentice wrote:

Surely you know how long your device is active and how long it is asleep.

You would lose that bet.    Well, knowing how long it sleeps is easy.  Just about all the time.  Knowing how long it is awake requires some thought and some code.

It is an interesting idea though.  I suppose I could temporarily add code that would activate a timer/counter.  When the software is about to go to sleep, it would save the count and clear it.

The capacitor method looks good to me, you can do a blank run just with the voltmeter to account for the self discharge and voltmeter current. Then, repeat with the circuit in idle, and in active modes. Surely, this will give enough data to calculate the power consumption.

This is just theory because I have never actually tried it...

valusoft wrote:
Well do yourselves a favour and obtain one of Dave's microcurrents. I did.
A review of Dave's creation (original version; current version is GOLD) :

The uCurrent

by Jack Ganssle

January 14, 2013

http://www.ganssle.com/rants/ucurrent.html

Review of the Real-Time Current Monitor (RTCM) (a previous version of RTCM) :

Real-Time Current Monitor Rev 2

by Jack Ganssle

March 26, 2015

http://www.ganssle.com/rants/rtcm-version-2.html

Current version of the RTCM :

https://www.ee-quipment.com/

distributed at

http://www.tag-connect.com/ee203

Embedded

The Ampere current sensor

April 06, 2015

http://www.embedded.com/electronics-blogs/break-points/4439122/The-Ampere-current-sensor

then

3flares-home

Wideband current probe design

http://www.3flares.com/wideband-current-probe-design

more :

Tools for Embedded Systems

by Jack Ganssle

http://www.ganssle.com/tools.htm

Test Equipment

http://www.ganssle.com/tools.htm#logicanal

...

Tools that monitor power and/or current:

...

Edits : RTCM, more

"Dare to be naïve." - Buckminster Fuller

Last Edited: Sat. Apr 8, 2017 - 11:35 PM

Surely you know how long your device is active and how long it is asleep.

Maybe.   But there is other stuff that you'd more or less have to guess at.  For instance, if you come out of power-down via a WatchDog Reset, you can take 65ms and/or 32k clocks for the reset to finish, and I don't see any documentation of the power consumption during that time...  (I guess, though, that this is a pretty strong reason to avoid using WDT Reset to come out of power-saving modes.   It looks like WDT Interrupt should always be an alternative.)

Yes,  if you have a regular duty-cycle app,   e.g. 20mA for 0.1ms, 5uA for 9.9ms then the capacitor discharge method is fine.

I nice feature of the method is that you should be able to choose the measurement period and test methodology such that it includes "many" possible code paths...

Remember-empty capacitors will act like a sponge & can soak up more charge (Joules) than the actual sensor circuit itself operated for a millisecond once a day...so inspect carefully where & how capacitors are being used.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Hardware and Firmware Issues in Using Ultra-Low Power MCUs

by Jack Ganssle
December 2014

http://www.ganssle.com/reports/ultra-low-power-design.html

5 - Decoupling, and Using a Capacitor to Boost Vdd

http://www.ganssle.com/reports/ultra-low-power-design.html#usingacapacitor

...

(For tantalums it's usual to rate leakage in CV, where V is the rated, not the applied, value.)

...

MLCC leaks are specified in ohm-farads:

...

"Dare to be naïve." - Buckminster Fuller