manuals.online logo
Brands
  1. Home
  2. •
  3. Brands
  4. •
  5. Arduino
  6. •
  7. Accessories
  8. •
  9. Arduino MH-Z14A User manual

Arduino MH-Z14A User manual

NDIR Infrared Carbon Dioxide Sensor Module
Model: MH-Z14A
User Manual
Pin Definition:
Pin name Pin description
1,15,17,23 Power positive (Vin)
2,3,12,16,22 Power supply negative (GND)
4,5,21 Analog output (0.4 to 2 V) or (0 to 2.5 V)
6,26 PWM
8,20 HD (zero calibration, low level for more than 7 seconds)
7,9 NC
1,14,18,24 UART (RXD) TTL level data input
10,13,19,25 UART (TXD) TTL level data output
Output Method:
PWM output
Assume that the measurement range is 0~2000ppm
CO2 concentration output range 0~2000ppm
cycle 1004ms±5%
High level output at the beginning of the cycle
2ms (theoretical value)
Central cycle
1000ms±5%
Low-level output at the end of the cycle
2ms (theoretical value)
The formula for calculating the current CO2 concentration value is obtained by PWM:
Cppm=2000×(TH-2ms)/(TH+TL-4ms)
Cppm is the calculated CO2 concentration value in ppm.
TH is the time when the output is high during an output cycle
TL is the time when the output is low in one output cycle
Serial Output (UART):
Hardware connection:
Connect the sensor's Vin-GND-RXD-TXD to the user's 5V-GND-TXD-RXD. (The client must use TTL
level, such as
If it is RS232 level, it must be converted).
Software settings:
Set the serial port baud rate to 9600, the data bit to 8 bits, the stop bit to 1 bit, and the parity bit to
none.
Protocol command interface list and meaning
0x86
Read gas concentration value
0x87
Calibration zero (ZERO)
0x88
Calibration span point (SPAN)
0x79
Turn on/off the automatic zero calibration
function
0x99
Setting range
0x86-read gas concentration value
Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Start
byte
Reserved
Command
-
-
-
-
-
Check
value
0xFF
0x01
0x86
0x00
0x00
0x00
0x00
0x00
0x79
Return value
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Start
byte
Command
High
concentration
of 8 digits
Low
concentration
of 8 digits
-
-
-
-
Check
value
0xFF
0x86
HIGH
LOW
-
-
-
-
Checksum
Example:
Send command FF 01 86 00 00 00 00 00 79 Return command FF 86 02 20 00 00 00 00 58
Gas concentration calculation (in ppm): hexadecimal 02 converted to decimal 2, hex 20 converted to
decimal 32, then 2*256+32 = 544ppm
Note: Please refer to the checksum calculation method for the check value.
0x87-zero calibration command
Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Start
byte
Reserved
Command
-
-
-
-
-
Check
value
0xFF
0x01
0x87
0x00
0x00
0x00
0x00
0x00
0x78
Example:
Passing carbon dioxide standard gas 400ppm or in outdoor environment, stable for more than 20
minutes;
Send command: FF 01 87 00 00 00 00 00 78 Perform zero calibration;
Note: It is forbidden to send the command without passing the standard gas or in a non-outdoor
environment.
0x88-calibrate SPAN point command
Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Start
byte
Reserved
Command
SPAN high
8 digits
SPAN
low 8
digits
-
-
-
Check
value
0xFF
0x01
0x88
0xA0/0x00
0x00
0x00
0x00
0x00
Checksum
Example:
Passing carbon dioxide standard gas 2000ppm, stable for more than 20 minutes;
Send command: FF 01 88 07 D0 00 00 00 A0 Perform SPAN point calibration;
Note: Calibrate the zero point before calibrating the SPAN value.
For the check value, please refer to the checksum calculation method.
It is forbidden to send the command without passing the standard.
0x79-ON/OFF automatic zero calibration
Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Start
byte
Reserved
Command
-
-
-
-
-
Check
value
0xFF
0x01
0x79
HIGH
LOW
0x00
0x00
0x00
Checksum
Example:
If the automatic calibration function is enabled, the command is sent: FF 01 79 A0 00 00 00 00 E6
If the auto-calibration function is turned off, the command is sent: FF 01 79 00 00 00 00 00 86
Note: When Byte3 is 0xA0, the auto calibration function is enabled; when Byte3 is 0x00, the auto
calibration function is turned off.
The factory default is to turn on the auto zero function.
0x99-set range
Send command
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Start
byte
Reserved
Command
Reserved
Range
24~32
Range
16~23
Range
8~15
Range
0~7
Check
value
0xFF
0x01
0x99
0x00
Data 1
Data 2
Data 3
Data 4
Checksum
Note: The range point must be selected from three values of 2000, 5000, and 10000.
For example, set the 2000ppm range and send the command: FF 01 99 00 00 00 07 D0 8F
Set the 10000ppm range and send the command: FF 01 99 00 00 00 27 10 2F
Checksum calculation method
Checksum = (inverted (Byte1+Byte2+Byte3+Byte4+Byte5+Byte6+Byte7))+1
Example:
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Start
byte
Reserved
Command
-
-
-
-
-
Check
value
0xFF
0x01
0x86
0x00
0x00
0x00
0x00
0x00
Checksum
Calculated as follows:
1. Add from Byte1 to Byte7: 0x01 + 0x86 + 0x00 + 0x00 + 0x00 + 0x00 + 0x00 = 0x87
2. Invert: 0xFF - 0x87 = 0x78
3. Add 1:0x78 + 0x01 = 0x79 after inversion.
C language checksum routine
char getCheckSum(char *packet)
{
char i, checksum;
for( i = 1; i < 8; i++)
{
checksum += packet[i];
}
checksum = 0xff –checksum;
checksum += 1;
return checksum;
}
Calibration Zero Function:
In order to facilitate the user to calibrate the zero point, the sensor has three zero calibration modes:
manual zero calibration, command zero calibration, and automatic zero calibration.
Zero calibration function refers to calibration 400ppm.
Manual zero calibration
Manual calibration of the zero point is to input the low level (0V) of the sensor's HD pin to calibrate the
zero point, and the low level lasts for more than 7 seconds.
Make sure the sensor is stable for more than 20 minutes at 400 ppm before calibrating the zero point.
Command calibration:
Please refer to the serial zero calibration command.
Automatic calibration function:
The automatic calibration function means that the sensor intelligently judges the zero point according to
the environmental concentration and calibrates itself after continuous operation for a period of time.
The calibration cycle is automatically calibrated every 24 hours from the power-on operation. The zero
point for automatic calibration is 400 ppm.
The automatic zero calibration function is suitable for office environment and home environment.
However, it is not applicable to agricultural greenhouses, farms, cold storages, etc. In such places, the
automatic zero calibration function should be turned off. After shutdown, the user should periodically
perform zero-point detection on the sensor, and if necessary, perform a zero calibration or manual zero
calibration.
Precautions
During the welding, installation and use of the sensor, the gold-plated plastic cavity should be
protected from any direction of pressure.
If the sensor needs to be placed in a small space, the space should be well ventilated, especially if the
two diffusing windows should be in a well ventilated position.
Keep the sensor away from heat and avoid direct sunlight or other heat radiation.
The sensor should be calibrated periodically and the calibration period is recommended for no more
than 6 months.
Do not use the sensor for long periods of time in a dusty environment.
In order to ensure the normal operation of the sensor, the supply voltage must be kept in the range of
4.5V~5.5V DC, and the supply current must be no less than 150mA. If it is not within this range, the
sensor may be faulty, the sensor output concentration is low or the sensor is not working properly.
When manually calibrating the zero point or sending a command to calibrate the zero point, it must be
operated continuously for more than 20 minutes in a stable gas environment (400 ppm).

