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.

BQ76942: Volgate calibration - gain and offset unit

Part Number: BQ76942

Hi!

We have been working on implementing the cell voltage, TOS and Pack PIN voltage calibration sequence that is described in "BQ769x2 Calibration and OTP Programming Guide". We are using a two point calibration sequence, and calculate on the difference between the measurement points. Cell voltages works good for us, but we have some problems with the two PINs.

Question 1:

The READ_CAL1 (0xf081) command have twelve byte response according to the manual, but the AFE returns 14 bytes on this command. What is the last bytes, and is it still correct that the TOS and PACK pin offset is in bytes 6 and 8 as states in the manual?

Question 2:

We are operating the AFE in userV of mV. What is the expected input in the formulas for offset and gain? For cell calibration this works fine, but when we apply the formula to the Pack and TOS PIN, our calculations get out of int16 range. (E.g we input 20V and 16V here, the difference will either be 4000mV or 400cV in the formula below)

Question 3:

The offset value for pack and tos pin is not included in the example code. Is that because it's not used? Documentation states that it can be calculated in the same way as for the cell voltages. Does that mean that the divisor shall be 2^16 in this formula:

 

Best regards

/Erik Almqvist

  • Hi Erik,

    Question 1: You are correct, READ_CAL() actually does return 14 bytes. The last 2 bytes are currently not documented, but they contain the cell map for the device. The TOS and PACK pin ADC Counts are still in bytes 6 and 8 as shown in the TRM.

    Question 2: The userV setting should not matter for the PACK/TOS/LD gains. Referring to the code example in the BQ769x2 Calibration and OTP Programming Guide, the applied voltages should be entered to the equation as mV. The userV setting does not affect the ADC counts.

    Question 3: Vdiv Offset is in units of userV, so it is important to set this according to the userV setting. It can be calculated in the same way as for the cell voltages with 2^16 as the divisor. This parameter is used for PACK Voltage, TOS Voltage, and LD Voltage, so it will impact all 3 measurements.

    Best regards,

    Matt

  • Hi!

    Thank you for your input Matt!

    Regarding question 2:) 

    We ask because the technical reference manual suggest that input shall be cV.

    We write this because we do get values out of range.In the formula we use the following values as input:

    Voltage1 = 20000mV

    Voltage2 = 17500mV

    ADC Counts V1 = 3853 (averaged values as read from READ_CAL1)

    ADC Counts V2 = 3370 (averaged values as read from READ_CAL1)

    Formula becomes:

    TOS Gain = 2^16*(20000-17500) / (3853-3370) = 2^16 (2500 / 483) = 2^16 * (5.175...) 


    which is outside the UINT16 range of the Calibration:Voltage:TOS Gain register. If using cV we would have a value between 0 and 1 to multiply with 2^16 -> Which would be in uint16 range. (Unfortunately, this still give us undesirable readings after the calibration sequence).

    Edit: Can you spot something that looks out of order in this calculation?

    Short separate note:

    While I have the GURU and writer of the BQ769x2 Calibration and OTP Programming Guide (Rev. A) on the line. When doing the current calculation - we had huge problems finding this sentence about what bytes to use in the CC2Counts for the READ_CAL1 , as it is not mentioned anywhere else in the documentation:

    It might be a good idea to highlight that part a little or, or mention it in the technical reference document. (Is it something similar that applies for the voltage registers of READ_CAL1?)

    Best regards

    /Erik Almqvist

  • Hi Erik,

    Sorry, for question 2, I made a mistake in my answer to you. The calculation should be in centi-volts. In the example code in the app note, I saw 4200-2500 for this calculation and I was thinking this was in mV, but this is the stack voltage which is 10 cells for this example, so it is 42000mV and 25000mV. 

    Thanks for the note on the CC2 Counts for the READ_CAL1() register. I will pass this onto the document owner for the TRM so we can make this clearer in the next revision.

    Best regards,

    Matt

  • Thanks for your reply once again Matt!

    I'm obviously having some problems with the straight line equation I guess... So, just so I understand it correct:

    We are using userV of mV. So, we should use the cV in the gain calculation, and then apply the VDIV offset formula of mV? Or should we convert to userV after the calculation?


    An example with numbers:

    Voltage1 = 17500mV

    Voltage2 = 20000mV

    ADC Counts V1 = 3370 (averaged values as read from READ_CAL1)

    ADC Counts V2 = 3853 (averaged values as read from READ_CAL1)

    Formulas becomes:

    TOS Gain = 2^16*(2000-1750) / (3853-3370) = 2^16 (250 / 483) = 2^16 * (0.5175...) = 33915

    VDiv Offset= (33915 * 3370 / 2^16) - 17500 ~= 1744 - 17500 = -15756           <---- Feels wrong

    It feels like it should be close to 0. If we would had cV in the Vdiv Offset equation above - we would have 1743-1750 and if we would had cV as -6 which feels OK given that VDiv Offset is zero by default. 

    Or, should we do the VDiv Offset calculation forumla in CV ) ( 1744-1750 = -6) and then convert this result to mV (-6 *10 = 60) before storing in userV?

    Best Regards

    Erik Almqvist

  • Hi Erik,

    Your last statement is correct - you should calculate VDiv Offset in cV and then convert this result based on your userV setting. Since your userV is set to mV, you want to store this value as 60. So Vdiv Offset is tricky because this parameter is interpreted by the device according to the userV setting.

    Best regards,

    Matt

  • Thank you for your support Matt! Much appreciated!

    Best regards

    /Erik