The MH-Z19C carbon dioxide gas sensor (hereinafter referred to as the sensor) is a general-purpose intelligent small sensor that uses the principle of non-dispersive infrared (NDIR) to detect the presence of C02 in the air. And other features; built-in temperature compensation: simultaneously has serial output, PWM output, easy to use. The sensor is a high-performance sensor made by closely combining mature infrared absorption gas detection technology with sophisticated optical circuit design and sophisticated circuit design.
Detection gas: carbon dioxide
Power supply voltage: DC （5.0 ±0.1） V
Average current: <40mA (@5V power supply)
Peak current:125 to (@5V power supply)
Interface level:3. 3v (compatible with 5v)
Measuring range:400-5000PPM optional
Output signal: serial UART (TL level 3.3V)
Warm-up time: 1min
Response time: T90< 120s
Working humidity: 0~95%RH (no condensation)
Vin: Power +(in)
GND: power supply-(GND)
Hd: HD (zero calibration, low level is effective for more than 7 seconds)
Rx: UART (RXD) TTL level data input
Tx: UART (TXD) TTL level data output
Assume the measurement range is 400-2000ppm
CO2: Concentration output range: 400-2000ppm
High level output at the beginning of the cycle: 2ms (theoretical value)
Central period: 1000ms±5%
Low level output at the end of the period: 2ms (theoretical value)
Calculation formula for obtaining current CO2 concentration value by PWM: Cppm=2000X (TH-2ms)/(TH+TL-4ms)
Cppm: CO2 concentration value calculated by the unit of ppm
TH: the time when the output is high level in one output cycle
TL: 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. (User terminal must use TTL level)
1. In the process of welding, installation and use of the sensor, the gold-plated plastic cavity should be prevented from withstanding pressure in any direction.
2. If the sensor needs to be placed in a small space, this space should be well ventilated, especially the two diffusion windows should be in a well ventilated position.
3. The sensor should be far away from the heat source, and avoid direct sunlight or other heat radiation.
4. The sensor should be calibrated regularly, and the calibration period is recommended to be no more than 6 months.
5. Do not use the sensor for a long time in the environment with high dust density.
6. In order to ensure that the sensor can work normally, the power supply voltage must be maintained at （5.0 ±0.1） VDC. The power supply current must not be less than 150mA
7. If it is not within this range, the sensor may be faulty, the output concentration of the sensor is low or the sensor cannot work normally.
8. When manually calibrating the zero point or sending the command to calibrate the main points, it must be stable
9. Work continuously for more than 20 minutes in a gas environment (400ppm).
10. The sensor is prohibited to use wave peak depth.
11. When welding with iron, set the temperature to （350±5） degree, early
12. The pick-up time must be less than 35.
13. When using the sensor, it is recommended that the customer use the method of inserting the solder bump to directly insert and remove the sensor for toilet maintenance.
Arduino library for the MH-Z19X CO2 sensor
User Manual for MH-Z Series Infrared CO2 Sensor Module Communication Protocol
MH-Z19C works on Uno but not on Mega
The Englisih datasheet for the MH-Z19: MH-Z19
The English datasheet for the non-JST MH-Z19B version: MH-Z19B NON-JST.
The Chinese datasheet for the JST MH-Z19B version (more detailed): MH-Z19B JST.