SCD41 CO₂ Sensor with a Raspberry Pi Pico
A true photoacoustic NDIR CO₂ sensor (400-5000 ppm) with onboard temperature and humidity, read over I²C.

The SCD41 breakout connects to the Raspberry Pi Pico's I2C0, SDA on GP4 and SCL on GP5, at its fixed address 0x62, with VIN on 3V3. Its measurement bursts are what to plan for on the Pico's 3.3 V rail.
Wiring the SCD41 CO₂ Sensor to the Raspberry Pi Pico
Pin by pin.
| SCD41 CO₂ Sensor | Raspberry Pi Pico |
|---|---|
| VIN | 3V3 |
| GND | GND |
| SCL | GP5 |
| SDA | GP4 |
What to know on the Raspberry Pi Pico
- The SCD41 draws up to 205 mA in peaks at 3.3 V, about 15 mA on average in periodic mode. Raspberry Pi recommends keeping the 3V3 pin under 300 mA, so leave headroom for anything else on that rail.Sensirion SCD4x datasheet v1.5, p. 4; Raspberry Pi Pico datasheet, release 21, p. 8
- Sensirion asks for supply ripple under 30 mV; decouple the breakout well, and keep it off a weak or shared supply.Sensirion SCD4x datasheet, electrical specifications
- Its 3V3 pin is the breakout's regulator output: wire VIN, not 3V3, to the Pico's 3V3.Adafruit SCD-40 and SCD-41 breakout, pinouts
- In periodic mode a reading arrives every 5 seconds, so the sketch polls getDataReadyStatus() once a second.Sensirion SCD4x datasheet v1.5, p. 9
SCD41 CO₂ Sensor code for the Raspberry Pi Pico
Compiled for rp2040:rp2040:rpipico on 2026-10-30.
// SCD41 CO₂ Sensor on Raspberry Pi Pico: wiring and a free simulation at https://www.tinkered.ai/components/scd41-co2-sensor/raspberry-pi-pico
#include <Wire.h>
#include <SensirionI2cScd4x.h> // library 1.x: SensirionI2c, lower-case c
SensirionI2cScd4x scd4x;
void setup() {
Serial.begin(9600);
Wire.begin();
scd4x.begin(Wire, SCD41_I2C_ADDR_62);
scd4x.stopPeriodicMeasurement(); // clean state
scd4x.startPeriodicMeasurement(); // ~5 s cadence
}
void loop() {
uint16_t co2; float temp, hum;
bool ready = false;
scd4x.getDataReadyStatus(ready);
if (ready && scd4x.readMeasurement(co2, temp, hum) == 0 && co2 != 0) {
Serial.print("CO2: "); Serial.print(co2); Serial.print(" ppm ");
Serial.print(temp); Serial.print(" C ");
Serial.print(hum); Serial.println(" %");
}
delay(1000);
}
SCD41 CO₂ Sensor on the Raspberry Pi Pico: questions
Can the Pico's 3V3 pin power an SCD41?
Yes, with care: its peaks reach 205 mA (Sensirion datasheet v1.5, p. 4), within the 300 mA Raspberry Pi recommends for 3V3 (Pico datasheet, p. 8), but not with other heavy loads on the same pin.
Why does my SCD41 read 0 ppm on the Pico?
The first periodic reading takes about 5 seconds (Sensirion datasheet, p. 9). The sketch skips a reading until the data is ready and CO2 is non-zero.
Which I2C address does the SCD41 use?
0x62, fixed (Sensirion datasheet v1.5, p. 7). Only one SCD41 per bus; a second needs the Pico's other I2C controller.
Keep going
This guide as plain Markdown. /components/scd41-co2-sensor/raspberry-pi-pico.md