mAs to mAh I am doing right

Thread Starter

hoyyoth

Joined Mar 21, 2020
528
May I know whether I am properly converting from mAs to mAh.If wrong please guide for the proper method.I am taking standby current to show my calculation.

The chip is working on a 3.3V supply and its standby current is 0.00085 mA. For one day the chip will be active only for 4.24 seconds. Rest of the time it will be in standby mode.

My calculation for standby mode energy consumption is given below.

Standby mode current = 0.00085 mA (1)

Standby mode time/Duration in a day = 86400-4.24 = 86395.76 Seconds (2)

Multiplying(1) & (2) = 73.44 mAs (3)

For converting mAs to mAh, I am dividing (3)/3600 , that is 73.44/ 3600 and the final value is 0,020 mAh

May I know is this correct or not ? I need to find the battery spec for my system that is why doing this.
 

Alec_t

Joined Sep 17, 2013
15,103
The maths is correct, but note that rated battery capacity (mAh) and actual capacity might differ considerably, depending on battery age and quality.
 

Thread Starter

hoyyoth

Joined Mar 21, 2020
528
Thank you.When I google the conversion from mAs to mAh,the AI search was telling me that I need to consider chip supply voltage aslo.That confused me
 

KeithWalker

Joined Jul 10, 2017
3,603
Your calculations are correct but the real requirements for the battery capacity will also need to include the length of time the battery will need to work, the active current and any leakage current, which will depend on what type of battery you choose.
 

KeithWalker

Joined Jul 10, 2017
3,603
Thank you.When I google the conversion from mAs to mAh,the AI search was telling me that I need to consider chip supply voltage aslo.That confused me
If you are not using a 3.3V battery, then you will need to calculate what current the voltage converter will use to supply 3.3V at 0.00085ma.
 

Thread Starter

hoyyoth

Joined Mar 21, 2020
528
Your calculations are correct but the real requirements for the battery capacity will also need to include the length of time the battery will need to work, the active current and any leakage current, which will depend on what type of battery you choose.
Yes I have an excel which includes all the calculations which contains active standby all the information.Will share it here tomorrow.Battery need to work for 7 days.I considered all in that excel.Kindly review it tomorrow
It is a sensor node project where many gas sensors are connected to an MCU and any gas corsses the threshold the MCU will be active and send data to a central node.The question I posted above,my intention is to verify my math is right or not.

This is my MCU.
 

panic mode

Joined Oct 10, 2011
4,864
what is the current draw in operation? because depending on what gets activated when MCU wakes up, you may draw 100s of mA - even if it is for only 4.24s. why is this excluded from your calculation?
say you have on average 50mA draw during operation that would be more than 200mAs, so actual energy consumption would be 4x what you calculated.
 

WBahn

Joined Mar 31, 2012
32,703
May I know whether I am properly converting from mAs to mAh.If wrong please guide for the proper method.I am taking standby current to show my calculation.

The chip is working on a 3.3V supply and its standby current is 0.00085 mA. For one day the chip will be active only for 4.24 seconds. Rest of the time it will be in standby mode.

My calculation for standby mode energy consumption is given below.

Standby mode current = 0.00085 mA (1)

Standby mode time/Duration in a day = 86400-4.24 = 86395.76 Seconds (2)

Multiplying(1) & (2) = 73.44 mAs (3)

For converting mAs to mAh, I am dividing (3)/3600 , that is 73.44/ 3600 and the final value is 0,020 mAh

May I know is this correct or not ? I need to find the battery spec for my system that is why doing this.
Because it is only active for 4.24 second a day and there are over 86,000 seconds in a day, any effort to account for the impact of the 4.24 seconds out of that time on the standby charge draw is completely lost in the noise.

To illustrate this, let's look at the result both ways.

Taking it into account: (0.85 µA)(86,395.76 s) = 73.436396 mA·s

Ignoring it: (0.85 µA)(86,400 s) = 73.440000 mA·s

As you can see, when reported to four sig figs, these are the same. We are seldom really justified in three sig figs, which implies the value is good to much better than 1%.

Another way to drive this home is to ask how much the current would need to change by to make the result that ignores the active time match the result that doesn't.

I = 73.436396 mA·s / 86400 s = 0.8499583... µA

Do we really know that the standby current is within 0.00005 µA (which is 50 picoamps) of being 0.85 µA?

By recognizing this, we can come up with a perfectly useable estimate with a lot less math:

0.85 µA * 24 hr = 20.4 µAh · (1 mA / 1000 µA) = 0.020 mAh

For your seven day goal, that would be 0.14 mAh.

Even if you want to do the full (supposedly) exact calculation, doing a quick estimate like this let's you know whether your exact calculation is reasonable.

Note that the 0.85 µA is also a "typical" current consumption under standby under very specific test conditions. Even under those test conditions, the actual current consumption will be different, with some being higher and some being lower. They don't provide maximum current draw in standby, but they do provide a graph that shows that the standby current starts rising with temperature pretty quickly and, when it's running hot, is more than ten times the room temperature draw (and keep in mind that that 'room temperature' isn't referring to the temperature of the room, it's referring to the temperature of the junctions on the silicon die). So if you really need it to last at least a minimum length of time, you need to add in a comfortable margin. I'd recommend using a factor of ten, at least initially. If that results in the need for a larger battery, then look at it more closely and perhaps reduce it to a factor of two or three. For the time, if you need it to last a minimum of seven days, design it so that it should last at least ten. Again, if you discover that doing so actually increases the cost (or whatever parameter becomes excessive) unacceptably, you can revisit things and tighten down.

Having done the capacity requirement for standby, you can then compare it to the smallest battery that you are hoping to use. Even for something like 2016 coin cell, this it tiny (well under 1%) of the typical 90 mAh rating, so it is reasonable to conclude that your standby current draw has no impact for your application and can be safely ignored.

Another useful thing to get a feel for is how much current need to be draw during that 4.24 seconds (and how well is that interval really known?) before it dominates the battery drain?

I_active = (0.0204 mAh/day) / (4.24 s/day) * (3600 s / h) = 17.32 mA

A gander at the data sheet shows that there are lots of ways in which the current draw, just to run some of the peripherals, can be considerably higher than this. So there's a fair chance that that's where you limiting factor on battery size is going to come from.
 
Last edited:

WBahn

Joined Mar 31, 2012
32,703
It says 0.85 μA.

That's 0.00085 mAh. Not mAs. So your math is off by a factor of 3600.
mA and mAh are two completely different quantities. On is a measure of current and the other is a measure of charge. This is like trying to say that 1 ft is somehow the same as 12 in·lb.
 

MikeA

Joined Jan 20, 2013
442
mA and mAh are two completely different quantities. On is a measure of current and the other is a measure of charge.
Right. But in the context of what the original poster was trying to calculate, if the goal isn't to argue semantics, isn't it much easier to explain how to calculate it as...

0.00085 mAh * 24 = 0.0204 mAh

Why even involve mAs? Converting between different time units, especially when they are not a decimal system, seems unnecessarily confusing.
 

WBahn

Joined Mar 31, 2012
32,703
Right. But in the context of what the original poster was trying to calculate, if the goal isn't to argue semantics, isn't it much easier to explain how to calculate it as...

0.00085 mAh * 24 = 0.0204 mAh
But it is NOT 0.00085 mAh scaled by a dimensionless factor of 24. It is

(0.00085 mA) * (24 h) = 0.0204 mAh

That's a fine point which may or may not reflect any kind of actual misunderstanding. But it is very good practice to properly associated the right units with the right coefficients and to track them properly through the work.

Why even involve mAs? Converting between different time units, especially when they are not a decimal system, seems unnecessarily confusing.
He invoked mA·s because what he was calculating was the charge (per day) used while in standby. His starting point was basically:

(0.00085 mA) * (1 day - 4.24 s)

That second factor has to be put into compatible units, so a choice has to be made - you can convert it to day, hours, minutes, or seconds (or years, for that matter). The two 'obvious' choices are hours or seconds..

(0.00085 mA) * ( (1 day)*(24 h / 1 day) - (4.24 s)*(1 h / 3600 s)) = (0.00085 mA) * ( 24 h - 0.001178 h) = (0.00085 mA) * (23.9988 h)

(0.00085 mA) * ( (1 day)*(24 h / 1 day)*(3600 s / h) - (4.24 s)) = (0.00085 mA) * ( 86400 s - 4.24) = (0.00085 mA) * (96395.76 s)

