This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ34Z100-G1: Programmatic calibration of gauge

Part Number: BQ34Z100-G1
Other Parts Discussed in Thread: BQSTUDIO, , BQ34Z100

Hi,

The literature for this gauge asks we enter calibration mode in order to calibrate the board offset. However on sniffing the i2c packets from battery management studio this does not occur.

Battery management studio does the following

Read Status AA 00 00 00

Send Board Offset command AA 00 09 00

Every 100ms reads status waiting for bits to change in status

Send CC Offset Save command 00 0B 00

and it's done.

So is the literature wrong, or is battery management studio wrong?

Additionally battery management studio (1.3.86) does not unseal the pack, but reports a successful calibration, how is this so?

Glen.

  • Hi Glen, Can you point to the literature and section number being referenced?

  • Hi,

    Yes, I'm referring to SLUA640B. Which is the only documentation I can find on calibrating TI fuel gauges...unless you can point me to a more relevant document?

    Glen.

  • Both the TRM and bqStudio are correct.

    The BOARD_OFFSET command will work in sealed mode and it will *force* a board offset calibration, regardless of mode. See TRM, Table 2-2:

    BOARD_OFFSET 0x0009 Yes Forces the device to measure and store the board offset

    The "Yes" indicates that this is available in sealed mode. And the description states that this will be forced.

    The command sequence that you observe from bqStudio is correct.

  • Ok,BQ Studio does NOT work in sealed mode when issuing that command, it states it succeeds, but the calibration has not occurred! This is a simple thing to test, issuing the calibrate board offset command will return immediately with the green tick within a couple of seconds. When the command is issued and the true calibration is performed, it should take around a minute to perform the calibration.

    So, the command sequence I observe from bq studio is not correct, unless the chip is unsealed. Unsealing the chip in bqstudio, then repeating the calibration sequence works correctly and takes around 1 minute before the the green tick appears.

    Is there any correct/up to date documentation on calibrating this bfg? The datasheet doesn't mention anything about the sequence for calibrating the voltage / temperature and current

    As I mentioned in my previous post SLUA640B is the best reference I've found, but even this has errors and does not mention the BQ34Z100-G1 (as of the time of writing Section 1.1).

    Is there a document that details host system calibration for the BQ34Z100-G1.

    The lack of decent documentation for this IC is VERY frustrating.

    Glen.

  • Hello Glen,

    None of the DF writes will work in sealed mode.

    I believe the sequence in the app note you referenced should work, are you able to try it on the EVM?

    I'll make a note to update our documentation for host side calibration for bq34z100 in the future.

  • Hi,

    The SLUA640B has a number of errors in the documentation.

    Here's a few I spotted with a cursory glance

    1) Code example Page 2 : The do..while loop will hang forever as it is not reading the buffer back within the loop.

    2) Code examples throughout: The functions send_subcommand, send_command, read_Register, send_extendedCommand, read_Block, read_Checksum (and possibly a few more are not documented). I see this has been asked about previously in the forum with no reply.

    3) Board Offset flowchart page 6 : First step enter calibration mode, this is not required.

    4) No unseal code functionality

    5) Page 4 and 6 flowchart box detailing polling cca bit. Delays between i2c commands. the datasheet specifies a maximum poll rate of 500ms between requests, yet BQ studio polls 5x faster than this @ 100ms

    Whilst all of these things can be overcome by research, this really shouldn't be necessary. The datasheets are convoluted enough without having to battle to find alternative sources to verify the information. I don't believe that I should have to sniff i2c traffic in order to come up with the information I need to get this to work correctly. It should be in the datasheet!

    This is not helped by TI staff (dominik) quoting the datasheet when the information in the datasheet is clearly incorrect.

    Cheers

    Glen.

  • Hello Glen,

    Thank you for the corrections here.

    1. You are right, that needs to be changed, at least the buffer needs to be in the do/while loop.

    2. I think the code examples here are very old. I will see if we can find the source to this.

    As far as most of the research part of this, I'm glad that you are figuring this out on your own and we will definitely use this feedback for the part to improve our documentation.

    We actually use bqStudio as the norm and sometimes we have to sniff traffic on some of the older parts to figure out how to best communicate with it.

    I think what you are suggesting is that we put more effort on improving our documentation. In this case, I would say TRM (Technical Reference Manual) for how the firmware works and how to interface with the firmware through programming.

  • I've found another issue....

    BQStudio issues an 0x79 command as part of the voltage calibration sequence. This extended command is not documented at all in the datasheet. Where can I find more information about it?

    Cheers

    Glen.

  • You can find some explanations about this command 0x79 in the following app note.

    http://www.ti.com/lit/an/slua640b/slua640b.pdf