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

How to Use SCD-40: Examples, Pinouts, and Specs

Image of SCD-40
Cirkit Designer LogoDesign with SCD-40 in Cirkit Designer

Introduction

The SCD-40 is a high-precision digital CO2 sensor manufactured by Adafruit. It is designed to measure carbon dioxide (CO2) concentration in the air using advanced non-dispersive infrared (NDIR) sensing technology. This sensor is compact, energy-efficient, and provides accurate and reliable readings, making it ideal for applications such as indoor air quality monitoring, HVAC systems, greenhouses, and environmental control systems.

Explore Projects Built with SCD-40

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-S3 GPS and Wind Speed Logger with Dual OLED Displays and CAN Bus
Image of esp32-s3-ellipse: A project utilizing SCD-40 in a practical application
This circuit features an ESP32-S3 microcontroller interfaced with an SD card module, two OLED displays, a GPS module, and a CAN bus module. The ESP32-S3 records GPS data to the SD card, displays speed on one OLED, and shows wind speed from the CAN bus on the other OLED, providing a comprehensive data logging and display system.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-S3 GPS Logger and Wind Speed Display with Dual OLED and CAN Bus
Image of Copy of esp32-s3-ellipse: A project utilizing SCD-40 in a practical application
This circuit features an ESP32-S3 microcontroller interfaced with an SD card, two OLED displays, a GPS module, and a CAN bus module. It records GPS data to the SD card every second, displays speed in knots on one OLED display, and shows wind speed from the CAN bus in NMEA 2000 format on the other OLED display.
Cirkit Designer LogoOpen Project in Cirkit Designer
I2C LCD Display Module with Power Supply Interface
Image of J8 +j22 lcd closeup: A project utilizing SCD-40 in a practical application
This circuit interfaces a 20x4 I2C LCD display with a power source and an I2C communication bus. The LCD is powered by a 4.2V supply from a connector and communicates via I2C through another connector, which provides the SCL and SDA lines as well as ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
18650 Li-ion Battery Pack with 4S40A BMS and XL4016 Voltage Regulator for Battery-Powered Applications
Image of Power Bank: A project utilizing SCD-40 in a practical application
This circuit is a battery management and charging system for a 4S Li-ion battery pack. It includes multiple 18650 Li-ion batteries connected to a 4S40A BMS for balancing and protection, a battery indicator for monitoring charge status, and an XL4016 module for voltage regulation. The system is designed to be charged via a 20V input from a charger.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with SCD-40

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 esp32-s3-ellipse: A project utilizing SCD-40 in a practical application
ESP32-S3 GPS and Wind Speed Logger with Dual OLED Displays and CAN Bus
This circuit features an ESP32-S3 microcontroller interfaced with an SD card module, two OLED displays, a GPS module, and a CAN bus module. The ESP32-S3 records GPS data to the SD card, displays speed on one OLED, and shows wind speed from the CAN bus on the other OLED, providing a comprehensive data logging and display system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of esp32-s3-ellipse: A project utilizing SCD-40 in a practical application
ESP32-S3 GPS Logger and Wind Speed Display with Dual OLED and CAN Bus
This circuit features an ESP32-S3 microcontroller interfaced with an SD card, two OLED displays, a GPS module, and a CAN bus module. It records GPS data to the SD card every second, displays speed in knots on one OLED display, and shows wind speed from the CAN bus in NMEA 2000 format on the other OLED display.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of J8 +j22 lcd closeup: A project utilizing SCD-40 in a practical application
I2C LCD Display Module with Power Supply Interface
This circuit interfaces a 20x4 I2C LCD display with a power source and an I2C communication bus. The LCD is powered by a 4.2V supply from a connector and communicates via I2C through another connector, which provides the SCL and SDA lines as well as ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Power Bank: A project utilizing SCD-40 in a practical application
18650 Li-ion Battery Pack with 4S40A BMS and XL4016 Voltage Regulator for Battery-Powered Applications
This circuit is a battery management and charging system for a 4S Li-ion battery pack. It includes multiple 18650 Li-ion batteries connected to a 4S40A BMS for balancing and protection, a battery indicator for monitoring charge status, and an XL4016 module for voltage regulation. The system is designed to be charged via a 20V input from a charger.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications:

  • Indoor air quality monitoring
  • HVAC (Heating, Ventilation, and Air Conditioning) systems
  • Greenhouse CO2 monitoring
  • Smart home automation
  • Industrial and environmental control systems

Technical Specifications

The SCD-40 sensor is equipped with advanced features and specifications to ensure high performance and accuracy. Below are the key technical details:

