CO2 meter (NDIR) with Enviro+

I would really need to connect a low cost NDIR CO2 meter together with the new Enviro+ and the PMS5003 particle meter and wonder if you have any ideas how to do this? The sensors I am thinking of is one of these:
Alt 1 MH-Z14A
Alt 2 senseAir S8
Alt 3 MH-Z19B


I suspect the MH-Z14A would be the easiest. One of its output modes includes analog, which would hook up nicely to the ADC (ADS1015) on Enviro+

For best results you would have to interleave gas sensor readings with your CO2 meter, since you would ideally want to set the ADS1015 gain to 2.048v instead of 6.148 to take your reading with the most sensitivity.

You can see how the gas sensor reads the ADS1015 here:

Depending on your use case, you might even want to hack CO2 readings right into here. I mean… CO2 is a gas!

Actually I should probably add two features into this

read_other()       # Read 'in3/gnd'
set_other_gain()   # Specify the gain to use when reading the additional analog input

And then I think I’d have you covered.

Brushed the rough edges off my idea and raised a PR for it with an example -

This is extremly useful, Thanks a lot.

No problem! It needed doing anyway.

i’m newbie for using enviro+ on my PI zero WH and i wanna use a CO2 meter.
I’ve read your discussion about it but I don’t kwow how to connect MH-Z14A on the enviro+. On gpio? on the PM port?
Thanks a lot

I haven’t used this part but it has an analog output (0.4 to 2V) and you could use the analog input on the Enviro+ to measure it.

so directly on GPIO? sda? or on PM port?

Honestly I’m not sure. Some of the features of the Enviro+ aren’t supported yet by the Github library. The “Pin 4” and ADC aren’t in the docs yet but the author says more is to come.