maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Battery drain display (https://talk.maemo.org/showthread.php?t=39891)

late666 2010-01-09 20:07

Battery drain display
 
Is there any way to calculate and show the rate of the battery drain?
Using xterm you can see the percentage of battery you have left, and if it also shows the exact amount of charge left in the battery then it would be possible to calculate battery drain..
That way you'd be able to see if your battery is draining too fast, or when you're low on power you can check and see how much you're spending and know how much time you have left approximately.

ndi 2010-01-09 22:13

Re: Battery drain display
 
Unlikely. Battery is not linear enough to extrapolate to 1% or so and 5% means 20 steps, which, for 10 hour uptime at least means "average consumption over the last 30 minutes or so" which is pretty much useless.

Also, consumption in such a device is anything BUT linear. In reality, the screen eats depending on what was displayed (not backlight), GSM actually works via fast bursts, disk works async as flushed, CPU drains ROUGHLY with load, since different tasks that ceil the CPU drain differently - that's why there are testing-benchmark algorithms instead of loops. Wifi works in bursts, headphones eat with volume and signal, etc.

The only linear drain in the N900 is most likely the backlight.

This one of the reasons we use Li-Po in phones, they deal well with spikes. Unless one has an accurate, fast, hardware amp-meter, it doesn't work.

Estimated uptime left on mobile PCs is easier to detect because the drain is bigger in standby, because there are amp-meters built in in some of them and because miniature drains like bluetooth don't really count when you drain 150W with the CPU and 150W with the GPU.

If you try on N900, the variations in usage (popping the screen, changing songs) will throw your estimation off by hours, which is worse than just watching the battery IMO.

late666 2010-01-09 23:37

Re: Battery drain display
 
It doesn't have to be linear in order to show the current rate of battery drain...

ndi 2010-01-09 23:48

Re: Battery drain display
 
Yes it would. GSM uses 2-3 milliseond pulses of varying intensity. One device in the phone can have as much as 50 times the average drain depending on conditions. The definition of "current" rate is very dim. It's very different from a light bulb.

You need to construct averages (software or hardware) and that requires hardware itself. Even if you try estimates by looking at the terminal running lshal every second, when you close the lid your figure just quadrupled. Simply moving around the phone varies recv signal and that affects tx signal. Older models varied emissions between 4 mW to 4W (I think that's been lowered since though). Signal strength alone can have a thousandfold increase over a few milliseconds.

Don't mean to be difficult.

I simply don't think it's doable with any useful accuracy.

jjx 2010-01-09 23:54

Re: Battery drain display
 
Is there a current (amps) / power sensor in the N900's power circuit?

Even if it's not possible to predict battery time accurately, it would be great to have fast feedback on power consumption while running different apps, widgets, different network settings, mobile signal levels, etc.

Right now there's a fair amount of advice about what you have to avoid or disable to get good battery life, but some of it is guesswork. It would be great to have measurements. It would also help developers optimise their apps to reduce power consumption.

shadowjk 2010-01-10 00:55

Re: Battery drain display
 
In screenshots of pre-release firmware, a Nokia Energy Profiler icon was visible.

On Symbian S60 devices, Nokia Energy Profiler can record real-time current measurements taken every 0.25seconds, among other things.

Unfortunately, NEP seems to be missing from production firmware and does not seem to be available anywhere.

mece 2010-01-10 01:05

Re: Battery drain display
 
For something not that accurate you could just poke at lshal | grep battery.reporting.current over a couple of minutes to get you your average drain over that period. then - now / timeperiod :)

late666 2010-01-10 01:16

Re: Battery drain display
 
Quote:

Originally Posted by mece (Post 461856)
For something not that accurate you could just poke at lshal | grep battery.reporting.current over a couple of minutes to get you your average drain over that period. then - now / timeperiod :)

Huh?
Poke what now?

ndi 2010-01-10 12:54

Re: Battery drain display
 
mece: that would gate you average drop in voltage, not in capacity, those are mV not mW. As a result, it's not linear and can't be used to extrapolate something useful unless "something between 4 and 8 hours" is useful.

At this precision, one could look at cpu load, wifi, 3g and stuff and guess. However two people on 3G might get anywhere between 24h and 4 hours standby depending on signal strength.

I never said it can't be done, I simply said that it would be only marginally useful.

In theory, one could run the battery through an amp meter from a multimeter and profile it, then guess. But setting it down behind a metal beam could halve the time - only now the user has a 6 hour estimate instead of "40%-ish".

Then there's the temperature of the battery, performance, etc. There are reports of 25% error in battery charge level depending on various, deemed "normal" factors. (there's a bug about it, closed)

Corwin 2010-01-19 12:37

Nokia Energy Profiler for N900?
 
This really is a pitty...

Call to Nokians: Is there a version of Nokia Energy Profiler for the N900?
This would make it so much easier to estimate the hit of several options to power usage.
Right now I am using js.s's perl script to roughly my power usage ( http://talk.maemo.org/showthread.php...40&#post413740 ), although I modified it to run only every 360 seconds and started it into ther background. Nice script, but a proper version of the Nokia Energy Profiler would be great.

Thanks,
Corwin


All times are GMT. The time now is 06:06.

vBulletin® Version 3.8.8