BQ76952: Problem in establishing i2C communication

Part Number: BQ76952

Hi,

i am using bq76952 with Arduino Nano ( for prototype). I created a function to check whether communication is established or not. I could clearly see that the device is unable to establish communication. Kindly please let me know when such a problem arises

Note:

1. I have used pull-up resistors of 4.7K to 5V

2. Ground of Microcontroller is connected to another end of sense resistor as shown in datasheet

3. I am using 400kHz I2C, distance between micro controller and device is 45cm wire for SCL and SDA

The problem is couldn't figure out, whether the problem is with software or hardware.

Please find the attachment of my schematic and function routine 4743.Schematic.pdf

  • Hi Mounish,

    I do not know if your issue is caused by hardware or software. Looking at your schematic, I see that the I2C pull-up resistors are connected to REG2. REG2 is disabled by default, so it needs to be enabled and set to 5V (using I2C). Do you have a voltage applied to this node until REG2 is enabled?

    If you are looking for Arduino example code, I have noticed that one user has published a BQ76952 Arduino project on Github (https://github.com/pranjal-joshi/BQ76952Lib). It might be a helpful reference. 

    Best regards,

    Matt

  • Hi, when i try to read data from registers, It is always returning me 0xFF.

    Let us compare this with an example in the software development guide. ( Read "Enable protections A") , 

    here let us say addr= 0x9261


    readDataMemory(unsigned int addr) {              // function for reading data from registers


    Wire.beginTransmission(BQ_I2C_ADDR_WRITE);       //  This creates [0x10] in fig 3.2 software developement guide
    Wire.write(CMD_DIR_SUBCMD_LOW);                       //    This creates [0x3E] in fig 3.2 software developement guide 
    Wire.write(LOW_BYTE(addr));                                      //     [0x61]
    Wire.write(HIGH_BYTE(addr));                                    //      [0x92]
    Wire.endTransmission();                                              //      End transmission

    Wire.beginTransmission(BQ_I2C_ADDR_WRITE);     //     This creates [0x10] in fig 3.2 software developement guide
    Wire.write(CMD_DIR_RESP_START);                        //      [0x40]
    Wire.endTransmission();                                              // Ends transmission

    Wire.requestFrom(BQ_I2C_ADDR_READ, 1);            // Creates [0x11]
    while(!Wire.available());                                                // wait till data is available
    unsigned int b=Wire.read();                                          // store data in variable "b'      
    Serial.println(b);                                                           // Print value in b

    }

    I always get 0xFF as output no matter what is written in the address..So I really doubt. Is this waveform correct? I read somewhere in the datasheet that the lower byte of the register address should be written to 0x3E and the upper byte of register address should be written to 0x3F .. Please help

  • Hi Mounish,

    I did not see an answer to my question, "Looking at your schematic, I see that the I2C pull-up resistors are connected to REG2. REG2 is disabled by default, so it needs to be enabled and set to 5V (using I2C). Do you have a voltage applied to this node until REG2 is enabled?"

    Best regards,

    Matt

  • Hi Matt Sunna,

    Yes, I have connected pull up resistors externally. Communication has been established, I was able to read all cell voltages using direct commands 0x14 to 0x32, . I even turned on FETs using FET_ENABLE-0x0022. but now I need to turn on REG1 and REG2, but before that, I would like to read default values in the registers..

  • Hi Mounish,

    Are you waiting long enough between sending the command to 0x3E and reading back from 0x40? Try inserting a 2ms wait time just before reading from 0x40. When you see 0xFF returned, this might mean the data is not available yet. Table 9-2 of the TRM shows the typical time it takes for the different subcommands to execute.

    Best regards,

    Matt

  • Hi Matt Sunna,

    Thank you so much, It did work