Battery energy - how to measure it (wide dynamic range) - Page 1
Forum section: electronics / testgear

author: tom66
author_rank: Super Contributor
timestamp: August 16, 2018, 09:46:27 pm
content: So, I need to find a way to evaluate battery power consumption of a low power widget that periodically wakes up and does some things. What it does is not just CPU; sometimes it activates a sensor, and the sensor activation can use varying amounts of power. To make things particularly difficult there is a considerable range in current from around 500nA to approaching 2 amps, and various levels in between, depending on a complex state machine. So calculating the power usage in a typical environment and over various parameters (software, temperature, low-battery condition etc) is not trivial.I have been looking at various SMUs which claim to be able to able to measure and source current over a wide range e.g. Keithley 2400 and Keysight B290xA but despite me wanting to spend money no one at either of these companies seems to know how well these instruments will cope with: a) moderately high dynamic range with transients on the order of a few hundred μs and b) accumulating the energy accurately over some time (several days at a time.) It seems sales engineers are less engineers and more "buy it or go away", or maybe the purchase of just one instrument isn't interesting enough, who knows.So...question for the SMU / test equipment guys here... Will an instrument like this do what I need? If not, how do I solve this measurement dilemma?I want to be able to measure energy in mAh*, Wh or Joules. (I would prefer an instrument that could do this automatically, but if I have to average data that's captured, then that's an option.)Budget is limited - probably less than £4,000 - as I need to convince the boss to spend the money and we've just blown £50k on something else I specified, so I imagine the wallet is going to be tight.I am aware of the Keysight N6705C, but this seems like wayyy overkill for the job. Besides, the quote with the required module came in around £8k, and the Keysight guy still wouldn't tell me if it would do what I needed, but did offer to loan us one for a 3-day trial. And then stopped replying to his emails.*yes I know this isn't really energy but it will suffice

author: M4x
author_rank: Contributor
timestamp: August 16, 2018, 09:52:51 pm
content: Would the 121GW in VA logging mode be suitable? You could easily calculate the consumed energy after you logged the data.

author: tom66
author_rank: Super Contributor
timestamp: August 16, 2018, 09:59:30 pm
content: Quote from: M4x on August 16, 2018, 09:52:51 pmThe problem I have with a general purpose multimeter in this application is it will need to filter the data somehow before sampling. If its filter is designed perfectly well it may well successfully average it though I have encountered many multimeters, while testing, that do not apply any (significant) filtering to the input and simply sample periodically. The other question is whether that filter (if present) distorts the data because it's non-linear for instance implemented with an amplifier instead of say an RC-filter. So there's no guarantee that they will accurately convey the energy used for that particular sampling period and so the whole measurement is questionable.

author: M4x
author_rank: Contributor
timestamp: August 16, 2018, 10:02:13 pm
content: I don't get what kind of filter you need and why it has to be applied before saving the logged data. Could you explain it to me please? That would make me very happy :-)

author: tom66
author_rank: Super Contributor
timestamp: August 16, 2018, 10:15:34 pm
content: Quote from: M4x on August 16, 2018, 10:02:13 pmOK let me explainSay you have a widget whose current varies something like the attached picture...If you just sample every say 5ms you might sample just the dips and you wouldn't be guaranteed to measure an accurate current figure, because there's a good chance you would just measure the low values and none of the high values.This is the dilemma I have - I have no idea if the instruments, when calculating energy, will take into account the current over the whole sample, or if they assume that the current remains the same for the entire sampling window if sampled using a sample-and-hold ADC. It's essentially the problem of integration techniques: whether it uses a trapezodial-type method which accurately averages data, or if it uses a rectangular integration method which may under or over estimate consumption when the incoming data consists of peaks of short duration.Of course, this issue could be solved with an external filter, but the behaviour of the RC network and current shunt then has to be modelled ... and quite honestly I'd rather have the guaranteed accuracy of a bit of kit even if it costs a bit more.

