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.

Battery Gauge bq27510-G3

Hi

    I want read External temperature from fual gauge ,i configured that WRTEMP Opconfig register also but i got negative temperature value like -35..my doubt on That Register config,please tell me what are all the initial configuration needed and where am going to read(which register) full charged,charger plugged,unplugged,battery low ..

  • Hi
    Pls refer to the technical reference manual for the device. It is very detailed and contains all the information you seek. Make sure your thermistor is connected properly.

    thanks
    Onyx
  • Hi,

       i referred that manual and wrote following code for changing WRTEMP  ,but not working properly 

    //unseal

    unsigned char t[]={0x00,0x14,0x04};

    i2c_write(slaveaddr_bat,3,t);
    t[1]=0x72;
    t[2]=0x36;
    i2c_write(slaveaddr_bat,3,t);


    ///BlockDataControl
    unsigned char t[]={0x61,0x00};
    i2c_write(slaveaddr_bat,2,t);


    //DataFlashClass

    unsigned char t[]={0x3E,0x40};

    i2c_write(slaveaddr_bat,2,t);
    t[0]=0x3F;
    t[1]=0x00;
    i2c_write(slaveaddr_bat,2,t);

    //read old value
    off[0]=0x40+11;
    i2c_read(slaveaddr_bat,1,Old_value,off);
    off[0]=0x60;

    //read old checksum
    i2c_read(slaveaddr_bat,1,Old_checksum,off);

    //write new value 0xCE
    off[0]=0x40+11;
    off[1]=0xCE;
    i2c_write(slaveaddr_bat,2,off);

    temp = (255-(Old_checksum[0]-Old_value[0]))&0x00FF;
    New_checksum = 255-(temp+value)&0x00FF;

    //write new checksum
    unsigned char t[2]={0x60,New_checksum};
    i2c_write(slaveaddr_bat,2,t);

    Reset_Gauge();
    Bat_Seal();

  • whether delay needed after DataFlashClass and checksum,and where am going to read battery full battery low information
  • Hi Yamaliakab,
    Try introducing a 250 ms delay to see if that helps.

    the FC bit in the flag register could be used for battery full indication. The SOC1 bit in the flag register can be configured to a battery low threshold where it gets set

    thanks
    Onyx