
ZG09 CO
2
Module
http://www.ZyAura.com
REV. 082018
4. UART
UART default:
BPS: 19200
Data Bit: 8
Parity bit: None
Stop bit: 1
Protocol:
The protocol for ZG09 UART is Modbus RTU, commends are for sending and receiving:
Send
ID
(1 Byte)
Function Code
(1 Byte)
Start
(2 Bytes)
Length
(2 Bytes)
CRC
(2 Bytes)
FEH
03H
0000H (Note 1)
0003H
XXXX
Receive
ID
(1 Byte)
Function Code
(1 Byte)
Length
(1 Byte)
data
(N Bytes)
CRC
(2 Bytes)
FEH
03H
06H (Note 2)
6 * 8 bit (Note 3)
XXXX
Note 1: Start = Start address for getting data. i.e. CO
2
value = 0x0B
Note 2: The length of Data
Note 3: Data length for Receiving = Length for Sending x 2
ID
The user can define the ID code of the device. The factory default is 0x01, 0xFA and 0xFE reserved for broadcast commands.
Function Code
0x03 Read
0x06 Write
Start
Start
Read / Write
Description
00(0x00) : SlaveID
R/W
ID: The factory default is 0x01.
250 (0xFA) and 254 (0xFE) are reserved for broadcast and
cannot be adjusted.
01(0x01) : BPS
R/W
Baud rate setting (settings will be applied after reset or repower)
0x00 : 9600
0x01 : 19200 (default)
0x02 : 38400
0x03 : 57600
02(0x02) : Uart Parity Set
R/W
Uart Parity setting (settings will be applied after reset or repower)
0x00:n82
0x01:n81 (default)
0x02:e81
0x03:o81
11(0x0B) : CO
2
Value
R
CO
2
concentration reading in units of ppm.
Example for getting CO
2
data:
Send the command, FA03 000B 0001 E043, to 250(0xFA) with the broadcast method.
The sensor is addressed as “Any address” (0xFE or 0xFA).
ID
(1 Byte)
Function Code
(1 Byte)
Start
(2 Bytes)
Length
(2 Bytes)
CRC
(2 Bytes)
Note
(1) FAH
03H
000BH
0001H
E043H
(2) FEH
04H
0003H
0001H
D5C5H