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. ›CO2 Sensors

Comparison · Intermediate · 3 min read

CO2 Sensors

MH-Z19, SCD40/41, SCD30 and S8 for Indoor Air Quality

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerWhat the numbers meanWhich sensor typeReading an MH-Z19 over UARTWarm-up and calibrationTry itCommon mistakesFAQsParts and next steps
Short answer

CO2 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. NDIR sensors such as the MH-Z19 and SCD30 measure CO2 directly; the Sensirion SCD40 and SCD41 use a compact photoacoustic method. Avoid VOC sensors that only estimate eCO2.

Key specs at a glance

MH-Z19B / C
NDIR, UART and PWM, 4.5 to 5.5 V, about 400 to 5000 ppm, 3 min warm-up
SCD40
I2C 0x62, 400 to 2000 ppm, small, 2.4 to 5.5 V, also temperature and humidity
SCD41
Same as SCD40 with a range up to 5000 ppm and single-shot mode
SCD30
NDIR, I2C or UART, 400 to 10000 ppm
Calibration
Automatic baseline correction or manual calibration in fresh air
Response
30 seconds to a few minutes
01

What the numbers mean

CO2 itself is harmless at these levels, but it is a good indicator of how much exhaled air is in a room.

Level (ppm)Meaning
400 to 450Fresh outdoor air
450 to 1000Typical well-ventilated room
1000 to 1500Getting stuffy; open a window soon
1500 to 2500Poor ventilation; drowsiness and poor focus reported
Above 2500Ventilate immediately
Level (ppm)Meaning
400 to 450
Fresh outdoor air
450 to 1000
Typical well-ventilated room
1000 to 1500
Getting stuffy; open a window soon
1500 to 2500
Poor ventilation; drowsiness and poor focus reported
Above 2500
Ventilate immediately
02

Which sensor type

MH-Z19 (NDIR)

inexpensive, UART and PWM output, needs 5 V and a warm-up. Good for ESP32 and Arduino projects.

SCD40 / SCD41 (photoacoustic)

tiny, I2C, also reports temperature and humidity, easy to place in a case. Excellent for wall displays.

SCD30 (NDIR)

larger, a wider range and also temperature and humidity.

S8 and similar

infrared modules with UART and Modbus for industrial use.

Caution

Do not use the eCO2 of a VOC sensor as a CO2 measurement. See the VOC sensors guide.

03

Reading an MH-Z19 over UART

Send the 9-byte read command and decode the reply. The sketch is for an ESP32 on Serial2 at 9600 baud.

MH-Z19 CO2 read (ESP32 Serial2) · Arduino C++Verify & upload in Electrolark
// Sensor TX -> GPIO16, sensor RX -> GPIO17, Vin 5 V, GND
const uint8_t CMD[9] = {0xFF, 0x01, 0x86, 0, 0, 0, 0, 0, 0x79};

void setup() {
  Serial.begin(115200);
  Serial2.begin(9600, SERIAL_8N1, 16, 17);
}

void loop() {
  Serial2.write(CMD, 9);
  delay(100);
  uint8_t r[9];
  if (Serial2.readBytes(r, 9) == 9 && r[0] == 0xFF && r[1] == 0x86) {
    int ppm = r[2] * 256 + r[3];
    Serial.print("CO2 ppm: "); Serial.println(ppm);
  }
  delay(5000);
}
04

Warm-up and calibration

Let the sensor warm up for at least the time in the data sheet. Many modules have automatic baseline correction (ABC), which resets the lowest reading of the day to about 420 ppm. This works well in rooms that are aired every day but drifts if the room is always occupied. In that case turn ABC off and do a manual calibration outdoors, or use the sensor's forced recalibration at a known level.

05

Try it: Adc resolution calculator

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

06

Common mistakes to avoid

  • !Reading values straight after power-on.
  • !Placing the sensor next to your face or a window vent.
  • !Leaving ABC on in a room that never reaches fresh air.
  • !Using a VOC sensor's eCO2 instead of a real CO2 reading.
  • !Powering a 5 V module from 3.3 V.
