No description
Find a file
2018-06-24 14:38:42 +02:00
.gitattributes Initial commit 2018-04-22 11:36:51 +02:00
LICENSE Initial commit 2018-04-22 11:36:51 +02:00
MH-Z19B.ino Changed status handling as it seems as if the mhz19B returns 0 instead of 0x40 like the mhz19. 2018-06-24 14:38:42 +02:00
MHZ.cpp Changed status handling as it seems as if the mhz19B returns 0 instead of 0x40 like the mhz19. 2018-06-24 14:38:42 +02:00
MHZ.h Added a debug mode and improved log messages. 2018-06-24 12:22:50 +02:00
README.md Added formula to readme. 2018-04-22 12:11:58 +02:00

MH-Z19B CO2 Module

Arduino implementation for the MH-Z19B sensor (as I didn't find all info in one place). The sensor is available for ~20 bucks at the usual places.

Resources:

Datasheet: http://www.winsen-sensor.com/d/files/infrared-gas-sensor/mh-z19b-co2-ver1_0.pdf

More info about the sensor: https://revspace.nl/MHZ19

Implementation

C ppm = 5000 * (T_high - 2 ms) / (T_high + T_low - 4ms)

The implementation is mostly based on https://forum.arduino.cc/index.php?topic=525459.msg3587557#msg3587557

Further reading:

(russuian, but google translate does a good job)