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.

BQ25155: VBAT ADC readout value is not correct while Active Battey Mode

Part Number: BQ25155

Dear Team,

I can read correct VBAT voltage w/ VIN plugged; but will get wrong VBAT voltage w/ battery only.

I also want to set ADC_COMP1 to monitor VBAT less than 3.4V; if meet the criteria, will notify user low battery status.

I can get the ADC_COMP1 interrupt, but the ADC readout VBAT voltage is not correct.

Example:

VIN plugged - VBAT ADC readout 3.9V

VIN unplugged -  then I will get ADC_COMP1 interrupt(flag2 = 0xC0), VBAT ADC readout 2.7V, actually VBAT voltage is around 3.9V

[Init Register]

BQ25155_RegWrite(BQ25155_MASK2, 0x31);//ADC_READY, COMP1

BQ25155_RegWrite(BQ25155_ADCCTRL0, 0x00);//disable ADC first
BQ25155_RegWrite(BQ25155_ADCCTRL1, 0x00);
BQ25155_RegWrite(BQ25155_ADCALARM_COMP1_M, 0x91);//set ADC COMP1 to VBAT low threshold MSB
BQ25155_RegWrite(BQ25155_ADCALARM_COMP1_L, 0x10);//set ADC COMP1 to VBAT low threshold, below 3.4V
BQ25155_RegWrite(BQ25155_ADCALARM_COMP2_M, 0x00);
BQ25155_RegWrite(BQ25155_ADCALARM_COMP2_L, 0x00);
BQ25155_RegWrite(BQ25155_ADCALARM_COMP3_M, 0x00);
BQ25155_RegWrite(BQ25155_ADCALARM_COMP3_L, 0x00);
BQ25155_RegWrite(BQ25155_ADC_READ_EN, 0x08);//enable VBAT ADC read

BQ25155_RegWrite(BQ25155_ADCCTRL0, 0xC3);//enable ADC measurement period 1min

[Log Output]

bq25155_get_battery_voltage_now - 0x7758, VBAT: 2797096
Low VBAT: 2797096uV, LOW_BATT_VOLT:3400000uV
flag2 - 0x80
bq25155_get_battery_voltage_now - 0x76F1, VBAT: 2787666
Low VBAT: 2787666uV, LOW_BATT_VOLT:3400000uV
flag2 - 0x80
bq25155_get_battery_voltage_now - 0x7674, VBAT: 2776222
Low VBAT: 2776222uV, LOW_BATT_VOLT:3400000uV

BR

