← All parts

Adafruit CCS811 Air Quality

AdafruitAdafruit Metro (Arduino compatible)

A sensor for measuring air quality by detecting Volatile Organic Compounds (VOCs) and equivalent carbon dioxide (eCO2).

In stock

Specifications

3
Operating Voltage
3.3V to 5V (via regulator) or directly from microcontroller logic level, depending on version used.
Logic Level
3-5VDC
Connectivity
I2C

Pinout

8
PinNameFunctionsNotes
VinPower
POWER
3.3V regulator converts 3-5VDC
3Vo3.3V Output
GND
Up to 100mA available
GNDGround
GND
SCLI2C Clock
I2C
Level shifted for 3-5VDC
SDAI2C Data
I2C
Level shifted for 3-5VDC
INTInterrupt Output
GPIO
WAKEWake-Up Pin
GPIO
Needs to be pulled low for communication, level shifted for 3-5VDC
RSTReset
GPIO
Level shifted for 3-5VDC

Interactive pinout

Highlight:
Adafruit Metro (Arduino compatible)

Click a pin to copy its name · tap a tag above to spotlight a bus.

Starter code

Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.

Arduino (C++)

Arduino library: Adafruit CCS811 Library

arduino
// CCS811 eCO2 / TVOC air quality (I2C) — community starter example
#include <Adafruit_CCS811.h>

Adafruit_CCS811 ccs;

void setup() {
  Serial.begin(115200);
  if (!ccs.begin()) { Serial.println("CCS811 not found"); while (1) delay(10); }
}

void loop() {
  if (ccs.available() && !ccs.readData()) {
    Serial.print("eCO2="); Serial.print(ccs.geteCO2()); Serial.print(" ppm  TVOC=");
    Serial.print(ccs.getTVOC()); Serial.println(" ppb");
  }
  delay(1000);
}

MicroPython

python
# CCS811 (ESP32) — community starter example
# driver: an Adafruit_CCS811 MicroPython port (e.g. Notthemarsian/CCS811)
from machine import Pin, I2C
import CCS811, time

i2c = I2C(0, scl=Pin(22), sda=Pin(21))
s = CCS811.CCS811(i2c)

while True:
    if s.data_ready():
        print("eCO2", s.eCO2, "TVOC", s.tVOC)
    time.sleep(1)

Wiring

PinArduino Uno R3ESP32 DevKitC (WROOM-32)Notes
Vin+5V3V3Breakout 3-5 V safe
GNDGNDGND
SCLA5/SCLGPIO22I2C clock
SDAA4/SDAGPIO21I2C data
WAKEGNDGNDActive-low; tie to GND to keep awake

Typical uses

  • Indoor air quality (eCO2 / TVOC)
  • Ventilation and CO2 alerts

Related parts

6