Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use DFRobot CO2 NDIR: Examples, Pinouts, and Specs

Image of DFRobot CO2 NDIR
Cirkit Designer LogoDesign with DFRobot CO2 NDIR in Cirkit Designer

Introduction

The DFRobot CO2 NDIR Sensor (Part ID: SEN0219) is a non-dispersive infrared (NDIR) sensor designed to measure carbon dioxide (CO2) concentration in the air. This sensor provides accurate and reliable readings, making it ideal for applications such as environmental monitoring, indoor air quality assessment, HVAC systems, and agricultural monitoring. Its compact design and ease of integration make it suitable for both hobbyist and professional projects.

Explore Projects Built with DFRobot CO2 NDIR

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Nano-Controlled Obstacle Avoidance Robot with IR and Ultrasonic Sensors
Image of LFOA Circuit Diagram: A project utilizing DFRobot CO2 NDIR in a practical application
This is a robotic control system featuring an Arduino Nano that interfaces with two IR sensors, an ultrasonic sensor, and a servomotor for various sensing and actuation tasks. It controls two DC gear motors through an L298N motor driver, all powered by a 12V battery. The system's functionality is determined by the embedded code running on the Arduino Nano, which manages sensor inputs and actuator outputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring Station with CO2, Temperature, Humidity Sensing and Data Logging
Image of 12345: A project utilizing DFRobot CO2 NDIR in a practical application
This is a multi-sensor data logging system with an ESP32 microcontroller that measures environmental parameters such as humidity, temperature, and CO2 levels. It includes an LCD for data display, an RTC for timekeeping, and an SD card module for data storage, all powered by a 18650 battery shield.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Air Quality and Fire Detection System with RGB Indicator and Alarm
Image of GAS SENSOR detector: A project utilizing DFRobot CO2 NDIR in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an MQ135 gas sensor for CO2 detection, a KY-026 flame sensor for fire detection, a buzzer for alarms, and an RGB LED to visually indicate CO2 levels. A 16x2 LCD displays CO2 concentration and fire alerts, while potentiometers control LCD contrast. The embedded code manages sensor readings, activates the buzzer based on predefined thresholds, and adjusts the RGB LED color in response to CO2 levels.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano and ESP32-Based Smart Environmental Monitoring System with Battery Power
Image of 19301 schematic: A project utilizing DFRobot CO2 NDIR in a practical application
This circuit is a multi-sensor monitoring system using an Arduino Nano and an ESP32. It includes sensors for obstacle detection (IR sensors), air quality (MQ135), and temperature/humidity (DHT11), with visual indicators (LEDs) and an auditory alert (buzzer). The system is powered by a 18650 Li-ion battery pack regulated by a 7805 voltage regulator.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with DFRobot CO2 NDIR

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of LFOA Circuit Diagram: A project utilizing DFRobot CO2 NDIR in a practical application
Arduino Nano-Controlled Obstacle Avoidance Robot with IR and Ultrasonic Sensors
This is a robotic control system featuring an Arduino Nano that interfaces with two IR sensors, an ultrasonic sensor, and a servomotor for various sensing and actuation tasks. It controls two DC gear motors through an L298N motor driver, all powered by a 12V battery. The system's functionality is determined by the embedded code running on the Arduino Nano, which manages sensor inputs and actuator outputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 12345: A project utilizing DFRobot CO2 NDIR in a practical application
ESP32-Based Environmental Monitoring Station with CO2, Temperature, Humidity Sensing and Data Logging
This is a multi-sensor data logging system with an ESP32 microcontroller that measures environmental parameters such as humidity, temperature, and CO2 levels. It includes an LCD for data display, an RTC for timekeeping, and an SD card module for data storage, all powered by a 18650 battery shield.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of GAS SENSOR detector: A project utilizing DFRobot CO2 NDIR in a practical application
Arduino UNO Based Air Quality and Fire Detection System with RGB Indicator and Alarm
This circuit features an Arduino UNO microcontroller interfaced with an MQ135 gas sensor for CO2 detection, a KY-026 flame sensor for fire detection, a buzzer for alarms, and an RGB LED to visually indicate CO2 levels. A 16x2 LCD displays CO2 concentration and fire alerts, while potentiometers control LCD contrast. The embedded code manages sensor readings, activates the buzzer based on predefined thresholds, and adjusts the RGB LED color in response to CO2 levels.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 19301 schematic: A project utilizing DFRobot CO2 NDIR in a practical application
Arduino Nano and ESP32-Based Smart Environmental Monitoring System with Battery Power
This circuit is a multi-sensor monitoring system using an Arduino Nano and an ESP32. It includes sensors for obstacle detection (IR sensors), air quality (MQ135), and temperature/humidity (DHT11), with visual indicators (LEDs) and an auditory alert (buzzer). The system is powered by a 18650 Li-ion battery pack regulated by a 7805 voltage regulator.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

The following table outlines the key technical details of the DFRobot CO2 NDIR sensor:

Parameter Value
Measurement Range 0 - 5000 ppm
Accuracy ±(50 ppm + 3% of reading)
Response Time < 120 seconds
Operating Voltage 4.5V - 5.5V
Operating Current < 85 mA
Output Signal UART (3.3V TTL)
Operating Temperature 0°C to 50°C
Operating Humidity 0% - 95% RH (non-condensing)
Dimensions 35mm x 23mm x 7mm

Pin Configuration and Descriptions

The DFRobot CO2 NDIR sensor has a 7-pin interface. The pin configuration is as follows:

Pin Name Description
1 VCC Power supply input (4.5V - 5.5V)
2 GND Ground
3 TX UART Transmit (3.3V TTL)
4 RX UART Receive (3.3V TTL)
5 PWM Optional PWM output for CO2 concentration
6 NC Not connected
7 NC Not connected

Usage Instructions

How to Use the Component in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 5V power source and the GND pin to ground.
  2. Connect Communication Pins: Use the TX and RX pins to establish UART communication with a microcontroller (e.g., Arduino UNO). Ensure the UART logic level is 3.3V.
  3. Optional PWM Output: If desired, connect the PWM pin to a microcontroller to read CO2 concentration as a PWM signal.
  4. Warm-Up Time: Allow the sensor to warm up for at least 3 minutes after powering on for accurate readings.

Important Considerations and Best Practices

  • Power Supply: Use a stable 5V power source to avoid measurement errors.
  • Ventilation: Ensure proper airflow around the sensor for accurate CO2 detection.
  • Avoid Condensation: Operate the sensor in non-condensing environments to prevent damage.
  • UART Logic Level: If using a 5V microcontroller, use a level shifter to convert the UART signals to 3.3V.

Example Code for Arduino UNO

Below is an example of how to interface the DFRobot CO2 NDIR sensor with an Arduino UNO using UART communication:

#include <SoftwareSerial.h>

// Define RX and TX pins for SoftwareSerial
SoftwareSerial mySerial(10, 11); // RX = Pin 10, TX = Pin 11

void setup() {
  Serial.begin(9600); // Initialize hardware serial for debugging
  mySerial.begin(9600); // Initialize software serial for sensor communication

  Serial.println("DFRobot CO2 NDIR Sensor Test");
}

void loop() {
  if (mySerial.available()) {
    // Read data from the sensor
    String sensorData = "";
    while (mySerial.available()) {
      char c = mySerial.read();
      sensorData += c;
    }

    // Print the received data to the Serial Monitor
    Serial.println("CO2 Concentration: " + sensorData + " ppm");
  }

  delay(1000); // Wait 1 second before the next reading
}

Note: Ensure the RX and TX pins of the sensor are correctly connected to the TX and RX pins of the Arduino UNO (via level shifters if necessary).

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Received from the Sensor:

    • Verify the TX and RX connections between the sensor and the microcontroller.
    • Ensure the UART baud rate is set to 9600 bps.
    • Check the power supply voltage (should be 4.5V - 5.5V).
  2. Inaccurate Readings:

    • Allow the sensor to warm up for at least 3 minutes after powering on.
    • Ensure the sensor is not exposed to extreme temperatures or humidity.
  3. Sensor Not Responding:

    • Confirm that the UART logic level matches the sensor's 3.3V requirement.
    • Check for loose or incorrect wiring.

FAQs

Q: Can this sensor measure CO2 levels above 5000 ppm?
A: No, the sensor's maximum measurement range is 5000 ppm. Readings above this value may not be accurate.

Q: Can I use this sensor outdoors?
A: While the sensor can operate in a wide range of humidity levels, it is not waterproof and should be protected from rain and condensation.

Q: How often should I calibrate the sensor?
A: The sensor is factory-calibrated, but for long-term accuracy, periodic calibration in a known CO2 environment is recommended.

Q: Can I use the sensor with a 5V UART microcontroller?
A: Yes, but you must use a level shifter to convert the 5V UART signals to 3.3V to avoid damaging the sensor.