Popular Accessories manuals by other brands

Omron F160 Vision Sensor manual

Omron

Omron F160 Vision Sensor manual

ICS P-3 Series operating instructions

ICS

ICS P-3 Series operating instructions

Advance acoustic iMPRESS 2 manual

Advance acoustic

Advance acoustic iMPRESS 2 manual

PCB Piezotronics 1203 Series Installation and operating manual

PCB Piezotronics

PCB Piezotronics 1203 Series Installation and operating manual

Velleman RCSOST user manual

Velleman

Velleman RCSOST user manual

LOXONE Window Handle Air quick guide

LOXONE

LOXONE Window Handle Air quick guide

Cooper Lighting Halo HSA610 Specifications

Cooper Lighting

Cooper Lighting Halo HSA610 Specifications

Forma Scientific 310 Series Operating and maintenance manual

Forma Scientific

Forma Scientific 310 Series Operating and maintenance manual

Hydas 4671 instruction manual

Hydas

Hydas 4671 instruction manual

Allegro ACS712 user manual

Allegro

Allegro ACS712 user manual

genialo WT-28A-1 instruction manual

genialo

genialo WT-28A-1 instruction manual

Novus RHT-Air instruction manual

Novus

Novus RHT-Air instruction manual

Sony BRAVIA Specifications

Sony

Sony BRAVIA Specifications

Coiltek CS-5000 V2 operating manual

Coiltek

Coiltek CS-5000 V2 operating manual

Native Instruments TRAKTOR KONTROL Z1 manual

Native Instruments

Native Instruments TRAKTOR KONTROL Z1 manual

Takuma AS-1 READER user manual

Takuma

Takuma AS-1 READER user manual

Crestron ST-VS Operation guide

Crestron

Crestron ST-VS Operation guide

Hytronik HIM34 quick start guide

Hytronik

Hytronik HIM34 quick start guide

manuals.online logo
manuals.online logoBrands
  • About & Mission
  • Contact us
  • Privacy Policy
  • Terms and Conditions

Copyright 2025 Manuals.Online. All Rights Reserved.