Sunday, February 23, 2014

CO2 Sensor


Why measure air quality?

CO2 quantity in the air is a good way to analyze our environment quality in addition to other indicators collected by the other sensors of the robot.
Depending CO2 concentration in the air several symptoms can appear:

1% of CO2 in the air represent 1000ppm



Evolution of the CO2 concentration since 1960:

It's really important to choose a CO2 clean place or to ventilate closed rooms to avoid this bad high concentration.
CO2 Wikipedia page

How to measure air quality?

Several modules exist on the market but we have selected the DFRobot CO2 Sensor v1 for its quality and features:
  • It has MG-811 sensor module onboard which is highly sensitive to CO2 and less sensitive to alcohol and CO, Low humidity&temperature dependency. 
  • Onboard heating circuit brings the best temperature for sensor to function. 5V power input will be boosted to 6V for heating. 
  • It has an onboard conditioning circuit for amplifying output signal
  • It has a digital output driven by a potentiometer to set the trigger level (not used in our AWBB robot)

Exploit the voltage output

The output voltage of the module falls as the concentration of the CO2 increases.
We will need to transform this value into a scientific readable data, in ppm (parts-per-million, 10–6). This value is obtained reading the datasheet of the CO2 sensor and applying the associated formula.
Code is located in file: Sketchbook\libraries\Robot_Motor\src\CO2Sensor.h

Code of the AWBB robot

Command must be created on both board to communicate and share CO2 value request/answer.

Command on the Control Board:
Reply to the Motor Board:


Calibrating phase

To adjust the coefficients used into the ppm formula, you can go into a clean place outside and be sure than output calculated by our software is '-1' (it means you've got a clean air with CO2 ppm under 400ppm). 


Reference link: 


1 comment:

  1. Thats what i try to tell my buddies in work, that fresh air is really important but they always look at me with a stupid grin in their faces. But whatever, even though they get a little angry on me, i just open the windows sometimes...

    ReplyDelete