Active Topics

 


Reply
Thread Tools
Posts: 214 | Thanked: 140 times | Joined on Aug 2010
#1
Aloha friends.

Does anyone know of a version of a BatteryGraph style tool (or can entice the Author of BatteryGraph to add as a feature) that can show the moment-to-moment actual power consumption?

In my old N95 I had the Nokia Energy Profiler, which is similar to "BatteryGraph", except that it was much faster updating (every second), and could give a completely accurate draw of current in milliamps (or recompute into milliwatts based on voltage, if that floats your boat more)



That way, finding power draws on the device was *trivial*. You just turned something off, flipped over to the energy profiler, saw "oh, that saved me 64 milliamps, cool" etc.

It was very accurate and you could learn all sorts of interesting stuff from it (like the power draw profile of a 3G connection turning on, checking email, and closing down for example).

The N900 doesn't give me this, not even on the low level.

While the battery monitoring tools seems to - under the hood - actually measure current, it actually gives this to us, the user, as a cumulative power consumption of a diminishing mAh value (milliamp-hours).

This is nigh useless as an aid to judge power _draw_, because you end up having to judge slopes of curves in BatteryGraph.

If nobody can find the actual current count (which is possible the system hides from us, if we are on lucky), then what I would like BatteryGraph to do (or a similar tool) would be to measure the value the OS *does* give us... but display it as a delta, i.e. how much did the "mAh" count change during the last X seconds? (Someone told me this value updates only every 5.12 seconds?)

This could be drawn is a separate curve in BatteryGraph, that could then much more easily be used to judge actual momentary draw.

Someone? Opinions? Thoughts?


/Z

Last edited by MasterZap; 2010-08-29 at 11:30. Reason: Typos
 
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#2
it isn't really very accurate. Yes you can compare it to another numbers calculated similarily but 64mA doesn't mean you get exactly the amount of current saved elsewhere.

But I agree that such app would be pretty nice to have..

One solution could be different approach from battery eye etc: calculate numbers without a daemon, 1-2 times per second and when you close the app, power consumption stops too.
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#3
The current draw (as you said, averaged over a 5.12s time span) can be read from the BQ27200 chip. You can either use the bq27x00_battery driver (in kernel-power) and read the value from /sys/class/power_supply/bq27200-0/current_now, or talk directly to the BQ27200 over I2C, using i2c-tools. Read the relevant register with the command

i2cget -y 2 0x55 20 w

In both methods, note that the units are unknown, so you can tell when the N900 uses a lot of power or a little power, and you can tell the ratio between a lot and a little, but you can't know exactly how much mAh are drawn.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 

The Following 3 Users Say Thank You to Matan For This Useful Post:
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#4
imo units are useless. only delta (=difference) means something. for example cut power consumption to half vs 80mA, which one tells more?

I'll see if I can scrape simple python app together.
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 

The Following User Says Thank You to ossipena For This Useful Post:
Posts: 147 | Thanked: 49 times | Joined on Dec 2009
#5
couldn't you calculate the consumtion by using the battery eye data?

I mean isn't the consumption the derivative of the graph?
 

The Following User Says Thank You to yorg For This Useful Post:
Posts: 87 | Thanked: 112 times | Joined on Feb 2010
#6
Originally Posted by Matan View Post
The current draw (as you said, averaged over a 5.12s time span) can be read from the BQ27200 chip. You can either use the bq27x00_battery driver (in kernel-power) and read the value from /sys/class/power_supply/bq27200-0/current_now, or talk directly to the BQ27200 over I2C, using i2c-tools. Read the relevant register with the command

i2cget -y 2 0x55 20 w

In both methods, note that the units are unknown, so you can tell when the N900 uses a lot of power or a little power, and you can tell the ratio between a lot and a little, but you can't know exactly how much mAh are drawn.
Hi,

Why do you say units are unknown ? according to bq27200 datasheet just divide by 20 to get mA / mAh / mW depending of register you want to read you can also get minutes.

20 is the 0.02 ohm resistor, i think nokia just follow this recommandation when building n900

Fabrice
 

The Following 2 Users Say Thank You to BabelO For This Useful Post:
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#7
Originally Posted by BabelO View Post
20 is the 0.02 ohm resistor, i think nokia just follow this recommandation when building n900
There is no reason to think that.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 
Posts: 87 | Thanked: 112 times | Joined on Feb 2010
#8
Originally Posted by Matan View Post
There is no reason to think that.
When i design an electronic circuit, usually i follow the typical application circuit.

I do some test and the values looks good
 

The Following User Says Thank You to BabelO For This Useful Post:
ossipena's Avatar
Posts: 3,159 | Thanked: 2,023 times | Joined on Feb 2008 @ Finland
#9
damn my apt -system is broken, so my efforts stopped almost before they began.... I hope I can fix it without reflash..
__________________
Want to know something?
K.I.S.S. approach:
wiki category:beginners. Browse it through and you'll be much wiser!
If the link doesn't help, just use
Google Custom Search
 
Posts: 1,258 | Thanked: 672 times | Joined on Mar 2009
#10
I use 20 (Also note that there's another factor, 3.57 or something like that, check the datasheet), and others use 21 or 22 as value for the sense resistor.
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:25.