1.2.2 LiBat Canbus v1.0 Data Frames

This section explains how to communicate with canbus line. There are specific opcodes to parse data properly. User should parse every canbus frame with matching corresponding frame description below.

Note

Pay your attention about value type and data packet descriptions. User may check the communication with 3rd party tools. (e.g. Busmaster)

Type Name Version Release Date Link

ZIP Archive
Busmaster, CANBus DBF file r0.1 2022-01-07 17:00 Download

ZIP Archive
BUSMASTER Software v3.2.2 2017-10-30 Download

1.2.2.1. Hello Packet (0x01)

This command can be used as heartbeat or handshake. Device responds with same frame when requested.

Table.1.2.2.1: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x01 1 0 0

Table.1.2.2.2: Response

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x01 1 0 0

1.2.2.2 Battery Pack Status (0x02)

Live status of the battery pack.

Table.1.2.2.3: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x02 1 0 0

Table.1.2.2.4: Response

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC Data
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x02 1 0 1 1 byte

Table.1.2.2.5: DATA Field Description:

Field Value Type Value Name Description
0 uint8 SOC State of charge of the battery percentage.

1.2.2.3. Overall Pack Voltages (0x03)

Summarized pack voltages for quick check.

Table.1.2.2.6: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x03 1 0 0

Table.1.2.2.7: Response

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC Data
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x03 1 0 5 5 bytes

Table.1.2.2.8: DATA Field Description:

Field Value Type Value Name Description
0 uint8 Min. Cell Voltage Minimum cell voltage in pack. 10mV steps in 2.0V basis.
1 uint8 Max. Cell Voltage Maximum cell voltage in pack. 10mV steps in 2.0V basis.
2 uint8 Cell Voltage Delta Difference between max. and min. cell voltages. Multiples of 10mV.
[3:4] uint16 Total Pack Voltage Total battery pack voltage. Multiples of 100mV.

1.2.2.4. Overall Pack Currents (0x04)

Battery pack current value and power path status.

Table.1.2.2.9: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x04 1 0 0

Table.1.2.2.10: Response

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC Data
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x04 1 0 6 6 bytes

Table.1.2.2.11: DATA Field Description:

Field Value Type Value Name Description
[0:3] int32 Current Current of the pack. Multiples of 10mA.
4 uint8 Charge FET Status 0: Disabled, 1: Enabled
5 uint8 Discharge FET Status 0: Disabled, 1: Enabled

1.2.2.5. Power And Energy (0x05)

Battery pack power and energy values.

Table.1.2.2.12: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x05 1 0 0

Table.1.2.2.13: Response

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC Data
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x05 1 0 8 8 bytes

Table.1.2.2.14: DATA Field Description:

Field Value Type Value Name Description
[0:3] int32 Power Instantaneous power of the pack. Multiples of 100mW.
[4:7] uint32 Energy Net energy inside battery pack. Multiples of 100mAh.

1.2.2.6. Pack Overall Temperatures (0x06)

Summarized pack temperatures for quick check.

Table.1.2.2.15: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x06 1 0 0

Table.1.2.2.16: Response

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC Data
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x06 1 0 8 8 bytes

Table.1.2.2.17: DATA Field Description:

Field Value Type Value Name Description
[0:1] int16 Min. Temperature Minimum temperature measurement value. Multiples of 0.1°. Signed.
[2:3] int16 Max. Temperature Maximum temperature measurement value. Multiples of 0.1°. Signed.
[4:5] uint16 Temperature Delta Difference between maxium and minimum measured temperature value. Multiples of 0.1°
[6:7] int16 Mean Temperature Mean value of all measured temperatures. Multiples of 0.1°. Signed

1.2.2.7. Individual Cell Voltage (0x07)

Requesting individual cell voltages for detailed check.

Table.1.2.2.18: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC DATA
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x06 1 0 1 1 Byte

Table.1.2.2.19: DATA Field Description

Field Value Type Value Name Description
0 uint8 Cell Number Requested cell number. Value between 1 and 18

Table.1.2.2.20: Response

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC Data
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x06 1 0 1 1 byte

Table.1.2.2.21: DATA Field Description:

Field Value Type Value Name Description
0 uint8 Cell Voltage Requested cell's voltage. Multiples of 10mV in 2.0V basis. If requested cell number (N) is greater than number of cells connected to the BMS, this field reads 0xFF.

1.2.2.8. Broadcast Cell Voltages (0x08)

When the BMS receives request frame, it starts sending battery pack's all cell voltage values. Each master and slave BMS modules has its own designated frame ID. Each BMS module may contain up to 18 connected cell. Therefore each BMS module may have up to 3 broadcast frame according to connected cell number. Refer the Table.1.3.25

Table.1.2.2.22: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x08 1 0 0

Table.1.2.2.23: Response

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC Data
BASE Add. (MSB) BASE Add. (LSB) 0x00 OPCODE 1 0 N N bytes

Table.1.2.2.24: DATA Field Description

Field Value Type Value Name Description
[0 ... 7] uint8 Cell Voltage Cell voltage. Multiples of 10mV in 2.0V basis. If one cell is not connected, related bytes and frames are omitted.

Table.1.2.2.25: OPCODE Field Description

Module ID Cell Numbers Opcode
0 [0:7] 0x08
0 [8:15] 0x09
0 [16:17] 0x0A
1 [0:7] 0x0B
1 [8:15] 0x0C
1 [16:17] 0x0D
... ... ...
15 [8:15] 0x3C
15 [16:17] 0x3D

1.2.2.9. Broadcast Temperatures (0x40)

Send all temperature sensor results. Unconnected sensors reads -99999 and unsupported inputs reads 0. Each master and slave BMS modules has its own designated frame ID. Each BMS module may contain up to 5 connected sensor. Therefore each BMS may have up to 2 broadcast frame.

Table.1.2.2.26: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x40 1 0 0

Table.1.2.2.27: Response

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC Data
BASE Add. (MSB) BASE Add. (LSB) 0x00 OPCODE 1 0 N N bytes

Table.1.2.2.28: DATA Field Description:

Field Value Type Value Name Description
[0:1] int16 Sensor Result Temperature measured on sensor. Multiples of 0.1°. Signed.
[2:3] int16 Sensor Result Temperature measured on sensor. Multiples of 0.1°. Signed.
[4:5] int16 Sensor Result Temperature measured on sensor. Multiples of 0.1°. Signed.
[6:7] int16 Sensor Result Temperature measured on sensor. Multiples of 0.1°. Signed.

Table.1.2.2.29: OPCODE Field Description

Module ID Temperature Sensor Number Opcode
0 [0:7] 0x40
0 [8:9] 0x41
1 [0:7] 0x42
1 [8:9] 0x43
... ... ...
15 [0:7] 0x7A
15 [8:9] 0x7B

1.2.2.10. Sleep Enterance (0x70)

Put system into sleep. After sending this command, system will go to sleep and waits for wake up conditions. Any canbus message will wake up the board. After wake up, a system reset executes and will be ready to use after a few seconds.

Table.1.2.2.30: Request

Byte 4 (MSB) Byte 3 Byte 2 Byte 1 (LSB) Ext. ID RTR DLC Data
BASE Add. (MSB) BASE Add. (LSB) 0x00 0x70 1 0 0 4 bytes

Table.1.2.2.31: DATA Field Description:

Field Value Type Value Name Description
[0] uint8 Fixed Value 0x11
[1] uint8 Fixed Value 0x22
[2] uint8 Fixed Value 0x33
[3] uint8 Fixed Value 0x44