0
\$\begingroup\$

I am wanting to measure the energy consumption of running some intensive blocks of code on Android, but I am very shakey with my electricity knowledge, so I am unsure what measurements I should be looking for.

In the Android settings,they give power consumption in mAh. An academic paper I am looking at gives energy consumption on mW. I want to make some comparisons between my measurements, and the measurements in this paper. Is there any way to go from mAh to mW? Which unit of measurement is most appropriate?

I appreciate any help. I am a bit lost when it comes to electricity.

\$\endgroup\$
  • \$\begingroup\$ Power consumption is not measured in mAh. The mAh figure tells you how much capacity is left in your battery or how much of that capacity has been used. It does not directly relate to power or energy. \$\endgroup\$ – Andy aka May 6 at 10:09
  • \$\begingroup\$ How long does it take to execute that part of code? \$\endgroup\$ – Rohat Kılıç May 6 at 10:10
  • \$\begingroup\$ Hello. I takes approx 10 minutes to execute the code. \$\endgroup\$ – BokBok May 6 at 10:11
  • \$\begingroup\$ "... energy consumption on mW ..." This is incorrect too. Power is measured in W (or mW). Energy is measured in Ws or Wh. \$\endgroup\$ – Transistor May 6 at 10:11
0
\$\begingroup\$

Amp hours can be multiplied with the battery voltage to get the Watt hours, for a lithium battery in a phone this can generally be assumed to be 3.6V as this is the average voltage for most lithium batteries over there discharge curve, so on average your code will draw that much watt hours.

As this is a constant, you can see that making the amp hour value half as small results in half as many watt hours.

Edit: If you want to know how many joules (How many watts your code consumed when averaged over 1 second), them multiply the watt hour value by 3600, to make it watt-seconds,

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Energy consumption measures energy. Full stop – if the paper measures anything else than energy, it's mislabeling it.

Energy has the SI-derived unit J (joule), which is 1 J = 1 W·s; the rest is trivial conversion of units. I don't know what to explain about that – having a clear understanding of what power is, what energy is, what current is, is probably necessary anyway, if you want to understand that paper.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.