Build an indoor carbon dioxide monitor
ActivitiesProjects
Read an indoor carbon dioxide sensor on a display and compare how its readings change when a room is ventilated.
Building an indoor carbon dioxide monitor comes down to pairing a CO₂ sensor with a microcontroller and deciding how you want to view or store the data. At the simplest end, a plug-together USB build sends live parts-per-million readings straight to a computer with no soldering. Step up in complexity and you can assemble a battery-powered logger that writes timestamped readings to an SD card, or a 3D-printed enclosure with a built-in screen and LEDs that mirror air-quality colors.
Three ways to build it
These three setups are alternative paths rather than steps in a single build, so pick the one that matches how you plan to use the monitor:
- No-solder USB monitor: Connect a Trinkey QT2040 to a Sensirion SCD40 CO₂ sensor using plug-together STEMMA QT cables and connectors. No soldering is required, and the order of the sensor boards along the cable does not matter. Adding a Bosch BME280 brings in temperature, humidity, and pressure alongside CO₂, and an optional bolt kit can fasten the boards together.
- Battery-powered offline logger: To track a room away from a computer, pair an SCD-40 with a Feather RP2040 and an Adalogger FeatherWing seated on a FeatherWing Doubler (a board that holds both Feather-format boards together). The Adalogger adds removable SD-card storage and an onboard real-time clock so readings carry timestamps. Powered by a LiPoly battery with a switch inside a printed case, the sensor mounts to the top lid with M2.5 standoffs and screws, the Doubler mounts to the bottom lid, a STEMMA QT cable links the sensor to the Feather, and the Feather's USB-C port faces the case's USB-C cutout.
- Enclosed monitor with a screen: For at-a-glance readings without a computer or SD card, combine an SCD4x CO₂ sensor, a Feather ESP32-S2 Reverse TFT, and a PMSA003I particle sensor inside a 3D-printed case. The display shows CO₂, humidity, and temperature alongside an air-quality interface, while LEDs mirror the displayed air-quality colors.
Wiring and getting a first reading
The SCD-4x sensor family communicates over I²C, a sensor communication bus, using either a plug-in STEMMA QT cable or four breadboard wires. On a Feather M4, those connections run 3V to VIN, GND to GND, SCL to SCL, and SDA to SDA; check the documentation for your specific sensor breakout and controller before applying those pins to a different board.
Software routes vary by example: the Trinkey USB build documents Arduino, CircuitPython, and host-PC Python approaches, while the SCD-4x sensor guide covers CircuitPython as well as a Python-on-computer route using Blinka (which requires platform-specific setup). In the CircuitPython SCD-4x example, copy the project bundle's `code.py` and `lib` folder onto the microcontroller's `CIRCUITPY` drive. The program initializes I²C, starts periodic measurement, checks `data_ready`, and prints CO₂ in parts per million along with temperature in Celsius and relative humidity in percent. Opening the serial console shows the output, so a dedicated screen is optional.
Placement and reading the numbers
Where you put the finished monitor shapes how useful the readings are. Set it in a commonly used room at breathing-zone height—about 3 to 6 feet off the floor for a typical adult, depending on whether people sit or stand there—with free airflow around the sensor. Keep it out of corners, away from behind furniture, and clear of drafts or localized sources and sinks such as open windows, doors, air-conditioning or heater vents, and ducts, where measurements may not represent average indoor concentrations. Record the location and nearby activities if you plan to compare readings over time.
Treat CO₂ trends as one practical clue rather than a complete verdict on indoor air quality. Rising CO₂ in an occupied space such as a classroom can be a cue to open a window and increase ventilation, but low-cost monitors only detect the specific substances or environmental factors they are designed to measure. Other contaminants can be present without showing up, and a monitor reading alone cannot establish a person's health risk.
Sources
- learn.adafruit.com · diy trinkey no solder air quality monitor
- learn.adafruit.com · disconnected co2 data logger
- learn.adafruit.com · aqi case
- learn.adafruit.com · assembly
- learn.adafruit.com · python circuitpython
- epa.gov · guide siting and installing air sensors
- epa.gov · low cost air pollution monitors and indoor air quality
