OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Battery Monitor, is there one that can measure runtime?
cmonex
post Mar 7 2006, 08:41 PM
Post #1





Group: Members
Posts: 92
Joined: 4-March 06
Member No.: 9,288



as above... i'd like to see how long i've been running on batteries... ph34r.gif couldn't find anything..
Go to the top of the page
 
+Quote Post
bam
post Mar 7 2006, 09:31 PM
Post #2





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



is there an uptime command in zaurus?
Go to the top of the page
 
+Quote Post
bam
post Mar 7 2006, 09:35 PM
Post #3





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



or you could do a cron or at job to log the battery status and time every so often, then you could extrapolate how much time it has run and how much time remains...just an estimate, but then again battery discharge is not quite linear...
Go to the top of the page
 
+Quote Post
cmonex
post Mar 8 2006, 05:44 AM
Post #4





Group: Members
Posts: 92
Joined: 4-March 06
Member No.: 9,288



QUOTE(bam @ Mar 8 2006, 07:35 AM)
or you could do a cron or at job to log the battery status and time every so often, then you could extrapolate how much time it has run and how much time remains...just an estimate, but then again battery discharge is not quite linear...
*



hey thanks for your answer smile.gif

the uptime command sounds nice, hmm if anyone knows about one, let me know... cool.gif

again, i just need something that tells me how much time elapsed on battery power, i don't mind if it can't calculate the remaining time, i trust myself better on that laugh.gif
Go to the top of the page
 
+Quote Post
chyang
post Mar 12 2006, 07:22 AM
Post #5





Group: Members
Posts: 271
Joined: 19-June 03
From: Beijing,China
Member No.: 156



One or two years ago, I thought to extrapolate the usage time of the battery based on Anton's battery applet, before I wrote the code I did one simple test, and the result shows that the battery measurement is imprecise, so the time seems to be useless. My original algorithm works depends on the time difference and battery difference,
Use Time= Left_Batter/(delta_battery/delta_time), but some running results showed the delta_battery will increase in most of time. sad.gif
Go to the top of the page
 
+Quote Post
bam
post Mar 12 2006, 09:15 AM
Post #6





Group: Members
Posts: 1,213
Joined: 9-June 05
From: Gobi Desert, Mongolia
Member No.: 7,306



the main problem is that current useage varies and here is no already built in way to measure this, but what can be done is a data profile of what the user does over time and a "good" estimation of battery time left, granted its not exact and if something drastically changes, say heavy wifi useage, the time error would increase but not dramatically.
Go to the top of the page
 
+Quote Post
cmonex
post Mar 23 2006, 04:23 PM
Post #7





Group: Members
Posts: 92
Joined: 4-March 06
Member No.: 9,288



thanks for your answers smile.gif

QUOTE(chyang @ Mar 12 2006, 05:22 PM)
One or two years ago, I thought to extrapolate the usage time of the battery based on Anton's battery applet, before I wrote the code I did one simple test, and the result shows that the battery measurement is imprecise, so the time seems to be useless. My original algorithm works depends on the time difference and battery difference,
Use Time= Left_Batter/(delta_battery/delta_time), but some running results showed the delta_battery will increase in most of time. sad.gif
*


yeah i noticed it isn't precise. it stays above 70% for a while then when it gets below that the indicated charge drops much quicker...

OK anyway... i'm not interested in remaining time! i mean elapsed time as battery runtime ... it would be so cool.. anyone any ideas? ph34r.gif
Go to the top of the page
 
+Quote Post
Greg2
post Mar 23 2006, 06:26 PM
Post #8





Group: Members
Posts: 790
Joined: 28-October 03
From: USA
Member No.: 792



QUOTE(cmonex @ Mar 8 2006, 08:44 AM)
the uptime command sounds nice, hmm if anyone knows about one, let me know...  cool.gif
In terminal do:
CODE
cat /proc/uptime

Greg
Go to the top of the page
 
+Quote Post
cmonex
post Apr 12 2006, 05:46 PM
Post #9





Group: Members
Posts: 92
Joined: 4-March 06
Member No.: 9,288



QUOTE(Greg2 @ Mar 24 2006, 04:26 AM)
QUOTE(cmonex @ Mar 8 2006, 08:44 AM)
the uptime command sounds nice, hmm if anyone knows about one, let me know...  cool.gif
In terminal do:
CODE
cat /proc/uptime

Greg
*



