A carbon dioxide sensor or CO2 sensor is an instrument for the measurement of carbon dioxide gas. The most common principles for CO2 sensors are infrared gas sensors (NDIR) and chemical gas sensors. Measuring carbon dioxide is important in monitoring indoor air quality, the function of the lungs in the form of a capnograph device, and many industrial processes.
An overview of the MG-812 sensor
MG812 gas sensor is chemical type gas sensor that adopts solid electrolyte cell principle, used to detect carbon dioxide. When sensors are exposed to CO2, battery is positive and negative electrode reaction, the sensor produces electromotive force between sensitive electrode and reference electrode, the output voltage signal can be detected carbon dioxide. This sensor features Small sizes, low power-consumption, high sensitivity and less affection by temperature and humidity. It can be used for Air quality control, ferment process control and CO2 detection in green house.
- Air quality control
- Ferment process control and CO2 detection in green house
MG-812 module Key Features
- On Board, ON/OFF LED indicator
- On Board LED indicator for Digital Comparator Output
- GebraBit Pin Compatible with GEBRABUS
- It can be used as a daughter board of GebraBit MCU Modules
- Featuring Castellated pad (Assembled as SMD Part)
- Separatable screw parts to reduce the size of the board
- Package: GebraBit small (36.29mm x 32.72mm)
GebraBit MG-812 module
GebraBit MG-812 module is a Low Power-Consumption CO2 Module and operates just with an input “5V” supply Voltage. GebraBit MG-812 module amplifies MG-812 sensor output by an integrated op-amp circuit for better analysis and interpretation and provides it on the module “AO” pin. For reading CO data, just connect the analog “AO” pin to MCU ADC and go on. The Gas intensity threshold is adjustable by an embedded potentiometer in the GebraBit MG-812 module.
Users need a starter circuit and driver for hardware development and of course software development of the MG812 sensor. GebraBit has done this by implementing the MG812 sensor circuit and provided access to its output for users.
It is enough to put the GebraBit MG812 module in the BreadBoard, then by applying the proper voltage set up the GebraBit MG812 module with any of Arduino, Raspberry Pi, Discovery board, and especially we recommend using GebraBit microcontroller development modules (GebraBit STM32F303 or GebraBit ATMEGA32 module) then receive the data.
The reason for our recommendation when setting up the GebraBit MG812 module with GebraBit microcontroller development modules (such as GebraBit STM32F303 or GebraBit ATMEGA32), is the compatibility of the pin order of all GebraBit modules together (GEBRABUS standard), it’s enough to Put the MG812 in the corresponding socket as shown in the above picture and develop the desired sensor module without the need for wiring.
Introduction of module sections
The MG812 sensor is the main IC of this module, which is responsible for detecting carbon dioxide gas and is placed on top of the module and its circuit is designed.
An amplifier is installed on the GebraBit MG812 module to amplify the output of the MG812 sensor for better data analysis.
In designing the MG812 sensor circuit, a potentiometer is used to determine the module sensitivity.
When the Gas intensity goes above, or below the threshold, the “Dout” LED status will be changed.
By applying voltage to the module through the Power pin, this LED is lit.
GebraBit MG-812 Module pins
- 5V: This pin supplies the sensor main power supply.
- GND: This is the ground pin for powering the sensor.
- AO: This pin is used to receive the analog output of the module. To read the sensor output data, it is enough to connect this pin to the ADC of the microcontroller.
- DO: This pin is used to receive the digital output of the module and when the gas intensity is higher or lower than the set threshold, the logic output (0 and 1) also changes.
Connect to the processor
Connection with GebraBit STM32F303
Due to the compatibility of the pin order of GebraBit modules with each other (GEBRABUS standard), to start the GebraBit MG812 module with GebraBit STM32F303 microcontroller module, it is enough to easily place the GebraBit MG812 module as pin to pin on the GebraBit STM32F303 module and start the module by applying voltage. Here, for better understanding, the separate connection of these two modules is shown:
Connection with GebraBit ATMEGA32A
Due to the compatibility of the pin order of GebraBit modules with each other (GEBRABUS standard), to start the GebraBit MG812 module with the GebraBit ATMEGA32A microcontroller module, it is enough to easily place the GebraBit MG812 module as pin to pin on the GebraBit ATMEGA32A module and start the module by applying voltage. Here, for better understanding, the separate connection of these two modules is shown:
Connection with ARDUINO UNO
- Connect the “5V” pin of the MG812 module to the “5V” pin of the ARDUINO UNO board output (red wire).
- Connect the “GND” pin of the MG812 module to the “GND” pin of the ARDUINO UNO board. (Black wire)
- Connect the “DO” pin of the MG812 module to one of the ARDUINO UNO board digital pins (blue wire).
- Connect the “AO” pin of the MG812 module to one of the ARDUINO UNO board analog pins (orange wire).
How to connect the above mentioned steps can be seen in this picture: