Source: https://mokxi.com/parts/scd4x
Updated: 2026-11-19

Part

# CO2 sensor, SCD41

Real CO2 in ppm, with temperature and humidity, over I2C at 0x62: a reading every five seconds.

See every part

- 4 pins
- 3 settings
- In 1 project

Drawn live by the editor's own code, at the size you see it.

At a glance

## The CO2 sensor, SCD41 in brief

What it is, and every setting the properties panel gives it.

The SCD41 is Sensirion’s CO2 sensor: real CO2 in ppm, with temperature and humidity, over I2C at 0x62, one reading every five seconds. It is the sensor of classroom air monitors and ventilation alarms. Unlike the eCO2 figure a gas sensor estimates, it counts CO2 by the sound a light pulse makes when it warms the gas. VIN takes 2.4 V to 5.5 V and the board carries the I2C pull-ups. The co2, temperature (-10 to 60 degrees C) and humidity properties are the room, and three sliders change them while the circuit runs. Sensirion’s library is shipped as SensirionI2cScd4x.h. The SCD40 is the same part with a narrower range.

Family

Sensors

Pins

4

co2

600

temperature

22

humidity

45

Pins

## 4 pins

Named as the editor names them, so a wire lands where you expect it.

Pin

What it does

VIN

Supply, 2.4 to 5.5 V.

GND

Ground.

SCL

I2C clock. The board carries the pull-ups.

SDA

I2C data.

How to use it

## How to read an SCD41 CO2 sensor with an Arduino

Four wires on the Uno’s I2C pins: SDA to A4, SCL to A5, VIN to 5 V and GND to GND. Temperature and humidity come from the SHT40 sensor built into the SCD41, on the same two wires. The SCD41 gives a new reading every five seconds. Fresh outdoor air is about 420 ppm, and a closed room full of people climbs past 1000 ppm, which is the point where a window wants opening.

Drag the CO2 slider on the SCD41 past 1000 ppm and watch the sketch ask for a window. The slider ranges for temperature and humidity change the other two values while the circuit runs. The sketch uses the SensirionI2cScd4x library and Adafruit’s SHT4x library, both of which compile in the browser.

Part pin

Board pin

VIN

5 V

GND

GND

SDA

A4

SCL

A5

The supply is 2.4 V to 5.5 V, so a 3.3 V board such as an ESP32 or a Pico drives it directly. Use that board’s I2C pins; the address is 0x62.

Click to open it in the editor

This is the simulator itself, running here. Click anything to open it in the editor.

Open this project in the editor Read the full tutorial

Common errors

## Common CO2 sensor, SCD41 errors and fixes

What goes wrong

The fix

The reading does not change for five seconds.

The SCD41 gives one reading every five seconds. Wait for the next one.

A scan finds nothing at the address you expect.

The SCD41 is at 0x62. Check SDA and SCL against the table.

The CO2 number looks like a gas sensor’s estimate.

It is not an eCO2 estimate. The sensor counts CO2 itself, so the number is real ppm and the slider is the room.

Questions

## Questions and answers

### What is the I2C address of the SCD41?

0x62.

### How often does the SCD41 measure?

One reading every five seconds.

### What CO2 level means open a window?

Fresh outdoor air is about 420 ppm. This project warns past 1000 ppm, which a closed room full of people climbs past.

How it is modeled

## What is true about the CO2 sensor, SCD41, here

In its help article’s own words: what the simulation gets right, and where it stops.

### Not modeled

The photoacoustic measurement's noise, and the effect of altitude, pressure and the
temperature offset on the result: a reading is the slider's CO2 plus any forced
recalibration's correction.

From SCD41 CO2 sensor, in full.

Projects

## See the CO2 sensor, SCD41 in a project

One built-in project uses it. It opens in the editor, already wired.

Boards

## The boards it is shown on

This board has a built-in project with the CO2 sensor, SCD41 in it.

- Arduino Uno R3

Libraries

## Arduino libraries for the CO2 sensor, SCD41

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

- Sensirion I2C SCD4x

Keep going

## Keep going

- I2C Scanner for Arduino and ESP32, and Fixes
- Arduino SHT31: Library, Example and Wiring
- Temperature and humidity, SHT31
- Air quality sensor, MQ-135
- Gas and weather, BME680

More parts

## The rest of the bench

Every one of these is drawn and simulated the same way.

Full-size breadboard

A real 0.1 inch grid with the rails and the center channel, 63 columns wide.

Jumper wires

Drag from any pin or hole to any other. Corners snap, and you can drag them.

Power

A supply rail at the voltage you choose.

Ground

The other end of every circuit.

LED

Lights when current flows. Five colors, and the brightness is what your eye would see.

Filament lamp

A tungsten bulb in a holder: an inrush when it is switched on cold, tens of milliseconds to warm up, and dim on half its voltage.

Resistor

Any value you like, with the color bands drawn to match.

ESP32-C3-DevKitM-1

A RISC-V board that runs your firmware at 160 MHz on the real memory map.

Pushbutton

A 12 mm tactile switch. Hold it while the simulation runs.

Raspberry Pi Pico

The RP2040 board on our own Cortex-M0+ core. Pick a program and press Run.

Raspberry Pi Pico W

Raspberry Pi Pico W (RP2040). The same board and the same pinout as a Pico, with the CYW43439 on it. The WiFi is simulated (no radio; real internet through the Cloud panel’s switch), and the on-board LED, which hangs off that chip rather than off GP25, is driven through the same path. Everything else is the Pico.

Raspberry Pi 4 Model B

Raspberry Pi 4 Model B: the 40-pin header, driven by main.py with RPi.GPIO or gpiozero.

See every part

## Wire up the CO2 sensor, SCD41

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.

Start building free Open the editor
