Author Topic: Calculating average current draw over time  (Read 7756 times)

0 Members and 1 Guest are viewing this topic.

Offline MrAureliusRTopic starter

  • Supporter
  • ****
  • Posts: 373
  • Country: ca
Calculating average current draw over time
« on: July 28, 2014, 12:29:18 am »
I feel silly that I don't know this, but after quite a bit of Googling and searching the forum, I haven't been able to find the correct formula or steps needed to calculate the average current of a project.

I have a microcontroller which draws 4uA in Hibernate mode. It stays in this mode for almost the whole time. Every minute, it wakes up and measures a sensor, which takes about 100 milliseconds. During this time it draws about 5mA. Then it goes back into hibernation. Every 15 minutes, it wakes up, takes the past 15 measurements, and connects to the internet to upload them. During this stage, it draws about 180mA for about 3 seconds.

My question is, how do I calculate the average current? This project will be running off of a 1200mAh battery and I'm curious to do some calculations.

Is it as simple as adding up all the instantaneous currents and dividing by the number of minutes? That feels really wrong to me, it must be more complex than that.

Any and all help would be much appreciated! It could be as simple as I'm not Googling the correct search terms, but I've been trying to find "calculate average current" and "average current draw" but it usually directs me to RMS calculations, which are not what I'm looking for.

Edit: after a bit more searching... is it as simple as

4uA + ((12/3600) * 180mA) + ((6/3600) * 5mA)
Then take that result and divide by 1200mAh to figure out the time?
« Last Edit: July 28, 2014, 12:41:30 am by MrAureliusR »
--------------------------------------
Canadian hacker
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Calculating average current draw over time
« Reply #1 on: July 28, 2014, 12:40:35 am »
Rough estimate - you can refine it further:

Quote
draws 4uA in Hibernate mode.
- 4ua * 15minutes = 0.06ma-minute;

Quote
Every minute, it wakes up and measures a sensor, which takes about 100 milliseconds.

 - 5ma * 100ms * 15 times = 0.125ma-minute;

Quote
t draws about 180mA for about 3 seconds.

 - 180ma * 3 seconds * 1 times = 9ma-minute.

Total = 9.131ma-minute for every 15 minutes -> 0.6ma average draw

Your battery, ignoring self-discharging and other errors, will last 1200mah/0.6ma = 2000hours.

or its whereabouts.
================================
https://dannyelectronics.wordpress.com/
 

Offline MrAureliusRTopic starter

  • Supporter
  • ****
  • Posts: 373
  • Country: ca
Re: Calculating average current draw over time
« Reply #2 on: July 28, 2014, 12:42:44 am »
Rough estimate - you can refine it further:

Quote
draws 4uA in Hibernate mode.
- 4ua * 15minutes = 0.06ma-minute;

Quote
Every minute, it wakes up and measures a sensor, which takes about 100 milliseconds.

 - 5ma * 100ms * 15 times = 0.125ma-minute;

Quote
t draws about 180mA for about 3 seconds.

 - 180ma * 3 seconds * 1 times = 9ma-minute.

Total = 9.131ma-minute for every 15 minutes -> 0.6ma average draw

Your battery, ignoring self-discharging and other errors, will last 1200mah/0.6ma = 2000hours.

or its whereabouts.

That's funny, right as you posted your reply I calculated 1972 hours....
Guess I figured it out?

Edit: The 4uA is essentially continuous, so I just added it as a continuous draw
« Last Edit: July 28, 2014, 12:44:51 am by MrAureliusR »
--------------------------------------
Canadian hacker
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12019
  • Country: us
Re: Calculating average current draw over time
« Reply #3 on: July 28, 2014, 01:06:36 am »
I think you got there, but it's basically a weighted average:

                              current x time + current x time + current x time + ...
average current = ------------------------------------------------------------------
                                                              total time

You do this calculation over one complete cycle.
 

Offline MrAureliusRTopic starter

  • Supporter
  • ****
  • Posts: 373
  • Country: ca
Re: Calculating average current draw over time
« Reply #4 on: July 28, 2014, 01:08:17 am »
I think you got there, but it's basically a weighted average:

                              current x time + current x time + current x time + ...
average current = ------------------------------------------------------------------
                                                              total time

You do this calculation over one complete cycle.

That's what I had in my head. You then take the capacity of the battery in mAh and divide by the mA average current. I had to remember to keep all my units relative to either mA or A, or else you throw everything off. It's easiest to do everything in mA because of the way battery capacity is measured.

Thanks all for the info!
--------------------------------------
Canadian hacker
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf