Power supply with precice energy measurement - Page 1
Forum section: electronics / testgear

author: kuon
author_rank: Regular Contributor
timestamp: March 19, 2019, 12:06:15 am
content: I am working on a battery powered wireless device, and I need to measure current consumption over a long period (days).I built an µcurrent like device (with specs tailored for the dynamic range I need), and it works, but I don't have an oscilloscope with enough data logging. I am going to buy a new scope, but I don't have the budget for the one I want yet.I need to know the power consumption over a long period, because I'm going to put the device under a real load, and I don't really know that in advance.That's why I thought that maybe, a programmable power supply with data logging might be the way to go, as I need a new one anyway because the cheap one I have is really bad with regulation.So, can a programmable power supply fill this? Dynamic range is like 20µA->500mA and I'd like an average current precision of ±50µW.Either with a storage card/usb key, or a PC interface for data logging.

author: NiHaoMike
author_rank: Super Contributor
timestamp: March 19, 2019, 12:30:39 am
content: The Mooshimeter might work, or the Joulescope if you want to pay more in return for more resolution and bandwidth. The 121GW might be worth considering as well. All of those will require a separate power supply to power your DUT, a simple LM317 combined with a wall wart would be one way to get that on a budget. (Bench PSUs with very good measurement capability exist but are expensive.)

author: kuon
author_rank: Regular Contributor
timestamp: March 19, 2019, 01:08:57 am
content: Do you think a mooshimeter would work in the 20µA->500mA dynamic range?But, I discussed with a friend who is a teacher at the local UNI, and he could lend me a keysight E36312A for a week. Sounds nice, but I'm not sure if it can do what I need (never used anything more fancy than an adjustable bench supply).

author: DaJMasta
author_rank: Super Contributor
timestamp: March 19, 2019, 05:05:27 am
content: If you don't need the detail of the pulses and the dynamic range for everything, just the average over a long time.... why not a capacitor or battery bank.For example: charge up, discharge with resistive load monitoring voltage, pick a stop voltage, math out power discharged. Recharge, attach DUT, discharge until it arrives at the same point, math out average consumption.Yes, you get some variation between cycles because of the aging effects of the battery, or you get some leakage across the capacitor, but if the load used for the initial measurement is similar to the DUT, these errors shouldn't be large. If you repeat the "calibration" procedure somewhat regularly (definitely after long periods of disuse, maybe after a dozen cycles or something as well), you effectively zero out most of the aging related effects in play... and it's a hell of a lot cheaper than a fancy power supply and monitoring equipment.You could also do a similar thing with a low current power supply and a large capacitor bank - you have a measure of the continuous current into the system and then enough capacitance to sustain the spikes. Again there would be some zeroing procedure to make sure you know if there's some losses in the apparatus between the PSU and the DUT, but by filtering those huge pulses down, so long as the power supply can measure the low currents, you can get a good reading. Perhaps you could just use an external ammeter on a supply to get the fine resolution without having to buy a new supply - as long as you filter the pulses down sufficiently so that you're within the bandwidth that your meter can measure, you can get a good reading.

author: SWR
author_rank: Regular Contributor
timestamp: March 19, 2019, 07:54:32 am
content: Quote from: kuon on March 19, 2019, 12:06:15 amI don't know your budget and the period you need to log so maybe this is totally beside the point, but I bought a GW Instek MDO-2204EX scope and was quite impressed with it's logging ability. It has 40M sample memory that can be split into 29K separate segments for high resolution logging of randomly timed events.On top of this you can download apps to the scope. One of them is a data logging app that has up to 1000 hours logging of images or waveforms direct to a USB stick if 40M samples is not enough. The minimum time interval is 2 seconds.The app is purely time based, but with the first method you can trig on events like wake up from sleep and store up to 29,000 separate events and measure the power consumption with a quite sofisticated array of math functions. Here's a brief overview of the math functions and apps:Math functions: Ch1-4, Ref1-4Measurement Pk-Pk,Max,Min,Amp,High,Low,Mean,CycleMean,RMS,CycleRMS,Area,CycleArea,ROvShoot,FOvShoot,Freq,Period,Rise,Fall,PosWidth,NegWidth,Dutycycle,FRR,FRF,FFR,FFF,LRR,LRF,LFR,LFF,Phase,RPRFShoot,FPREShoot,+Pulses,-Pulses,+Edges,-EdgesOperators +,-,*,/,<,>,<=,>=,==,!=,||,&&,Functions Intg,Diff,Log,Ln,Exp,Sqrt,Abs,Rad,Deg,Sin,Cos,Tan,Asin,Acos,AtanApp Bode plot: 20-25MHz, log gain & phase 10/15/30/45/90pt/dec, >80dB dynamic rangeApp Data logging: waveforms, screenshotsApp Digital filtering: LP/BP/HP,trackingApp DVM: 3 digit DC/DCrms/ACrms, 5 digit Frequency/Duty-cycle, floating windowApp Go-NoGo: compare, violation stop/count, separate entry/exit, toleranceApp Mask: compare, violation stop/count(save), auto/manualThe dynamic range might be an issue so I can see two approaches:- Measure active periods with the scope segments and sleep with the µCurrent device. Then add the sleep current to the measured active currents.- Add a logarithmic amplifier to the µCurrent signal to reduce the dynamic range of the signal.Good luck with your measurements.

author: kuon
author_rank: Regular Contributor
timestamp: March 19, 2019, 05:43:09 pm
content: Quote from: DaJMasta on March 19, 2019, 05:05:27 amUsing a capacitor bank to average the actual current is a very good idea.

author: SaKhan
author_rank: Contributor
timestamp: March 20, 2019, 10:57:14 am
content: If you want to make sure that the supply voltage doesn't drop too much during the spikes or just have a bit better idea/visualization of the current draw, you can connect an ADC to that "µcurrent like device" and read it from an MCU. Depending on your project, the average reading might hide some important information such as the duration when the controller is actively doing something. With the wifi chips like ESP8266, there might be significant difference in the current draw depending on the signal quality and other factors. The association process can easily take anywhere between 1 and 8 seconds and during that time the the MCU is actively drawing current.

author: luma
author_rank: Regular Contributor
timestamp: March 20, 2019, 01:00:28 pm
content: The trick with uCurrent-style measurements is that you need to be sampling at high enough resolution to catch any momentary spikes in current utilization, which is pretty common for MCU-powered devices that spend most of their time in a deep sleep state. If you need to be able to record and analyze those spikes individually, there really isn't any alternative other than the approaches mentioned here. However, if you're just trying to get a sense of how much power is being used over time, and there is a large dynamic range in your utilization (very common in this use case) AND you need to record the utilization over hours/days/weeks, you might find that acoulomb counteris a better approach. These devices (there are several on the market) will provide an accumulated value of current that has passed through them (or through an external shunt resistor), which for figuring out overall battery draw is just what you want. You don't need to record all of the individual samples for this use case, you just need a running tally of how much current has been drawn over time. These devices are made specifically for this purpose, and are typically implemented to monitor battery utilization for providing a "fuel gauge" to the end user.