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

 

9 REPLIES 9
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.

 

Hi Trishuynh,

There was probably a misunderstanding in my first response to your question.
I will try to be more clear. The function AEK_POW_BMS63EN_Start_Mgn_exec() start a process that ciclically activate cell balancing.
This means that if you use this function with no changes, cell balancing is activated periodiacally.
If you want to change the behaviour of cell balancing, before to call in your main AEK_POW_BMS63EN_Start_Mgn_exec(), you should modify the function AEK_POW_BMS63EN_Balancing() according to your needs.  see image below.

 

ATROI_0-1732718269015.png

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.

take into account that the old library is deprecated.

Thanks,

AutoDevKit Team

Dear @ATROI@Max VIZZINI@Chronal,

 

I tested with the old driver by modifying the AEK_POW_BMS63EN_Balancing() function as in the picture below:

trishuynh_0-1732787426513.png

After that, I also added this function after the AEK_POW_BMS63EN_Start_Mgn_exec() in the main like this:

trishuynh_1-1732787491355.png

 

Even in the Core0() like this:

trishuynh_2-1732787549910.png

However, the balancing still enable based on each cell that has SoC over 3% different from another. 

 

After that, when I moved to the new driver using demo (without modify) SPC58EC - AEK_POW_BMS63EN_SOC_Est_SingleAccess_CHAIN application for discovery, there are some problems:

1. The code run fine for only around 6 minutes after we upload the demo to the board. After that it returned wrong data and the LED blink weird (I tested with multiple times). (data file in xls and the video are attached below)

2. When I hotplug 1 cell and replug it to the pack, the system stops to send any signal.

 

Could you please give me some advice or any demo code for the new driver that can send data from AEK_POW_BMS63CHAIN_node_getFastMeas to the serial so that I can send it for you to diagnose.

 

I really appreciate your help with the new driver.

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

Best regards,

Trishuynh.