[Nexus One Android Development] Marine6680:
People seem to be in the dark about lithium ion batteries, how they are charged, and how the device estimates battery charge remaining.

Lithium batteries do not have memory effects, but the phone does keep a file with charge info about the battery; it uses this to estimate charge left and how to charge safely when the device is powered on.

When properly charging a Li-ion battery, the last 10% of the charge should take almost as long as the time it takes to charge from 0 to 90% (well about half as long meaning a full third of the charging time should be going into the last 10% of the charge) Charging with the device off, charges the battery more completely and consistently.

Li-ion battery chargers use a type of charge cycle called constant amp/constant voltage. The battery will be force fed amps until the battery's voltage peaks and it will then be fed a constant voltage. (around the 90% charge mark) During the constant voltage phase, the amps that the battery is taking in will be monitored; as the battery gets closer to full charge the amperage will drop more and more, until it is just a tiny trickle. When it gets to that point, the battery is fully charged. Obviously charging with the device still powered on creates a problem for that type of charging. So the battery can only be charged to the peak voltage, then the charge cycle must stop; as the last 10-15% of the charge can not be completed safely.

It is always good to let a device run until dead and then charge with the device off a couple times when the device is new, and then charge the device from empty while powered off once every couple months. (do not do it too often, as Li-ion batteries prefer to be between 50-80% charge for longer service life) This allows the device to maintain a proper reference data file on the battery and its charge state. this data file is what Android uses to estimate the charge in the battery, if the file is not accurate, the device may power down sooner than it should, or not charge fully to a true 100% state. (peak voltage state when powered on that is)

Also, Li-ion batteries are rated for capacity from a discharged voltage of 3v. So a 1500Mah battery is rated to provide 1500mah of power from fully charged to a final discharged voltage of 3v.

I do not know what the minimum operating voltage of various devices is, but if it is higher than 3v; then the phone must shut down at its min operating voltage and not the 3v needed to get full capacity. My Nexus one shuts off around 3.5v so there is around 25% of the actual rated battery capacity left. (remember what I said about Li-ion batteries liking to be between 50-80%, this left over capacity means that running the battery dead repeatedly is less harmful than if you drained the battery to a true 0% state)

There is also a voltage drop on a battery when under load. So if you are putting a heavy load on the device (like a 3D rendered game heavy gps use) then the battery voltage may drop to below the device’s min voltage. This means that if the phone shuts down during this time, you could probably turn it back on and get a few hours of standby or a few more minutes of light use. This could be another cause for people seeing shut downs when the battery gets around 10%.

The amount of power in a battery is high, especially in Li-ion batteries with their high energy densities. Over charging a Li-ion battery can cause an explosion, literally, that little battery in your phone could remove some fingers. Over discharging is bad as well, as it can start a fire; though like I mentioned above, the cut off voltage is above the 0% state, so that is unlikely here.