[Nexus One Android Development] gxh:
The actual chip that is managing the capacity counting is in the battery. This chip has some EEPROM memory to keep values, even if the battery is completely empty. So any value that you are reading or writing in the kernel pseudo file system (and that you see in the calibration application) is actually written and read from the battery itself.

That means if you are changing batteries, the capacity reading and all values are unique to each battery.

The only problem on the Nexus One seems to be that something is resetting the battery age value to 94 in certain circumstances. But if I change my batteries before they are discharged completely, the battery age is still the stored value. In case I swap in a battery and it has reset to 94 I am just using the calibration application to set the value I know for that battery, no need for a new learn cycle.

fcisco13 asked about if someone got a true 1600mAh battery. This is a little bit hard to answer I would think:

The chip that is in the battery can measure voltages quite accurately. This is quite easy and cheaply to do. The current on the other hand is a little bit harder to measure cheaply. The way that is done is to measure the current indirectly by measuring the voltage drop across a resistor with a known value, Again we are measuring a voltage and because we know the value of the resistor, we can calculate the current. But to produce resistors with a known value is expensive, so the battery manufacturers are using a cheap resistor with an higher tolerance. To account for that tolerance, the chip in the battery has several registers that need to be programmed to correct for the actual value of the resistor. The most important register is probably the RSGAIN register that is supposed to be calibrated in the factory to meet the accuracy. It looks like that some batteries might have a wrongly set RSGAIN register. So instead of measuring say 1mA the chip is measuring for example 2mA. So the real capacity might be in reality 1600mAh, but the value we measure and is reported after a learn cycle by the chip is 3200mAh. RogerPodacter is suspecting that his battery has such a wrong value set - but we have not quite verified this. My battery is reporting 1550mAh and this is more believable. But I am also not sure if I can trust the value.

The chip has also a register FRSGAIN that is supposed to be read only and should contain the factory determined value for RSGAIN. On both my batteries that value is actually zero. The value is not used for any calculations in the chip, but only contains a reference if something overwrites the writeable RSGAIN. So I am not sure if that calibration step was done properly in the factory.

What that means is (given it is true that the resistors are not calibrated correctly) that we can not use the mAh value to compare different batteries. Identical 1600mAh batteries could be reported as 1550mAh or as 2400mAh battery just because someone programmed the batteries differently.

The good thing is that even with a wrongly calibrated mA value you still get the full useable capacity when you do a learn cycle. The learn cycle makes sure that you start from 0% at the empty voltage and then charge as long as the current is above the min charge current. Even if your current calibration is out by a factor of two you will end up with an pretty full battery (given that you have set the Full40 value high enough). The learn cycle will then set the battery age. So then your capacity will go from 100% to 0% and you will use the full physical capacity.

You might notice that usually Android does not give you mAh or mA values. The only thing you see is the capacity in %.

But if people buy batteries and the parameters are programmed wrongly, they might only be able to use half of the real capacity. So I am really glad that a lot of dedicated people have spent some time to figure all this out!

My guess is that the cell chemistry between most of the cells is pretty much the same. So for a certain volume you get a certain capacity. So stock batteries are around 1500 to 1600mAh. The batteries that are using a extended cover are using double the volume, so are around 3000mAh.

For the price I paid it was still a good deal, even if the new "1600mAh" battery is providing only the same capacity as the stock battery.

The real test is how long a battery can run the phone. But I found it almost impossible to really compare. There is a huge difference when you use the display or when you are idle. The phone uses more battery dependent on bluetooth, GPS, Wifi, signal strenght,... But from what I can see Gingerbread is a big improvement for me. Before I was using roughly 50mA at idle, with Gingerbread I am using around 10mA. That is a big improvement...