Key Specifications:

Parameter Value
CO2 Measurement Range 400 ppm to 5000 ppm
Accuracy ±(50 ppm + 5% of reading)
Operating Voltage 3.3V to 5V
Current Consumption 2 mA (typical)
Communication Interface I2C and UART
Operating Temperature -10°C to +60°C
Operating Humidity 0% to 95% RH (non-condensing)
Dimensions 10 mm x 10 mm x 7 mm

Pin Configuration:

The SCD-40 sensor has a simple pinout for easy integration into your projects. Below is the pin configuration:

Pin Name Description
VIN Power supply input (3.3V to 5V)
GND Ground
SDA I2C data line
SCL I2C clock line
RX UART receive line
TX UART transmit line

Usage Instructions

The SCD-40 sensor is straightforward to use in a circuit. It can be connected to a microcontroller, such as an Arduino UNO, via the I2C or UART interface. Below are the steps to use the sensor:

Connecting the SCD-40 to an Arduino UNO:

  1. Power the Sensor: Connect the VIN pin of the SCD-40 to the 5V pin on the Arduino UNO, and connect the GND pin to the Arduino's GND.
  2. I2C Communication: Connect the SDA pin of the SCD-40 to the Arduino's A4 pin (SDA) and the SCL pin to the Arduino's A5 pin (SCL).
  3. Install Required Libraries: Download and install the Adafruit SCD40 library from the Arduino Library Manager.
  4. Upload Example Code: Use the example code provided below to read CO2 concentration data.

Example Code:

#include <Wire.h>
#include "Adafruit_SCD40.h"

// Create an instance of the SCD40 sensor
Adafruit_SCD40 scd40;

void setup() {
  Serial.begin(115200);
  while (!Serial) delay(10); // Wait for Serial Monitor to open

  Serial.println("Initializing SCD40 sensor...");

  // Initialize the sensor
  if (!scd40.begin()) {
    Serial.println("Failed to find SCD40 sensor! Check wiring.");
    while (1) delay(10);
  }
  Serial.println("SCD40 sensor initialized successfully.");
}

void loop() {
  // Check if a new measurement is available
  if (scd40.getDataReadyStatus()) {
    float co2, temperature, humidity;

    // Read CO2, temperature, and humidity data
    if (scd40.readMeasurement(co2, temperature, humidity)) {
      Serial.print("CO2: ");
      Serial.print(co2);
      Serial.print(" ppm, Temp: ");
      Serial.print(temperature);
      Serial.print(" °C, Humidity: ");
      Serial.print(humidity);
      Serial.println(" %");
    } else {
      Serial.println("Failed to read measurement. Please try again.");
    }
  }

  delay(2000); // Wait 2 seconds before the next reading
}

Important Considerations:

  • Ensure the sensor is not exposed to water or condensation, as it is designed for non-condensing environments.
  • Allow the sensor to warm up for a few minutes after powering it on to ensure accurate readings.
  • Avoid placing the sensor in direct sunlight or near heat sources, as this may affect its accuracy.

Troubleshooting and FAQs

Common Issues and Solutions:

  1. Sensor Not Detected:

    • Cause: Incorrect wiring or I2C address mismatch.
    • Solution: Double-check the wiring and ensure the SDA and SCL pins are connected correctly. Verify the I2C address in the code matches the sensor's default address (0x62).
  2. Inaccurate Readings:

    • Cause: Insufficient warm-up time or environmental interference.
    • Solution: Allow the sensor to warm up for at least 5 minutes. Ensure the sensor is placed in a stable environment away from direct sunlight or strong air currents.
  3. No Data Output:

    • Cause: Faulty connections or incorrect library installation.
    • Solution: Check all connections and ensure the Adafruit SCD40 library is installed correctly in the Arduino IDE.

FAQs:

  • Q: Can the SCD-40 measure other gases besides CO2?
    A: No, the SCD-40 is specifically designed to measure CO2 concentration using NDIR technology.

  • Q: What is the typical lifespan of the SCD-40 sensor?
    A: The sensor has a typical lifespan of over 15 years under normal operating conditions.

  • Q: Can I use the SCD-40 with a 3.3V microcontroller?
    A: Yes, the SCD-40 supports both 3.3V and 5V logic levels, making it compatible with a wide range of microcontrollers.

  • Q: How often should I calibrate the sensor?
    A: The SCD-40 features automatic self-calibration. However, for optimal accuracy, it is recommended to expose the sensor to fresh air periodically.

By following this documentation, you can effectively integrate and use the SCD-40 sensor in your projects for accurate CO2 monitoring.