ZyAura ZG09 User Manual Download Page 6

ZG09 CO

Module

 

                                                                                       

 

 

  http://www.ZyAura.com 

REV. 082018 

Commend for data returning 0103 0201 F8B8 56 

ID 

(1 Byte) 

Function Code 

(1 Byte) 

Length 

(1 Byte) 

data 

(N Bytes) 

CRC 

(2 Bytes) 

Note 

(1) FAH 

03H 

02H 

01ACH 

5C7DH 

428ppm 

(2) FEH 

04H 

02H 

0197H 

ED1AH 

407ppm 

Data length for Receiving =Length for Sending x 2 
CO

2

 value is 0x01ACH = 428ppm, 0x0197=407ppm 

 

CRC Code 

unsigned int Crc16(unsigned char * data, unsigned char length) 

 

int 

j; 

 

unsigned int reg_crc=0xFFFF; 

 

while(length--) 

 

 

 

reg_crc 

^= *data++; 

 

 

for(j=0;j<8;j++) 

 

 

 

 

 

if(reg_crc & 0x01) /* LSB(b0)=1  */ 

 

 

 

 

reg_crc=reg_crc 

>>1  ^ 0xA001; 

 

 

 

else 

 

 

 

 

reg_crc=reg_crc 

>>1; 

 

 

 

 

return reg_crc; 

 

CRC Code (Lookup Table) 

unsigned int Crc(unsigned char *ucTx, unsigned int Len) 

if    (Len && ucTx) 

 

    { 

 

    unsigned char *ucPtr=ucTx; 

 

    unsigned char ucCRCHi = 0xff; 

 

    unsigned char ucCRCLo = 0xff; 

 

    unsigned uIndex; 

 

    while(Len--) 

 

 

 

 

uIndex = ucCRCHi ^ *ucPtr++; 

 

 

ucCRCHi = ucCRCLo ^ ucCRCHigh[uIndex]; 

 

 

ucCRCLo = ucCRCLow[uIndex]; 

 

 

 

    return (unsigned int)(ucCRCLo << 8) | (unsigned int)ucCRCHi; 

 

    } 

 

else 

 

    return 0; 

 

unsigned char ucCRCHigh[] =   

 

0x00,0xc1,0x81,0x40,0x01,0xc0,0x80,0x41,0x01,0xc0,0x80,0x41,0x00,0xc1,0x81, 

 

0x40,0x01,0xc0,0x80,0x41,0x00,0xc1,0x81,0x40,0x00,0xc1,0x81,0x40,0x01,0xc0, 

 

0x80,0x41,0x01,0xc0,0x80,0x41,0x00,0xc1,0x81,0x40,0x00,0xc1,0x81,0x40,0x01, 

 

0xc0,0x80,0x41,0x00,0xc1,0x81,0x40,0x01,0xc0,0x80,0x41,0x01,0xc0,0x80,0x41, 

 

0x00,0xc1,0x81,0x40,0x01,0xc0,0x80,0x41,0x00,0xc1,0x81,0x40,0x00,0xc1,0x81, 

 

0x40,0x01,0xc0,0x80,0x41,0x00,0xc1,0x81,0x40,0x01,0xc0,0x80,0x41,0x01,0xc0, 

 

0x80,0x41,0x00,0xc1,0x81,0x40,0x00,0xc1,0x81,0x40,0x01,0xc0,0x80,0x41,0x01, 

Summary of Contents for ZG09

Page 1: ...ZG09 CO2 Module http www ZyAura com REV 082018 ZG09 CO2 Module User Manual...

Page 2: ...a com REV 082018 Contents 1 GENERAL DESCRIPTION 3 2 FEATURES OF DESIGN 3 3 SPECIFICATION 3 4 UART 5 5 RS485 COMMUNICATION 7 6 I2C COMMUNICATION 7 7 PWM OUTPUT 7 8 DAV OUTPUT 8 9 RELIABILITY 8 10 RESPO...

Page 3: ...rsive infrared sensor The diffusion and sampling method are both available Measurement range 0 10 000ppm Output interface UART RS485 I2C PWM DAC 3 Specification Communication UART 3 3V level Modbus RT...

Page 4: ...dule External Drawing Note The dimensions in this drawing are for reference only Pin Configuration Pin Function PWM CO2 ppm PWM output DAO DAC output G Ground 5V Power input 5V SDA I2C Data pin SCL I2...

Page 5: ...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...

Page 6: ...d int Len if Len ucTx unsigned char ucPtr ucTx unsigned char ucCRCHi 0xff unsigned char ucCRCLo 0xff unsigned uIndex while Len uIndex ucCRCHi ucPtr ucCRCHi ucCRCLo ucCRCHigh uIndex ucCRCLo ucCRCLow uI...

Page 7: ...d1 0xd0 0x10 0xf0 0x30 0x31 0xf1 0x33 0xf3 0xf2 0x32 0x36 0xf6 0xf7 0x37 0xf5 0x35 0x34 0xf4 0x3c 0xfc 0xfd 0x3d 0xff 0x3f 0x3e 0xfe 0xfa 0x3a 0x3b 0xfb 0x39 0xf9 0xf8 0x38 0x28 0xe8 0xe9 0x29 0xeb 0x...

Page 8: ...ppm adjustable Note 2 For planting the alarm setting is AL1 AL2 The CO2 generator will be activated when the CO2concentration is lower than AL2 400ppm adjustable The CO2 generator will be inactivated...

Page 9: ...ltage drops to 4 5V Figure 6 10 Response Time It shows how much time is needed for CO2 monitor to reach the 90 response to step change Test methods 1 putting the monitor in the environment at 1 000ppm...

Reviews: