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.

BQ34Z100-G1: .

Part Number: BQ34Z100-G1
Other Parts Discussed in Thread: BQSTUDIO, , EV2400, BQ34Z100

what are the initial process to work with BQ34z100-g1 without EVM and Bqstudio, instead using Arduino-Uno

  • Hi Shyam,

    We recommend that you use the evm for your initial design along with bqstudio. Otherwise, your comms are not going to be convenient. Please refer to the documents in the page linked here for help, http://www.ti.com/product/BQ34Z100-G1/technicaldocuments. You can also find videos on youtube and google if you search for impedance track.

  • Thanks Batt,

    The main task given to me is to Configure, Calibrate and Gauge the battery/cell parameters for NiMH single cell and multicell. All I have is an Arduino as a host without any bqstudio and EVM.

    I found out the similar CHEM-ID from bqstudio, where do i enter the CHEMID(Which register is used to type in the CHEMID).

  • Hi Shyam,

    Doing this is going to be very difficult as bqstudio is the program that is fully capable of interfacing with the gauge. To program the chem ID, it's not a simple matter of changing one register. You will need to program all the parameters which are in a db in bqstudio. I strongly suggest that you either get an ev2300 or an ev2400 and use that to interface with the gauge. All your requirements will be easily met once you have that. We also have schematics available in case you want to make your own board. Please refer to the DS.

  • Hi Batt,

    We have made a PCB, where Fuel gauge (Only IC) is been used, for a 4 series cell. All pins are connected except the I2C( SDA,SCL)pins. We are using MSP430 launchpad as a host to communicate with Fuel gauge IC. Before I could interface BQ34Z100 IC with MSP430 Launchpad, I am using an Arduino I2C to communicate with BQ34Z100-G1. As in the Application note SLUA790 its given how to communicate using I2C. 

    My question is without EVM and EV2300/EV2400, instead using only the BQ34Z100-G1 and any other MCU(Arduino/MSP430 launchpad) can we use BQstudio to program the board?

    If not how do I use MCU(Arduino/MSP430 launchpad) I2C to communicate and program BQ34Z100-G1 IC?

    Thank you.

  • Hi Shyam,

    Please refer to this, .

  • Thanks Batt,

    It was really helpful, I am able to read battery voltage.

    I have entered Calibration Commands before I could read other parameters, but 

    I get 

    SOC=0;

    RC=0;

    FCC=junk value returned;

    What changes can be made, I am using a single NiMH battery of 1.2V/2400mAh for now and I would like to extend to 4s cell.

  • Hi Shyam,

    Please refer to the TRM to get the settings. You need to change the voltage divider also to >5V. The technical documents page has all the documents you need for help.

  • Hi Batt, 

    I realized the reason that only Voltage is been displayed because the Dataflash write for the VoltageDivider is not changing for multicell, initially which was set for single cell. 

    But even for single cell, I am able to read any other parameters only Voltage is been read correctly. I changed the IC and noticed write flash Occurred once but again later when it was connected to multicell DataFlash write was not changing.

    What possibly could this issue be, is it either the circuit/voltage divider part or is the IC memory is not working?

    PS: The input given to BAT pin was 5.2V, multicell/No external voltage divider, voltage was read and battery capacity, only FCC/RC was returning some random number.

  • Hi Shyam,

    Please check if you are at least able to read the device number and the fw version from the command panel. If you are not getting that, then you may need to reflash the IC. You can also try to see if you get a pulse on the TS pin if you are using the evm. That's an indication that the gauge is on.

    If your comms are stable, then I suggest reflashing defaults and starting afresh. Other than that, this gauge should work. To learn capacity, you will need to find your chem ID and perform the learning cycle as I mentioned before.

  • Hi Batt,

    I have a problem with the control subcommands, initially I checked if i can read control-status flags, later device type using Arduino.

    #include <Wire.h>
    #define BQ34Z100 0x55

    unsigned int cs_lsb, cs_msb;
    uint8_t wireByte;
    unsigned int Cs, dtype;
    int dt[1];

    void setup()
    {
     Serial.begin(9600);

    Wire.begin();
    }

    void devicetype()
    {
     // Write Control command bytes to gas gauge chip: 0x00/0x01
     wireByte = 0x00;
     
     Wire.beginTransmission(BQ34Z100);
     Wire.write(0x00);
     Wire.write(0x01);
     Wire.endTransmission();
     
     Wire.beginTransmission(BQ34Z100);
     Wire.write(0x01);
     Wire.write(0x00);
     Wire.endTransmission();
     
     Wire.requestFrom(BQ34Z100,2);
     for( byte i=0; i<=1; i++)
     {
       dt[i] = Wire.read();  
     }

    unsigned int temp= dt[1]<<8;
     dtype = temp+dt[0];
     
    }

    void CS()

     wireByte = 0x00;
     Wire.beginTransmission(BQ34Z100);
     Wire.write(0x00);
     Wire.write(0x00);
     Wire.write(0x00);
     Wire.requestFrom(BQ34Z100,2);

    Serial.print("\n Control Status :: ");  
     while(Wire.available())
     {
        wireByte =  Wire.read();
        Serial.print(wireByte,HEX);
        Serial.print("\t");
     }

    Serial.print("\n");  
     Wire.endTransmission();
    }

    void loop()
    {

    CS();
    Serial.print("\n control status");

    devicetype();
    Serial.print("device type: ");
    Serial.println(dtype);
    Serial.print("device type HEX: ");
    Serial.println(dtype,HEX);

    Serial.print("\r\n");
     
    delay(5000);
    }

    This is the code which i used to read control subcommands, but ControlStatus flag always returns with 64 hex value and the is the same case with device type.

    My question is 

    1. Is my code correct in entering the subcommand using control command, if not what steps should i take to read the control status flags?

    2. As u mentioned to Reflash the gauge, how is that done using RESET command?

    3. How to make sure my control subcommands are executing?, any steps to be followed?

  • I have few more questions regarding the dataflash write.

    I can change packconfiguration data flash but i dont know why i am unable to change the VOLTAGE DIVIDER, DESIGN CAPACITY, DESIGN ENERGY, DEVICE CHEMISTRY. 

    Is it possible that Dataflash might have damaged?

    And in order to perform succesful learning cycle of the gauge I need to know Control status Flags, how do I read ControlStatus Flags using subcommands.

    When I RESET the device it gets into SEALED state, as I got to know When I READ the Dataflash using subclass. Why is it behaving like this solution please?

  • Hi Shyam

    If you have programmed the wrong divider in, the fw will read the wrong voltage. If the voltage read by fw is lower than flash update voltage you can't update df. Your only solution is to put the gauge in ROM mode by sending 0x000F to 0x00 and then flashing the gauge. When you seal a gauge once, if you reset it after unsealing, it will be sealed again.

  • Hi Batt,

    Sorry for the delayed reply. I have used 3 IC's all 3 IC's i was able to write into DataFlash and Configure VOLTAGE DIVIDER, DESIGN CAPACITY, DESIGN ENERGY and PACK CONFIGURATION REGISTERS. But after frequently changing all the above parameters, I wanted to check if the voltage read, changes or not, so was disconnecting and  connecting the battery without powering off the gauge. while i was able to read the voltage while battery was connected to gauge and also read null value when the battery was disconnected.

    NOW, will the battery connection/disconnection without powering off  the gauge cause the damage of IC internally? DataFlash can't be overwritten with all 3 IC's, after frequent changes of the above parameters.

    P.S. : applied battery voltage was less than MAX RATING.

  • Hi Shyam,

    No, that shouldn't damage the gauge. Please check if the gauge is sealed as you can write it if sealed.

  • Hi Batt,

     Yes, I checked in both Sealed and Unsealed state.

    In sealed mode the default dataflash is not accessed(read)

    In Unsealed mode the Default Dataflash is accessible but can't overwrite VOLTAGE DIVIDER, DESIGN CAPACITY, DESIGN ENERGY and PACK CONFIGURATION REGISTERS. But able to change LED_configuration.

    Is it possible that when Battery  removed when the IC was powered ON might have caused Voltagesurge and damaged the IC?

  • Hi Shyam,

    It's unlikely that could happen. An ESD hit can cause damage but otherwise removing the battery shouldn't affect the gauge.

  • Hi Batt, 

    ESD Protection was taken care while using the IC, But is there any possibility to Overwrite the above mentioned dataflash?

    And aslo how am I able to Change only few Subclass dataflash! and not many, which are the ones necessary for changing between different battery capacities.

    Will the IC read voltage without sense resistor?, removing the sense resistor while reading the voltage can cause any damage to IC?

    Thanks.

  • Hi Shyam,

    Here is long thread that is a good read for arduino enthusiasts when working with the bq34z100-g1:

    https://e2e.ti.com/support/power-management/f/196/t/372162

    Please don't remove the sense resistor.  It isn't specifically tied to the voltage reading of the pack, but the IT algorithm depends on current sense readings to function properly.

    Also, please use your favorite search engine and search for some popular code/repository sharing websites.  There are a few open source solutions available that may help jumpstart your development.

    Sincerely,

    Bryan Kahler