Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›SCD40 and SCD41 CO2 Sensors

Component guide · Intermediate · 3 min read

SCD40 and SCD41 CO2 Sensors

Pinout, Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the SCD40 / SCD41 isSCD40 / SCD41 pinoutWiring the SCD40 / SCD41Example codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Short answer

The SCD40 and SCD41 from Sensirion are small CO2 sensors that measure real carbon dioxide with photoacoustic NDIR, plus temperature and humidity. They talk I2C at address 0x62 and run from 2.4 to 5.5 V. The SCD40 covers 400 to 2,000 ppm; the SCD41 covers 400 to 5,000 ppm and adds a low-power single-shot mode for battery monitors.

Key specs at a glance

Measures
CO2, temperature, relative humidity
CO2 range
SCD40: 400 to 2,000 ppm; SCD41: 400 to 5,000 ppm
Accuracy
SCD40 ±(50 ppm + 5 %); SCD41 ±(40 ppm + 5 %)
Interface
I2C, address 0x62
Supply
2.4 to 5.5 V
Measurement interval
5 s periodic; SCD41 also single shot

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1Sensirion SCD41 CO2, Temperature & Humidity Sensor Module – I2C Interface, Blue PCB₹2,459
  • Option 2Sensirion SCD40 Gas Sensor Module Purple – CO2, Temperature, Humidity, I2C Interface₹1,919
  • Option 3DFRobot Gravity SCD41 Infrared CO2 Sensor Module (400–5000 ppm) – I2C Interface₹6,539
  • Option 4Sensirion SCD40-D-R1 CO₂ Gas Detection Sensor, I²C Output, Integrated Temp & Humidity, 2.4~5.5 VDC, SCD4x Series₹2,029
  • Option 5Sensirion SCD40-D-R2 CO₂ Gas Sensor, Range: 400 ppm~2000 ppm, I2C Interface₹1,539
  • Option 6Sensirion SCD41-D-R2 CO₂ Gas Sensor, Range: 400 ppm~5000 ppm, I2C Interface, LGA-20 Package₹1,949
01

What the SCD40 / SCD41 is

These sensors use photoacoustics: an infrared source pulses inside a tiny chamber, CO2 absorbs the light and warms slightly, and a microphone hears the resulting pressure waves. This lets the sensor be far smaller than a classic NDIR chamber.

They also report temperature and humidity and use them to compensate the CO2 reading. Bare SCD40-D and SCD41-D parts are surface-mount components; the modules add pull-ups and a connector.

02

SCD40 / SCD41 pinout

The pins on the SCD40 / SCD41 and what each one does.

PinFunction
VDD / VINSupply, 2.4 to 5.5 V
GNDGround
SDAI2C data
SCLI2C clock
PinFunction
VDD / VIN
Supply, 2.4 to 5.5 V
GND
Ground
SDA
I2C data
SCL
I2C clock
03

Wiring the SCD40 / SCD41

The SCD4x accepts 3.3 or 5 V on modules. Keep the sensor out of direct sunlight and airflow; the module's own heat can raise the temperature reading slightly.

SCD40 / SCD41 pinArduino UnoESP32
VCC5V (or 3.3V)3V3
GNDGNDGND
SDAA4GPIO 21
SCLA5GPIO 22
VCC
Arduino Uno:
5V (or 3.3V)
ESP32:
3V3
GND
Arduino Uno:
GND
ESP32:
GND
SDA
Arduino Uno:
A4
ESP32:
GPIO 21
SCL
Arduino Uno:
A5
ESP32:
GPIO 22
04

Example code

Install "SparkFun SCD4x Arduino Library" from the Library Manager. begin() starts periodic measurement automatically.

Read CO2, temperature and humidity (SparkFun SCD4x library) · Arduino C++Verify & upload in Electrolark
#include <Wire.h>
#include "SparkFun_SCD4x_Arduino_Library.h"

SCD4x scd;

void setup() {
  Serial.begin(115200);
  Wire.begin();
  if (!scd.begin()) { Serial.println("No SCD4x at 0x62"); while (1); }
}

void loop() {
  if (scd.readMeasurement()) {          // true when a new reading is ready (every 5 s)
    Serial.print(scd.getCO2()); Serial.print(" ppm  ");
    Serial.print(scd.getTemperature(), 1); Serial.print(" C  ");
    Serial.print(scd.getHumidity(), 1); Serial.println(" %RH");
  }
  delay(500);
}
05

Setup and tuning

Automatic self-calibration (ASC)

is on by default and expects fresh air (about 400 ppm) at least weekly. In sealed rooms, turn it off and use forced recalibration outdoors.

Altitude

set the sensor altitude or ambient pressure for better accuracy.

Temperature offset

set an offset if the enclosure warms the sensor.

Battery use

use the SCD41 in single-shot mode every few minutes.

06

What you need