Peter

  • PS. BTW, the LP is always High while test w/ battery only

  • Hello Peter,

    It appears that everything in your register configuration process is correct. The ADC read voltage for VBAT should not be affected by the presence of VIN. Can you share your schematic for this device?

    Additionally, do you have a waveform of VBAT? This is just to discard any possible oscillations or glitches that might affect the ADC reading.

    Best Regards,

    Juan Ospina

  • Dear Juan,

    I use BQ25155EVM for test and also use oscilloscope to monitor VBAT while testing, no 1V glitches on VBAT observed

    BR

    Peter

  • HI Peter,

    I'll attempt to recreate the behavior you are seeing on my end. Please let me know if any modifications have been made to the EVM.

    Best Regards,

    Juan Ospina

  • Dear Juan,

    there is no HW modification of EVM, the following is my init flow~

    void bq25155_init(){
    printf("%s\r\n", __func__);

    //1) wake bq25155 - #LP pin(PB0) set low
    HAL_GPIO_WritePin(CHG_LP_GPIO_Port, CHG_LP_Pin, GPIO_PIN_RESET);

    //2) init registers
    BQ25155_RegWrite(BQ25155_MASK0, 0x5C);//PG, THERM_MITIGATION, CHG_DONE
    BQ25155_RegWrite(BQ25155_MASK1, 0xB0);//TS
    BQ25155_RegWrite(BQ25155_MASK2, 0x31);//ADC_READY, COMP1
    BQ25155_RegWrite(BQ25155_MASK3, 0x70);//MR_WAKE
    BQ25155_RegWrite(BQ25155_VBAT_CTRL, 0x3C);
    BQ25155_RegWrite(BQ25155_ICHG_CTRL, 0x11);//0x11
    BQ25155_RegWrite(BQ25155_PCHRGCTRL, 0x01);
    BQ25155_RegWrite(BQ25155_TERMCTRL, 0x0A);
    BQ25155_RegWrite(BQ25155_BUVLO, 0x00);
    BQ25155_RegWrite(BQ25155_CHARGERCTRL0, 0x90);//disable WD
    BQ25155_RegWrite(BQ25155_CHARGERCTRL1, 0x00);
    BQ25155_RegWrite(BQ25155_ILIMCTRL, 0x06);
    BQ25155_RegWrite(BQ25155_LDOCTRL, 0xEC);//enable 3.3V LDO
    BQ25155_RegWrite(BQ25155_MRCTRL, 0x68);//wake1-0.5s, wake2-2s, reset-4s, warn-1s
    BQ25155_RegWrite(BQ25155_ICCTRL0, 0x10);//disable ship mode
    BQ25155_RegWrite(BQ25155_ICCTRL1, 0xC0);
    BQ25155_RegWrite(BQ25155_ICCTRL2, 0x20);
    BQ25155_RegWrite(BQ25155_ADCCTRL0, 0x00);//disable ADC first
    BQ25155_RegWrite(BQ25155_ADCCTRL1, 0x00);
    BQ25155_RegWrite(BQ25155_ADCALARM_COMP1_M, 0x91);//set ADC COMP1 to VBAT low threshold MSB
    BQ25155_RegWrite(BQ25155_ADCALARM_COMP1_L, 0x10);//set ADC COMP1 to VBAT low threshold, below 3.4V
    BQ25155_RegWrite(BQ25155_ADCALARM_COMP2_M, 0x00);
    BQ25155_RegWrite(BQ25155_ADCALARM_COMP2_L, 0x00);
    BQ25155_RegWrite(BQ25155_ADCALARM_COMP3_M, 0x00);
    BQ25155_RegWrite(BQ25155_ADCALARM_COMP3_L, 0x00);
    BQ25155_RegWrite(BQ25155_ADC_READ_EN, 0x08);//enable VBAT ADC read
    BQ25155_RegWrite(BQ25155_TS_FASTCHGCTRL, 0x34);
    BQ25155_RegWrite(BQ25155_TS_COLD, 0x6F);
    BQ25155_RegWrite(BQ25155_TS_COOL, 0x61);
    BQ25155_RegWrite(BQ25155_TS_WARM, 0x39);
    BQ25155_RegWrite(BQ25155_TS_HOT, 0x38);


    //4) boot completed - LED slow blink x 1
    //led_control(LED_SLOW_BLINK, 1);
    BQ25155_RegWrite(BQ25155_ADCCTRL0, 0xC3);//enable ADC measurement period 1min

    //5) toggle CHG IRQ
    CHG_INT+=1;
    HAL_GPIO_WritePin(CHG_LP_GPIO_Port, CHG_LP_Pin, GPIO_PIN_SET);
    }

    BR

    Peter

  • Thank you for this additional context peter. I will attempt to recreate your scenario and find any potential causes for the behavior you are seeing.

    Best Regards,

    Juan Ospina

  • Hi Peter,

    I've been working to recreate your scenario but I'm not able to see any issues in accuracy with the register set up provided. On an EVM the battery ADC voltage reading will drop slightly when VIN is removed, but this is likely due to charge stopping. Can you provide the schematic to confirm there isn't any components that may have an effect? Additionally, is this test being performed with a battery or a battery simulator?

    Best Regards,

    Juan Ospina

  • Dear Juan,

    I change to use our HW board, not EVM; the issue is not observed, kindly thanks ur help~

    BR

    Peter