PYLON LFP Battery Communication Protocol - RS485 V2.8 20161216
PYLON LFP Battery Communication Protocol - RS485 V2.8 20161216
PYLON LFP Battery Communication Protocol - RS485 V2.8 20161216
protocol - RS485
V2.8
Contents
V2.8................................................................................................................................................... 1
CID1code table ..................................................................................................................................... 7
CID2code table ..................................................................................................................................... 7
2
Change record
20081120 Original version V2.2
3
20160820 1.Add command “Get charge/discharge V2.6
management information” and “get Series
Number Information”
Note: *1. If RS485 be in network form, all equipment are as slaves. The address of the host
starts from 2.
4
1. Communication requirement
According to the requirement of communication standard technical report
<Communication backup lithium iron battery Pack>storage battery provide the items of
communication equipment or analog device see table 1(include the communication items of
storage battery and upper computer)and live monitor
Alarm data Charge over voltage alarm and protect of the pack; Charge current
alarm and protect of the pack; Charge under voltage alarm and protect
of the pack; Polarity transposition alarm and protect of the pack;
Charge over current alarm and protect of the pack; High temperature
alarm and protect of the pack; Environment temperature alarm and
protect of the pack; Under capacity alarm and protect of the pack;
temperature sensor fail alarm of the pack; voltage sensor fail alarm of
the pack; current sensor fail alarm of the pack; High temperature alarm
and protect of cell; Charge over voltage alarm and protect of cell;
Discharge under voltage alarm and protect of cell; Charge over current
alarm and protect of cell
2. Communication protocol
It defines the communication protocol in detail in <Communication protocol of front-end smart
devices>, according to the practical application and characteristic, the protocol (B.12) give a
specific definition of the SM and SO(Master Smart Pack).
Standard data format is the requirement in the protocol.
Communication protocol and command follow 7,8.9,10 rules
The protocol released under B.12 data protocol
2.1. Communication Interface and Transmission Rate
Communication Interface of Intelligent device should proved asynchronous serial communication
mode. Asynchronous Serial Communication Interface and Transmission Rate have:
RS-485: 115.2kb/s, 500kb/s or 9.6kb/s;
Communication Interface Format: Start Bit (1bit), Data Bit (8bit), Stop Bit (1bit), without parity.
Remark
VER – see the specification of each protocol
ADR – different address for each battery,support a maximum of 254 batteries
the description of INFOinclude COMMAND_INFO& DATA_INFO
COMMAND_INFO include several forms
COMMAND_INFO include in command information, the content(see table A3) is a combination
of one or several types.
Table A3 COMMAND_INFO
6
1 byte Different remote control order or different control
COMMAND_TYPE command in history data transmission
Table A4 DATA_INFO
Table A5 DATA_FLAG
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bi1t Bit0
No.
0 0 0 0 1 0 0 0 0 1
Calculator the sum of all characters in ASCII value, except for SIO,EOI and CHKSUM, Take
modulus 65536,and inverse the remainder ,plus 1.
For example:
Received or Sent character sequence is "~1203400456ABCEFEFC72\R"("~"is SOI,"CR"is
EOI),the "FC72" in last 5 characters "FC72\R" is CHKSUM, Calculaiton method is: '1' + '2' +
'0'+ ... + 'F' + 'E' = 31H + 32H + 30H + ... + 46H + 45H = 038EHtake modulus 65536 of
038EH, the remainder is 038EH, do a bitwise invert of the remainder ,and plus 1, the result is
FC72H
2.8 SmartPack
Each SmartPack manage M series Cellswhich can detect the voltage of each Cell and
currentmanage N temperature sensorshandle the safety protection of voltage, current,and
temperatureAll protection parameters are stored in EEPROM. A group can contain up to
16 Smart Packs.
Use RS485 bus and all SmartPack communication.
The default communication rate is 115200BPS.
CID2encoding table
No. content CID2 Remark
1 Get analog valuefixed-point 42H
number
2 Get alarm data 44H
3 Get system parameterfixed-point 47H
number
4 Get communication protocol version 4FH
9
6 Command format error 05H
7 Invalid data 06H *1
8 ADR error 90H User-defined
9 Communication error 91H User-defined*2
note*1 INFO data is invalidation.
*2 communication error: SM can get one Slave Pack data the communication
between Master Pack amd Slave Pack is wrong.
3 Communication command
3.1 Get protocol version
Command information
No. 1 2 3 4 5 6 7 8 9
byte 1 1 1 1 1 2 LENID/ 2 1
2
forma SOI VER ADR 46H 4FH LENGT INFO CHKSUM EOI
noteVER is arbitrary number LENID = 00H
response information
No. 1 2 3 4 5 6 7 8 9
byte 1 1 1 1 1 2 LENID/2 2 1
format SOI VER ADR 46H RTN LENGTH INFO CHKSUM EOI
noteSO does not check the VER when the command is coming
in response informationVER is versionV2.1 is transferred as 21H
No. 1 2 3 4 5 6 7 8 9
10
byte 1 1 1 1 1 2 LENID/ 2 1
2
Form SOI VER ADR 46H 51H LENGT INFO CHKSUM EOI
NoteLENID = 0
Response information
No. 1 2 3 4 5 6 7 8 9
byte 1 1 1 1 1 2 LENID/2 2 1
format SOI VER ADR 46H RTN LENGTH INFO CHKSUM EOI
NoteLENID = 40H
DATAINFO
No. 1 2 3 4 5 6 7 8 9
byte 1 1 1 1 1 2 LENID/ 2 1
2
Form SOI VER ADR 46H 42H LENGTH INFO CHKSU EOI
NoteLEDID = 02H INFO is 1byte Command
Command = 0xFF get the data of all Pack
Command = 0x01 get the data of Pack1
……
Command = 0x08 get the data of Pack8
Response information
No. 1 2 3 4 5 6 7 8 9
11
byte 1 1 1 1 1 2 LENID/ 2 1
2
Form SOI VER ADR 46H RTN LENGT INFO CHKSUM EOI
12
Note INFO contains INFOFLAG and DATAI
+#9 SOI VER ADR 46H 47H LENGTH INFO CHKSUM EOI
(#)LENID = 0
13
response data
No. 1 2 3 4 5 6 7 8 9
Byte 1 1 1 1 1 2 LENID/2 2 1
format SOI VER ADR 46H RTN LENGTH INFO CHKSUM EOI
Note)INFO contains INFOFLAG and DATAI
DATAI data
No. Content DATAI byte
1 Unit cell voltage 2
2 Unit cell low-voltage threshold 2
3 Unit cell under-voltage threshold 2
4 Charge upper-limit temperature 2
5 Charge lower-limit temperature 2
6 Charge lower-limit current 2
7 Upper limit of Total voltage 2
8 Lower limit of total voltage 2
9 Under voltage of total voltage 2
10 Discharge upper-limit temperature 2
11 Discharge lower-limit temperature 2
12 Discharge lower-limit current 2
No 1 2 3 4 5 6 7 8 9
Byt 1 1 1 1 1 2 LENI 2 1
e D/2
for SO VE A 46 44 LENG INFO CHKS EO
note)LEDID = 02H
INFO is one byte=Command)
Command = 0xFF get all Pack dataA
Command = 0x01 get Pack1 data
……
Command = 0x08 get Pack8 data
14
Response data
No 1 2 3 4 5 6 7 8 9
Byt 1 1 1 1 1 2 LENI 2 1
for SO VE AD 46 RT LENG INFO CHKS EO
note)INFO contains DATAFLAG and WARNSTATE
status2
status3
status4
status5
R#9 SOI VER ADR 46H 9SH LENGTH INFO CHKSUM EOI
(#T LEDID = 02H INFO as one byte, for Command:
Command = 0x01 U
VW
$<'*
$ 99 +#9#
XX
Command = 0x08 U
VY
$<'*
$ 99 +#9#
2 Recommend discharge 2
Voltage Down Limit
3 Maximum Charge Current 2
Z Minimum Discharge Current 2
[ Status W
Status
Bit Description Remark
7 >$ 1) 0)#9
6 %*
$ 1) 0)#9
5 >$ 99' 1) 0)#9
4
3
2
1
0
@ 1 1 1 1 1 2 LENID/2 2 1
R#9 SOI VER ADR 46H 93H LENGTH INFO CHKSUM EOI
(#T LEDID = 02H INFO as one byte, as CommandT
Command = 0x01 get Pack1 SN information
XX
Command = 0x08 get Pack8 SN information
>#*;#' ,+#9#
(# 1 2 3 4 5 6 7 8 9
@ 1 1 1 1 1 2 LENID/2 2 1
R#9 SOI VER ADR 46H RTN LENGTH INFO CHKSUM EOI
(#T ,(R= ' *
#*&' ( ,+#9#?
18
>#*;#' ( ,+#9#
(# ># 09V
1 ( W8
(#T ( 3 >,,
#'1 W8 1 7 ;?
R#9 SOI VER ADR 46H 94H LENGTH INFO CHKSUM EOI
(#T LENID=12H, INFO is 9 byte, consisted with “Command” and “DataF”.
Command = 0xff not support
Command = 0x01 setup the charge/discharge management information of Pack1
XX
Command = 0x08 setup the charge/discharge management information of Pack8
Remark: The content of Command should be same as ADR.
0*;#* ,+#9#
(# 1 2 3 4 5 6 7 8 9
@ 1 1 1 1 1 2 LENID/2 2 1
R#9 SOI VER ADR 46H RTN LENGTH INFO CHKSUM EOI
(#T LENID 6 \
DataF Information
(# ># 09V
1 Recommend Charge Voltage Up 2 Byte
Limit
2 Recommend discharge Voltage Down 2
Limit
3 Maximum Charge Current 2
Z Minimum Discharge Current 2
(#T When you need to manually set charge/discharge management information, send
this command periodically, if the battery does not receive this command again 10 seconds,
the battery is automatically set charging and discharging management information according
to the current conditions.
Do not use this command until the PYLON's proposed value for current is specified.
R#9 SOI VER ADR 46H 95H LENGTH INFO CHKSUM EOI
(#T LENID=02H, INFO is 1 byte, consisted with Command
Command = 0xff not support
Command = 0x01 PackW turn off
X
Command = 0x08 Pack8 turn off
Remark: The content of Command should be same as ADR.
0*;#* ,+#9#
(# 1 2 3 4 5 6 7 8 9
@ 1 1 1 1 1 2 LENID/2 2 1
R#9 SOI VER ADR 46H RTN LENGTH INFO CHKSUM EOI
(#T LENID 6 \
4 Description
Type Parameter Description
Live data Cell voltage mV
Temperature negative temperature value is negativethe
calculation is )the temperature unit in
response data is 0.1Ke.g.25.5] =25.5 * 10 +
2731 = 29860.1K
-12.4] = -12.4 * 10 + 2731 = 26070.1K
Pack voltage mV
Pack remains mAH mAh
Pack total mAH mAh
System Upperlimit voltage of cell mV
parameter Cell low-voltage threshold mVlower-voltage alarm
20
Under voltage of total mVunder voltage proctection
voltage
Discharge upper-limit 0.1K
temperature
Discharge lower-limit 0.1K
temperature
Discharge lower-limit mAsigned numberactual value=passing
current value * 100e.g. -4000mApassing value is
0xFFD8
5 Routine
Get analog quantization data (fixed point type)
Host Commands: 7E 32 30 30 31 34 36 34 32 45 30 30 32 30 31 46 44 33 35 0D
Reply Data: 7E 32 30 30 31 34 36 30 30 43 30 36 45 31 31 30 31 30 46 30 44 34 35 30 44 34 34
30 44 34 35 30 44 34 34 30 44 34 35 30 44 34 34 30 44 33 45 30 44 34 35 30 44 34 41 30 44 34 41
30 44 34 42 30 44 34 41 30 44 34 41 30 44 34 41 30 44 34 41 30 35 30 42 43 33 30 42 43 33 30 42
43 33 30 42 43 44 30 42 43 44 30 30 30 30 43 37 32 35 42 46 36 38 30 32 43 33 35 30 30 30 30 32
45 35 35 33 0D
The corresponding data take out and analysis as follow:
21
XX …… 30 42 43 33 30 42 43 33
30 42 43 44
22