Battery Monitoring
From Qi-Hardware
Contents |
[edit] log script
#!/usr/bin/python import os,time ts = time.ctime() usb = os.popen('cat /sys/class/power_supply/USB/online').readlines()[0][:-1] v_now = os.popen('cat /sys/class/power_supply/battery/voltage_now').readlines()[0][:-1] print "%s * %s * %s" % (ts, usb, v_now)
[edit] cron task
apt-get install cron crontab -e
*/5 * * * * /root/scripts/bat_mon.py >> /root/log/battery
[edit] results
I got a 10.8 hours of battery in a overnight idle run, nn running debian (first hour or so the screen was on, due to me leaving the fbterm that for some reason was avoiding the screen from lighting off). Couldn't wait for it to get completely exhausted, but I still need to test for some more time. More datasets are welcome :)
If I understand correctly what's stated on this page, the low-volt system switching off would happen at ~3.0 V, right? Hmm... that would be meaning that we have >20h of idle battery life?? Something wrong with my assumptions?
It would be interesting also to measure how the out-of-the-box battery life is performing with time.