cancel
Showing results for 
Search instead for 
Did you mean: 

BMS Chain Setup Assistance

Luke_A
Associate II

I posted recently about getting set up with the demo for the GUI application, and got great help from @SRomeo. I've now moved on to the SingleAccess Chain demo, and could use some more help if you don't mind?

I am using the C4ML1T, ISOSPI1, and 2 BMS63EN boards each connected to a BMSHOLD cell holder. The first device has 8 cells connected to it, the second has 4. In both cases, there are cells occupying slots 1, 2, 13, and 14.

In AutoDevKitStudio, the AEK-POW-BMS63ENCHAIN component is set up with a single chain, with two devices. I have connected the ISOSPI1 board to the C4ML1T as per the allocated pins visible on the board view, below.

ISO_MCU Pinouts.png

Once the code is compiled and generated, and the board is flashed, I get periodic LED illumination, and zero values for all data printed to the serial terminal. See video below for hardware behaviour, including how the frequency of the LEDs changes with a reset.

I suppose my first question is am I interpreting the board view pin designations correctly? NSLAVE isn't mentioned, and so I have left it disconnected (assuming there's internal pull-down resistors or something), and BNE/TxAmp are shown with an "X" which I have also taken to mean leave disconnected.

My ultimate goal with this is to be able to output voltage values for all cells across all devices to a terminal. Toward this aim, I have included a for-loop in the AEK_POW_BMS63CHAIN_app_serialStep function to iterate over devices as well as cells, as below. I will only ever have a single chain and so I don't need to iterate over that.

 

void AEK_POW_BMS63CHAIN_app_serialStep(uint16_t AEK_POW_BMS63CHAIN_app_timeStamp){
  char message[11];

  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;
  uint8_t cellCounter = 1;

  if((osalThreadGetMilliseconds()%AEK_POW_BMS63CHAIN_app_timeStamp)==0){
	  for(AEK_POW_BMS63CHAIN_devidx = AEK_POW_BMS63CHAIN_NODE_DEV1; AEK_POW_BMS63CHAIN_devidx<=AEK_POW_BMS63CHAIN_chain_getDevNum(AEK_POW_BMS63CHAIN_chainidx); AEK_POW_BMS63CHAIN_devidx++){

		    //Printing DEV
		    sprintf(message, "DEV,%d, ", (int)(AEK_POW_BMS63CHAIN_devidx));
		    sendMessage(message);
		    sendMessage("\n");

		    //Printing SoC
			for(AEK_POW_BMS63CHAIN_cellidx = AEK_POW_BMS63CHAIN_CELL1; AEK_POW_BMS63CHAIN_cellidx<= AEK_POW_BMS63CHAIN_CELL14; AEK_POW_BMS63CHAIN_cellidx++){
		    sprintf(message, "S%d,%.3d, ",AEK_POW_BMS63CHAIN_cellidx, (int)(AEK_POW_BMS63CHAIN_app_dataChain[AEK_POW_BMS63CHAIN_chainidx].AEK_POW_BMS63CHAIN_nodeData[AEK_POW_BMS63CHAIN_devidx - 1].AEK_POW_BMS63CHAIN_Pack_SOC[AEK_POW_BMS63CHAIN_cellidx - 1] * 100));
		    sendMessage(message);
		    }
		    sendMessage("\n");

		    //Printing Voltage
			for(AEK_POW_BMS63CHAIN_cellidx = AEK_POW_BMS63CHAIN_CELL1; AEK_POW_BMS63CHAIN_cellidx<= AEK_POW_BMS63CHAIN_CELL14; AEK_POW_BMS63CHAIN_cellidx++){
		    sprintf(message, "V%d,%.3f, ",cellCounter, AEK_POW_BMS63CHAIN_app_dataChain[AEK_POW_BMS63CHAIN_chainidx].AEK_POW_BMS63CHAIN_nodeData[AEK_POW_BMS63CHAIN_devidx - 1].AEK_POW_BMS63CHAIN_Pack_CellVoltage[AEK_POW_BMS63CHAIN_cellidx - 1]);
		    sendMessage(message);
		    cellCounter++;
		    }
		    sendMessage("\n");

		    //Printing Current
		    sprintf(message, "C,%.4f, ", AEK_POW_BMS63CHAIN_app_dataChain[AEK_POW_BMS63CHAIN_chainidx].AEK_POW_BMS63CHAIN_nodeData[AEK_POW_BMS63CHAIN_devidx - 1].AEK_POW_BMS63CHAIN_Pack_Current);
		    sendMessage(message);
		    sendMessage("\n");

		    //Printing Temperature
			for(AEK_POW_BMS63CHAIN_cellidx = AEK_POW_BMS63CHAIN_CELL1; AEK_POW_BMS63CHAIN_cellidx<= AEK_POW_BMS63CHAIN_CELL14; AEK_POW_BMS63CHAIN_cellidx++){
		    sprintf(message, "T%d,%.3f, ", AEK_POW_BMS63CHAIN_cellidx, AEK_POW_BMS63CHAIN_app_dataChain[AEK_POW_BMS63CHAIN_chainidx].AEK_POW_BMS63CHAIN_nodeData[AEK_POW_BMS63CHAIN_devidx - 1].AEK_POW_BMS63CHAIN_Pack_CellTemperatureNTC[AEK_POW_BMS63CHAIN_cellidx - 1]);
		    sendMessage(message);
		    }
		    sendMessage("\n");

		    //Printing Bal_cmd
			for(AEK_POW_BMS63CHAIN_cellidx = AEK_POW_BMS63CHAIN_CELL1; AEK_POW_BMS63CHAIN_cellidx<= AEK_POW_BMS63CHAIN_CELL14; AEK_POW_BMS63CHAIN_cellidx++){
		    sprintf(message, "B%d,%d, ", AEK_POW_BMS63CHAIN_cellidx, AEK_POW_BMS63CHAIN_app_dataChain[AEK_POW_BMS63CHAIN_chainidx].AEK_POW_BMS63CHAIN_nodeData[AEK_POW_BMS63CHAIN_devidx - 1].AEK_POW_BMS63CHAIN_Pack_Bal_cmd[AEK_POW_BMS63CHAIN_cellidx - 1]);
		    sendMessage(message);
		    }
		    sendMessage("\n");

		}}
}

 

 

 

