MG-811 CO2 Sensor Module

Overview

This sensor module has an MG-811 onboard as the sensor component. There is an onboard signal conditioning circuit for amplifying output signal and an onboard heating circuit for heating the sensor. The MG-811 is highly sensitive to CO2 and less sensitive to alcohol and CO. It could be used in air quality control, ferment process, in-door air monitoring application. The output voltage of the module falls as the concentration of the CO2 increases.

Features

  • Analog and digital output
  • Onboard signal conditioning circuit
  • Onboard heating circuit
  • Sensor jack eliminates soldering the sensor and allows plug-and-play
  • 4-pin interlock connectors onboard
  • 4-pin interlock cables included in the package
  • Compact size

MG-811 Specifications

Symbol Parameter Value Remarks
VH Heating Voltage 6.0±0.1V AC or DC
RH Heating Resistor ~30.0 Ohm At room temperature
IH Heating Current ~200mA
PH Heating Power ~1200mW
Tao Operating Temperature -20 – 50°C
Tas Storage Temperature -20 – 70°C
EMF Output 100-600mV 400-10000ppm CO2

Pinout

Pin Description Remarks
VCC 5V power supply for signal conditioning <5.5V
VOUT Analog voltage signal output
BOOL Comparator output Open drain
HEAT Heating power supply 6-24V 7.5-12V*
VSET Heating voltage select 0-5V
GND Common ground Onboard heating circuit

*Please note that the heating voltage should be 7.5-12V instead of 6-24V as marked around the barrel connector on the PCB.

Test Points

There are six test points on board. They are VE, AN, BL, TH, +V and GND.

VE the regulated heating voltage, typical values are 6.0V
AN analog output, the voltage should drop down when CO2 concentration rises
BL digital output, see “Comparator” Section above
TH comparator threshold voltage, you can set it to any value between 0 and +V
+V signal conditioning circuit power supply, which is 5V

Typical Application Schematics

Schematics

Theory

The MG-811 sensor is basically a cell which gives an output in the range of 100-600mV (400—10000ppm CO2). The current sourcing capability of the cell is quite limited. The amplitude of the signal is so low and the output impedance of the cell is so high that a signal conditioning circuit is required between the sensor and microcontroller’s ADC input. The output voltage of the sensor in clean air (typically 400ppm CO2) is in the range of 200mV-600mV, this output voltage is defined as Zero Point Voltage (V­0) which is the baseline voltage. The output voltage will decrease as the CO2 concentration increases. When the concentration of CO2 is greater than 400ppm, the output voltage (Vs) is linear to the common logarithm of the CO2 concentration (CCO2):

Vs = V­0 +ΔVs / (log10400 – log101000) * (log10CCO2 – log10400)

WhereΔVs = sensor output@400ppm – sensor output@1000ppm

Reaction Voltage(ΔVs) is the voltage drop from CO2 concentration of 400ppm to CO2 concentration of 1000ppm, which may differ from sensor to sensor. The typical value forΔVs is 30mV-90mV. In order to get an accurate CO2 concentration result, proper calibration is required.

The DC gain of the signal conditioning circuit is 8.5. So the range of VOUT is 0.85-5.0V, which is a reasonable range for a 5V microcontroller or standalone ADC.

The threshold of the comparator open drain output pin BOOL can be set by on-board trimmer R11. When VOUT is lower than the threshold voltage the BOOL is at ground potential. When VOUT is greater than the preset value, the BOOL is open circuit. User should connect a pull-up resistor to the BOOL pin in order to have a valid “high” state.

Signal Conditioning Circuit

Signal Conditioning

The LMC662 is used as the amplifier because of its ultra high input impedance. According to the datasheet of MG-811, this sensor require an input impedance of 100-1000Gohm, the LMC662 has an input resistance above 1Tohm, which meets this requirement. The typical input offset voltage of this OPA is about 3mV, which is insignificant for this application. The DC gain is set by R4 and R1, with the formula

Vout = Vin * (1 + R4/R1)

In this specific application, Vout = 8.5*Vin.

R16 and C1 form a Low Pass Filter which gives a cleaner output by filtering out the high frequency noise.

Comparator Circuit

Comparator

The LMC662 is used as a comparator here. The R11 set the threshold of the comparator. If VOUT goes below the threshold, V_BOOL is at ground potential. If VOUT goes greater than the threshold, V_BOOL is floating. A pull-up resistor is needed to pull the BOOL pin up in order to have a valid “high” state when V_BOOL is floating.

Switch Mode Regulator Circuit

Regulator

This is a typical step-down SMPS, the feedback voltage of the MP2359 is 0.81V, here is the relationship between VIN and VOUT of this circuit. This is not a low power device, so please don’t use a 9V battery as the power source of the heating circuit. The battery will die very soon if you apply it to this circuit.

VOUT = 0.81 * (1 + R13/R14)

In this specific application, VOUT = 0.81 * (1 + 10.2K/1.58K) = 6.0V

Sample Code for Arduino

Resources

Demo Output

demo
Demo output when a small amount of breath is puffed to the sensor.

Assembly Drawing

Assembly Drawing

Dimensions

Dimensions

FacebookTwitterGoogle+Share

15 thoughts on “MG-811 CO2 Sensor Module

  1. I have bought this product.
    It is arrived yesterday from China.
    It is very good.

    And this page about datasheet + example is also very very good.

    Thank you!

    1. You may need to modify the feedback resistor values to limit the output of the module to 0-3.3V. Also, the onboard amp op need 5v to operate, so please make sure that you have a 5V supply on Teensy 3.1.

  2. Hi, I bought your sensor and wired it up. I have a question tho. Do I have to supply additional power to the sensor for the heating or the Arduino does that? Thank you

  3. Hello everybody,
    I want to modify this circuit to connect it to a 3,3v device. To do that I’ve changed the op amp gain by changing R4 and R1 (in the Signal Conditioning Schematics chapter) but now I don’t know if I can leave the resistance (R16) and the cap (C1) unchanged. What is the aim of those component? Do they filter low frequencies? Can I leave them 1Kohm and 100nF?
    Thanks for your help!

    1. Hi Andrea,

      Just leave the R16 and C1 unchanged. They offers a relative low impedance in the feedback loop to keep the noise low.

      Kim

  4. Is there any option how to power this module directly from Arduino Mega 2560, which is powered by 9V/1A adapter? I mean not only data, but heating also. Is it needed to power heating anyway? Or is there an option, – let’s say if operating temperature will be always between 20-35°C – not to power the heating?

    1. 1. Connect Vin of Arduino Mega to the inter polar of the barrel connector, and connect GND of Arduino Mega to the outer shell of the barrel connector.
      2. Connect +5V of Arduino Mega to Vcc(red) of the module, and connect GND of Mega to GND(black) of the module.

  5. i buy mg811 from sandbox electronics i have question ,should i connect this sensor to 3.3v or 5v from arduino?
    please reply
    thank you in advance

    1. All the modules are tested with 15V before shipping and the DC-DC chip has a input rating of 24V . It is OK if you connected with 13.8V.

  6. I was wondering if there is an approximate resolution for this sensor for the range of 400-10,000 ppm? Can it be expected to provide accuracy of +/-1 ppm or would it be more like +/- 10 ppm?

    1. The output of this sensor is analog voltage and if you are going to use it with a MCU. The resolution depends on the ADCs of your MCU. As for the accuracy, +-10ppm is quite hard to achieve.

Leave a Reply

Your email address will not be published. Required fields are marked *


five + 1 =