Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
T series Intelligent Toxic Gas sensor Module User Manual
(Rev:V1.1.2 Revision Date:2021-8-9)
1
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
一、Points for attention:
1. Please read the instruction manual carefully before use.
2. Please pay attention to definition of each pin output to avoid damage to sensor.
3. Pump suction type external air tube diameter φ4X6mm.
4. Recommended gas flow rate: 300-600ml/min.
5. Properly store sensor It is recommended to store sensor in a clean environment.
6. Do not place sensor in an environment with gas pollution such as volatile gases.
二、Interface Pins and Definitions:
Name Detail Description
Operate Voltage 3.3-5.5VDC
VCC
(suggest 5V)
VOUT(0.4-2V) Sensor Output Voltage port
RS485 Signal A/
485A/TX
TTL signal sender
RS485 Signal B/
485B/RX
TTL signal receiver
GND Power and signal ground
Note:*RS485 signal and TTL signal are optional. When placing an order, please confirm options you need
with salesperson.
2
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
三、Signal and Interface Selection table:
Air Vent Mode Signal Output Connection Code
Contact Pin GTB
TTL
White Socket GTW
Diffusion Type
Contact Pin G4B
RS485
White Socket G4W
Contact Pin PTB
TTL
White Socket PTW
Pump Priming Type
Contact Pin P4B
RS485
White Socket P4W
Note:*0.4-2V output, all models has these function.
四、Sensor Module Size:
Pump Priming type Size:
3
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
Diffusion type Size:
Appendix:
Communication Protocol:
I、Format:
Adopt general TTL bus, all of the control board is connected to a TTL bus;
Communication is universal asynchronous receiver / transmitter (UART),baud rate 9600, 8
data bits, 1 stop bit, even parity;
A complete message contains an address byte, a command byte, N data bytes and two
check bytes, format is as following:
start address command data check over
4T 1 byte 1 byte N 2 byte 4T
bytes
A、start/end:
send each message frame need more than 3.5 character time (recommended more than
5 characters time) pause interval begins; such as baud rate of 9600, which a character time T
1/9600 * 10 = 1.04ms, therefore when the system detects that the current byte of the byte
interval is greater than about 3.5 T at 3.5ms, automatically the byte as a message frame's
start ( proposed sends two messages frame interval above 5ms );
4
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
When receiving the first byte (address), each device decodes to determine whether
destined for their own. After the last transmitted character, the same at least more than 3.5
character times ( recommend more than 5 character times ) pause interval to indicate the end
of a frame message. A new message can begin after this pause.
The entire message frame must be continuously sent. If there is more than 3.5 character
times pause time before finish frame two bytes, the receiving device flushes the incomplete
message and assumes that the next byte is the address field of a new message
(recommended frames sent between two bytes before the completion of the message in the
same frame two bytes within the interval should be controlled within 1.5 character times).
Likewise, if a new message in front of less than then began receiving device will consider it a
continuation of the previous message in the 3.5 character times. This will result in a
communication error, because the value is definitely wrong when check.
B、Address:
Slave address, a byte, range :1-247 (0xF7). Host will be contacted via the address from
the machine into the address field of the message to the slave strobe. When slave sending
response messages, it put his address in response to the address field in order to let master
know which one device to respond. Address 0 is used as a broadcast address, so that all can
be received from the device.
C、Command:
That command is function code, a byte, range is 1-225. When the message is sent from the
host to the slave, the function code will let salve to know what specific tasks it need to perform.
For a different command, the slave will make different responses; If done correctly, the
nature of the query command, the machine will return a message with the specified information;
If a communication error, the slave will return a code equivalent to the original code , and sets
the most significant bit to "1".
D、Data:
Data range including what you need slave to perform the action or the returned message by
the slave adopted. This information can be a value, the reference address etc. If data range is
multi-byte, then the high byte is first, low byte is later. For different slave, address and data
information are not the same.
Both the concentration value and the ADC value of our company are signed numbers.
Signed numbers use the highest bit to represent the sign (1 for negative, 0 for positive). If it is
5
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
negative, the remaining bits are used to represent the size of the value. For unsigned numbers,
all bits are used to represent the size of the number.
Example: If a signed number is known to be 0xFFFFFFF9, the original code is –7. Because
the sign bit is "1", indicating that it is a negative number, the bit remains unchanged and remains
"1". The remaining bits, 0x7FFFFFF9, are inverted to be 6; add 1, so it is 7.
0xFFFFFFFF means – 1
0xFFFFFFF9 means – 7
0xFFFFBED9 means – 16679
0x000000F9 means 249
0x0000BED9 means 48857
E、Check:
Master or slave can use check code to discriminate whether the receiving information is
wrong; check method is the 16-bit cyclic redundancy code (CRC16), check object includes all
bytes of the message frame (except for the two checksum byte itself) ;
CRC16 contains two-byte, low byte first, high byte later. CRC16 code calculated by the
sending device, placed in the tail of the sent information. The Equipment to receive information
and then recalculate the information received CRC16 code, comparing the calculated CRC16
code whether matches the received, if they do not match, then the error.
C language example which calculated by CRC16 code is as following:
6
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
//CRC16 code directly calculation method
//*pSendBuf first byte:finger
//nEnd: data check length
unsigned int GetCheck(unsigned char *pSendBuf,unsigned char nEnd)
{
unsigned char i,j;
unsigned int wCrc = (unsigned int)(0xffff);
for(i = 0;i<nEnd;i++)
{
wCrc ^= (unsigned int)(pSendBuf[i]);
for(j = 0;j<8;j++)
{
if(wCrc&0x01)
{
wCrc >>=1;
wCrc ^= 0xA001;
}
else wCrc >>=1;
}
}
return wCrc;
}
(II) Instruction:
Instruction set as shown in Table 1
Detailed instruction format is as follows (assuming these salve address are 0x01), the data in
the following table are in hexadecimal.
1、Read Type:
Host send format:
Addre Comma Register Register Register Register Check Check
ss nd address address number number low high
(high 8 (low 8 (high 8 (low 8
bits) bits) bits) bits)
01 03 01 01 00 01 D4 36
Instruction:Read the measurement type of slave with address 01;
The slave return format:
Addres Comma Data Data Data Check Check
s nd lengt high low high low
h
01 03 02 00 01 79 84
Instruction:The measurement type of slave whose address is 01 is 01 (as shown in Table 2,
indicating CO);
7
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
2、Read test range:
Host send format:
Addre Comma Register Register Register Register Check Check
address address number number
ss nd low high
(high 8 (low 8 (high 8 (low 8
bits) bits) bits) bits)
01 03 01 04 00 02 84 36
Instruction:Read the measurement test range of slave with address 01;
Slave return format:
Addre Comma Data Data Data Check Check
ss nd length high low low high
01 03 04 0000 2710 E0 0F
Instruction: (Assume the measurement unit of address 01 slave is 2 as show Table 3,
indicate ppm),decimal 1,then the test range of address 01 slave is
1000.0ppm(0x2710=10000);
Remarks:This command get data must be combined measurement unit and decimal place
two parameter to get the final test range value;
3、Read unit:
Host send format:
Addre Comma Register Register Register Register Check Check
address address number number
ss nd low high
(high 8 (low 8 (high 8 (low 8
bits) bits) bits) bits)
01 03 01 02 00 01 24 36
Instruction: Read the measurement unit of slave with address 01;
Slave return format:
Addre command Data Data Data low Check low Check high
ss length high
01 03 02 00 02 39 85
Instruction:the measurement unit of address 01 slave is 02 (as show Table 3,indicate ppm);
Remarks:This parameter is valid to all concentration value, including measurement range
value, measurement value and each alarm value;
8
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
4、Read decimal place :
Host send format:
Addre Comma Register Register Register Register Check Check
address address number number
ss nd low high
(high 8 (low 8 (high 8 (low 8
bits) bits) bits) bits)
01 03 01 03 00 01 75 F6
instruction:Read decimal number of slave with address 01.
Slave return format:
addre comma Data length Data Data low Check low Check high
ss nd high
01 03 02 00 01 79 84
Instruction:the decimal place of address 01 slave is 1;
Remarks:This parameter is valid to all concentration value, including measurement range
value, measurement value;
5、Change address:
Host send format:
Ad Com Regist Regist Regis Regist Byte Data Data Ch Ch
dre mand er er ter er numb (high (low ec ec
ss addres addres numb numbe ers 8 8 k k
s (high s (low er r (low bits) bits) lo hig
8 bits) 8 bits) (high 8 bits) w h
8 bits)
01 10 00 00 00 01 02 00 02 27 91
Instruction:change slave address 01 to 02;
If change successful, ( new address is valid), the slave return format:
addr com Register Register Register Register Check Check
address address number number
ess mand low high
(high 8 (low 8 (high 8 (low 8
bits) bits) bits) bits)
01 10 00 00 00 01 01 C9
If change failure, will return an exception response( 0x90);
Remark:cannot change new address to broadcast address 00;
9
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
6、Read measurement value:
Host send format:
addre comma Register Register Register Register Check Check
address address number number
ss nd low high
(high 8 (low 8 (high 8 (low 8
bits) bits) bits) bits)
01 03 01 08 00 02 44 35
Instruction: Read measurement concentration value of salve with address 01;
The slave return format:
addre comma Data Data Data Check Check
ss nd length high low low high
01 03 04 0000 04EA 79 7C
Instruction: Assure the measurement unit of address 01 slave is 2 ( see Table 3 , means
ppm), decimal place is 1,then the measurement value of the address 01 slave is
125.8ppm(0x04EA=1258);
remark: Use this command to get data,it must combine two parameters(measurement unit
and decimal place) to get final measurement value.
7、Read ADC value:
Host send format:
addre comma Register Register Register Register Check Check
address address number number
ss nd low high
(high 8 (low 8 (high 8 (low 8
bits) bits) bits) bits)
01 03 01 0A 00 02 E5 F5
Instruction: Read ADC value of salve with address 01;
The slave return format:
addre comma Data Data Data Check Check
ss nd length high low low high
01 03 04 0000 04EA 79 7C
Instruction: ADC value of slave at address 01 is 1258(0x04EA=1258);
10
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
8、Specify serial number of calibration record:
Host send format:
Ad Com Regist Regist Regis Regist Byte Serial Serial Check Check
dre mand er er ter er numb No. No. low high
ss addres addres numb numbe ers (high (low
s (high s (low er r (low 8 8
8 bits) 8 bits) (high 8 bits) bits) bits)
8 bits)
01 10 04 21 00 01 02 00 02 64 E0
Instruction:Select zero calibration record from slave with address 01;
If specify successful, the slave return format:
addr com Register Register Register Register Check Check
address address number number
ess mand low high
(high 8 (low 8 (high 8 (low 8
bits) bits) bits) bits)
01 10 04 21 00 01 50 F3
If change failure, will return an exception response( 0x90);
Remark:calibration record can only be set after using this command to specify the serial
number of calibration record;
Serial number:
0x02:user ZERO
0x0D:user SPAN
9、correct ZERO:
Only after sending function code with specified serial number of calibration record as
user ZERO, the host can send this function code.
Host send format:
Ad Com Regist Regis Regis Regis Byte conc conc ADC ADC Chec Chec
dre mand er ter ter ter num entr entr (high (low k low k
ss addre addre numb numb bers ation ation 16 16 high
ss ss er er (high (low bits) bits)
(high (low 8 (high (low 16 16
8 bits) bits) 8 bits) 8 bits bits)
bits) )
01 10 04 22 00 04 08 0000 0000 0000 0440 C3 B6
instruction:Correct current measurement value of slave whose address is 01 to new zero
point, ADC value is 1088 (0x0440=1088).
If correction success, the slave return format:
addre comma Register Register Register Register Check Check
address address number number
ss nd low high
(high 8 bits) (low 8 bits) (high 8 (low 8
bits) bits)
01 10 04 22 00 04 60 F0
If change failure, will return an exception response( 0x90);
11
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
10、Correct SPAN:
Only after sending function code with specified serial number of calibration record
as user SPAN, the host can send this function code.
Host send format:
Ad Com Regist Regis Regis Regis Byte conc conc ADC ADC Chec Chec
dre mand er ter ter ter num entr entr (high (low k low k
ss addre addre numb numb bers ation ation 16 16 high
ss ss er er (high (low bits) bits)
(high (low 8 (high (low 16 16
8 bits) bits) 8 bits) 8 bits bits)
bits) )
01 10 04 22 00 04 08 0000
1F4 0000 F703 C5 17
0
Instruction: Corrects the current measured value of the slave with address 01 to a standard
value of 800.0ppm (0x1F40=8000, assuming the unit of measurement of the slave is ppm,
the decimal place is 1 bit); ADC value is 63235 (0x0F703=63235);
if the calibration is successful, the slave returns the format:
addre comma Register Register Register Register Check Check
address address number number
ss nd low high
(high 8 bits) (low 8 bits) (high 8 (low 8
bits) bits)
01 10 04 22 00 04 60 F0
If change failure, will return an exception response( 0x90);
11、Restore factory calibration:
Host send format:
Ad Com Regist Regist Regis Regist Byte Data Data Check Check
dre mand er er ter er numb (high (low low high
ss addres addres numb numbe ers 8 8
s (high s (low er r (low bits) bits)
8 bits) 8 bits) (high 8 bits)
8 bits)
01 10 10 11 00 01 02 00 01 75 10
Remark:After sending this command, sensor will restore calibration value of ZERO point and
SPAN point to factory calibration value;
12
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
(III) Table:
Table 1: Register definition
Address Register
0x0000 Device address
0x0101 Sensor type
0x0102 Sensor unit
0x0103 Sensor decimal places
0x0104 Sensor measurement range(high 16bit)
0x0105 Sensor measurement range(low 16bit)
0x0108 Sensor measurement value(high 16bit)(signed number)
0x0109 Sensor measurement value(low 16bit)(signed number)
0x010A Sensor ADC value(high 16bit)(signed number)
0x010B Sensor ADC value(low 16bit)(signed number)
0x0115 Sensor output zero
0x0116 Sensor output range
Serial No. Of calibration record (0x02 is user zero,0x0D is user
0x0421 span).Before calibrate zero or span,please specify serial No. Of
calibration record
0x0422 Concentration of calibration record(high 16bit)(signed
number)
0x0423 Concentration of calibration record(low 16bit)(signed number)
0x0424 ADC of calibration record(high16bit)(signed number)
0x0425 ADC of calibration record(low 16bit)(signed number)
0x1011 Restore factory calibration
13
Sensors︱Detectors︱Analyzers︱ Excellent Supplier of Digital Acquisition
Table 2:Gas type definition
NO. Chemical formula Rema No Chemical Remark
rk . formula
01 CO 29 TiCL4
02 H2S 30 CH3NH2
03 O2 31 SO2F2
04 Ex 32 C4H8S
05 NO2 33 C4H9SH
06 NO 34 CCL4
07 SO2 35 GAS
08 Cl2 36 Br2
09 NH3 37 BF3
10 H2 38 CH3CL
11 PH3 39 CHCL3
12 CH2O 40 SIHCL3
13 O3 41 AsH3
14 F2 42 C2H3Cl
15 HF 43 B2H6
16 HCL 44 C2H5OH
17 HBr 45 CH3OH
18 C2H4O 46 HCN
19 COCl2 47 C2H4
20 SiH4 48 H2O2
21 ClO2
22 CO2
23 SF6
24 TVOC
25 CH4
26 HC(Standard gas
C3H8)
27 N2O
28 R123a
Table 3:Unit Definition:
Code 0 1 2 3 4 5 6 7 8 。。。
Symbol PPM PPB PPM ‰ % %LEL %VOL Mg/m3 Mg/L 。。。
14