getPower() returns the power in mA used by a sensor while in use:
Now, I need to calculate how much battery is used by the registration of the sensor.
Does he value returned by getPower() indicate the mAH (mA per HOUR) or something else? If yes, is there a way to get the battery mAH in order to calculate the % of battery used by the sensor?
This means the power consumption of a sensor is about 1 watt. If running the sensor 24 hours per day, the daily consumption would be 0.024 kWh.
Open the Settings app. From the list, tap Battery or Battery Usage. It will display the list of apps and the battery life they consume.
getPower() returns the power in mA used by a sensor while in use: Now, I need to calculate how much battery is used by the registration of the sensor.
Using magnetic field sensors to measure power consumption.
Something quite related has been discussed in Google groups not too long ago. You can find the full thread here for reference.
A small excerpt from the last reply in that thread, which should answer your question more or less:
(...) the battery capacity is always given in terms of mAH. (...) What matters is how long a battery can supply a given current at its rated voltage. 3800mAH means that it can supply 3800mA for 1 hour. Knowing this it makes sense now that the API is providing the current drain as a metric of power consumption. You can now calculate how much effect it will have on the battery life as a function of time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With