[Gta04-owner] bq27000-battery: battery is not calibrated! ignoring capacity values

NeilBrown neilb at suse.de
Mon Feb 4 07:06:54 CET 2013

On Sun, 03 Feb 2013 22:47:03 +0100 EdorFaus <edorfaus at xepher.net> wrote:

> Hi,
> On 02/03/2013 05:18 PM, Bob Ham wrote:
> > I'm wondering if anybody here can provide some authoritative information
> I'm not an authority on the subject, but I figured I could provide some 
> details on my (limited) understanding of the problem, just so we're all 
> on the same page.
> > What precisely is it that needs calibration?
> > Why does reporting the charge depend on this calibration?
> The OpenMoko battery contains a bit more circuitry than most batteries, 
> including a bq27000 chip. This chip measures and keeps track of several 
> things about the battery, including the current going into or out of the 
> battery, and this lets it know the charge level of the battery. The 
> GTA0x then communicates with this chip via the third contact to display 
> information about the battery, such as max and current charge level, and 
> the mA currents we see on the home screen.
> Keeping this chip inside the battery instead of in the GTA0x is because 
> it allows you to have more than one battery, and/or use the battery in 
> more than one device, while still maintaining accurate and up-to-date 
> information.
> That bq27000 chip is what appears to needs calibration, presumably to 
> know the characteristics of the actual battery it is in, I'm guessing it 
> in particular it needs to know the max and min charge levels that the 
> battery will hold, to be able to calculate things like how full the 
> battery is or how long it is until it's empty.
> While it apparently knows the values the battery was designed for, those 
> values will change as the battery wears down (which, for LiIon 
> batteries, includes simple time passed), and it needs to know the 
> actual, measured, values to have any accuracy.
> > How is the calibration performed, and by what?  Is there a problem with
> > the GTA04's hardware, or with the kernel, or is this expected behaviour?
> I assume the calibration is performed by the chip itself, when the 
> device/user follows some kind of procedure to calibrate it, meaning that 
> this is (kind of) expected behavior.
> The problem is that, since we haven't seen the datasheet or any other 
> relevant information, we don't actually know what that calibration 
> procedure is supposed to be.

Datasheets can be found.  e.g.

There are two things that can cause this message.

The first is if the BQ27000 in your battery doesn't think that it is
calibrated.  This seems unlikely except for a new battery or one that has
been left to go completely flat for a long time.  Normally the BQ27000 will
think it is calibrated, even if the calibration is inaccurate.

The second is if the BQ27000 doesn't respond to a read properly.  In that
case an attempt to read the 'flags' will see 0xFF, and as that has the
"Capacity Inaccurate" flag set, the driver will think that it is not
calibrated.  This happens for example if you take the battery out.

This also happens if you have a battery without a BQ27000 in it, hence
Nikolaus' earlier question "HDQ can't detect battery presence?"

While the one-wire bus can enumerate devices, the HDQ bus (which is
similar but simpler) cannot.  So if the device doesn't expect to have a
BQ27000 in the battery, we need to tell the kernel.

Possibly we could get the BQ27000 driver to detect read errors better and
somehow report "no battery" rather than "not calibrated".

To answer another question in 

> So, I have a question: is it possible to temporarily disable the 
> function that stops charging when the battery is full, so that it keeps 
> charging as long as the device is plugged in?

No it isn't.  That is a function of the hardware.  The charger will keep
charging until the current drops below a certain value, and then stops

If a single discharge/charge cycle doesn't get rid of the "not calibrated"
message, then either:
 - there is no bq27000 in the battery
 - the bq27000 is broken
 - the connection to the battery is dodgy.

I've noticed that the battery connector on my GTA04 is placed slightly
differently to the one on my GTA02 (fractions of a millimeter) to the effect
that bumping the phone can cause the battery to disconnect.  i.e. it doesn't
press as hard on the battery terminals.  To address this I put one or two
layers of tape on the bottom of the battery to push it harder against the
terminals.  It might be the case that a similar effect is causing some people
to have a poor connection to the sensor pin, but still (just) a good enough
connection to the power pins.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20130204/64f3ad63/attachment.bin>

More information about the Gta04-owner mailing list