← Back to team overview

ubuntu-phone team mailing list archive

Re: Battery

 

* Cesar Herrera wrote:
> So it would be interesting display the Voltage.

You can get this information here:

  /sys/class/power_supply/battery/voltage_now

... or somewhere similar, depending on the exact device.

It's not perfect, but it's usually pretty close under normal 
circumstances.  Divide by 1,000,000 to get voltage:

# cat voltage_now
4323000

So, it says it's at 4.323 V.  My meter says it's 4.346 V, but 
that's close enough.  The meter is more accurate than the kernel.


* Marcin Xc <gtriderxc@xxxxxxxxx> wrote:
> There is one more thing I'd like to add to this discussion that 
> You can see in the picture:
> http://ep.com.pl/cache/images/norm/3/1/7/
> c3JjPS9pbWFnZXMvbm9ybS8zLzEvNy8xMzMxN2FrdW11bGF0b3J5X3J5c18yMC5qcGcmdz05MDAmaD01OTQ
> =_srcb9bd5f071626572b62658662f22e4c3d.jpg

FWIW, I measured and graphed a charge like that on arale:

  http://toykeeper.net/tmp/phablet/power/arale.charge.png

It uses a nice 3-stage charging algorithm.  I'm not too happy 
about how it behaves after it's fully charged though.  It's bad 
for the battery to sit idle in a nearly-full charge-discharge 
cycle.  So, don't leave the phone plugged in while it's full.

> The green line "Pojemnosc" is capacity. The red one "Napiecie 
> ogniwa" is voltage. In a healthy Li-Ion battery You can pretty 
> easily display the capacity if You know the voltage.

Yes, if you know the shape of the discharge curve, you can get a 
pretty good estimate of the remaining capacity.  The discharge 
curve depends on the cell type, make, model, age, current draw, 
etc.  It typically needs recalibration over time as the cell 
ages, and it's best to have curve data for multiple levels of 
amperage.

Here are the discharge curves for some common 18650 cells at 0.2A:

  http://www.lygte-info.dk/pic/Batteries2011/All18650/Capacity-0.2A.png

Personally, I prefer to just check the voltage directly and keep 
a rough mental map of the curve in my head.

> behind a kind of an overcharging/ totally discharging/overheat 
> protecting firewall.  If Your phone doesn't stand up it doesn't 
> mean that the battery is under 2V or 1V, zero and empty. It 
> means that the electronic security doesn't allow You to turn it 
> on any more to protect Your battery chemically.

Draining this type of cell too far will damage it.  Many 4.2V 
protection circuits will cut off at 2.7V.  These phones use 4.35V 
cells, but I haven't tested to see if it has a protection circuit 
or where its limits are.  I find that the phone's OS will shut 
itself off at about 3.2V, but I suspect the protection circuit 
doesn't activate until a bit lower.


-- Selene


References