7. Communicating with foxBMS

7.1. Communicating over CAN

The table CAN Messages shows the CAN messages sent and received by the BMS with their respective names and IDs, the direction and a short comment.

The table CAN RX Signals gives the CAN signals sent and received in these messages.

To add or change a signal it must be refered to the software FAQ: How to manually add CAN entries (transmit and receive) and to change the transmit time period?.

Note

12 cell voltages, 12 cell temperatures and 8 modules are configured in the default CAN configuration of the foxBMS Software.

If less then 8 modules, 12 cell voltages or 12 cell temperatures are configured in the software (e.g., in batterysystem_cfg.h), random values are transmitted on these messages/signals. These values from the unused CAN messages must simply be ignored.

In case it is really wanted not to transmit these values, the configuration of the CAN module must be changed as shown in the software FAQ in How to adapt the CAN module when less or more than 8 battery modules are used? and in How to adapt the CAN module when less than 12 battery cells/temperature sensors per module are used?. The configuration must also be changed if more than 8 modules, 12 cell voltages or 12 cell temperatures are used.

7.1.1. CAN Messages

Message names in the DBC file can vary from the following tables in order to be compliant with the 32 character limit of DBC files.

RX Messages:

Message Name Message ID DLC Direction Description
CAN0_Software_Reset 0x95 8 RX Perform software reset
CAN0_Debug_Message 0x100 8 RX Debug message
CAN0_State_Request 0x120 8 RX State request
CAN0_IVT_Current 0x35C/0x521 6 RX Current Sensing Current Value
CAN0_IVT_Voltage_1 0x35D/0x522 6 RX Current Sensing Voltage 1
CAN0_IVT_Voltage_2 0x35E/0x523 6 RX Current Sensing Voltage 2
CAN0_IVT_Voltage_3 0x35F/0x524 6 RX Current Sensing Voltage 3
CAN0_IVT_Temperature 0x525 6 RX Current Sensing Temperature
CAN0_IVT_Power 0x526 6 RX Current Sensing Power
CAN0_IVT_CoulombCount 0x527 6 RX Current Sensing Coulomb Counting Value
CAN0_IVT_EnergyCount 0x528 6 RX Current Sensing Energy Counting Value
CAN0_GetReleaseVersion 0x777 8 RX Request software version

TX Messages:

