Overview

The SGP30 is a digital multi-pixel metal-oxide (MOX) gas sensor designed by Sensirion for indoor air quality (IAQ) applications. Integrating four sensing elements on a single chip inside a 2.45×2.45 mm2.45 \times 2.45\text{ mm} DFN package, it outputs calibrated Total Volatile Organic Compounds (TVOC in ppb) and equivalent carbon dioxide (eCO2\text{eCO}_2 in ppm) measurements over I2CI^2C.

Featuring Sensirion's CMOSens technology and proprietary dynamic baseline compensation algorithms, the SGP30 resists long-term siloxane contamination and sensor drift. It is widely used in smart home air purifiers, HVAC ventilation systems, ESPHome nodes, and indoor environmental monitors.

Quick reference

Operating voltage (VCC)3.3 V to 5.0 V DC (breakout with onboard 1.8V LDO)
IC supply voltage (VDD)1.62 V to 1.98 V DC (1.8 V nominal)
InterfaceI2CI^2C (up to 400 kHz)
I2CI^2C Address0x58 (Fixed)
eCO2\text{eCO}_2 measurement range400 ppm to 60,000 ppm
TVOC measurement range0 ppb to 60,000 ppb
Measurement rate1.0 Hz (1 measurement per second)
Active current draw48.2 mA at 1.8V (continuous heater operation)

Pinout

Standard 4-pin 0.1" (2.54 mm) header or Qwiic / STEMMA QT connector:

PinNameTypeDescription
1VCCPowerSupply input (+3.3 V to +5.0 V DC)
2GNDPowerGround (0 V)
3SCLDigital InputI2CI^2C Serial Clock (1.8V logic; module includes level shifter)
4SDADigital Input / OutputI2CI^2C Serial Data (1.8V logic; module includes level shifter)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Supply Voltage (Module)VCCV_{CC}3.33.3 / 5.05.5VPower rail with 1.8V LDO
Operating CurrentICCI_{CC}48.255.0mAActive heating & measurement
Sleep CurrentIsleepI_{sleep}2.010.0µALow power sleep
eCO2\text{eCO}_2 RangeeCO2eCO_240060000ppmEquivalent CO2\text{CO}_2
TVOC RangeTVOCTVOC060000ppbTotal Volatile Organic Compounds
Sampling Ratefsamplef_{sample}1.0HzRecommended sampling interval
Baseline Persistencetbaset_{base}1224hoursBaseline save interval
Operating TemperatureToprT_{opr}-4085°CAmbient air

I2CI^2C Commands & Protocol

The SGP30 uses 16-bit command words (0x58 address):

Command (16-bit)NameDescription
0x2003IAQ_initInitialize IAQ measurement algorithms and baseline
0x2008IAQ_measureTrigger TVOC and eCO2\text{eCO}_2 reading (returns 6 bytes: 2B eCO2\text{eCO}_2 + CRC, 2B TVOC + CRC)
0x2015get_baselineRead current algorithm baseline values (save to EEPROM)
0x201Eset_baselineRestore saved baseline values on boot
0x2061set_humidityWrite absolute humidity value (g/m3\text{g/m}^3) for compensation

Wiring

SGP30 PinArduino UnoESP32Notes
VCC5V / 3.3V3.3VModule includes 1.8V LDO
GNDGNDGNDSystem ground
SCLA5GPIO 22I2CI^2C Clock
SDAA4GPIO 21I2CI^2C Data

Example

cpp
#include <Wire.h>
#include "Adafruit_SGP30.h"

Adafruit_SGP30 sgp;

void setup() {
  Serial.begin(115200);
  Serial.println("SGP30 test");

  if (!sgp.begin()) {
    Serial.println("Sensor not found :(");
    while (1);
  }
  Serial.print("Found SGP30 serial #");
  Serial.print(sgp.serialnumber[0], HEX);
  Serial.print(sgp.serialnumber[1], HEX);
  Serial.println(sgp.serialnumber[2], HEX);
}

void loop() {
  if (!sgp.IAQmeasure()) {
    Serial.println("Measurement failed");
    return;
  }
  Serial.print("TVOC: "); Serial.print(sgp.TVOC); Serial.print(" ppb\t");
  Serial.print("eCO2: "); Serial.print(sgp.eCO2); Serial.println(" ppm");

  delay(1000);
}

Common mistakes

  • Not polling at 1.0 Hz: The SGP30 internal baseline algorithm expects IAQmeasure() to be called at exact 1-second intervals. Irregular polling distorts TVOC and eCO2\text{eCO}_2 readings.
  • Lost baseline on power cycle: During the first 15 seconds after IAQ_init(), the sensor outputs fixed dummy readings (400 ppm eCO2\text{eCO}_2 / 0 ppb TVOC). After 12 hours of continuous operation, application code should save the baseline (get_baseline) to non-volatile flash memory and restore it on reboot (set_baseline).
  • Powering bare SGP30 IC with 3.3V or 5V: The raw SGP30 IC is rated strictly for 1.8V. Only bare chips require an external 1.8V regulator; breakout boards handle this onboard.

Notes

  • SGP30 vs CCS811: SGP30 features wider measurement ranges (up to 60,000 ppm vs 8,192 ppm) and faster baseline convergence.

Assets & downloads