cancel
Showing results for 
Search instead for 
Did you mean: 

BMS Chain Setup Assistance

Luke_A
Associate

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");

		}}
}

 

 

 

0 REPLIES 0