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.

BQ76920: Cells and Battery values change with low battery voltage

Part Number: BQ76920

Dear Sir,

I have a strange problem. I have 4 LiFePO4 cells (Vc3 and VC4 shorted on the Bq7692003), when the battery voltage is about less than 11V, sometimes I see the cells and the battery voltage read by Bq7692003 that change the values. For example I read for much seconds a 2900mV on the cell, and sometimes for 2/3 seconds I read about 2100mV.  The REGSRC and BAT pins have less than 11V, there are 2 diodes. What happen?

Regards,

Davide

  • Hi Davide,

    I am not sure what could be causing this behavior. Have you observed this behavior on more than one device? If not, can you try replacing the device in case it is damaged?

    Maybe you can share your schematic for the BQ76920 and I can check for any potential issues. 

    Best regards,

    Matt

  • Hi Matt,

    thank you for reply. Yes the problem is also on other boards. Thi is the schematic:

    Regards,

    Davide

  • Hi Davide,

    I do not see anything in the schematic that explains the large jump in the voltage reading. The time constant of the cell input resistors / capacitors is a little large - you could try reducing the capacitor values to 1 uF to see if that makes a difference. Although this would only result in some small measurement variation during cell balancing, not the large change you observed.

    Another thing to check - are you reading the voltages as atomic values (reading both the high and low bytes in the same transaction). If the 2-byte voltage reading is on a boundary (for example 0x1CFF but is fluctuating to 0x1D00 on some readings), if you were to read each byte individually, you might read 0x1C for the high byte and 0x00 for the low byte. 

    Regards,

    Matt

  • Hi Matt,

    I tried to change the capacitor without any good news. 

    I' m changed the reading algorithm several times, and I'm sure the atomic read good. Moreover, I tried with this simple algorithm to be sure to read correctly the registers, but never changes!

    In the while main cicle of host:

    ------------------------------------------------

    readRegister(SYS_STAT, &bq7692003_register[SYS_STAT].Byte);
    SYS_STAT_cc_ready = bq7692003_register[SYS_STAT].Bits.b7;
    if ((SYS_STAT_cc_readyOld == 0) && (SYS_STAT_cc_ready == 1))
    {
    readAfeRegister(BAT_HI_BYTE, &debug0009);
    readAfeRegister(BAT_LO_BYTE, &debug0010);
    }

    SYS_STAT_cc_readyOld  = SYS_STAT_cc_ready;

    ...instructions to reset the CC_READY

    ---------------------------------------------

    As you see, the code is simple and I think is not possible to read each byte individually.

    Can be the ESD discharge?

    Regards,

    Davide 

  • Hi Davide,

    The bytes should be read as a block read instead of two transactions. There is example code available for this device in the product folder - here is the link: https://www.ti.com/lit/zip/sluc583  This code uses an I2C block read command to read the atomic value.

    Best regards,

    Matt

  • Hi Matt,

    I implemented the algorithm you adviced me but it doesn' t solve the issue! It's very strange. I made a log with timestamp (1 second for stamp) and battery  and cells voltage. Please watch what happen on the time 352, 381, 406, 429

    Time:347     Battery:11249mV     C1:2825mV   C2:2819mV   C3:2793mV   C4:2811mV

    Time:347     Battery:11249mV     C1:2825mV   C2:2819mV   C3:2793mV   C4:2811mV

    Time:348     Battery:11252mV     C1:2825mV   C2:2819mV   C3:2793mV   C4:2811mV

    Time:349     Battery:11252mV     C1:2826mV   C2:2819mV   C3:2793mV   C4:2811mV

    Time:350     Battery:11253mV     C1:2826mV   C2:2820mV   C3:2794mV   C4:2811m

    Time:351     Battery:11253mV     C1:2826mV   C2:2820mV   C3:2794mV   C4:2811mV

    Time:352     Battery:11339mV     C1:2827mV   C2:2820mV   C3:2794mV   C4:2812mV

    Time:353     Battery:11256mV     C1:2827mV   C2:2820mV   C3:2794mV   C4:2812mV

    Time:354     Battery:11256mV     C1:2827mV   C2:2820mV   C3:2795mV   C4:2813mV

    Time:355     Battery:11256mV     C1:2827mV   C2:2821mV   C3:2795mV   C4:2813mV

    Time:356     Battery:11258mV     C1:2827mV   C2:2821mV   C3:2796mV   C4:2813mV

    Time:357     Battery:11258mV     C1:2827mV   C2:2821mV   C3:2796mV   C4:2813mV

    Time:358     Battery:11259mV     C1:2828mV   C2:2822mV   C3:2796mV   C4:2813mV

    Time:359     Battery:11261mV     C1:2828mV   C2:2822mV   C3:2796mV   C4:2813mV

    Time:360     Battery:11261mV     C1:2828mV   C2:2822mV   C3:2796mV   C4:2814mV

    Time:361     Battery:11262mV     C1:2828mV   C2:2822mV   C3:2796mV   C4:2814mV

    Time:362     Battery:11262mV     C1:2829mV   C2:2822mV   C3:2796mV   C4:2814mV

    Time:363     Battery:11264mV     C1:2829mV   C2:2822mV   C3:2796mV   C4:2814mV

    Time:364     Battery:11264mV     C1:2829mV   C2:2822mV   C3:2796mV   C4:2814mV

    Time:365     Battery:11265mV     C1:2829mV   C2:2822mV   C3:2797mV   C4:2824mV

    Time:366     Battery:11265mV     C1:2829mV   C2:2823mV   C3:2797mV   C4:2814mV

    Time:367     Battery:11265mV     C1:2829mV   C2:2823mV   C3:2797mV   C4:2815mV

    Time:368     Battery:11265mV     C1:2829mV   C2:2823mV   C3:2797mV   C4:2815mV

    Time:369     Battery:11267mV     C1:2830mV   C2:2823mV   C3:2797mV   C4:2815mV

    Time:370     Battery:11268mV     C1:2830mV   C2:2823mV   C3:2798mV   C4:2815mV

    Time:371     Battery:11268mV     C1:2830mV   C2:2823mV   C3:2798mV   C4:2815mV

    Time:372     Battery:11268mV     C1:2830mV   C2:2823mV   C3:2798mV   C4:2816mV

    Time:373     Battery:11270mV     C1:2830mV   C2:2824mV   C3:2798mV   C4:2816mV

    Time:374     Battery:11270mV     C1:2830mV   C2:2824mV   C3:2798mV   C4:2816mV

    Time:375     Battery:11270mV     C1:2830mV   C2:2824mV   C3:2798mV   C4:2816mV

    Time:376     Battery:11268mV     C1:2830mV   C2:2824mV   C3:2798mV   C4:2816mV

    Time:377     Battery:11270mV     C1:2830mV   C2:2824mV   C3:2798mV   C4:2816mV

    Time:378     Battery:11271mV     C1:2830mV   C2:2824mV   C3:2798mV   C4:2844mV

    Time:379     Battery:11271mV     C1:2831mV   C2:2824mV   C3:2799mV   C4:2816mV

    Time:380     Battery:11273mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2816mV

    Time:381     Battery:11302mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2817mV

    Time:382     Battery:11271mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2817mV

    Time:383     Battery:11274mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2817mV

    Time:384     Battery:11273mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2817mV

    Time:385     Battery:11274mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2817mV

    Time:386     Battery:11274mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2817mV

    Time:387     Battery:11274mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2817mV

    Time:388     Battery:11276mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2818mV

    Time:389     Battery:11279mV     C1:2831mV   C2:2825mV   C3:2799mV   C4:2817mV

    Time:390     Battery:11279mV     C1:2832mV   C2:2825mV   C3:2800mV   C4:2817mV

    Time:391     Battery:11277mV     C1:2832mV   C2:2826mV   C3:2800mV   C4:2845mV

    Time:392     Battery:11277mV     C1:2832mV   C2:2826mV   C3:2800mV   C4:2818mV

    Time:393     Battery:11276mV     C1:2832mV   C2:2826mV   C3:2800mV   C4:2818mV

    Time:394     Battery:11276mV     C1:2832mV   C2:2826mV   C3:2800mV   C4:2818mV

    Time:395     Battery:11279mV     C1:2832mV   C2:2826mV   C3:2800mV   C4:2818mV

    Time:396     Battery:11279mV     C1:2833mV   C2:2826mV   C3:2801mV   C4:2818mV

    Time:397     Battery:11279mV     C1:2833mV   C2:2826mV   C3:2800mV   C4:2818mV

    Time:398     Battery:11279mV     C1:2833mV   C2:2826mV   C3:2801mV   C4:2818mV

    Time:399     Battery:11279mV     C1:2833mV   C2:2827mV   C3:2801mV   C4:2818mV

    Time:401     Battery:11279mV     C1:2833mV   C2:2826mV   C3:2801mV   C4:2818mV

    Time:402     Battery:11279mV     C1:2833mV   C2:2826mV   C3:2801mV   C4:2819mV

    Time:403     Battery:11280mV     C1:2833mV   C2:2826mV   C3:2801mV   C4:2819mV

    Time:404     Battery:11280mV     C1:2833mV   C2:2827mV   C3:2801mV   C4:2819mV

    Time:405     Battery:11280mV     C1:2833mV   C2:2827mV   C3:2801mV   C4:2819mV

    Time:406     Battery:11297mV     C1:2833mV   C2:2827mV   C3:2801mV   C4:2819mV

    Time:407     Battery:11282mV     C1:2833mV   C2:2827mV   C3:2801mV   C4:2818mV

    Time:408     Battery:11282mV     C1:2833mV   C2:2827mV   C3:2801mV   C4:2841mV

    Time:409     Battery:11282mV     C1:2833mV   C2:2827mV   C3:2801mV   C4:2819mV

    Time:410     Battery:11282mV     C1:2833mV   C2:2827mV   C3:2801mV   C4:2819mV

    Time:411     Battery:11283mV     C1:2833mV   C2:2827mV   C3:2801mV   C4:2819mV

    Time:412     Battery:11283mV     C1:2834mV   C2:2827mV   C3:2802mV   C4:2819mV

    Time:413     Battery:11283mV     C1:2834mV   C2:2827mV   C3:2802mV   C4:2819mV

    Time:414     Battery:11283mV     C1:2834mV   C2:2827mV   C3:2802mV   C4:2819mV

    Time:415     Battery:11283mV     C1:2834mV   C2:2827mV   C3:2802mV   C4:2819mV

    Time:416     Battery:11283mV     C1:2834mV   C2:2827mV   C3:2802mV   C4:2819mV

    Time:417     Battery:11285mV     C1:2834mV   C2:2827mV   C3:2802mV   C4:2821mV

    Time:418     Battery:11285mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:419     Battery:11285mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:420     Battery:11285mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:421     Battery:11285mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:422     Battery:11285mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:423     Battery:11285mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:424     Battery:11285mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:425     Battery:11286mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:426     Battery:11286mV     C1:2835mV   C2:2828mV   C3:2802mV   C4:2823mV

    Time:427     Battery:11286mV     C1:2835mV   C2:2828mV   C3:2802mV   C4:2821mV

    Time:428     Battery:11286mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:429     Battery:11403mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:430     Battery:11372mV     C1:2835mV   C2:2828mV   C3:2803mV   C4:2820mV

    Time:431     Battery:11288mV     C1:2835mV   C2:2828mV   C3:2803mV   C4:2819mV

    Time:432     Battery:11288mV     C1:2835mV   C2:2828mV   C3:2803mV   C4:2819mV

    Time:433     Battery:11289mV     C1:2835mV   C2:2828mV   C3:2803mV   C4:2820mV

    Time:434     Battery:11289mV     C1:2835mV   C2:2829mV   C3:2803mV   C4:2820mV

    Time:435     Battery:11289mV     C1:2835mV   C2:2828mV   C3:2803mV   C4:2820m

     

    Regards,

    Davide 

  • Hi Davide,

    Can you highlight the problem readings? I do not see what you mean.

    Thanks,

    Matt

  • Hi Matt,

    I highlighted the problem. As you can see, the battery voltage sudden change the values.

    ...

    Time:350     Battery:11253mV     C1:2826mV   C2:2820mV   C3:2794mV   C4:2811m

    Time:351     Battery:11253mV     C1:2826mV   C2:2820mV   C3:2794mV   C4:2811mV

    Time:352     Battery:11339mV     C1:2827mV   C2:2820mV   C3:2794mV   C4:2812mV

    Time:353     Battery:11256mV     C1:2827mV   C2:2820mV   C3:2794mV   C4:2812mV

    Time:354     Battery:11256mV     C1:2827mV   C2:2820mV   C3:2795mV   C4:2813mV

    ...

    Time:426     Battery:11286mV     C1:2835mV   C2:2828mV   C3:2802mV   C4:2823mV

    Time:427     Battery:11286mV     C1:2835mV   C2:2828mV   C3:2802mV   C4:2821mV

    Time:428     Battery:11286mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:429     Battery:11403mV     C1:2834mV   C2:2828mV   C3:2802mV   C4:2820mV

    Time:430     Battery:11372mV     C1:2835mV   C2:2828mV   C3:2803mV   C4:2820mV

    Time:431     Battery:11288mV     C1:2835mV   C2:2828mV   C3:2803mV   C4:2819mV

    Time:432     Battery:11288mV     C1:2835mV   C2:2828mV   C3:2803mV   C4:2819mV

    ...

    Regards,

    Davide 

  • Hi Davide,

    In your original problem description, you said the cell voltage would sometimes jump from 2900 mV down to 2100 mV. Has that problem gone away? 

  • Hi Matt,

    yes it happen when the battery has a low voltage (about less then 11V). In this case, the cell and the battery voltage varies thier values.  Now the battery has about 11.3V and the changes happen on the battery voltage only.

    Regards,

    Davide 

  • I discharged a bit the battery and here that I observed. The problem is random!!

    ....
    Time:10799 Battery:11202mV C1:2817mV C2:2808mV C3:2775mV C4:2798mV
    Time:10800 Battery:11202mV C1:2817mV C2:2808mV C3:2775mV C4:2798mV
    Time:10801 Battery:11200mV C1:2817mV C2:2808mV C3:2775mV C4:2813mV
    Time:10802 Battery:11200mV C1:2817mV C2:2808mV C3:2775mV C4:2827mV
    Time:10803 Battery:11243mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10804 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10805 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV

    .....


    Time:10811 Battery:11199mV C1:2817mV C2:2808mV C3:2775mV C4:2799mV
    Time:10812 Battery:11210mV C1:2817mV C2:2808mV C3:2775mV C4:2799mV
    Time:10813 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2877mV
    Time:10814 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2890mV
    Time:10815 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2871mV
    Time:10816 Battery:11199mV C1:2817mV C2:2808mV C3:2775mV C4:2799mV
    Time:10817 Battery:11200mV C1:2817mV C2:2808mV C3:2775mV C4:2799mV
    Time:10818 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10819 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10820 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10821 Battery:11204mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10822 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10823 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2815mV
    Time:10824 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10825 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10826 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2804mV
    Time:10827 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2810mV
    Time:10828 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2874mV
    Time:10829 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10830 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10831 Battery:11202mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10832 Battery:11200mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV
    Time:10833 Battery:11202mV C1:2817mV C2:2808mV C3:2776mV C4:2799mV

  • Hi Davide,

    Is cell balancing being enabled when these variations occur?

    Regards,

    Matt

  • Hi Matt,

    the balancing is  always disabled. This a stamp of voltage cells, voltage battery and CELLBAL1, CELLBAL2 and CELLBAL3 registers. The last 6 numbers are respectively CELLBAL1, CELLBAL2 and CELLBAL3 with hexadecimal notation.

    Time:0188 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00
    Time:0189 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2942mV 00 00 00
    Time:0190 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00
    Time:0191 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2990mV 00 00 00
    Time:0192 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00
    Time:0193 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00
    Time:0194 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00

    Time:0215 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00
    Time:0216 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00
    Time:0217 Battery:11784mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00
    Time:0218 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00
    Time:0219 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00
    Time:0220 Battery:11769mV C1:2948mV C2:2946mV C3:2932mV C4:2941mV 00 00 00

    Regards,

    Davide

  • Hi Davide,

    I cannot see a reason for this behavior. When you log this, is it possible to log the raw hex values (before applying the gain and offset)? I want to see if we can rule out the non-atomic byte reading possibility.

    Regards,

    Matt

  • Hi Matt,

    at the edge of each Voltage value (in mV) a stamped the RAW value of registers (hexadecimal). The last 2 value are the ADCGAIN and ADCOFSET.

    T:0056 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2613-1A9F 9480 2C
    T:0057 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2613-1A9F 9480 2C
    T:0058 B:10471-1AAB 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2612-1A9E 9480 2C
    T:0059 B:10471-1AAB 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2611-1A9E 9480 2C
    T:0060 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2619-1A9F 9480 2C
    T:0061 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2830-1DA2 9480 2C
    T:0062 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2758-1A9F 9480 2C
    T:0063 B:10472-1AAC 1:2656-1B13 2:2639-1AE5 3:2563-1A1C 4:2613-1A9F 9480 2C
    T:0064 B:10493-1ABA 1:2656-1B13 2:2639-1AE5 3:2563-1A1C 4:2613-1A9F 9480 2C
    T:0065 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2613-1A9F 9480 2C
    T:0066 B:10472-1AAC 1:2656-1B13 2:2639-1AE5 3:2563-1A1C 4:2613-1AA0 9480 2C
    T:0067 B:10472-1AAC 1:2656-1B13 2:2639-1AE5 3:2563-1A1C 4:2613-1AA0 9480 2C

    T:0089 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2613-1A9F 9480 2C
    T:0090 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2613-1A9F 9480 2C
    T:0091 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2613-1A9F 9480 2C
    T:0092 B:10523-1ACE 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2612-1A9E 9480 2C
    T:0093 B:10523-1ACE 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2612-1A9E 9480 2C
    T:0094 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2612-1A9F 9480 2C
    T:0095 B:10472-1AAC 1:2656-1B13 2:2639-1AE5 3:2563-1A1C 4:2613-1A9F 9480 2C
    T:0096 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1B 4:2613-1A9F 9480 2C
    T:0097 B:10472-1AAC 1:2656-1B13 2:2639-1AE4 3:2563-1A1C 4:2613-1A9F 9480 2C

    T:0279 B:10208-19FD 1:2612-1A9E 2:2589-1A60 3:2454-18FC 4:2555-1A0A 9480 2C
    T:0280 B:10210-19FE 1:2612-1A9E 2:2589-1A60 3:2455-18FF 4:2552-19FB 9480 2C
    T:0281 B:10210-19FE 1:2612-1A9F 2:2589-1A61 3:2456-18FF 4:2552-19FB 9480 2C
    T:0282 B:10210-19FE 1:2613-1A9F 2:2589-1A61 3:2456-1900 4:2614-1AA2 9480 2C
    T:0283 B:10211-19FF 1:2613-1A9F 2:2589-1A62 3:2456-1902 4:2649-19FB 9480 2C
    T:0284 B:10211-19FF 1:2613-1A9F 2:2590-1A62 3:2457-1902 4:2551-19FB 9480 2C
    T:0285 B:10211-19FF 1:2613-1A9F 2:2590-1A62 3:2457-1902 4:2551-19FB 9480 2C
    T:0286 B:10211-19FF 1:2613-1A9F 2:2590-1A62 3:2457-1902 4:2551-19FB 9480 2C

    Best regards,

    Davide

  • Hi Davide,

    The gain does not look right to me. It should be a 5-bit value I think.

    Matt

  • Hi Matt,

    sure the GAIN is 5-bit value. I stamped the RAW of registers ADCGAIN and ADCOFSET, so the register 0x50-ADCGAIN1 is 0x94, the register 0x59-ADCGAIN2 is 80, the register 0x51-ADCOFSET is 2C. Do you think these registers are not correct? 

    Regards,

    Davide 

  • Hi Davide,

    That makes sense. I cannot see a reason for the jumps in the measurements, but it does look like the might be some small errors in the calculations. For example, in the last few lines you are reading 0x19FB. The last 3 lines show a voltage of 2551 mV which is correct based on your gain and offset. However, the fourth line from the bottom shows 2649mV for the same reading which is strange.

    One of your readings shows 0x1DA2 which calculates to 2904mV. But your table shows 2830mV which is a big difference. 2904mV is still a problem which does not make sense, but it is strange that the microcontroller is also calculating the voltage incorrectly at times.

    Can you verify that you are reading these values atomically (reading 2-bytes from the first register address instead of reading the high and low bytes separately) and can you verify the calculations for the voltage are correct?

    Regards,

    Matt

  • Hi Matt,

    I made a firmware with only read the atomic values of cells and Battery register only. The firmware doen't. It does nothing else, read the register and print to monitor. 

    This is a firmware for calculate the voltage from registers values.

    void voltageCellsCalc(void) {
    uint8_t i, j;
    uint32_t temp01, temp02;
    uint32_t temp03, temp04;

    temp02 = 0x17B;//gainCalc();

    for (i=0; i<=4; i++) {
    temp01 = bq7692003_register[(i*2)+0x0C].Byte;//BAT_HI_byte.Byte;
    temp01 <<= 8;
    temp01 += bq7692003_register[(i*2)+0x0D].Byte;//BAT_LO_byte.Byte;

    temp03 = (temp02 * temp01);
    temp03 /= 1000; // voltage in mV

    if (temp03 >= 128) {
    if (ADCOFFSET_byte.Byte >= 0x80)
    CellVoltageJustNow[i][indexCellVoltageJustNow] = temp03 - 256 + ADCOFFSET_byte.Byte;
    else
    CellVoltageJustNow[i][indexCellVoltageJustNow] = (uint32_t) temp03 + ADCOFFSET_byte.Byte;

    }
    else
    CellVoltageJustNow[i][indexCellVoltageJustNow] = temp03; 

    temp01 = 0;
    for (j=0; j<SizeArrayCellVoltageJustNow; j++) {
    temp01 += CellVoltageJustNow[i][j];
    }
    temp01 /= 4;
    if ((temp01 > 1500) && (temp01 < 4500)) {
    CellVoltage[i] = temp01;
    }
    }

    indexCellVoltageJustNow++;
    if (indexCellVoltageJustNow >= SizeArrayCellVoltageJustNow)
    indexCellVoltageJustNow = 0;

    // Voltage battery
    temp01 = BAT_HI_byte.Byte;
    temp01 <<= 8;
    temp01 += BAT_LO_byte.Byte;
    temp03 = 4*(temp02 * temp01);
    temp03 /= 1000; // voltage in mV

    if (temp03 > 512) {
    if (ADCOFFSET_byte.Byte >= 0x80) {
    temp04 = temp03 - ((256 - ADCOFFSET_byte.Byte)*4);
    }
    else {
    temp04 = (uint32_t) temp03 + (ADCOFFSET_byte.Byte * 4);
    }
    }
    else
    {
    temp04 = temp03;
    }

    BatteryVoltage = temp04;

    }

    Best  regards,

    Davide 

  • Hi Davide,

    I'm not really understanding the code. Can you capture one of the cell voltage readings on a logic analyzer or scope? It would be good to confirm the atomic reading (block reading 2 bytes in a single I2C transaction).

    Matt