Introduction: Tutorial: How to Use Mg811 Co2 Carbon Dioxide Gas Sensor


This tutorial will shows you a few simple steps about how to use Mg811 Co2 Gas Sensor by using Arduino Uno. At the end of this tutorial, you will get a result of comparison when the sensor can detect a motion and could not detect any movement.

This sensor module has an MG-811 on-board as the sensor component. There is an on-board signal conditioning circuit for amplifying output signal and an on-board 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.


  • Carbon dioxide sensor module (with analog signal output, TTL level signals, temperature compensated output).

  • TTL output valid signal is low. (Low-level signal when the output light can be directly connected to the microcontroller).

  • Analog output (0 ~ 2V/0-4V) voltage output selectable default hair 0-2V.

  • Rapid response and recovery characteristics.

  • The main chip: LM393, carbon dioxide gas sensing probe

  • Working voltage: DC 6V

  • Size: 32mm X22mm X30mm L * W * H.

Step 1: Item Preparation

The photo above show item needed in this tutorial:

  1. Arduino UNO
  3. Jumper Wire

Step 2: Follow the Video Step

Step 3: Source Code