author: IanB
author_rank: Super Contributor
timestamp: August 16, 2018, 10:37:22 pm
content: Quote from: tom66 on August 16, 2018, 09:46:27 pmThis seems to me like a very hard problem. If you want to log over a period of days, with transients of less than a millisecond, and sharp rises and falls, then your instrument needs to have a fast sample interval (let's say 100,000 samples per second) and accumulate billions of samples. That's a lot of instrument.Might it not be easier and more accurate to use the actual battery as the measurement device?Start out with a known and calibrated charge in the battery, run the test for a few days, and then measure the residual battery charge?Or perhaps make an accurate profile of battery voltage vs remaining charge, and then log the battery voltage during the test?

author: M4x
author_rank: Contributor
timestamp: August 16, 2018, 11:29:30 pm
content: Thanks for your explanation! Only you can estimate for how long the consumed energy is likely to go up / stay at a higher level. For me it sounds legit to choose a tool which can sample and log at an interval which looks appropriate. And if you're logging both voltage and current, you're able to have a look at the data before calculating the average consumed energy. You could extend or repeat your measurements to be on the save side.I although like IanBs approach :-)

author: Mr.B
author_rank: Unknown
timestamp: August 17, 2018, 01:05:17 am
content: I have used Analog Devices LTC4150 (Coulomb Counter) to measure power consumption on a couple of my MCU projects.The device appears to be fairly accurate when compared to IanBs method of connecting to a known charge level and play the waiting game.http://www.analog.com/en/products/ltc4150.html#product-overviewI did my setup the easy way and purchased a Sparkfun breakout board.https://www.sparkfun.com/products/12052https://learn.sparkfun.com/tutorials/ltc4150-coulomb-counter-hookup-guide?_ga=2.93429983.312385841.1534467219-879616005.1534467219Probably will not be a good fit for you: Vmax = 8.5V, Imax = 1A (For the Sparkfun board - you could change the sense resistor)Thought I would mention it anyway...

author: digsys
author_rank: Unknown
timestamp: August 17, 2018, 02:12:56 am
content: If you really need to preserve the waveforms, what about a data-logging / maths DSO. Saving just the "text", even at 100Ksps, is bugger all memorythese days, heck with1-2TB USB stick coming, you can also save the waveforms, then whip up a simple app to crunch whatever numbers you like,well after the body has gone cold :-)

author: tom66
author_rank: Super Contributor
timestamp: August 17, 2018, 09:13:48 am
content: Quote from: IanB on August 16, 2018, 10:37:22 pmThe difficulty is two-fold:- The actual amount of energy used is small, despite the large peaks. The product operates from two AA lithium cells (Energizer L91) and is likely to last 8-10 years with fresh batteries. So testing for a few days and measuring the energy used is not trivial. I would need a deliberately "worse" battery (e.g. zinc carbon), but then the difficulty is how the ESR of that battery would affect behavour as there are buck/boost circuits on the board. Then there is the concern as to how such a battery would vary with temperature so e.g. at night when the heating in the office is off would the battery perform a little differently? I would need to eliminate a lot of variables here.- The particular type of battery chemistry maintains a fairly stable voltage under discharge; variation of OCV from 100% to 0% SOC is ~1.75V -> ~1.4V. So determining SOC is not easy. I have considered NiMH (discharge, charge 100mAh, measure time) to measure the change in energy but the voltage range is different & there's some question in the charge/discharge efficiency and how that varies under load and temperature. I've also looked at supercaps but the leakage of a capacitor for a few days long test would be a few tens of uA.I don't really need to see the exact peaks - I just need to see an accumulated average charge. So I essentially need an SMU, lab supply or multimeter that can integrate current accurately with a wide dynamic range. The question is really whether an instrument will let me do this or whether it will be a bit dumb and just take a single S&H measurement and give me erroneous readings - something no one at the respective Keysight/Keithley companies can tell me.

author: tom66
author_rank: Super Contributor
timestamp: August 17, 2018, 09:18:29 am
content: Quote from: Mr.B on August 17, 2018, 01:05:17 amYeah, I've looked at coloumb counters, the question is one of accuracy for the large dynamic range. As I said above I might even be able to solve the problem with an RC filter network across a shunt resistor the issue is effectively qualifying that system as a usable test. There is no point chasing one's tail trying to improve the product's power consumption when you discover that your measurement was wrong in the first instance.

author: tom66
author_rank: Super Contributor
timestamp: August 17, 2018, 09:19:11 am
content: Quote from: digsys on August 17, 2018, 02:12:56 amA DSO simply would not have the dynamic range, it would need an 20-24 bit ADC to be usable.

author: Kalvin
author_rank: Super Contributor
timestamp: August 17, 2018, 09:50:01 am
content: If the system has few I/O pins to spare, one could use those pins to reflect the device's operation state, and one could use this state information for estimating rudimentary energy consumption. Or, one could use the I/O pins to drive external current measurement range switch (MOSFET) for an external ADC.

author: IanB
author_rank: Super Contributor
timestamp: August 17, 2018, 10:26:20 am
content: Quote from: tom66 on August 17, 2018, 09:13:48 amI see the difficulty. If I were going to use a battery for this kind of test I would use a lithium ion cell, since lithium ion very closely approximates a charge integrator. There is a tight relationship between voltage and accumulated charge, and the charge efficiency is high (there is very little internal leakage or self-discharge). Other battery chemistries like NiMH would be no good at all.QuoteIt seems you need to ask about specific technical parameters (samples/sec, resolution and accuracy per sample, maximum sample storage, etc.).Could you not ask the sales rep to lend you a review sample of such an instrument so you can evaluate it?

author: tom66
author_rank: Super Contributor
timestamp: August 17, 2018, 10:59:58 am
content: Quote from: IanB on August 17, 2018, 10:26:20 amI did. They stopped responding to my emails.Thanks for your suggestion on lithium ion but I suspect the higher voltage may be an issue. I have already tested the MCU and quiescent current goes up from 0.5uA at 3.5V to almost 1mA at 4V; the device is only rated at 3.8V max.

author: Fungus
author_rank: Super Contributor
timestamp: August 17, 2018, 12:04:07 pm
content: Quote from: tom66 on August 16, 2018, 09:46:27 pmSurely you only need to log mA and upwards. You can ignore readings in the uA range as background noise. One short burst at 2A is going to be worth a month of sleeping.Ambient temperature will probably have a bigger effect on battery life than the consumption in sleep mode.

author: mzzj
author_rank: Super Contributor
timestamp: August 17, 2018, 01:06:48 pm
content: Large capacitor to average out the peaks? too easy?Or run the circuit from supercapacitor and calculate the average current from voltage drop?Might need to characterize the supercapacitor real capacitance and leakage current but nothing rocket science.0,03mA average current is 1 volt drop in 90 hours with 10F capacitor.I like also the IanB's idea of lithium-ion "charge integrator".

author: IanB
author_rank: Super Contributor
timestamp: August 17, 2018, 02:10:30 pm
content: Quote from: tom66 on August 17, 2018, 10:59:58 amPossibly you might consider LiFePO4 chemistry? That would be 3.6 V at full charge, and a pair of lithium primaries at 2 x 1.8 V would be about the same.

author: Fungus
author_rank: Super Contributor
timestamp: August 17, 2018, 02:13:25 pm
content: Quote from: mzzj on August 17, 2018, 01:06:48 pmI'm sure there's a dozen ways to do it for $20 but the OP seems to want to spend $4000 on something with lots of blinkenlights.

author: tom66
author_rank: Super Contributor
timestamp: August 17, 2018, 04:19:32 pm
content: Quote from: Fungus on August 17, 2018, 12:04:07 pmNot necessarily.The calculations I've done so far show that the quiescent current for a typical application forms about 30% of the power consumption. A power consumption of 2 amps is really very, very rare; it typically pulls 400mA around every 4 seconds for 50us, which works out to around 5uA. The MCU pulls around 0.5uA - 3uA depending on battery voltage, temperature, etc.QuoteI've considered this but the issue is the cap (if say it was a 10-100 farad device) would have too much leakage. I'd basically need to characterise the performance of this anyway, so it would be better to buy something off the shelf that we could be sure of.QuoteIt ain't my money. But we still have a budget. Not worth wasting days of effort to save money, especially if we can use this for other products as well.QuoteCould work. I'll look into it. Does this have the same "charge accumulator" behaviour that LiIon does?

author: mzzj
author_rank: Super Contributor
timestamp: August 17, 2018, 05:42:52 pm
content: Quote from: tom66 on August 17, 2018, 04:19:32 pm10mF electrolytic capacitor voltage is going to drop by 2.5mV with 50 uS 500mA pulse and if you put 1 kohms in series with it it allows you to measure average current consumption without peaks. 100uA current measurement range is sufficient.10mF 16v electrolytic capacitor leakage current can be better than 5uA if you bother to test out couple of samples. (and even lot smaller than 10mF would work)

author: mzzj
author_rank: Super Contributor
timestamp: August 17, 2018, 05:44:25 pm
content: Just tested random cap from parts bin, 50V 2200uF LXV panasonic, leakage at 3v is less than 1uA

