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.

BQ76952: BQ76952 Trouble with getting synchronous current readings from ADC counts.

Part Number: BQ76952

Hello,

We're trying to get synchronous current and voltage readings from the BQ. We got voltage working using the equation in the TRM, but we can't get the current to work properly. This is the equation I've been using:

Cell # current = ((cell # current adc values) - ((board current offset) / (coulomb counter offset samples))) * CC Gain

When reading board current offset and coulomb counter offset samples, we find that board offset is 0, so the equation essentially simplifies down to (cell # current ADC values * CC Gain). But when we do this, we get something wildly off. We played around with it and found that this equation came very close to our actual current reading, but it still had a 10% error:

Cell # current = adc value / CC gain

I'm not sure why dividing worked better, but it did.

Note: I've tried this with just the 32-bit adc value and also using the middle-bytes of the adc value. The most success I got was with the 32 bit value and not the 16 bit value.

Our CC Gain value is 15.9536 because we're using a 0.5 mΩ sense resistor.

Also, we're reading CC3 current as well, and that is very accurate. It's just the ADC conversion we're having trouble with.

Any ideas as to why it's not working?

  • Hi Harmander,

    To convert this 32-bit value to the CC2 Current reading that you see in 0x3A, you take the middle 16 bits and multiply this times 15.9536 (for a 0.5 mΩ sense resistor). This gain will vary slightly if you go through the calibration steps, but this is a close value. The bytes are reported in reverse order, so the least significant byte comes first. 

    To use the entire 32-bits, the most significant byte is just a sign byte. For the bottom 24 bits, the LSB is approximately 29.56 nV. So you can divide this voltage by your sense resistor value to calculate the current.

    Best regards,

    Matt

  • Hey Matt, the second method you outlined got us really close but I had a question. I used the equation in the datasheet to get 29.56 nV (with extra resolution we got 29.5639038 nV) and multiplied it by our adc counts. But we're still seeing a discrepancy between the synchronous current readings and the current obtained from CC3. Is this expected? When we were drawing 30 A, CC3 showed 5% error under the actual value and the synchronous currents showed a 7% error above the actual value.

  • Hi Harmander,

    CC3 is the average of multiple CC2 readings (the is configured by the Settings:Configuration:CC3 Samples register). The raw counts do not have any calibration (gain and offset) applied, so there should be some error expected.

    Best regards,

    Matt