MG811 CO2 sensor

Hello, I've recently bought 3x MG811 sensors (link above) and I'm facing problem in writing a code in order to measure CO2 concentration. I've already tried the sample code given in ( but it doesn't work most likely because these sensors have an analog output 0-2V instead of 0-5V as described in the details below the product. It's my first time I'm trying to write a code and I would appreciate any kind of help. Thank you!

The “” module appears to be somewhat different. The amplifier on that unit is set to 8.5X. It is not clear what the voltage amplifier is set to on your module. It also doesn’t say what the “Tcm” pin is for.

It looks like your module matches the “uxcell” module.
[](http://“ CO2 sensor manual V1.2.rar”)
The schematic shows that SOMETHING about signal amplifier is adjustable with one of the two pots. You may need to find the specs for the amplifier to figure out what that pot is doing.

Good luck.

OK thank you very much for your help!