Message Name Message ID DLC Direction Description
CAN0_MSG_Boot 0x101 8 TX BMS booting successful
CAN0_MSG_SystemState_0 0x110 8 TX BMS system state 0
CAN0_MSG_SystemState_1 0x111 8 TX BMS system state 1
CAN0_MSG_SystemState_2 0x112 8 TX BMS system state 2
CAN0_MSG_SlaveState_0 0x115 8 TX BMS slave state 0
CAN0_MSG_SlaveState_1 0x116 8 TX BMS slave state 1
CAN0_RecOperatingCurrent 0x130 8 TX Recommended operating current
CAN0_SOP 0x131 8 TX State-of-power
CAN0_SOC 0x140 8 TX State-of-charge
CAN0_SOH 0x150 8 TX State-of-health
CAN0_SOE 0x160 8 TX State-of-energy
CAN0_MinMaxCellVoltages 0x170 8 TX Cell voltages Max Min Mean
CAN0_SOV 0x171 8 TX State-of-voltage
CAN0_MinMaxCellTemperatures 0x180 8 TX Cell temperatures Max Min Mean
CAN0_Tempering 0x190 8 TX Cooling/Heating
CAN0_Insulation 0x1A0 8 TX Insulation
CAN0_MovAveragePower_0 0x1D0 8 TX Moving average power 0
CAN0_MovAveragePower_1 0x1D1 8 TX Moving average power 1
CAN0_MovAveragePower_2 0x1D2 8 TX Moving average power 2
CAN0_MovAverageCurrent_0 0x1E0 8 TX Moving average current 0
CAN0_MovAverageCurrent_1 0x1E1 8 TX Moving average current 1
CAN0_MovAverageCurrent_2 0x1E2 8 TX Moving average current 2
CAN0_PackVoltage 0x1F0 8 TX Battery pack voltage
CAN0_Cell_voltage_M0_0 0x200 8 TX Cell voltages module 0 cell 0 1 2
CAN0_Cell_voltage_M0_1 0x201 8 TX Cell voltages module 0 cell 3 4 5
CAN0_Cell_voltage_M0_2 0x202 8 TX Cell voltages module 0 cell 6 7 8
CAN0_Cell_voltage_M0_3 0x203 8 TX Cell voltages module 0 cell 9 10 11
CAN0_Cell_temperature_M0_0 0x210 8 TX Cell temperatures module 0 - 0 1 2
CAN0_Cell_temperature_M0_1 0x211 8 TX Cell temperatures module 0 - 3 4 5
CAN0_Cell_temperature_M0_2 0x212 8 TX Cell temperatures module 0 - 6 7 8
CAN0_Cell_temperature_M0_3 0x213 8 TX Cell temperatures module 0 - 9 10 11
CAN0_Cell_voltage_M1_0 0x220 8 TX Cell voltages module 1 cell 0 1 2
CAN0_Cell_voltage_M1_1 0x221 8 TX Cell voltages module 1 cell 3 4 5
CAN0_Cell_voltage_M1_2 0x222 8 TX Cell voltages module 1 cell 6 7 8
CAN0_Cell_voltage_M1_3 0x223 8 TX Cell voltages module 1 cell 9 10 11
CAN0_Cell_temperature_M1_0 0x230 8 TX Cell temperatures module 1 - 0 1 2
CAN0_Cell_temperature_M1_1 0x231 8 TX Cell temperatures module 1 - 3 4 5
CAN0_Cell_temperature_M1_2 0x232 8 TX Cell temperatures module 1 - 6 7 8
CAN0_Cell_temperature_M1_3 0x233 8 TX Cell temperatures module 1 - 9 10 11
CAN0_Cell_voltage_M2_0 0x240 8 TX Cell voltages module 2 cell 0 1 2
CAN0_Cell_voltage_M2_1 0x241 8 TX Cell voltages module 2 cell 3 4 5
CAN0_Cell_voltage_M2_2 0x242 8 TX Cell voltages module 2 cell 6 7 8
CAN0_Cell_voltage_M2_3 0x243 8 TX Cell voltages module 2 cell 9 10 11
CAN0_Cell_temperature_M2_0 0x250 8 TX Cell temperatures module 2 - 0 1 2
CAN0_Cell_temperature_M2_1 0x251 8 TX Cell temperatures module 2 - 3 4 5
CAN0_Cell_temperature_M2_2 0x252 8 TX Cell temperatures module 2 - 6 7 8
CAN0_Cell_temperature_M2_3 0x253 8 TX Cell temperatures module 2 - 9 10 11
CAN0_Cell_voltage_M3_0 0x260 8 TX Cell voltages module 3 cell 0 1 2
CAN0_Cell_voltage_M3_1 0x261 8 TX Cell voltages module 3 cell 3 4 5
CAN0_Cell_voltage_M3_2 0x262 8 TX Cell voltages module 3 cell 6 7 8
CAN0_Cell_voltage_M3_3 0x263 8 TX Cell voltages module 3 cell 9 10 11
CAN0_Cell_temperature_M3_0 0x270 8 TX Cell temperatures module 3 - 0 1 2
CAN0_Cell_temperature_M3_1 0x271 8 TX Cell temperatures module 3 - 3 4 5
CAN0_Cell_temperature_M3_2 0x272 8 TX Cell temperatures module 3 - 6 7 8
CAN0_Cell_temperature_M3_3 0x273 8 TX Cell temperatures module 3 - 9 10 11
CAN0_Cell_voltage_M4_0 0x280 8 TX Cell voltages module 4 cell 0 1 2
CAN0_Cell_voltage_M4_1 0x281 8 TX Cell voltages module 4 cell 3 4 5
CAN0_Cell_voltage_M4_2 0x282 8 TX Cell voltages module 4 cell 6 7 8
CAN0_Cell_voltage_M4_3 0x283 8 TX Cell voltages module 4 cell 9 10 11
CAN0_Cell_temperature_M4_0 0x290 8 TX Cell temperatures module 4 - 0 1 2
CAN0_Cell_temperature_M4_1 0x291 8 TX Cell temperatures module 4 - 3 4 5
CAN0_Cell_temperature_M4_2 0x292 8 TX Cell temperatures module 4 - 6 7 8
CAN0_Cell_temperature_M4_3 0x293 8 TX Cell temperatures module 4 - 9 10 11
CAN0_Cell_voltage_M5_0 0x2A0 8 TX Cell voltages module 5 cell 0 1 2
CAN0_Cell_voltage_M5_1 0x2A1 8 TX Cell voltages module 5 cell 3 4 5
CAN0_Cell_voltage_M5_2 0x2A2 8 TX Cell voltages module 5 cell 6 7 8
CAN0_Cell_voltage_M5_3 0x2A3 8 TX Cell voltages module 5 cell 9 10 11
CAN0_Cell_temperature_M5_0 0x2B0 8 TX Cell temperatures module 5 - 0 1 2
CAN0_Cell_temperature_M5_1 0x2B1 8 TX Cell temperatures module 5 - 3 4 5
CAN0_Cell_temperature_M5_2 0x2B2 8 TX Cell temperatures module 5 - 6 7 8
CAN0_Cell_temperature_M5_3 0x2B3 8 TX Cell temperatures module 5 - 9 10 11
CAN0_Cell_voltage_M6_0 0x2C0 8 TX Cell voltages module 6 cell 0 1 2
CAN0_Cell_voltage_M6_1 0x2C1 8 TX Cell voltages module 6 cell 3 4 5
CAN0_Cell_voltage_M6_2 0x2C2 8 TX Cell voltages module 6 cell 6 7 8
CAN0_Cell_voltage_M6_3 0x2C3 8 TX Cell voltages module 6 cell 9 10 11
CAN0_Cell_temperature_M6_0 0x2D0 8 TX Cell temperatures module 6 - 0 1 2
CAN0_Cell_temperature_M6_1 0x2D1 8 TX Cell temperatures module 6 - 3 4 5
CAN0_Cell_temperature_M6_2 0x2D2 8 TX Cell temperatures module 6 - 6 7 8
CAN0_Cell_temperature_M6_3 0x2D3 8 TX Cell temperatures module 6 - 9 10 11
CAN0_Cell_voltage_M7_0 0x2E0 8 TX Cell voltages module 7 cell 0 1 2
CAN0_Cell_voltage_M7_1 0x2E1 8 TX Cell voltages module 7 cell 3 4 5
CAN0_Cell_voltage_M7_2 0x2E2 8 TX Cell voltages module 7 cell 6 7 8
CAN0_Cell_voltage_M7_3 0x2E3 8 TX Cell voltages module 7 cell 9 10 11
CAN0_Cell_temperature_M7_0 0x2F0 8 TX Cell temperatures module 7 - 0 1 2
CAN0_Cell_temperature_M7_1 0x2F1 8 TX Cell temperatures module 7 - 3 4 5
CAN0_Cell_temperature_M7_2 0x2F2 8 TX Cell temperatures module 7 - 6 7 8
CAN0_Cell_temperature_M7_3 0x2F3 8 TX Cell temperatures module 7 - 9 10 11
CAN0_MSG_ISENS_TRIG 0x35B 8 TX Trigger for CurrentSensor

7.1.2. CAN RX Signals

Message: CAN0_Software_Reset Message ID: 0x95 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder

When this message is received, a software reset is performed.


Message: CAN0_Debug_Message Message ID: 0x100 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_DEBUG_Data 0 64 0.0 0xFFFFFFFF 1.0 0.0 none Intel

This message contains only one single signal. The debug data is interpreted by the embedded software differently depending on its actual databits. In the software FAQ (How to simply trigger events via CAN?), further details are given on the handling of debug messages.


Message: CAN0_State_Request Message ID: 0x120 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_ReceiveStateRequest 8 8 0.0 255 1.0 0.0 none Intel

In the messages described in the previous table, the signal CAN0_SIG_ReceiveStateRequest is used to change the state of the foxBMS Master Unit. This is one of the most important signals: it allows initiating the procedure to close the power contactors. Possible request numbers in default configuration are 3 (Normal state), 4 (Charge state) and 8 (Standby state), but can be configured (0 is No Request). More details can be found in the documentation of the module BMS.

A state request has to be sent every 100ms, otherwise the BMS enters into an error state. The requests must come in the window 95-105ms to be valid.


Message: CAN0_MSG_IVT_Current Message ID: 0x35C/0x521 DLC: 6            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_IVT_Current_MuxID 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Current_Status 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Current_Measurement 16 32 -2147483648 2147483647 1.0 0.0 mA Intel

CAN0_IVT_Current_MuxID indicates the measurement type and CAN0_IVT_Current_Status indicates status values and counters of the current sensor measurement. For details the datasheet of the current sensor must be consulted. CAN0_IVT_Current_Measurement is the current value measured by the sensor. It is a 32 bit signed value with 1mA resolution. It must be noted that resolution in CAN transmission is not the same as the measurement accuracy.


Message: CAN0_MSG_IVT_Voltage_1 Message ID: 0x35D/0x522 DLC: 6            
Signal name Start bit Bit length Min Max Factor Offset unit Byteorder
CAN0_SIG_IVT_Voltage_1_MuxID 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Voltage_1_Status 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Voltage_1_Measurement 16 32 0.0 4294967295 1.0 0.0 mV Intel

CAN0_IVT_Voltage_1_MuxID indicates the measurement type and CAN0_IVT_Voltage_1_Status indicates status values and counters of the current sensor measurement. For details the datasheet of the current sensor must be consulted. CAN0_IVT_Voltage_1_Measurement is the voltage value measured by the sensor at the voltage input channel 1. It is a 32 bit unsigned value with 1mV resolution. It must be noted that resolution in CAN transmission is not the same as the measurement accuracy.


