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.

BQ27441EVM-G1A: how do bqStudio displays data

Part Number: BQ27441EVM-G1A
Other Parts Discussed in Thread: BQSTUDIO

Hello,

I'm using bqStudio to evaluate a BQ27441-G1A chip.

I'm comparing the data read with bqStudio with those read with my processor (STM32). I have exactly the same setup for both readings (same load, same charger).

For now, I just do a very simple test : read the SoC, with the defaut parameters (no configuration, just a simple loop with the 0x1C command code)

With bqStudio, the SoC seems perfect, it increase when charging, decrease when discharging, no jump in value, even when switching on and off the system.

With my processor, I have a lot of undefined behaviors : SoC switching to 0 and back to normal value, 10 or more % jumps, etc.

I decoded the I2C frames for both systems with serial analyzer, I can say that the way I read SoC is good.

I didn't check what are all the frames that bqStudio is sending to the fuel gauge, but it seems to be only standard commands.

I would like to know what is bqStudio doing better than me... is there software filtering ? Or is it displaying raw datas ?

Thank in advance for your help !

Regards,

Antoine

  • Hello Antoine,

    Do you usually get the right value for SOC with occasional errors? Or is it always a bad reading? Also, have you tried reading other values to see if they are giving strange results? The gauge actually does filter SOC somewhat, but I still don't think there should be 0's and huge jumps even without that. Also, can you try artificially slowing down your reads or even alternating between different values to read? I know you said that the I2C is good, but the symptoms you described do sound like something that would happen if there were clocking errors. Besides just checking the frames, have you checked the I2C specifications in the datasheet and ensured those are okay as well?

    Sorry to ask so many questions, but it can be really difficult to debug these sorts of communication issues. Let me know if anything here seems to help or if you have more questions.

    thanks,

    Alex M.

  • Hello Alexander, thank you for your answer !

    -> When the battery is charging, SOC value seems to be fine, no jump.

    -> When discharging, I read either 0 either a random value. If I plug the charger again, this strange behavior stops and I read a stable and coherent value...

    -> I tried to read other values and slow down my reading, all values seems fine except SOC. I tried to follow approximately bqstudio i2c transactions pattern, you can find below my code inside the infinite loop, that should be understandable :

      ReadFuelGaugeFlags(&fuel_gauge);
      osDelay(120);
      ReadFuelGaugeControlStatus(&fuel_gauge);
      osDelay(120);
      ReadFuelGaugePrevMACwrite(&fuel_gauge);
      osDelay(120);  
      ReadTemperature(&fuel_gauge);
      osDelay(25);
      ReadBatteryVoltage(&fuel_gauge);
      osDelay(25);
      ReadBatteryCurrent(&fuel_gauge);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_NOM_CAPACITY, (uint16_t*)&result);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_FULL_CAPACITY, (uint16_t*)&result);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_REM_CAPACITY, (uint16_t*)&result);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_STDBY_CURRENT, (uint16_t*)&result);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_MAX_CURRENT, (uint16_t*)&result);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_AVG_POWER, (uint16_t*)&result);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_SOH, (uint16_t*)&result);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_REM_CAP_UNFL, (uint16_t*)&result);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_REM_CAP_FIL, (uint16_t*)&result);
      osDelay(25);
      ReadFuelGaugeCommand(&fuel_gauge, BQ27441_COMMAND_FULL_CAP_UNFL, (uint16_t*)&result);
      osDelay(25);
      ReadBatteryCharge(&fuel_gauge);
      osDelay(500);

    I first configured all the main parameters (capacity, energy, taper rate, etc.).

    I also thought it could be a clocking issue but it is so strange that all value (voltage, temperature, etc.) are good and only SOC isn't.

    I know it might be hard for you to help with as little information but if you have any idea i'm ready to hear it...

    Thank you

    Antoine

  • I tried to cut the i2c tracks that are connected between the BQ27441 soldered on my PCB and my processor, and I soldered wires to the BQ27441 evaluation module, now I can read good values. So it is not a software issue but a hardware one. I will try to investigate what's wrong. Maybe I can share with you the schematic to see if you could have any idea ?

    Thanks

    Antoine

  • Hello Antoine,

    The fact that you only see issues on discharge is interesting. How does the pullup voltage on the I2C pins look when the charger is disconnected? Are you using the external VDD? And if you measure VDD does it look okay? Lastly, I see that all the other parameters are working, is that during charge and discharge as well?

    thanks,

    Alex M