cancel
Showing results for 
Search instead for 
Did you mean: 

AEK-POW_BMS63EN cell balancing manually adjust

trishuynh
Associate III

Dear community members,

 

There are multiple functions related to cell balancing in AEK-POW_BMS63EN_id. However, when I tested, none of them work. Here is my main code based on the "SPC58EC - AEK_POW_BMS63EN_SOC_Estimation_14Cells_GUI application for discovery" example. Could anyone experts give me documents about how to manually use cell balancing of this board? and explain detail how cell balancing of AEK-POW-BMS63EN works?

This is my code:

trishuynh_0-1730455880757.png

And this is the results: Cells balancing still turn on

trishuynh_1-1730455908832.png

 

7 REPLIES 7
ATROI
ST Employee

Hi Trishuynh,

 

In the function AEK_POW_BMS63EN_StartMgn_exec there is a set of functions that, based on the SOC, activates the cell balancing. Executing this function after StopCellBalancing, DisableCellBalancing ... overrides the expected behavior.

We suggest updating AutoDevKit, in order to use the new driver on BMS (BMS_CHAIN)
that has been released and to use the demo: SPC58EC - AEK_POW_BMS63EN_SOC_Est_SingleAccess_CHAIN application for discovery.

Regarding your request for documentation in the folder comments -> aek_pow_bms63chain_component_rla -> doc
you will find the file in which the functionality of each function is described.

Finally, below a list of some function that you should use to achieve your scope:

//Set Balancing Mode of Node of BMS Chain.

- AEK_POW_BMS63CHAIN_node_setBalMode


//Enable Balancing Cell of Node of BMS Chain.
- AEK_POW_BMS63CHAIN_node_enableBalCell


//Disable Balancing Cell of Node of BMS Chain
- AEK_POW_BMS63CHAIN_node_disableBalCell


//Set Balancing Start of Node of BMS Chain.
- AEK_POW_BMS63CHAIN_node_setStartBal


//Set Balancing Stop of Node of BMS Chain.
- AEK_POW_BMS63CHAIN_node_setStopBa

Thanks,

AutoDevKit Team.

Dear ATROI,

 

I followed your instruction that use new driver on BMS (BMS_CHAIN). When I run the demo SPC58EC - AEK_POW_BMS63EN_SOC_Est_SingleAccess_CHAIN application for discovery, everything works perfectly. Then, In the function AEK_POW_BMS63CHAIN_app_step, I uncomment all the code of Balancing and replace them with 2 lines of code:

AEK_POW_BMS63CHAIN_node_setBalMode(AEK_POW_BMS63CHAIN_CHAIN0, AEK_POW_BMS63CHAIN_NODE_DEV1, AEK_POW_BMS63CHAIN_BAL_MANUAL);
AEK_POW_BMS63CHAIN_node_setStopBal(AEK_POW_BMS63CHAIN_CHAIN0, AEK_POW_BMS63CHAIN_NODE_DEV1);

 

However, when I run the program, the balancing is still on. I have several questions could you and experts help me:

 

1. How and where to use the balancing functions in the demo provided.

2. When enable the balancing, can I have fully permission to change the balancing value of each cells to 0 or 1?. Or these values are automatically turned on by the system?

 

I also attached the picture of the code and the output for your references.

Thank you for your attention to this matter. I appreciate your assistance in clarifying this detail.

Best regards,

Trishuynh.

trishuynh_0-1732268547110.png

trishuynh_1-1732268555046.png

 

 

 

Hello,

It might be easier to help you if you shared a snapshot of the following data structures:

AEK_POW_BMS63CHAIN_fastMeas_t

 AEK_POW_BMS63CHAIN_fastDiag_t

Please, could you attach a txt file with structure field data?

Dear Chronal,

I attached the txt file data structures of 

AEK_POW_BMS63CHAIN_fastMeas_t,

AEK_POW_BMS63CHAIN_fastDiag_t,

and AEK_POW_BMS63CHAIN_node_getFastMeas as required. 

 

Hi,

Thank you, but more than the code definition,  we would like to receive the actual memory content of these structures when you run the code and spot issues.

Thanks,

AutoDevKit Team

Dear Experts,

I am trying with the AEK_POW_BMS63CHAIN_node_getFastMeas structure in order to print the data to serial and export to txt file for you. However, when I start the program execution, it sends nothing to the serial. I think the problem is my coding skills. Could you please help me to overcome this. 

 

 

void AEK_POW_BMS63CHAIN_app_serialStep(uint16_t AEK_POW_BMS63CHAIN_app_timeStamp){
     char message[11];
     char buffer[50];  // Buffer for sprintf
 
     uint8_t AEK_POW_BMS63CHAIN_chainidx = AEK_POW_BMS63CHAIN_CHAIN0;
     uint8_t AEK_POW_BMS63CHAIN_devidx = AEK_POW_BMS63CHAIN_NODE_DEV1;
     uint8_t AEK_POW_BMS63CHAIN_cellidx = AEK_POW_BMS63CHAIN_CELL1;
 
     if((osalThreadGetMilliseconds()%AEK_POW_BMS63CHAIN_app_timeStamp)==0){
           sprintf(buffer, "Cell 1: En=%d, Data Ready=%d, Voltage=%.2f\n",
              AEK_POW_BMS63CHAIN_node_getFastMeas(AEK_POW_BMS63CHAIN_chainidx,AEK_POW_BMS63CHAIN_devidx).AEK_POW_BMS63CHAIN_vCell1_En,
              AEK_POW_BMS63CHAIN_node_getFastMeas(AEK_POW_BMS63CHAIN_chainidx,AEK_POW_BMS63CHAIN_devidx).AEK_POW_BMS63CHAIN_dRdyVcell1,
              AEK_POW_BMS63CHAIN_node_getFastMeas(AEK_POW_BMS63CHAIN_chainidx,AEK_POW_BMS63CHAIN_devidx).AEK_POW_BMS63CHAIN_vCell1);
 
            sendMessage(buffer);
}
}
 

Thank you for your attention to this matter. I appreciate your assistance in clarifying this detail.

Best regards,

Trishuynh.

Dear ATROI,

 

In the main function of "SPC58EC - AEK_POW_BMS63EN_SOC_Estimation_14Cells_GUI application for discovery" example, it has a function "AEK_POW_BMS63EN_init()" that already disabled cell balancing as in the picture: 

trishuynh_0-1732609969925.png

So, I add the function "AEK_POW_BMS63EN_Start_Mgn_exec()" below  "AEK_POW_BMS63EN_init()" as you said to overrides the expected behavior as in the picture below:

trishuynh_1-1732610078540.png

However, the balancing is still enabled on each cell. I also attached the data file (*.xls format) about all the output parameters for you.

Thank you for your attention to this matter. I appreciate your assistance in clarifying this detail.

Best regards,

Trishuynh.