Affiliate disclosure: This page contains affiliate links. When you buy through these links, we earn a small commission at no extra cost to you. This helps us keep the site running and the links up to date.
What This Project Is
This project builds an indoor air quality monitor using an Arduino UNO, a Sensirion SGP30 gas sensor, and a small OLED display. It measures Total Volatile Organic Compounds (TVOC) and equivalent CO2 (eCO2) levels, showing the readings on a clear 0.96-inch screen. This is a solid beginner project for getting started with I2C sensors and displays on Arduino.
The original Arduino Project Hub page provides the code and a basic parts list, but many of the links are generic or point to components that are frequently out of stock. This guide provides current, working buy links for all components, including common substitutions, along with practical build tips and warnings gathered from various SGP30 guides.
What You’ll Need to Buy
| # | Component | Spec | Qty | Buy Link | Notes |
|---|---|---|---|---|---|
| 1 | Arduino UNO R3 | ATmega328P, 5V logic, 14 digital I/O, 6 analog inputs, I2C on A4/A5 (SDA/SCL), 16 MHz, USB-B | 1 | SparkFun — Arduino UNO R3 | Any 5V-logic Arduino (Nano, Mega) works with pin reassignment. UNO R4 Minima is a direct form-factor replacement. |
| 2 | SGP30 Air Quality Sensor Breakout | Sensirion SGP30, I2C address 0x58, 3.3V or 5V compatible, measures TVOC 0–60,000 ppb and eCO2 400–60,000 ppm | 1 | Adafruit — SGP30 Breakout | Adafruit #3709 is often out of stock; generic GY-SGP30 modules are electrically equivalent. |
| 3 | OLED Display Module 0.96” 128×64 I2C (SSD1306) | SSD1306 driver, 128×64 pixels, I2C address 0x3C, 3.3V–5V compatible | 1 | Adafruit — OLED Display | Generic SSD1306 0.96” modules from Amazon are electrically identical and widely available. |
| 4 | Half-Size Breadboard | 400 tie points, standard 0.1” pitch, power rails included | 1 | Adafruit — Half-Size Breadboard | Any standard half-size or full-size breadboard works. |
| 5 | Jumper Wires Male-Male (Dupont) | Male-to-male, 6” (150mm), 28 AWG, at least 6 wires needed | 1 pack | Adafruit — Jumper Wires | If using the Adafruit SGP30, a STEMMA QT to male pin cable simplifies connection. |
| 6 | USB Cable Type A to Type B | USB-A to USB-B, 6 foot, for Arduino UNO programming and power | 1 | SparkFun — USB Cable | Standard printer-style USB cable. If using UNO R4 Minima, you’ll need a USB-A to USB-C cable. |
Estimated total cost for all components: $25-45.
Where to Get the Files
- Firmware (Adafruit SGP30 Library): https://github.com/adafruit/Adafruit_SGP30
- Example Code (Adafruit Learn Guide): https://learn.adafruit.com/adafruit-sgp30-gas-tvoc-eco2-mox-sensor/arduino-code
Build Notes
- Initial Readings: The SGP30 sensor needs to warm up. The first 10-20 readings will always show TVOC 0 ppb and eCO2 400 ppm. Discard these initial values or wait for them to stabilize.
- First-Time Baseline: When you first power on the sensor, it needs about 12 hours to establish a baseline for accurate readings. Plan for a full-day “burn-in” period.
- Baseline Expiration: If the sensor is off for more than seven days, any stored baseline values will expire. You’ll need to re-establish a baseline.
- Multiple SGP30s: You can only use one SGP30 sensor per I2C bus because its address (0x58) is fixed. If you need more than one, you’ll need an I2C multiplexer.
- Saving Baselines: To avoid the 12-hour re-learning period after every power cycle, save the baseline calibration values using
sgp.getIAQBaseline()and restore them on startup withsgp.setIAQBaseline(). Store these values in EEPROM or Flash memory. - Establishing Baseline: For normal operation, exposing the sensor to outside air for about 10 minutes cumulative time should be enough to establish a usable baseline.
- Warm-up Time: The SGP30 typically needs about 15 seconds to warm up before it starts providing accurate readings. Consider adding a delay or a “warming up” message to your display at startup.
- Healthy Levels: Healthy TVOC levels are typically 0 to 200 ppb. For eCO2, 400 to 1000 ppm is considered normal in a well-ventilated room. You can use these ranges to set up alerts or visual indicators in your code.
- Humidity Compensation: For better accuracy, especially in environments with changing humidity, pair the SGP30 with a humidity/temperature sensor (like a DHT22 or BME280). You can then feed the absolute humidity value to the SGP30 using
sgp.setHumidity().
About This Page
Some Assembly Mandatory builds supply guides for popular maker projects. We research and verify every component link so you can focus on building, not shopping. This guide was researched and compiled with AI assistance and reviewed by our editorial team. Found a dead link or a better component? Let us know.