Message: CAN0_MSG_IVT_Voltage_2 Message ID: 0x35E/0x523 DLC: 6            
Signal name Start bit Bit length Min Max Factor Offset unit Byteorder
CAN0_SIG_IVT_Voltage_2_MuxID 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Voltage_2_Status 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Voltage_2_Measurement 16 32 0.0 4294967295 1.0 0.0 mV Intel

CAN0_IVT_Voltage_2_MuxID indicates the measurement type and CAN0_IVT_Voltage_2_Status indicates status values and counters of the current sensor measurement. For details the datasheet of the current sensor must be consulted. CAN0_IVT_Voltage_2_Measurement is the voltage value measured by the sensor at the voltage input channel 2. It is a 32 bit unsigned value with 1mV resolution. It must be noted that resolution in CAN transmission is not the same as the measurement accuracy.


Message: CAN0_MSG_IVT_Voltage_3 Message ID: 0x35F/0x524 DLC: 6            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_IVT_Voltage_3_MuxID 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Voltage_3_Status 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Voltage_3_Measurement 16 32 0.0 4294967295 1.0 0.0 mV Intel

CAN0_IVT_Voltage_3_MuxID indicates the measurement type and CAN0_IVT_Voltage_3_Status indicates status values and counters of the current sensor measurement. For details the datasheet of the current sensor must be consulted. CAN0_IVT_Voltage_3_Measurement is the voltage value measured by the sensor at the voltage input channel 3. It is a 32 bit unsigned value with 1mV resolution. It must be noted that resolution in CAN transmission is not the same as the measurement accuracy.


Message: CAN0_MSG_IVT_Temperature Message ID: 0x525 DLC: 6            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_IVT_Temperature_MuxID 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Temperature_Status 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Temperature_Measurement 16 32 -2147483648 2147483647 1.0 0.0 0.1°C Intel

CAN0_IVT_Temperature_MuxID indicates the measurement type and CAN0_IVT_Temperature_Status indicates status values and counters of the current sensor measurement. For details the datasheet of the current sensor must be consulted. CAN0_IVT_Temperature_Measurement is the temperature value measured by the sensor. It is a 32 bit signed value with 0.1°C resolution. It must be noted that resolution in CAN transmission is not the same as the measurement accuracy.


Message: CAN0_MSG_IVT_Power Message ID: 0x526 DLC: 6            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_IVT_Power_MuxID 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Power_Status 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_Power_Measurement 16 32 -2147483648 2147483647 1.0 0.0 W Intel

CAN0_IVT_Power_MuxID indicates the measurement type and CAN0_IVT_Power_Status indicates status values and counters of the current sensor measurement. For details the datasheet of the current sensor must be consulted. CAN_IVT0_Power_Measurement is the power value measured by the sensor (referring to current and voltage U1). It is a 32 bit signed value with 1W resolution. It must be noted that resolution in CAN transmission is not the same as the measurement accuracy.


Message: CAN0_MSG_IVT_CoulombCount Message ID: 0x527 DLC: 6            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_IVT_CC_MuxID 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_CC_Status 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_CC_Measurement 16 32 -2147483648 2147483647 1.0 0.0 As Intel

CAN0_IVT_CoulombCount_MuxID indicates the measurement type and CAN0_IVT_CoulombCount_Status indicates status values and counters of the current sensor measurement. For details the datasheet of the current sensor must be consulted. CAN0_IVT_CoulombCount_Measurement is the current counted by the sensor. It is a 32 bit signed value with 1As resolution. It must be noted that resolution in CAN transmission is not the same as the measurement accuracy.


Message: CAN0_MSG_IVT_EnergyCount Message ID: 0x528 DLC: 6            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_IVT_EC_MuxID 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_EC_Status 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_IVT_EC_Measurement 16 32 -2147483648 2147483647 1.0 0.0 Wh Intel

CAN0_IVT_EnergyCount_MuxID indicates the measurement type and CAN_IVT0_EnergyCount_Status indicates status values and counters of the current sensor measurement. For details the datasheet of the current sensor must be consulted. CAN0_IVT_EnergyCount_Measurement is the energy counted by the sensor (referring to current and voltage U1). It is a 32 bit signed value with 1Wh resolution. It must be noted that resolution in CAN transmission is not the same as the measurement accuracy.


Message: CAN0_MSG_GetReleaseVersion Message ID: 0x777 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_GetReleaseVersion 0 64 0.0 0 1.0 0.0 none Intel