Shop this list9 of 9 found in our store · ₹16,631

  • Sensirion SCD41 CO2, temperature and humidity module: the sensor this guide coversSensirion SCD41 CO2, Temperature & Humidity Sensor Module – I2C Interface, Blue PCB₹2,459Closest match, check the specs
  • Sensirion SCD40 module: the lower-range versionSensirion SCD40-D-R2 CO₂ Gas Sensor, Range: 400 ppm~2000 ppm, I2C Interface₹1,539Closest match, check the specs
  • DFRobot Gravity SCD41 Infrared CO2 Sensor Module (400–5000 ppm) – I2C Interface: another version this guide coversDFRobot Gravity SCD41 Infrared CO2 Sensor Module (400–5000 ppm) – I2C Interface₹6,539
  • Sensirion SCD40-D-R1 CO₂ Gas Detection Sensor, I²C Output, Integrated Temp & Humidity, 2.4~5.5 VDC, SCD4x Series: another version this guide coversSensirion SCD40-D-R1 CO₂ Gas Detection Sensor, I²C Output, Integrated Temp & Humidity, 2.4~5.5 VDC, SCD4x Series₹2,029
  • Sensirion SCD40-D-R2 CO₂ Gas Sensor, Range: 400 ppm~2000 ppm, I2C Interface: another version this guide coversSensirion SCD40-D-R2 CO₂ Gas Sensor, Range: 400 ppm~2000 ppm, I2C Interface₹1,539
  • Sensirion SCD41-D-R2 CO₂ Gas Sensor, Range: 400 ppm~5000 ppm, I2C Interface, LGA-20 Package: another version this guide coversSensirion SCD41-D-R2 CO₂ Gas Sensor, Range: 400 ppm~5000 ppm, I2C Interface, LGA-20 Package₹1,949
  • ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
  • 0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
  • Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
07

Alternatives and when to choose them

  • ✓MH-Z19: larger NDIR sensor on UART.
  • ✓CO2 sensors compared.
  • ✓ENS160: VOC-based estimate, not real CO2.
08

Try it: I2c pullup calculator

Change the values and the diagram and results update as you type.

09

Common mistakes to avoid

  • !Leaving self-calibration on in a room that never gets fresh air.
  • !Expecting the SCD40 to read above 2,000 ppm accurately.
  • !Mounting it in a closed box with no air exchange.
  • !Polling faster than the 5 s measurement interval.
10

Frequently asked questions

What is the SCD40's I2C address?

0x62, fixed (same for the SCD41).

SCD40 or SCD41?

The SCD41 has a wider range (to 5,000 ppm), better accuracy and a low-power single-shot mode.

Is it a real CO2 sensor?

Yes, it measures CO2 with photoacoustic NDIR.

Does it work at 5 V?

Yes, the supply range is 2.4 to 5.5 V.

How often does it measure?

Every 5 seconds in periodic mode.

Parts for this guide

  • Sensirion SCD41 CO2, Temperature & Humidity Sensor Module – I2C Interface, Blue PCB
    ₹2,459View
  • Sensirion SCD40 Gas Sensor Module Purple – CO2, Temperature, Humidity, I2C Interface
    ₹1,919View
  • DFRobot Gravity SCD41 Infrared CO2 Sensor Module (400–5000 ppm) – I2C Interface
    ₹6,539View
  • Sensirion SCD40-D-R1 CO₂ Gas Detection Sensor, I²C Output, Integrated Temp & Humidity, 2.4~5.5 VDC, SCD4x Series
    ₹2,029View
  • Sensirion SCD40-D-R2 CO₂ Gas Sensor, Range: 400 ppm~2000 ppm, I2C Interface
    ₹1,539View
  • Sensirion SCD41-D-R2 CO₂ Gas Sensor, Range: 400 ppm~5000 ppm, I2C Interface, LGA-20 Package
    ₹1,949View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • 0.96" OLED Display 128x64
    ₹139View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop Gas, Air Quality & CO2 Sensors

Calculators

I2c pullup calculator

Terms in this guide

I2CInter-Integrated Circuit: a two-wire bus (SDA and SCL) that connects many devices by address.

Keep learning

ComparisonIntermediateCO2 SensorsCO2 sensors tell you when a room needs fresh air: outdoors is about 420 ppm, under 1000 ppm indoors is good and above 1500 ppm calls for ventilation.3 min read · SensorsBuying guideIntermediateAir Quality SensorsCompare particle, CO2 and VOC sensors for an air monitor: PMS5003 and SDS011, NDIR CO2 vs eCO2, wiring, warm-up, power and placement for honest readings.3 min read · SensorsConcept explainerIntermediateI2C ExplainedI2C is a two-wire bus that lets one microcontroller talk to many sensors and displays using a data line (SDA) and a clock line (SCL).4 min read · Electronics FundamentalsComponent guideIntermediateMH-Z19 CO2 SensorThe MH-Z19 from Winsen is an NDIR (infrared) CO2 sensor that measures real carbon dioxide from 400 to 5,000 ppm.3 min read · Sensors

Sources

  • SCD4x datasheet (Sensirion)
  • SparkFun SCD4x Arduino library

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the SCD40 / SCD41 isSCD40 / SCD41 pinoutWiring the SCD40 / SCD41Example codeSetup and tuningWhat you needAlternatives and when to choose themTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)2 items · ₹2,663

Sensirion SCD41 CO2, Temperature & Humidity Sensor Module – I2C Interface, Blue PCB · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

Photoacoustic CO2 every 5 s in periodic mode.

Serial monitor115200 baud
756 ppm  26.4 C  52.0 %RH

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question