07

Frequently asked questions

What CO2 level is bad?

Above 1000 ppm indoors suggests poor ventilation, and above 1500 ppm you should open a window.

MH-Z19 or SCD40?

SCD40 is smaller and gives temperature and humidity too. MH-Z19 is a low-cost UART option.

How often should I calibrate?

With ABC on, it calibrates itself weekly. Without it, check against outdoor air every few months.

Can I use it for safety?

No. These sensors indicate ventilation, not toxic gas levels. Use certified detectors for CO or gas leaks.

Why do my readings jump?

Breath or ventilation changes. Average over a few minutes and place the sensor in free air.

Parts for this guide

  • Winsen MH-Z19E NDIR CO2 Sensor for Indoor Air Quality Monitoring – UART/PWM Output
    ₹1,839View
  • Sensirion SCD40 Gas Sensor Module Purple – CO2, Temperature, Humidity, I2C Interface
    ₹1,919View
  • Sensirion SCD41 CO2, Temperature & Humidity Sensor Module – I2C Interface, Blue PCB
    ₹2,459View
  • S8-0053 Infrared CO2 Sensor Module with Temperature & Humidity – UART/Modbus/PWM
    ₹349View
Shop Gas, Air Quality & CO2 Sensors

Calculators

Adc resolution calculator

Terms in this guide

NDIRNon-dispersive infrared: the accurate way to measure CO2 by absorption of infrared light, used by sensors such as the MH-Z19 and SCD40.ABC calibrationAutomatic baseline correction. Some CO2 sensors assume the lowest reading each day is fresh air (about 420 ppm) and reset to it. It drifts if the room is never aired.ppmParts per million. Used for gas concentration (outdoor CO2 is about 420 ppm) and for frequency accuracy: a 20 ppm crystal can drift about 1.7 seconds a day.CalibrationMeasuring a sensor against known conditions so its raw numbers can be converted into meaningful values, such as dry and wet readings for a soil sensor.UARTUniversal asynchronous receiver-transmitter: two-wire serial (TX and RX) used by GPS, Bluetooth modules and debug output.I2CInter-Integrated Circuit: a two-wire bus (SDA and SCL) that connects many devices by address.

Projects that use it

Put this into practice: 1 step-by-step build in our project library uses parts from this guide.

Intermediate · 3 hoursIndoor air quality station: CO2, VOC, dust and humidity on an ESP32View project
Browse all 1 project

Keep learning

Buying 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 · SensorsComparisonIntermediateVOC and Indoor Air Quality SensorsVOC sensors detect a mix of organic gases from cleaners, paints and cooking and report a relative index rather than a precise gas amount.3 min read · SensorsComponent guideIntermediateMQ Gas SensorsMQ sensors are cheap metal-oxide gas sensors: a heated tin-dioxide surface changes resistance when gas is present.3 min read · SensorsConcept explainerBeginnerUART and Serial CommunicationA UART sends data one bit at a time over one wire with no shared clock, so both ends must agree on the speed, called the baud rate (9600 and 115200 are common).4 min read · Electronics FundamentalsConcept 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 Fundamentals

Sources

  • Winsen MH-Z19 data sheet
  • Sensirion SCD4x and SCD30 data sheets
  • ASHRAE guidance on indoor CO2 as a ventilation indicator

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 numbers meanWhich sensor typeReading an MH-Z19 over UARTWarm-up and calibrationTry 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 guide4 items · ₹6,566

Winsen MH-Z19E NDIR CO2 Sensor for Indoor Air Quality Monitoring – UART/PWM Output · Sensirion SCD40 Gas Sensor Module Purple – CO2, Temperature, Humidity, I2C Interface · Sensirion SCD41 CO2, Temperature & Humidity Sensor Module – I2C Interface, Blue PCB · S8-0053 Infrared CO2 Sensor Module with Temperature & Humidity – UART/Modbus/PWM

Run itChange the inputs and watch the output
Serial monitor115200 baud
CO2 ppm: 642

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