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: Unable to get proper response from BQ34Z100-G1 through MCU - I2C Comm

Part Number: BQ34Z100-G1
Other Parts Discussed in Thread: BQSTUDIO, BQ34Z100, BQPRODUCTION
We are working with a fuel gauge (bq34z100-g1). We already completed some of the following steps to calibrate and use to get appropriate results.
1. Follow all the steps that are mentioned in the datasheet to configure & calibration of fuel gauge through bq studio.
2. After this we are able to get voltage value, current value and state of charge.
Repeating the same steps with MCU-I2C but we didn't get the same response from the fuel gauge. 
We update the same configuration (design capacity, design energy, no of series cell and pack configuration) and apply calibration to bq34z100-g1 through I2C command. but while reading(voltage) the response from bq34z100-g1 always returns zero(0).
For Reference :
  
  • Hello Diwakar,

    I would check what bqStudio value reads and use that as a reference to debug. You can compare waveforms on the bus to see if the response is the same

  • i have found the reason where is the actual problem arises. 

    when i was configuring the parameter it set all ok. but while calibration, reading the old voltage divider value from the data flash memory that i was read is seems very high (28800) i guess for voltage calibration  and if i used this value to calibrate voltage by the given formula : 

    where : 

    old_volt_dvdr = 28800 (readed value)

    read_volt = 60412(readed value)

    applied_volt = 57600

    formula : 

    new_volt_dvdr = old_volt_dvdr * (applied_volt/read_volt)

    and use the new_volt_dvdr in flash_ok_cell_volt formula

    cell_count = 16

    old_flash_ok_volt = 2800

    flash_ok_cell_volt = old_flash_ok_volt * cell_count * (5000/new_volt_dvdr)

    the value of flash_ok_cell_volt reaches to 6700 to 7000 mV. which seems out of range for flash_ok_cell_volt. after this i unable to update new_volt_dvdr value in data flash memory.

    Can you help me out in this issue.

    Thank You

  • Try writing the new value of Flash_update_ok_voltage after calibration

  • unable to write any value in voltage divider register, flash_update_ok_voltage, cc_gain, delta_gain.

    Tried process : 

    1. Unseal bq34z100 with(0x36720414) value.
    2. read flash block (104) with (0) offset.
    3. change update voltage divider value.
    4. write change value in flash block(104).
    5. update checksum
    6. reset command
    7. unseal bq34z100 again.
    8. read flash block again 
    9. get the older values or default values not new one.

    Can you suggest the process or review my process is it incorrect or need to change any thing else.

    thank you.

  • Hello Diwakar,

    The gauge should not be sealed. I would reprogram the srec file and start afresh. Then remove all unseal steps from your procedure and try.

  • i didn't get which srec file you are talking about ?  

    can we do the debug session for this calibration process? 

    or can you suggest me the complete calibration(current and voltage) process document or any link.

  • Hello Diwakar,

    The srec file is available in the bq34z100-G1 Device Firmware download which is on the product page.

    Calibration steps are detailed in the TRM

  • Can you please mention the link of that srec file.

    I am trying to program with MCU-I2C command and calibration process is not mentioned. it is mentioned according to bq studio & EVM only. 

  • Hello Diwakar,

    Srec package www.ti.com/.../sluc580

    The production information is here www.ti.com/.../slua665.pdf

  • Hi Shirish,

    I have followed the same fashion for the calibration that mentioned in document link www.ti.com/.../slua665.pdf. the only difference is i tried to calibrate till fuel gauge return the +/- 50 mV voltage of applied voltage(57600mV). i have attached the code snapshot. still not update 

    and i used same method for current calibration.

    PACK_CURRENT = -5000mA

    cc_gain = ((uint32_t)flash_block_data[0])<<24 | ((uint32_t)flash_block_data[1])<<16 | ((uint32_t)flash_block_data[2])<<8 | (uint32_t)flash_block_data[3];
    gain_resistence = 4.768 / xemicsToFloat(cc_gain);

    cc_gain_delta = ((uint32_t)flash_block_data[4]) << 24 | ((uint32_t)flash_block_data[5]) << 16 | ((uint32_t)flash_block_data[6]) << 8 | (uint32_t)flash_block_data[7];
    delta_resistance = (5677445.6/xemicsToFloat(cc_gain));

    read_curr = bq_fg_current();

    new_gain = (((float)read_curr)/((float)PACK_CURRENT)) * gain_resistence;

  • Hi Shirish,

    Can we do the debug session.

    because i am unable to program .srec in my custom board and i am stuck from past 2 weeks to config and calibrate fuel gauge. My project already got delay.

    Please suggest me the suitable time for debug session.

    Thank You.

  • Hello Diwakar,

    It is very time consuming to debug someone else's code, especially when we do not know details of the system it is running on.

    If you need to program the srec, then i recommend that you use bqStudio. This is not required in production because the srec is pre-programmed on the bq34z100-G1.

    For production I recommend that you use bqProduction if you have issues with your own code. To debug your code, the best way is to try the same sequence from bqStudio. If bqStudio works and your code does not, then the problem would be in your code. If bqStudio also does not work, then the problem is some setting or hardware/input related.