When message CAN0_MSG_GetReleaseVersion is received, CAN message CAN0_MSG_BOOT is transmitted as response message.


7.1.3. CAN TX Signals

Message: CAN0_MSG_BOOT Message ID: 0x101 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_VersionNumberMajor 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_VersionNumberMinor 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_VersionNumberBugfix 16 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_Checksum 32 32 0.0 4294967295 1.0 0.0 none Intel

CAN0_SIG_VersionNumberMajor, CAN0_SIG_VersionNumberMinor and signal CAN0_SIG_VersionNumberMinor add up to the current flashed SW-version. The latest Releaseversion is 1.5.4. CAN0_SIG_Checksum holds the calculated CRC32 checksum of the flashed software. This message is transmitted once after startup or can be requested via CAN.


Message: CAN0_MSG_SystemState_0 Message ID: 0x110 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_GS0_general_error 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS0_current_state 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS0_error_overtemp_charge 16 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS0_error_undertemp_charge 24 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS0_error_overtemp_discharge 32 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS0_error_undertemp_discharge 40 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS0_error_overcurrent_charge 48 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS0_error_overcurrent_discharge 56 8 0.0 255 1.0 0.0 none Intel
Message: CAN0_MSG_SystemState_1 Message ID: 0x111 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_GS1_error_overvoltage 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS1_error_undervoltage 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS1_error_temperature_MCU0 16 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS1_error_contactor 24 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS1_error_selftest 32 8 for future use (not implemented yet)
CAN0_SIG_GS1_error_cantiming 40 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS1_current_sensor 48 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS1_balancing_active 56 8 0.0 255 1.0 0.0 none Intel
Message: CAN0_MSG_SystemState_2 Message ID: 0x112 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_GS2_state_cont_interlock 0 16 0.0 65535 1.0 0.0 none Intel
CAN0_SIG_GS2_error_insulation 16 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS2_fuse_state 24 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS2_lowCoinCellVolt 32 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS2_error_openWire 40 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_GS2_daisyChain 48 8 0.0 255 1.0 0.0 none Intel
RESERVED_FOR_FUTURE_USE 56 8 0.0 255 1.0 0.0 none Intel

The signals of the messages CAN0_MSG_SystemState_0 , CAN0_MSG_SystemState_1 and CAN0_MSG_SystemState_2 display information about the system status of the battery system.

CAN0_SIG_GS0_general_error indicates if and an error is detected from the BMS:

  • Bit[0]: maximum safety limit violated, CAN timing, current sensor or contactor error detected
  • Bit[1]: recommended safety limit violated
  • Bit[2]: maximum operating limit violated

The current state of the battery system is represented by the a bitfield in signal CAN0_SIG_GS0_current_state:

  • 0x00: Uninitialized
  • 0x03: Idle
  • 0x04: Standby
  • 0x05: Precharge (normal)
  • 0x06: Normal
  • 0x07: Precharge (charge)
  • 0x08: Charge
  • 0xF0: Error

The various error signals CAN0_SIG_GSx_error_xxxx give information about limit violations and internal errors. In general, the following bitfield is used:

  • Bit[0]: maximum safety limit violated
  • Bit[1]: recommended safety limit violated
  • Bit[2]: maximum operating limit violated