author: Brad O
author_rank: Regular Contributor
timestamp: August 17, 2018, 05:59:54 pm
content: Quote from: IanB on August 16, 2018, 10:37:22 pmBattery chemistry is too variable across even the same batch of batteries to make an accurate power measurement by measuring one across time. There's no way to know the exact capacity of the battery without discharging it yourself. LiIon would vertainly be better, but it would not be a spec'd method.OP, Are you looking to simulate the battery as well? I'm just wondering why you were looking into SMUs if you're providing your own battery. Have you looked into Digitizing DMMs? They should have the capture speed and dynamic range you need.

author: nctnico
author_rank: Super Contributor
timestamp: August 17, 2018, 08:20:00 pm
content: Quote from: tom66 on August 17, 2018, 09:13:48 amI think a lab supply with a fairly accurate current read-out (like the Keysight E36300 series) should be able to do this job. By definition the current reading is the average over the measurement period and all current consumed by the device passes the current sense resistor. You could filter out the short (us to ms) peaks by using an external capacitor to make sure but the output capacitor of the PSU will effectively do the same.On thing to watch out for is the internal resistance of the batteries combined with the high peak currents. You'll probably need a fairly large capacitor to keep these peak currents away from the battery.

author: thm_w
author_rank: Super Contributor
timestamp: August 17, 2018, 11:03:53 pm
content: R&S NGMO is basically purpose built for this kind of measurement. 100nA resolutionhttps://cdn.rohde-schwarz.com/pws/dl_downloads/dl_common_library/dl_brochures_and_datasheets/pdf_1/ngmo2_21_web-LF.pdfBut its quite old and the software probably isn't supported any more (good luck finding it used). Also unsure if the lower range accuracy meets your req. Similar to the 66311B:https://www.keysight.com/en/pd-1000001614%3Aepsg%3Apro-pn-66311B/mobile-communications-dc-source-15v-3a?cc=CA&lc=engMaybe a modern DMM has fast enough sampling that it could have similar performance. NGMO samples at up to 100ksps. DMM6500 has 100ksps to 1MS/s for example. The 1MS/s is at 16-bit so that would not be enough, not sure how the resolution at 100ksps is.

author: tom66
author_rank: Super Contributor
timestamp: October 24, 2018, 02:10:49 pm
content: For those interested, we sampled a Keithley 2281S which worked well for this application so we've now got one on order.It's got sufficient dynamic range for us - 1uA to 5A without range switching - and measures mAh. However it has a few annoying features that make it tricky to use for measuring power consumption of specific operations, e.g. an LED flash. There are ways around this though.

author: kaz911
author_rank: Super Contributor
timestamp: October 25, 2018, 07:19:27 am
content: This is a low cost alternative - with the premium option you can simulate batteries.https://www.qoitech.com/features5v out max - max 5A - measures from 1uA to 5AGot IO's and serial for triggering or other debugging.Company is Swedish but owned? by SonyI use it for everything non TI MSP/Tiva. For TI stuff I use TI's own debug/power monitor.

author: trobbins
author_rank: Frequent Contributor
timestamp: October 25, 2018, 09:38:47 am
content: tom66, I don't think have articulated the influence/consequence/specification of the battery enough to the project. It seems that the choice of battery is very closely linked to the device, as you can use some chemistries but not others. There is no specification of what battery model/make/capacity etc is being targeted, or whether that matters. If the battery does have a strong influence on the devices performance, then I'm with IanB and suggest that measuring battery autonomy time is the key (eg. such as repeating a sequence of activities with the device till an agreed end of discharge condition, and using enough samples to provide acceptable statistical outcome).

author: Apollyon25_
author_rank: Regular Contributor
timestamp: November 02, 2018, 02:53:13 am
content: We have two of the Qoitech Otii units, and have been pretty impressed with their level of functionality, for the price, and very impressed with the quality of their support.We have one premium licence (to get scripting (using LUA), battery modelling and simulation) and one standard.

author: reagle
author_rank: Unknown
timestamp: February 05, 2019, 06:35:42 pm
content: For a very low cost option ($80), there is also Nordic Power Profiler Kithttps://www.nordicsemi.com/Software-and-Tools/Development-Kits/Power-Profiler-Kit

author: mliberty
author_rank: Contributor
timestamp: February 19, 2019, 07:01:03 pm
content: Another option is Joulescope, which launched today onKickstarter. (disclosure: I am the creator of Joulescope)Joulescope was specifically designed for this challenge of nA to A! It also handles the fast transients that were mentioned.I know this is an old thread, but check out Joulescope if you are still looking not fully happy with that Keithley 2281S!