tobiasschuerg / MH-Z-CO2-Sensors

Arduino imeplementation for CO2 sensors of the MH-Z series (Intelligent Infrared CO2 Module)
MIT License
77 stars 40 forks source link

Can this library be used with MH-Z16? #48

Closed thehans closed 1 year ago

thehans commented 1 year ago

MH-Z16 50,000 ppm (5% Vol) CO2 range Datasheet here: https://www.winsen-sensor.com/d/files/MH-Z16.pdf

tobiasschuerg commented 1 year ago

The MH-Z16 is not explicitely defined (PR welcome)

https://github.com/tobiasschuerg/MH-Z-CO2-Sensors/blob/23ff60df1a495a27f70bf9df8cce25207486de22/MHZ.h#L17-L21

However, since the sensortype only defines the preheat and response times, settings the MH-Z19B which has also a pre-heat time of 3minutes, should work:

MHZ co2(RX_PIN, TX_PIN, MHZ19B, RANGE_50K );
tobiasschuerg commented 1 year ago

I now also added the configuration for the MH-Z14:

MHZ co2(RX, TX, MHZ::MHZ16);
int ppm = co2.readCO2UART();