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.

BQ76942: Cell Balancing not activating.

Part Number: BQ76942


Hello!

I have a custom board with BQ76942 as the AFE. The configuration is 6S. I am not able to get the AFE to balance the cell even  if there is a 120mV+ imbalance. (using real cells)

Here are my settings in the firmware with comments on what I'm trying to set:

    BQ769x2_SetRegister(BalancingConfiguration, 0x1F, 1); 
    BQ769x2_SetRegister(CellBalanceInterval, 0x14, 1); //Set cell balancing interval to 30s.
	BQ769x2_SetRegister(CellBalanceMaxCells, 0x03, 1); //Set max cell balancing to 3 cells.
	BQ769x2_SetRegister(CellBalanceMinCellVCharge, 0x0C80, 2); //Balancing will happen only when cell vol above 3200mV in Charge mode.
	BQ769x2_SetRegister(CellBalanceMinCellVRelax, 0x0C80, 2); //Balancing will happen only when cell vol above 3200mV in Relax mode.

Here is my PowerConfig settings:

BQ769x2_SetRegister(PowerConfig, 0x0D80, 2);

I am also trying to print CB_ACTIVE_CELLS 0x0083 using code below: This output is always 0.

uint16_t BQ769x2_ReadBalancingActive()
// Reads no of cells undergoing balancing.
{
	DirectCommands(CB_ACTIVE_CELLS, 0x00, R);
	return (RX_data[1]*256 + RX_data[0]);

Here are some other points:

- My temperatures are all withing limits

- My CHG and DSG Threshold settings are default.

Please let me know what all should be done apart from this to enable cell balancing in RELAX mode and kindly check if I am setting everything right.

Thanks in advance,

Abhijith

  • Dear Abhijith,

    I have a few quick questions:

    1. Have you read from any of the registers you have written to in order to confirm that the changes went through?

    2. Have you tried cell balancing while the device is charging?

    3. What did you configure for the Cell Balance Min Delta and Cell Balance Stop Delta registers?

    4. Is the device operating normally besides cell balancing?

    It is worth noting that VC16 and VC15 must be populated with a cell between them in order for device to balance properly. I'm not sure if you have or haven't done this, but it is worth noting. Which VCx pins do you have populated for you 6S configuration?

    Best,

    Asher Nederveld

  • Hi Asher, thanks for the continuous help.

    1, No, I haven't done that. I will try this and add the result as an edit.

    2, Kind of. The imbalance at the end of the charge is very minor. But the cells had only very little imbalance to begin with. We have not explicitly tried causing a heavy imbalance and check if its balancing. We have also not tried monitoring the CB_ACTIVE_CELLS to check if the status changed.

    3, They are at default. I have not configured them. So Min Delta = 40mV and Stop Delta = 20mV.

    4, Yes, all functions we have tested until now works normally.

    My device is BQ76942 and not 52, so it is VC10 and VC9. We have a cell in between - VC0 and VC1, VC1 and VC2, VC2 and VC3, VC4 and VC5, VC5 and VC6, VC9 and VC10.

    Also does the device need to be in sleep mode to start autonomous cell balancing?

  • Dear Abhijith,

    Sounds good, let me know if the changes go through and are readable. The device does not need to be in sleep mode to start balancing. There are three options for that based on the Balancing Configuration register:

    1. CB_SLEEP: The device will begin cell balancing in  SLEEP mode

    2. CB_RELAX: The device can cell balance while the current drawn is low enough such that the device has entered RELAX mode.

    3. CB_CHG: The device can cell balance while the cells are charging.

    None of these are mutually exclusive and they can all be set to be true. Also, I just wanted to check, but are you using the BQ769x2_SetRegisters() function provided by TI or did you write your own?

    Best,

    Asher Nederveld

  • Hi, yes, by setting the BalancingConfiguration as 0x1F, I am setting all 3 you mentioned.

    Yes I'm using the same BQ769x2_SetRegisters() function provided by TI in the example for STM_I2C.

    Can you please guide me on how to read the registers back? I'm having trouble with this.

    Also, I am considering host controlled balancing, so for this, in the while (1) loop, Subcommands(CB_SET_LVL, 0x0C80, W2); //Start host balancing cells above 3200mV to StopDelta doing only this will enable start balancing? (Also changed BalancingConfiguration to 0x0F to accept host controlled balancing.)

    If yes, what should we set CB_ACTIVE_CELLS to? Can we get ignore this? I am confused by CB_ACTIVE_CELLS and CB_SET_LVL. Please let me know the difference. Please also let me know what I should set if I want to perform host controller balancing.

    Few other questions regarding Host Controlled Balancing:
    1, If I choose to perform host controlled balancing, then what all parameters I am I to set? Will the AFE still respect the StopDelta, MinDelta, CellBalanceInterval and such other parameters? Basically the host should just decide what cell to balance based on cell voltages?
    2, How would this command change if I identify what cell I should balance, (lets say cell 2): Subcommands(CB_ACTIVE_CELLS, 0x????, W2);

    This is what I have tried now (Result: Not balancing):

        if (cellImbalance > 30)
        {
            if ((HAL_GetTick() - lastBalancingTime) > 29000)
            {
            Subcommands(CB_SET_LVL, 0x0C80, W2);
            lastBalancingTime = HAL_GetTick();
            }
    
        }


    Sorry I'm asking too many questions, I lack a team currently. Thanks for the help.
    Abhijith

  • Dear Abhijith,

    Similar to the SetRegisters() function, TI also provides an example ReadReg() funciton that should return the value contained in a register. I've attached it below.

    int I2C_ReadReg(uint8_t reg_addr, uint8_t *reg_data, uint8_t count)
    {
    	unsigned int RX_CRC_Fail = 0;  // reset to 0. If in CRC Mode and CRC fails, this will be incremented.
    	uint8_t RX_Buffer [MAX_BUFFER_SIZE] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    #if CRC_Mode
    	{
    		uint8_t crc_count = 0;
    		uint8_t ReceiveBuffer [10] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    		crc_count = count * 2;
    		unsigned int j;
    		unsigned int i;
    		unsigned char CRCc = 0;
    		uint8_t temp_crc_buffer [3];
    
    		HAL_I2C_Mem_Read(&hi2c1, DEV_ADDR, reg_addr, 1, ReceiveBuffer, crc_count, 1000);
    		uint8_t crc1stByteBuffer [4] = {0x10, reg_addr, 0x11, ReceiveBuffer[0]};
    		CRCc = CRC8(crc1stByteBuffer,4);
    		if (CRCc != ReceiveBuffer[1])
    		{
    			RX_CRC_Fail += 1;
    		}
    		RX_Buffer[0] = ReceiveBuffer[0];
    
    		j = 2;
    		for (i=1; i<count; i++)
    		{
    			RX_Buffer[i] = ReceiveBuffer[j];
    			temp_crc_buffer[0] = ReceiveBuffer[j];
    			j = j + 1;
    			CRCc = CRC8(temp_crc_buffer,1);
    			if (CRCc != ReceiveBuffer[j])
    				RX_CRC_Fail += 1;
    			j = j + 1;
    		}
    		CopyArray(RX_Buffer, reg_data, crc_count);
    	}
    #else
    	HAL_I2C_Mem_Read(&hi2c1, DEV_ADDR, reg_addr, 1, reg_data, count, 1000);
    #endif
    	return 0;
    }

    CB_ACTIVE_CELLS (CAC) and CB_SET_LVL (CSL) serve two different purposes but both are for balancing. You only need to use 1 of them. Also note that if you wish to use manual control, make sure the Settings:Cell Balancing Config:Balancing Configuration[CB_NO_CMD] bit set to 0, otherwise, commands will be blocked. You will also need to decide how long you want to cell balance as there is a built in time to prevent indefinite cell balancing. The value of the timer is located at Settings:Cell Balancing Config: Cell Balance Interval. For more information on configuring

    CAC: This lets you turn on cell balancing for individual cells. When a bit is set high for this register, the cell corresponding to this bit are balanced until the bit is set low. This means you'll have to handle when the cell has been balanced enough and turn it off on the software side of your MCU. This gives you the most control of cell balancing, but it will be more software intensive.

    CSL: This lets you set a voltage value to balance all cells to a preset value. This is a very simple method of balancing, but it will be the least software intensive of the manual cell balancing. It will balance cells until they reach the voltage level that is stored in the register.

    1. For manual cell balancing (where automatic balancing is disabled), the StopDelta and other functions are not involved. Cell balancing will be controlled by the CAC, CSL, and Cell Balance Interval levels will determine whether a cell is being balanced or not.

    2. If you want to balance a cell (1-16), you would set the corresponding bit high. For example, for cell 3, the command would be Subcommands(CB_ACTIVE_CELLS, 0x0004, W2). For cell 8, the command would be Subcommands(CB_ACTIVE_CELLS, 0x0080, W2). For cell 8 and cell 3, the command would be Subcommands(CB_ACTIVE_CELLS, 0x0084, W2).

    Best,

    Asher Nederveld

  • Hello Asher, thanks for the explanation.

    Few follow up questions regarding CSL:

    1, If we consider a 3S pack, with C1 = 3600mV, C2 = 3750mV, C3 = 3800mV and the stop delta I want is 40mV, I should set the CSL to 40mV? Because you say

    It will balance cells until they reach the voltage level that is stored in the register.

    as per this, if let's say I set CSL to 3200mV, then AFE will turn on the Balance FETs until C1, C2 and C3 reach 3200mV? I'm confused. What if the cell value is already lesser than this? (say 2900mV). I was thinking CSL works almost like CellBalanceMinCellVCharge or CellBalanceMinCellVRelax where balancing will happen only if the cells are above this value and AFE will take care of what cell to balance?

    2, I prefer to use CSL and just call this function whenever the imbalance becomes more than a certain value. With my Q1 cleared, when I use CSL, in the code I've attached in the above post, if the cellImbalance becomes lesser than 30mV then CSL will not be called and the Cell Balance FET will turn off after the timer in Cell Balance Interval runs out? The device will take care of what cell to balance when and all of that? Basically just call the function when imbalance exists and that's it?

    Also since the last post, I have been able to set the and read back the setting. Currently I'm using just the CSL as 3200mV and when I read CB_CELLS_ACTIVE, I see some cells are getting balanced. I am currently logging it and will update back with the result. Please clarify my doubts on CSL.

    Many thanks,

    Abhijith

  • Hi Abhijith,

    I'm glad you are able to read the registers now.

    1. If the cell balance is less than 3200mV like 2900mV, it won't be balanced. Only cells greater than 3200mV will be balanced. It will be up to you on the software side to read all cell voltages, determine which voltage is the lowest, and set something near that value as the goal to be balanced to. Yes, the AFE should handle the balancing part to match it.

    2. That is how should it should work. Per the datasheet, the device starts balancing one or more of the highest voltage cells if they are above the set threshold.

    Best,

    Asher Nederveld