hehe thanks. though this shows only system uptime sad.gif
Go to the top of the page
 
+Quote Post
lardman
post Apr 13 2006, 02:32 AM
Post #10





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



Well save the output of that command as soon as you resume and before suspend and you can then take the two away from one another.

While you at it, recording things to a text file (as this sound like the easiest way), you can save the battery status by 'cat /proc/apm' iirc. Then you can plot a battery percentage vs time graph.

If you're running on a c7x0 machine with OpenZaurus you might also consider recording the cpufreq transitions and the actual battery voltages (from sysfs.)


Si
Go to the top of the page
 
+Quote Post
cmonex
post Apr 13 2006, 04:02 AM
Post #11





Group: Members
Posts: 92
Joined: 4-March 06
Member No.: 9,288



QUOTE(lardman @ Apr 13 2006, 12:32 PM)
Well save the output of that command as soon as you resume and before suspend and you can then take the two away from one another.

While you at it, recording things to a text file (as this sound like the easiest way), you can save the battery status by 'cat /proc/apm' iirc. Then you can plot a battery percentage vs time graph.

If you're running on a c7x0 machine with OpenZaurus you might also consider recording the cpufreq transitions and the actual battery voltages (from sysfs.)


Si
*



thanks for the idea. smile.gif hmm yeah it'd be nice to have some script for this. hmmm, now it only has to be actually created laugh.gif (and dunno yet, how unsure.gif )

btw actually uptime doesn't measure the time while the zaurus is switched off, just the system runtime from the last reboot. which could even be used for battery runtime if i never reboot and if i do a reboot at every recharge ph34r.gif

wow, oz really can show the actual voltage? cool.gif sounds more useful than this percentage thing in cacko which is very incorrectly measured. i sometimes get the feeling that someone was as crazy as to specify 50% at 3.6V (and 100% at 4.20V of course)...
Go to the top of the page
 
+Quote Post
lardman
post Apr 13 2006, 04:17 AM
Post #12





Group: Members
Posts: 4,515
Joined: 25-October 03
From: Bath, UK
Member No.: 464



All of the Zauruses can read the voltage (or at least a representation of the voltage from an a2d converter) in the kernel. OZ makes this info available in sysfs, I'm sure with a bit of kernel hacking it could be done for the 2.4.18 kernels.

Once you get into this, you can marvel at the wonder that is Sharp's voltage -> percentage lookup table wink.gif which is again contained within the kernel. I should add that this table has been redesigned in the past for the 2.4.x kernels and has also been re-designed for the 2.6.x kernel used by the OZ machines (depends which machine you have though, as the 2.6 kernel is onyl usable on the c7x0 and cx000 machines atm).


Si
Go to the top of the page
 
+Quote Post
cmonex
post Apr 14 2006, 06:49 PM
Post #13





Group: Members
Posts: 92
Joined: 4-March 06
Member No.: 9,288



QUOTE(lardman @ Apr 13 2006, 02:17 PM)
All of the Zauruses can read the voltage (or at least a representation of the voltage from an a2d converter) in the kernel. OZ makes this info available in sysfs, I'm sure with a bit of kernel hacking it could be done for the 2.4.18 kernels.

Once you get into this, you can marvel at the wonder that is Sharp's voltage -> percentage lookup table wink.gif which is again contained within the kernel. I should add that this table has been redesigned in the past for the 2.4.x kernels and has also been re-designed for the 2.6.x kernel used by the OZ machines (depends which machine you have though, as the 2.6 kernel is onyl usable on the c7x0 and cx000 machines atm).


Si
*



a little bit of kernel hacking sounds very exciting however i'm not the right person to even think of trying to achieve that lol ph34r.gif (i'm no linux guru)
very sad, because i would sure try to hack it if i could.

so this lookup table is actually a wonder?! i seriously doubt it, lol... laugh.gif

i have a c760 btw. if that matters.
Go to the top of the page
 
+Quote Post
ldrolez
post Jun 23 2006, 01:56 AM
Post #14





Group: Members
Posts: 69
Joined: 16-May 06
From: France, Metz
Member No.: 9,882



QUOTE(cmonex @ Mar 8 2006, 06:41 AM)
as above... i'd like to see how long i've been running on batteries... ph34r.gif couldn't find anything..
*

I've made a little script, which can give data to gnuplot : http://ldrolez.free.fr/software/zaurus/

Cheers,

Ludo.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st October 2014 - 01:55 AM