Infrared CO2 Sensor 0-50000ppm SKU: SEN0220

From DFRobot Electronic Product Wiki and Tutorial: Arduino and Robot Wiki-DFRobot.com
Infrared CO2 Sensor 0-50000ppm

Introduction

DFRobot released its latest wide range infrared CO2 sensor, which effective range is up to 0~50000ppm. This sensor is based on non-dispersive infrared (NDIR) technology and has good selectivity and oxygen-free dependency. It integrates temperature compensation and support UART communication mode. Most importantly, the product is easy to use; it is compatible with all types of microcontrollers with UART port, like Arduino, Raspberry Pi and other microcontrollers. Besides, it has a long service life, up to 5 years!
In addition, this UART Infrared CO2 Sensor is a high-performance sensor that combines technology of mature infrared absorption gas detection with precision optical circuit design as well as sophisticated circuit design. It has characteristics such as wide range detection, high sensitivity, high resolution, low power consumption, fast response, anti-water vapor interference, no poisoning, high stability and long life.
It can be widely used in HVAC refrigeration and indoor air quality monitoring, industrial process and safety monitoring, agricultural and animal husbandry production process monitoring, etc..

Feature

  • Wide Range
  • High Sensitivity
  • Low power consumption
  • Excellent stability
  • Temperature compensation
  • Excellent linear output
  • High cycle life
  • Anti-water vapor interference
  • No poisoning
  • Need 5V power supply, even you are using a 3.3V microcontroller, like Genuino 101/ Raspberry Pi or anything else.


Specification

  • Gas Detection: Carbon Dioxide (CO2)
  • Operating Voltage: 4.5 ~ 5.5V DC
  • Average Current: <85mA
  • Output Signal: UART/PWM/Analog output (the last two has not been developed)
  • Measuring Range: 0 ~ 50000ppm
  • Accuracy: ± (50ppm + 5% reading)
  • Preheating Time: 3min
  • Response Time: T90 < 30s
  • Operating Temperature: 0 ~ 50 ℃
  • Operating Humidity: 0 ~ 95% RH (no condensation)
  • Service Life: >5 years
  • Board Dimension: 21 * 27.11 mm/ 0.83 * 1.06 inches
  • Weight: 42 g


Board Overview

SEN0220 CO2 Sensor
Num Label Description
1 RX RX
2 TX TX
3 GND GND
4 VCC VCC
5 Detector connection Detector connection


Tutorial

Upload the code to Arduino Uno, open the serial monitor to check the CO2 concentration.

NOTE: The CO2 concentration during the preheating time in the serial monitor is not accurate, just ignore the result in the first 3 minutes (Preheating Time).

Requirements

  • Hardware

DFRduino UNO x 1

    • Gravity UART Infrared CO2 Sensor
    • DuPont cables

Connection Diagram

SEN0220_Connection


Sample Code

/***************************************************
* Infrared CO2 Sensor 0-50000ppm(Wide Range)
* ****************************************************
* The follow example is used to detect CO2 concentration.
  
* @author lg.gang(lg.gang@qq.com)
* @version  V1.0
* @date  2016-6-6
  
* GNU Lesser General Public License.
* See <http://www.gnu.org/licenses/> for details.
* All above must be included in any redistribution
* ****************************************************/ 
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
unsigned char hexdata[9] = {0xFF,0x01,0x86,0x00,0x00,0x00,0x00,0x00,0x79}; //Read the gas density command /Don't change the order
void setup() {
  
  Serial.begin(9600);
  while (!Serial) {

  }
  mySerial.begin(9600);

}

void loop() {
   mySerial.write(hexdata,9);
   delay(500);

 for(int i=0,j=0;i<9;i++)
 {
  if (mySerial.available()>0)
  {
     long hi,lo,CO2;
     int ch=mySerial.read();

    if(i==2){     hi=ch;   }   //High concentration
    if(i==3){     lo=ch;   }   //Low concentration
    if(i==8) {
               CO2=hi*256+lo;  //CO2 concentration
      Serial.print("CO2 concentration: ");
      Serial.print(CO2);
      Serial.println("ppm");      
               }

  }   
  
 } 

 }


Expected Results

Open your IDE serial monitor and wait for about 3 minutes (preheat process), then you'll see the finial data. (Indoor Temperature: 25℃)

SEN0220 serial monitor


FAQ

Q. I found the output data is always cyclic variation. Why?

A. Yes, this is normal for the infrared CO2 sensor, It is using NDIR optical detection principle, the value will be hyperactive. But the finial result is still in the precision range. You can use some filtering algorithm to read the average value.

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.


More



DFshopping car1.png Shopping from DFRobot Store or DFRobot Distributor.