Calculating average power consumption of a pulsed load (oscillator/battery) - Page 1
Forum section: electronics / beginners

author: iroc86
author_rank: Regular Contributor
timestamp: February 16, 2021, 03:18:36 am
content: I'm wanting to calculate the power consumption of anLED flasherbased on the LM3909 IC. This discretized circuit runs off a 1.5 V battery and is supposed to consume less than 500 µA on average, operating for several years on C- and D-cell batteries according to thedatasheet. I'd like some feedback on my power calculation method below. I'm not sure if this is the right way to do it.I'm using a 10 ohm resistor as a current shunt--it's nothing special, just all that I had handy. The voltage drop across the resistor is a periodic waveform at 157 Hz. Using my scope, I calculated the volt-second integral over one period, which equaled 10.75 µVs. Multiplying those numbers together, the average voltage drop across the shunt is 1.68 mV. Dividing that by 10.048 ohms, which is the measured shunt resistance, I came up with an average current of 167 µA. Taking this one step further, 167 µA * 1.5 V = 250 µW of average power consumption.The numbers are admittedly smaller than I was expecting, so it's possible that my approach (or test setup) is wrong. I'd appreciate any guidance--thank you!

author: bdunham7
author_rank: Super Contributor
timestamp: February 16, 2021, 03:23:53 am
content: Determine the average of thesquareof the voltage, then take the square root of that mean. RMS = Root Mean Square. Then do the math with the resistor.See Wolfram's comment below.

author: WattsThat
author_rank: Frequent Contributor
timestamp: February 16, 2021, 07:00:40 am
content: Why are you in calculating in watts? From the datasheet:QuoteSo let’s assume it runs for the rating of the battery. Give or take. Batteries are typically rated in mAh. So don’t you want your units to be mAh? If so, what you’re calling the integral of microvolt-seconds is current and time. It’s just a matter of converting units.10.5 uv/s into 10 ohms would be 1.05 uA/s1.05 uA/s * 60 * 60 = 0.0038 mA/hNot sure where a CR3022 would run flat for the application but stated capacity is 235 mA/h so let’s assume 200 usable.200 / 0.0038 = 52910 hours or 6.3 years.Sound about right?

author: ledtester
author_rank: Super Contributor
timestamp: February 16, 2021, 07:26:27 am
content: Another way to frame this is that you're computing the average power delivered by the battery:$$P_{\text{avg}} = \frac{1}{T}\int_0^T V_{\text{batt}} \cdot I_{\text{batt}}\,dt$$where \$V_{\text{batt}} = 1.5V\$ and \$I_{\text{batt}} = V(t)/10.048\Omega\$. Moving all of the constants out of the integral yields:$$P_{\text{avg}} = \frac{1.5V}{10.048\Omega} V_{\text{avg}}$$where \$V_{\text{avg}}\$ is the average of \$V(t)\$ over one period.

author: Wolfram
author_rank: Frequent Contributor
timestamp: February 16, 2021, 09:54:47 am
content: Quote from: bdunham7 on February 16, 2021, 03:23:53 amThat will give you the RMS current, which corresponds to the heating in the shunt resistor, but not the power dissipated by the load. With DC voltage, average power is proportional to average current. RMS measurements are useful for resistive loads where the voltage and current change together; U and I are proportional, and P is proportional to the square of either. When you have a constant voltage, P is directly proportional to I.

author: bdunham7
author_rank: Super Contributor
timestamp: February 16, 2021, 03:37:57 pm
content: Quote from: Wolfram on February 16, 2021, 09:54:47 amUm, yes, I misread his post. I should have clicked on the pictures.

author: iroc86
author_rank: Regular Contributor
timestamp: February 16, 2021, 04:54:28 pm
content: Thanks for the replies and help!Quote from: WattsThat on February 16, 2021, 07:00:40 amI'm using watts just because it correlates to battery power capacity (watt-hour). Since it's all 1.5 V anyway, and I'm not comparing performance or consumption across various voltages, then I suppose mAh would arrive at the same result.How does the pulse frequency enter into your calculation of current? The ~10.5 µVs event is occurring 157 times per second. Note that the integration units on my scope are microvolt-seconds, not microvolt/seconds. Your units are shown as µV/s. Maybe I'm missing something? µVs * 1/s (frequency) = µV.Quote from: ledtester on February 16, 2021, 07:26:27 amQuote from: Wolfram on February 16, 2021, 09:54:47 amAccording to my scope, the average voltage of one pulse is 29 mV. The period is 366 µs. Multiplying those together, I get 10.6 µVs, basically the same as the integration method (scope screenshot below). I couldn't easily calculate average voltage with the full period on the screen because of noise in the "off" portion of the period.--After I posted this question, I found a few other places that discuss how to measure the current consumption of pulsed events, such a microcontroller sleep/wake cycle. The approach looks pretty similar to what I'm doing. I've attached one of the PDFs below since I couldn't find a good direct link.AN713 (attached, p3): "Once the voltage samples have been acquired for the event of interest, the next step is to integrate them over the duration of the event. The basic idea is to calculate the product of each voltage sample with the sample period. The sum total of these products is a quantity of Volt-seconds, which can be converted to Amp-seconds (or Coulombs) using Ohm's law." [Note that the example in this article also used a shunt resistor in a similar test setup.]Using the scope integration function to determine energy use: "The volt-second unit of integration (or mV-sec, μV-sec, etc., depending on scaling) means if you spread the consumption over one second it would average that number of volts over that second. Note that this is not a unit of energy. To get energy consumption, one needs to use the Ohm's law relationship for power and voltage. But first, the volt-second number is multiplied by the number of wake cycles/second to get a number in units of just volts. Then, knowing the value of the precision resistor used in the measurement, we can calculate a power dissipation.--From all of your responses, I think we're getting at the same thing... whether I use integration or the averaging method, calculating the current consumption of these pulsed loads no different than a constant load (Ohm's law, obviously), but I'm still fuzzy on the way the pulse duration is tabulated. Total "voltage consumption" of 10.75 µVs is significantly different at 10 Hz versus 1 kHz. Is it appropriate to multiply this by the frequency, and then do the Ohm's law calcs for the average current and power?

author: ledtester
author_rank: Super Contributor
timestamp: February 16, 2021, 05:42:42 pm
content: QuoteYes, if the voltage consumption is measured over one period. The formula:$$V_{\text{avg}} = \frac{1}{T}\int_0^T V(t)\,dt$$is valid for any value of T and if T is exactly one period then 1/T is the same as the frequency which gives you:$$V_{\text{avg}} = \text{frequency} \times \text{voltage-consumption over one period}$$If you measure the voltage consumption over \$N\$ periods then the formula becomes:$$V_{\text{avg}} = \frac{\text{frequency}}{N} \times (\text{voltage-consumption over $N$ periods})$$But when doing the measurement on your scope I probably wouldn't worry about computing the frequency or number of periods. Just set your markers to the start and end of a convenient number of whole periods and compute the average voltage as: voltage-consumption between the markers / time-difference between the markers.

author: Terry Bites
author_rank: Super Contributor
timestamp: February 16, 2021, 07:57:03 pm
content: Assuming your pulse is rectangular: (pulsewidth/period)*pulsepower. Lets not knob about with calculus guys.Its the area under your pulse/period times your period or flash rate.

author: iroc86
author_rank: Regular Contributor
timestamp: February 17, 2021, 02:32:50 pm
content: I appreciate the added follow-ups and explanations. It sounds like I'm on par for calculating the current usage appropriately. Interestingly, I discovered that Dave (EEVblog) produced a video about oscilloscope integration that used a pulsed load situation (microcontroller sleep/wake) as an example to explain practical uses for this math function:EEVblog #662- How & Why to use Integration on an Oscilloscope.The approach was identical, aside from using a µCurrent instead of a shunt resistor. Dave also measured the non-pulsed sleep current with a DMM and added it to the pulsed current to determine the total consumption across the sleep/wake period. Looking through the replies on the forum as well as YouTube, a few people commented that the DMM wouldalsocapture the pulse, but Dave insisted that the pulse was too short to make a difference. I believe the period was somewhere around 2 s, which is far longer than I'm dealing with, too. The scope, of course, has difficulty integrating the sleep current due to noise, interference, and other effects, so I presume that's why he used the DMM for that portion of the waveform.(When I tried to integrate the "off" voltage on my scope, the result at the end of each period was actuallynegative, which doesn't seem right. If I measure the voltage drop across the shunt resistor with a DMM, the total current is about double that of just the pulse as measured on the scope. The pulses have a period of ~6 ms and the integration time of my HP 3466A is 100 ms, so I suppose the DMM is capturing the pulses in this measurement?)