CAN0_SIG_GS1_error_temperature_MCU0 indicates if the operating range of the MCU0 junction temperature is violated. CAN0_SIG_GS1_error_cantiming is set to 1 if the can timing is violated (see #define CHECK_CAN_TIMING for more information). CAN0_SIG_GS1_current_sensor is 1 if no current sensor is detected and otherwise 0. CAN0_SIG_GS1_error_contactor is set to 1 if contactor error is detected. This means the feedback signal of the contactor doesn’t match the controlled state. CAN0_SIG_GS1_error_cantiming occurs if no state request message is received within 100ms. This feature can be enabled/disabled (see Important Switches in Code). The signal CAN0_SIG_GS1_balancing_active is a simple flag to show if balancing is ON (1) or OFF (0). CAN0_SIG_GS2_error_insulation indicates an insulation error. CAN0_SIG_GS2_dieTempMCU indicates a violation of the primary MCU die temperature.

The status of contactors and the interlock is represented as a bitfield in BMS1_status_contactors (0: open, 1: closed):

  • Bit[0]: Plus (normal)
  • Bit[1]: Precharge (normal)
  • Bit[2]: Minus (normal)
  • Bit[3]: Plus (charge)
  • Bit[4]: Precharge (charge)
  • Bit[5]: Minus (charge)
  • Bit[6-8]: reserved for future use
  • Bit[9]: Interlock status
  • Bit[10-15]: reserved for future use

Bitfield CAN0_SIG_GS2_lowCoinCellVolt displays the coin cell status.

  • Bit[0]: Coin cell voltage low: swap battery in the near future
  • Bit[1]: Coin cell voltage critically low: swap battery as soon as possible

CAN0_SIG_GS2_error_openWire is set to 1 if an open voltage sense wire is detected. Bitfield CAN0_SIG_GS2_fuse_state indicates the fuse state (0: fuse intact, 1: fuse tripped):

  • Bit[0]: Fuse state normal path
  • Bit[1]: Fuse/Contactor state normal path
  • Bit[2]: Fuse state charge path
  • Bit[3]: Fuse/Contactor state charge path

A problem with the daisy-chain communication is indicated with bitfield CAN0_SIG_GS2_daisyChain (0: no error, 1: error)

  • Bit[0]: spi error
  • Bit[1]: ltc PEC error
  • Bit[2]: multiplexer error

Message: CAN_MSG_SlaveState_0 Message ID: 0x115 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_SS0_states 0 64 for future use (not implemented yet)  
Message: CAN_MSG_SlaveState_1 Message ID: 0x116 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_SS1_states 0 64 for future use (not implemented yet)

This messages indicate any errors with the foxBMS Slave Units but this functionality is currently not supported.


Message: CAN0_RecOperatingCurrent Message ID: 0x130 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_RecChargeCurrent 0 16 0.0 6553.5 0.1 0.0 A Intel
CAN0_SIG_RecChargeCurrent_Peak 16 16 0.0 6553.5 0.1 0.0 A Intel
CAN0_SIG_RecDischargeCurrent 32 16 0.0 6553.5 0.1 0.0 A Intel
CAN0_SIG_RecDischargeCurrent_Peak 48 16 0.0 6553.5 0.1 0.0 A Intel

The recommended current capability of the battery system is indicated by the signals of the previous table. For both discharge and charge directions, two values are stated, one for the continuous current capability and one for the peak current capability. Currently, the peak value is simply the same as the continuous value. The resolution of the values is 0.1A, which should be of sufficient granularity for most applications. It is a tradeoff that enables a range up to 6553.5A in charge and discharge direction with reasonable resolution.


Note

This feature is currently not supported!

Message: CAN0_MSG_SOP Message ID: 0x131 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_MaxChargePower 0 16 0.0 6553.5 0.1 0.0 kW Intel
CAN0_SIG_MaxChargePower_Peak 16 16 0.0 6553.5 0.1 0.0 kW Intel
CAN0_SIG_MaxDischargePower 32 16 0.0 6553.5 0.1 0.0 kW Intel
CAN0_SIG_MaxDischargePower_Peak 48 16 0.0 6553.5 0.1 0.0 kW Intel

The power capability of the battery system is indicated by the signals of the previous table. For both discharge and charge directions, two values are stated, one for the continuous power capability and one for the peak power capability. Currently, the peak value is simply the same as the continuous value. The resolution of the values is 100W, which should be of sufficient granularity for most applications. It is a tradeoff that enables a range up to 6553.5kW in charge and discharge direction with reasonable resolution.

Note

This feature is currently not supported!


Message: CAN0_MSG_SOC Message ID: 0x140 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_SOC_mean 0 16 0.0 100.0 0.01 0.0 % Intel
CAN0_SIG_SOC_min 16 16 0.0 100.0 0.01 0.0 % Intel
CAN0_SIG_SOC_max 32 16 0.0 100.0 0.01 0.0 % Intel
CAN0_SIG_SOC_max 48 16 currently not used

Once initialized, CAN0_SIG_SOC_mean, CAN0_SIG_SOC_min, CAN0_SIG_SOC_max the values are updated via Coulomb counting. The values can be initialized either with a look-up table or by setting the values directly.


Message: CAN0_MSG_SOH Message ID: 0x150 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder

This message is currently not backed up with information and provided for forward-compatibility only.


Message: CAN0_MSG_SOE Message ID: 0x160 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder

This message is currently not backed up with information and provided for forward-compatibility only.


Message: CAN_MinMaxCellVoltages Message ID: 0x170 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Cellvolt_mean 0 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Cellvolt_min 16 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Cellvolt_max 32 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_ModNumber_volt_min 48 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_ModNumber_volt_max 56 8 0.0 255 1.0 0.0 none Intel

The minimum, maximum and mean voltage are transmitted in the signals CAN0_SIG_Cellvolt_min, CAN0_SIG_Cellvolt_max and CAN0_SIG_Cellvolt_mean. Additionally, the number of the module with minimum and maximum voltage is indicated in the signals CAN0_SIG_ModNumber_volt_min and CAN0_SIG_ModNumber_volt_max. Indexing of module numbers starts from zero.


Message: CAN0_MSG_SOV Message ID: 0x171 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder

This message is currently not backed up with information and provided for forward-compatibility only.


Message: CAN0_MinMaxCellTemperatures Message ID: 0x180 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Celltemp_mean 0 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Celltemp_min 16 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Celltemp_max 32 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_ModNumber_temp_min 48 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_ModNumber_temp_max 56 8 0.0 255 1.0 0.0 none Intel

The minimum, maximum and mean temperature are transmitted in the signals CAN0_SIG_Celltemp_min, CAN0_SIG_Celltemp_max and CAN0_SIG_Celltemp_mean, respectively. Additionally, the number of the module with minimum and maximum temperature is indicated in the signals CAN0_SIG_ModNumber_temp_min and CAN0_SIG_ModNumber_temp_max, respectively. Indexing of module numbers starts from zero.


Message: CAN0_Tempering Message ID: 0x190 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_CoolingNeeded 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_HeatingNeeded 8 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_TemperingDemand 16 32 0.0 0xFFFFFFFF 1.0 0.0 none Intel

The signals CAN0_SIG_CoolingNeeded, CAN0_SIG_HeatingNeeded and CAN0_SIG_TemperingDemand are left free for use for application specific development. Here, CAN0_SIG_CoolingNeeded and CAN0_SIG_HeatingNeeded could be simple ON/OFF flags and CAN0_SIG_TemperingDemand could be a ‘continuous’ value indicating the needed cooling/heating power.


Message: CAN0_Insulation Message ID: 0x1A0 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_InsulationStatus 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_InsulationValue 8 16 0.0 65535 1.0 0.0 none Intel

The signal CAN0_SIG_InsulationStatus indicates if the insulation value is greater than the threshold value and CAN0_SIG_InsulationValue holds the measured insulation value by the insulation monitoring device.


Message: CAN0_MovAveragePower_0 Message ID: 0x1D0 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_MovAverage_Power_1s 0 32 -2500000 4292467295 1.0 -2500000 W Intel
CAN0_SIG_MovAverage_Power_5s 32 32 -2500000 4292467295 1.0 -2500000 W Intel
Message: CAN0_MovAveragePower_1 Message ID: 0x1D1 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_MovAverage_Power_10s 0 32 -2500000 4292467295 1.0 -2500000 W Intel
CAN0_SIG_MovAverage_Power_30s 32 32 -2500000 4292467295 1.0 -2500000 W Intel
Message: CAN0_MovAveragePower_2 Message ID: 0x1D2 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_MovAverage_Power_60s 0 32 -2500000 4292467295 1.0 -2500000 W Intel
CAN0_SIG_MovAverage_Power_config 32 32 -2500000 4292467295 1.0 -2500000 W Intel

The messages CAN0_MovAveragePower_0, CAN0_MovAveragePower_1 and CAN0_MovAveragePower_2 provide moving average values over the different time frames 1s, 5s, 10s, 30s and 60s. The signal CAN0_SIG_MovAverage_Power_config can be configured to an arbitrary duration. The default configuration is 3 seconds.


Message: CAN0_MovAverageCurrent_0 Message ID: 0x1E0 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_MovAverage_Current_1s 0 32 -2500000 4292467295 1.0 -2500000 mA Intel
CAN0_SIG_MovAverage_Current_5s 32 32 -2500000 4292467295 1.0 -2500000 mA Intel
Message: CAN0_MovAverageCurrent_1 Message ID: 0x1E1 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_MovAverage_Current_10s 0 32 -2500000 4292467295 1.0 -2500000 mA Intel
CAN0_SIG_MovAverage_Current_30s 32 32 -2500000 4292467295 1.0 -2500000 mA Intel
Message: CAN0_MovAverageCurrent_2 Message ID: 0x1E2 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_MovAverage_Current_60s 0 32 -2500000 4292467295 1.0 -2500000 mA Intel
CAN0_SIG_MovAverage_Current_config 32 32 -2500000 4292467295 1.0 -2500000 mA Intel

The messages CAN0_MovAverageCurrent_0, CAN0_MovAverageCurrent_1 and CAN0_MovAverageCurrent_2 provide moving mean values over the different time frames 1s, 5s, 10s, 30s and 60s. The signal CAN0_SIG_MovAverage_Current_config can be configured to an arbitrary duration. The default configuration is 3 seconds.


Message: CAN0_PackVoltage Message ID: 0x1F0 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_PackVolt_Battery 0 32 0.0 4294967295 1.0 0.0 none Intel
CAN0_SIG_PackVolt_PowerNet 32 32 0.0 4294967295 1.0 0.0 none Intel

The signal CAN0_SIG_PackVolt_Battery provides the measured battery pack voltage (V0 Sense) from the current sensor between Battery MINUS and Battery PLUS. CAN0_SIG_PackVolt_PowerNet contains the power net voltage measured between Battery MINUS and Load PLUS (V2 Sense). See Fig. 6.4 for a detailed BJB block diagram.


Message: CAN0_Cell_voltage_M0_0 Message ID: 0x200 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Mod0_volt_valid_0_2 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_Mod0_volt_0 8 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Mod0_volt_1 24 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Mod0_volt_2 40 16 0.0 65535 1.0 0.0 mV Intel
Message: CAN0_Cell_voltage_M0_1 Message ID: 0x201 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Mod0_volt_valid_3_5 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_Mod0_volt_3 8 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Mod0_volt_4 24 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Mod0_volt_5 40 16 0.0 65535 1.0 0.0 mV Intel
Message: CAN0_Cell_voltage_M0_2 Message ID: 0x202 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Mod0_volt_valid_6_8 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_Mod0_volt_6 8 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Mod0_volt_7 24 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Mod0_volt_8 40 16 0.0 65535 1.0 0.0 mV Intel
Message: CAN0_Cell_voltage_M0_3 Message ID: 0x203 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Mod0_volt_valid_9_11 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_Mod0_volt_9 8 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Mod0_volt_10 24 16 0.0 65535 1.0 0.0 mV Intel
CAN0_SIG_Mod0_volt_11 40 16 0.0 65535 1.0 0.0 mV Intel

Three cell voltages are transmitted within one CAN message. The signal CAN0_SIG_Modx_volt_valid_x_x contains three valid flags (bit 0, 1 and 2) for the voltages transmitted in the same messages. 0 –> valid cell voltage, 1 –> invalid cell voltage. Signal CAN0_SIG_Mod0_volt_valid_6_8 for example indicates valid cell voltages with

  • bit[0]: Module 0 cell voltage 6
  • bit[0]: Module 0 cell voltage 7
  • bit[0]: Module 0 cell voltage 8

Currently, the valid signals are not backed up with information and provided for forward-compatibility only. Therefore the flags always indicate valid cell voltages.


Message: CAN0_Cell_temperature_M0_0 Message ID: 0x210 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Mod0_temp_valid_0_2 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_Mod0_temp_0 8 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Mod0_temp_1 24 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Mod0_temp_2 40 16 -128.0 527.35 0.01 -128.0 °C Intel
Message: CAN0_Cell_temperature_M0_1 Message ID: 0x211 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Mod0_temp_valid_3_5 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_Mod0_temp_3 8 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Mod0_temp_4 24 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Mod0_temp_5 40 16 -128.0 527.35 0.01 -128.0 °C Intel
Message: CAN0_Cell_temperature_M0_2 Message ID: 0x212 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Mod0_temp_valid_6_8 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_Mod0_temp_6 8 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Mod0_temp_7 24 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Mod0_temp_8 40 16 -128.0 527.35 0.01 -128.0 °C Intel
Message: CAN0_Cell_temperature_M0_3 Message ID: 0x213 DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_Mod0_temp_valid_9_11 0 8 0.0 255 1.0 0.0 none Intel
CAN0_SIG_Mod0_temp_9 8 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Mod0_temp_10 24 16 -128.0 527.35 0.01 -128.0 °C Intel
CAN0_SIG_Mod0_temp_11 40 16 -128.0 527.35 0.01 -128.0 °C Intel

Three cell temperatures are transmitted within one CAN message. The signal CAN0_SIG_Modx_temp_valid_x_x contains three valid flags (bit 0, 1 and 2) for the temperatures transmitted in the same messages. 0 –> valid temperature, 1 –> invalid temperature. Signal CAN0_SIG_Mod0_temp_valid_6_8 for example indicates valid cell temperatures with

  • bit[0]: Module 0 cell temperature 6
  • bit[0]: Module 0 cell temperature 7
  • bit[0]: Module 0 cell temperature 8

Currently, the valid signals are not backed up with information and provided for forward-compatibility only. Therefore the flags always indicate valid cell voltages.


Message: CAN0_MSG_ISENS_TRIG Message ID: 0x35B DLC: 8            
Signal name Start bit Bit length Min Max Factor Offset Unit Byteorder
CAN0_SIG_ISA_Trigger 0 32 0.0 0xFFFFFFFF 1.0 0.0 none Intel

ISENS_Trigger is set to 0x31FFFF and sent via CAN bus to trigger a current sensor measurement cycle. This is the command of the Isabellenhütte sensor to trigger a measurement of all internal measurement channels when the sensor is not configured in cyclic mode.