The first take you directly to mAh, while the second allows you to work with numbers more comfortable (and less error prone) for humans to work with.

Advantages and disadvantages either way.
 

Thread Starter

hoyyoth

Joined Mar 21, 2020
528
My excel sheet is attached here.Please review it.The second sheet contains the calculations.
The battery capacity is coming large because I considered sensors are always on .Need to change that
1760007985812.png
 
Last edited:

panic mode

Joined Oct 10, 2011
4,864
Because it is only active for 4.24 second a day and there are over 86,000 seconds in a day, any effort to account for the impact of the 4.24 seconds out of that time on the standby charge draw is completely lost in the noise.

To illustrate this, let's look at the result both ways.

Taking it into account: (0.85 µA)(86,395.76 s) = 73.436396 mA·s

Ignoring it: (0.85 µA)(86,400 s) = 73.440000 mA·s
good math except it does not reflect reality.

current draw of 0.00085mA only applies in standby, but in operation current is MUCH bigger ... and not to be ignored. this unit has radio.
using MCU core alone (without any peripherals) means draw of 2.89mA, enabled radio current is 25mA
my guess is that unit draws at least 2.89mA for those 4 sec and 25mA for probably 0.5sec. no idea what else may be there.

so 2.89mA*4.24s=12.2536mA*s
25mA*0.5s=12.5mA*s
together, that is some 25mA*s which is same order of magnitude as standby consumption.

and who knows, there may be other loads during those 4.24 seconds. they don't need to be tractor beams or phasor banks but all power need to be accounted - only then one can dismiss smaller factors.

EDIT ---
did not check the previous post with spreadsheet. sensors consume 76mA and they draw current continuously. this is wrong. they should get power cut off by mosfet when MCU is in sleep. without doing this, everything else is insignificant.
 
Last edited:

WBahn

Joined Mar 31, 2012
32,703
good math except it does not reflect reality.

current draw of 0.00085mA only applies in standby, but in operation current is MUCH bigger ... and not to be ignored. this unit has radio.
using MCU core alone (without any peripherals) means draw of 2.89mA, enabled radio current is 25mA
my guess is that unit draws at least 2.89mA for those 4 sec and 25mA for probably 0.5sec. no idea what else may be there.

so 2.89mA*4.24s=12.2536mA*s
25mA*0.5s=12.5mA*s
together, that is some 25mA*s which is same order of magnitude as standby consumption.

and who knows, there may be other loads during those 4.24 seconds. they don't need to be tractor beams or phasor banks but all power need to be accounted - only then one can dismiss smaller factors.

EDIT ---
did not check the previous post with spreadsheet. sensors consume 76mA and they draw current continuously. this is wrong. they should get power cut off by mosfet when MCU is in sleep. without doing this, everything else is insignificant.
This is why the post you quoted ended with:

Another useful thing to get a feel for is how much current need to be draw during that 4.24 seconds (and how well is that interval really known?) before it dominates the battery drain?

I_active = (0.0204 mAh/day) / (4.24 s/day) * (3600 s / h) = 17.32 mA

A gander at the data sheet shows that there are lots of ways in which the current draw, just to run some of the peripherals, can be considerably higher than this. So there's a fair chance that that's where you limiting factor on battery size is going to come from.
 

rsjsouza

Joined Apr 21, 2014
424
My excel sheet is attached here.Please review it.The second sheet contains the calculations.
The battery capacity is coming large because I considered sensors are always on .Need to change that
View attachment 356969
Energy calculations seem alright, but given that you are referencing every current consumption to 86400s, I think the fourth column is the energy consumed in a day, not mAs.
Is the sensor controller always in low power mode or are you using it in gas events? If so, you need to account for that in active (24MHz) mode.

Also, if you are looking at very accurate current measurements, you can use EnergyTrace that is embedded in the CC1352P Launchpad. It will get an accurate current consumption profile (sub-µA resolution at 256000 samples/s) and you can even save the data in csv format for post processing. I used this to get a more accurate profile of the Tx/Rx events. You will also notice the device has a periodic recharge pulse, but that is accounted for with the average standby current spec of the datasheet.

You can also check your data using one of the calculators available online. In this site there is a good one at:
https://www.allaboutcircuits.com/tools/battery-lifetime-calculator/
 
Last edited:
Top