Winsen MH-Z14 User manual

Intelligent Infrared Carbon Dioxide Module
(Model: MH-Z14)
User’s Manual V2.4
Valid from May 1st,2014
Zhengzhou Winsen Electronics Technology CO., LTD.

Statement
The copyright of this manual belongs to Zhengzhou Winsen Electronics Technology Co., LTD.
Without the written permission, any part of this manual shall not be copied, translated, stored in
database or retrieval system, also can’t spread through electronic, copying, record ways.
Thanks for purchasing our product. In order to enable customers to better use the product and
reduce the faults caused by misuse, please read the manual carefully and operate it correctly in
accordance with the instructions. If users disobey the terms or remove, disassemble, change the
components inside of the sensor, we shall not be responsible for the loss.
The specific such as color, appearance, sizes ...etc., please in kind prevail.
We are devoting ourselves to products development and technical innovation, so we reserve the
right to improve the products without notice. Please confirm it is the valid version before using this
manual. At the same time, users’ comments on optimized using way are welcome.
Please keep the manual properly, in order to get help if you have questions during the usage in the
future.
Zhengzhou Winsen Electronics Technology CO., LTD

MH-Z14 NDIR CO2 Module
1. Profile
MH-Z14 NDIR Infrared gas module is a common type, small size sensor, using non-dispersive infrared
(NDIR) principle to detect the existence of CO2in the air, with good selectivity, non-oxygen dependent
and long life. Built-in temperature sensor can do temperature compensation; and it has digital output
and analog voltage output. This commons type infrared gas sensor is developed by the tight
integration of mature infrared absorbing gas detection technology, Precision optical circuit design and
superior circuit design.
Its design, production and inspection adhere to below: GB/T13384-92
2. Applications:
MH-Z14 NDIR Infrared gas module is applied in the HVAC, indoor air quality monitoring, industrial
process, safety and protection monitoring, agriculture and animal husbandry production process
monitoring.
3. Main functions and features:
High sensitivity, High resolution
Low power consumption
Output modes: UART, analog voltage signal, PWM wave
Quick response
Temperature compensation, excellent linear output
Good stability
Long lifespan
Anti-water vapor interference
No poisoning

4. Main technical parameters
Working voltage
4.5 V ~ 5.5V DC
Average current
< 85 mA
Interface level
3.3 V
Measuring range
0~5%VOL optional
Output signal
PWM
UART
0.4-2V DC
Preheat time
3min
Response Time
T90 < 90s
Working temperature
0℃~ 50℃
Working humidity
0~95%RH
Weight
15 g
Lifespan
>5 year
Dimension
57.5×34.7×16mm(L×W×H)
Target Gas
Measuring Range
Accuracy
Mark
Carbon Dioxide
(CO2)
0~2000ppm
±(50ppm
+5%reading
value)
Temperature
compensation
0~5000ppm
Temperature
compensation
0~1%VOL
Temperature
compensation
0~5%VOL
Temperature
compensation
5. Structure

6. Definition for pins
PIN
Description
Pad1/Pad15/Pad17
Vin(input voltage 4.5V~5.5V)
Pad2/Pad3/ Pad12/Pad16
GND
Pad4
Vout2 (0.4~2V)
Pad5
Vout1 (0~2.5V)
Pad6
PWM
Pad8
HD
Pad7/Pad9
NC
Pad11/Pad14/Pad18
UART(RXD)0~3.3V input digital
Pad10/Pad13/Pad19
UART(TXD)0~3.3V output digital
7. Circuit

8. Operating instruction
8.1 Analog output connections
The output value of Vout1 is 0-2.5V, which stands for 0 to full range.
The output value of Vout2 is 0.4-2V, which stands for 0 to full range.
Vin –5V
GND- Power Ground
Vout2-ADC input
After preheating, the value of output voltage from Vout2 represents gas
concentration.
8.2 PWM output (taking PWM output from 2000ppm as example):
CO2 output range: 0ppm-2000ppm
Cycle: 1004ms±5%
High level output for beginning: 2ms (in name)
Middle of cycle: 1000ms±5%
Low level output for ending: 2ms(in name)

Account formula for CO2 concentration which gets through PWM:
)4/()2(2000 msTTmsTC LHHppm
Among:
ppm
C
is calculated CO2 concentration, unit is ppm;
H
T
is time for high level during an output cycle;
L
T
is time for low level during an output cycle.
8.3 Digital connects:
Vin-5V power
GND- Power Ground
RXD connect sensor TXD
TXD connect sensor RXD
You can read gas concentration via Uart, no need to calculate.

8.3.1 Communication protocol
1. General Settings
Baud rate
9600
Date byte
8 byte
Stop byte
1byte
Calibrate byte
no
2. Command
Each command or return:
Contains 9 bytes (byte 0 ~ 8)
Starting byte fixed 0 XFF
Command contains sensor number (factory default to 0 x01) to check and end
Command List:
0x86
Gas concentration
0x87
Calibrate zero point(ZERO)
0x88
Calibrate span point(SPAN)
Read gas concentration
Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Startin
g byte
Sensor
No.
comman
d
-
-
-
-
-
Check
value
0XFF
0x01
0x86
0x00
0x00
0x00
0x00
0x00
0x79
Return value
Return
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Starti
ng
byte
comman
d
High level
concentra
tion
Low level
concentra
tion
-
-
-
-
Chec
k
value
0XFF
0x86
0x02
0x60
0x47
0x00
0x00
0x00
0xD1
Gas concentration= high level *256+low level
Calibrate zero point
Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Starti
ng
byte
Sensor
No.
comman
d
-
-
-
-
-
Check
value
0XFF
0x01
0x87
0x00
0x00
0x00
0x00
0x00
0x78
No return value
Calibrate span point

Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Starti
ng
byte
Sensor
No.
comman
d
High level
span
point
Low level
span
point
-
-
-
Check
value
0XFF
0x01
0x88
0x07
0xD0
0x00
0x00
0x00
0xA0
No return value
3. Calibration and calculation
The checksum = (invert (byte 1 +... + 7)) + 1
Reading gas concentration:
Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Starti
ng
byte
Sensor
No.
comman
d
-
-
-
-
-
Check
value
0XFF
0x01
0x86
0x00
0x00
0x00
0x00
0x00
0x79
Except byte 0 , add the other bytes together
0x1 + 0x86 + 0 + 0 + 0 + 0 + 0 = 0x87
Get the value from the first step, and then invert it.
0xff –0x87 = 0x78
The second value plus one
0x78 + 0x01 = 0x79
Program : C language
9. Notes for maintenance
9.1 The sensor should be calibrated regularly. The cycle time is better to be no more than 6
months.
9.2 Do not use the sensor in the high dusty environment for long time.
9.3 Please use the sensor with correct power supply.
9.4 Forbidden to cut the sensor pin.
Zhengzhou Winsen Electronics Technology Co., Ltd
Add.: NO.299 Jin Suo Road, National Hi-Tech Zone,
Zhengzhou, 450001 China
Tel.: 0086-371-67169097 67169670
Fax: +86- 0371-60932988
E-mail:sales@winsensor.com
Website:www.winsen-sensor.com
char getCheckSum(char *packet)
{
char i, checksum;
for( i = 1; i < 8; i++)
{
checksum += packet[i];
}
checksum = 0xff –checksum;
checksum += 1;
return checksum;
}
Table of contents
Other Winsen Control Unit manuals