Component guide · Intermediate · 3 min read
Sensirion SCD30 NDIR CO2, Temperature and Humidity Sensor

Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The Sensirion SCD30 is a dual-channel NDIR CO2 sensor with built-in temperature and humidity, so one board gives the three main indoor air values. It reads 400 to 10,000 ppm with about plus or minus 30 ppm accuracy over I2C at address 0x61 or Modbus. It suits classrooms, offices and ventilation control, and its larger optics make it more stable than tiny CO2 sensors.
Key specs at a glance
- Supply
- 3.3 to 5.5 V
- Range
- 400 to 10,000 ppm
- Accuracy
- Plus or minus (30 ppm + 3%)
- Interface
- I2C 0x61 (up to 100 kHz) or Modbus over UART
- Extras
- Temperature and humidity
- Current
- About 19 mA average at 2 s interval
What the Sensirion SCD30 CO2 sensor is
The Sensirion SCD30 is an NDIR CO2 sensor module that also measures temperature and humidity, giving accurate CO2 readings over I2C, UART (Modbus) or PWM.
The SCD30 uses I2C clock stretching. The ESP32 handles it; on some boards slow the bus to 50 kHz if you see errors.
The temperature reading includes self-heating; set a temperature offset if you compare with another sensor.
Sensirion SCD30 CO2 sensor pinout
The pins on the Sensirion SCD30 CO2 sensor and what each one does.
| Pin | Function |
|---|---|
| VIN | 3.3 to 5.5 V |
| GND | Ground |
| SCL / TX | I2C clock |
| SDA / RX | I2C data |
| RDY | Data ready |
| SEL | Low for I2C, high for Modbus |
- VIN
- 3.3 to 5.5 V
- GND
- Ground
- SCL / TX
- I2C clock
- SDA / RX
- I2C data
- RDY
- Data ready
- SEL
- Low for I2C, high for Modbus
Wiring the Sensirion SCD30 CO2 sensor
Connect the Sensirion SCD30 CO2 sensor like this.
| Sensirion SCD30 CO2 sensor pin | Arduino Uno | ESP32 |
|---|---|---|
| VIN | 5 V | 3.3 V |
| GND | GND | GND |
| SDA | A4 | GPIO 21 |
| SCL | A5 | GPIO 22 |
- VIN
- Arduino Uno:
- 5 V
- ESP32:
- 3.3 V
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5
- ESP32:
- GPIO 22
Example code
A minimal sketch to check the part works.
#include <Adafruit_SCD30.h>
Adafruit_SCD30 scd;
void setup() {
Serial.begin(115200);
if (!scd.begin()) { Serial.println("No SCD30"); while (1); }
}
void loop() {
if (scd.dataReady() && scd.read()) {
Serial.print(scd.CO2, 0); Serial.print(" ppm ");
Serial.print(scd.temperature, 1); Serial.print(" C ");
Serial.print(scd.relative_humidity, 0); Serial.println(" %RH");
}
delay(2000);
}Setup and tuning
VDD 3.3 to 5.5 V, GND, SDA and SCL; I2C runs at up to 100 kHz with clock stretching.
use the Sensirion or SparkFun SCD30 library.
set the measurement interval (2 s default); longer intervals save power.
use automatic self-calibration only if the room sees fresh air daily; or force-calibrate at 420 ppm outdoors.
clock stretching can upset some ESP8266 I2C drivers; use ESP32 or slower I2C.
What you need
Shop this list3 of 5 found in our store · ₹2,917
Sensirion SCD30 NDIR CO₂, Temperature & Humidity Sensor Module – I²C/UART Output: the part this guide coversSensirion SCD30 NDIR CO₂, Temperature & Humidity Sensor Module – I²C/UART Output₹2,389
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389- Uno R3 development board: the controller used in the wiring tableFind this part
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs- USB 12 V DC fan PWM speed controller: ventilation driven by the readingFind this part
Alternatives and when to choose them
- SCD4x sensor: smaller photoacoustic sensor.
- MH-Z19 sensor: cheaper UART NDIR.
- Sensirion SEN5x and SEN66: all-in-one.
Common mistakes to avoid
- Running I2C too fast.
- Auto calibration in a never-ventilated room.
- Ignoring self-heating offset.
- Blocking the sensor openings.
Frequently asked questions
How accurate is the SCD30?
About ±30 ppm plus 3 % of the reading.
Why does my SCD30 not respond on I2C?
It uses clock stretching; lower the I2C speed and use a board that supports it.
Does the SCD30 measure temperature and humidity?
Yes, but self-heating raises temperature; set the temperature offset.
Should I enable auto calibration?
Only if the room is ventilated with fresh air daily.
SCD30 or SCD40, which should I choose?
The SCD40 is smaller and cheaper; the SCD30 is a proven, accurate classic.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


