No description
Find a file
Christoph Schultz 8a063e7c27
Add support for setting the range and autocalibration. Closes #1.
* added possibility to set Range, to enable/disable Autocalibrate and to calibrate maually ( see Datasheet v 1.2 : https://www.winsen-sensor.com/d/files/MH-Z14A.pdf

* Update MHZ.cpp

* Update MHZ.cpp

* Update MHZ.h

added calibrate Span, for complete functionality but commented out , due to professional use (req. constant atmosphere with 2k, 5k or 10k ppm CO2.).
corrected the bugs in MHZ.cpp also.

* Update MHZ.cpp

Added comments for  Sensors with specific firmware.

Co-authored-by: Christoph Schultz <christoph@schultz1-christoph.de>
2021-01-14 22:28:47 +01:00
examples/MH-Z19B implements various small fixes and improvements 2019-06-08 13:37:21 +02:00
.gitattributes Initial commit 2018-04-22 11:36:51 +02:00
.gitignore adds the entire .vscode folder to gitignore 2019-06-08 11:10:41 +02:00
keywords.txt Use correct field separator in keywords.txt 2018-07-17 07:29:47 -07:00
library.properties Update library.properties 2019-06-08 18:15:09 +02:00
LICENSE Initial commit 2018-04-22 11:36:51 +02:00
MHZ.cpp Add support for setting the range and autocalibration. Closes #1. 2021-01-14 22:28:47 +01:00
MHZ.h Add support for setting the range and autocalibration. Closes #1. 2021-01-14 22:28:47 +01:00
README.md Update README.md 2018-09-04 23:45:04 +02:00

MH-Z14A, MH-Z19B CO2 ... Module

Arduino implementation for MH-Z CO2 sensors such as MH-Z14A, MH-Z18B (as I didn't find all info in one place).

The sensor is available for ~20 bucks at the usual places.

Implementation

See example.

PPMuart: 602, PPMpwm: 595, Temperature: 23

Implementation details

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

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

Further reading:

(russuian, but google translate does a good job)