← 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| Pin | Name | Functions | Notes |
|---|---|---|---|
| Vin | Power | POWER | 3.3V regulator converts 3-5VDC |
| 3Vo | 3.3V Output | GND | Up to 100mA available |
| GND | Ground | GND | |
| SCL | I2C Clock | I2C | Level shifted for 3-5VDC |
| SDA | I2C Data | I2C | Level shifted for 3-5VDC |
| INT | Interrupt Output | GPIO | |
| WAKE | Wake-Up Pin | GPIO | Needs to be pulled low for communication, level shifted for 3-5VDC |
| RST | Reset | 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
| Pin | Arduino Uno R3 | ESP32 DevKitC (WROOM-32) | Notes |
|---|---|---|---|
| Vin | +5V | 3V3 | Breakout 3-5 V safe |
| GND | GND | GND | |
| SCL | A5/SCL | GPIO22 | I2C clock |
| SDA | A4/SDA | GPIO21 | I2C data |
| WAKE | GND | GND | Active-low; tie to GND to keep awake |
Typical uses
- Indoor air quality (eCO2 / TVOC)
- Ventilation and CO2 alerts