4 REPLIES 4
Max VIZZINI
ST Employee

Hi,

The AEK-POW-BMSHOLD is wired to support exactly 14 cells and not less. It is true that L9963E device is able to manage from a minimum of 4 cells to 14 cells, but the pin wiring has to be done in the proper series way otherwise the sensing will not work.

Best Regards,

AutoDevKit Team

SRomeo
ST Employee

Hi Luke,
As Max says our evaluation kit was designed for exactly 14 Cells.

 

Moreover, I see that the allocation process is allocating some pins as "X".

This means that, somehow, the allocation process allocated an MCU pin not wired to the 4x37 connector.
The golden rule to make a system work is that "all the pins displayed on the connection matrix MUST be connected". So BNE and TXAMP have to be allocated manually to an available MCU pin.


To do that you should take a look to the AEK_MCU_C4MLIT1 extended connector, which can be found on the C4MLIT1 User Manual.

SRomeo_0-1739530680247.png

The pins you want to allocate are GPIOs, so you should search which MCU pin allocable as GPIO, may be found on the scheme above.SRomeo_1-1739531182668.png

To check which P"x"y" pin may work as GPIO you have to open SRomeo_2-1739531583990.pngand take a look to the SIUL section into the Outline window:

SRomeo_7-1739532841495.png     SRomeo_8-1739533091251.png

 

I suggest you using pin 111 and pin 87 (which are wired).
Then left click on the pin with "X" and copy the name from the General setting window:

SRomeo_6-1739532524310.png
Then right click on the PIN and deallocate it, selecting NOT USED:

SRomeo_4-1739532274213.png
Then select the pin 111 and allocate it as input/output

SRomeo_3-1739532078766.png

Pasting the name you copied before.

Repeat the procedure also for BNE, then Save allclean and compile.
Your application should no more have "X" pins allocated

Best Regards
AEK team

 

 

 

Luke_A
Associate II

This was really useful, thank you. The "X" has now disappeared and BNE and TXAmp are now allocated to pins. I have also now fully populated each holder with 18650 cells. I think I have it setup how I want, sending voltage measurements from each cell to the serial port.

I am however noticing lower than expected readings on some cells. The first two cells on each device (Cell 1 and Cell 15) display a reading around 600 - 700 mV lower than when measured using a multimeter (see figures below), while the rest of the cells are around 100 mV lower. For additional information, the voltage of the cells in the holder ranges between 3.3V and 3.8V for each cell, with a total pack voltage of around 51 V.

 

Discrepancy in Voltage ValuesDiscrepancy in Voltage Values

Fig 1: Voltage readings on terminal

 

Cell 15Cell 15 

Fig 2: Cell 15 reading on DVM

 

Cell 1Cell 1
Figure 3: Cell 1 reading on DVM

 

SRomeo
ST Employee

Hi Luke,
I think your L9963E device is actually missing the ground reference.
Please follow this procedure:

 1) Disconnect the BMS holder connector
 2) Check both your BMS boards and place each Jumper JP1 in the 1/2 position:

   SRomeo_0-1739879570805.png

  3) Reconnect the BMS holder connector.

This should solve your issue.

 

Note: Sometimes, even with the jumpers, this problem happens. That's because the BMS connector is not inserted correctly. Try to reconnect it by pushing along the borders, uniformly, as in the picture:

SRomeo_1-1739879640619.png

Best Regards
AEK team