Component guide · Intermediate · 3 min read
CCS811 Air Quality Sensor

Pinout, Wiring and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The CCS811 is a metal-oxide gas sensor with its own microcontroller that reports total VOC (TVOC, in ppb) and an estimated CO2 equivalent (eCO2, in ppm). It talks I2C at address 0x5A (or 0x5B) and is a 3.3 V part. Pull the WAK pin low, give it 48 hours of burn-in and 20 minutes of warm-up, and use it for indoor air quality indicators.
Key specs at a glance
- Outputs
- TVOC 0 to 1,187 ppb, eCO2 400 to 8,192 ppm
- Method
- Metal-oxide (MOX) sensor with on-chip processing
- Interface
- I2C, address 0x5A (ADDR low) or 0x5B
- Supply
- 1.8 to 3.6 V (3.3 V)
- Modes
- Readings every 1 s, 10 s or 60 s
- Control pins
- WAK must be low to talk to it
What the CCS811 is
The CCS811 measures VOCs (gases from paints, cleaners, cooking and people) and estimates eCO2 from them, because in occupied rooms CO2 and VOCs rise together. It is not a true CO2 sensor.
The chip keeps a baseline that it updates over time; saving and restoring that baseline makes readings stable after a restart. The CCS811 is no longer made, and the ENS160 is a current alternative.
CCS811 pinout
The pins on the CCS811 and what each one does.
| Pin | Function |
|---|---|
| VCC | 3.3 V supply |
| GND | Ground |
| SCL / SDA | I2C clock and data |
| WAK | Wake: tie to GND (or drive low) to communicate |
| INT | Interrupt output when data is ready |
| RST | Reset, active low |
| ADD | Address: low 0x5A, high 0x5B |
- VCC
- 3.3 V supply
- GND
- Ground
- SCL / SDA
- I2C clock and data
- WAK
- Wake: tie to GND (or drive low) to communicate
- INT
- Interrupt output when data is ready
- RST
- Reset, active low
- ADD
- Address: low 0x5A, high 0x5B
Wiring the CCS811
The CCS811 uses I2C clock stretching, which the ESP8266 and Raspberry Pi handle poorly; ESP32 and AVR Arduinos work. Its 3.3 V I2C lines work with an Uno in most cases, but a level shifter is safer.
| CCS811 pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 3.3V | 3V3 |
| GND | GND | GND |
| SDA | A4 | GPIO 21 |
| SCL | A5 | GPIO 22 |
| WAK | GND | GND |
- VCC
- Arduino Uno:
- 3.3V
- ESP32:
- 3V3
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- SDA
- Arduino Uno:
- A4
- ESP32:
- GPIO 21
- SCL
- Arduino Uno:
- A5
- ESP32:
- GPIO 22
- WAK
- Arduino Uno:
- GND
- ESP32:
- GND
Example code
Install "Adafruit CCS811 Library". Feed temperature and humidity from another sensor with setEnvironmentalData() for better accuracy.
#include "Adafruit_CCS811.h"
Adafruit_CCS811 ccs;
void setup() {
Serial.begin(115200);
if (!ccs.begin()) { Serial.println("No CCS811 found (is WAK low?)"); while (1); }
while (!ccs.available());
}
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);
}Setup and tuning
run a new sensor for 48 hours before trusting readings.
20 minutes after every power-up.
read the baseline after a day of running in clean air, store it, and write it back after restarts.
combine it with a BME280 or SHT3x for temperature and humidity input.
What you need
Shop this list5 of 5 found in our store · ₹2,185
CCS811 eCO2 TVOC air quality module: the sensor this guide coversCCS811 CO2 eCO2 TVOC Air Quality Detection Sensor Module – I2C Interface₹1,149Closest match, check the specs
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
Bosch BME280 sensor: temperature and humidity for compensationBosch BME280 Combined Temperature, Humidity & Pressure Sensor – I²C/SPI Digital Output₹459
0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
Alternatives and when to choose them
- ENS160: current-production VOC sensor with an air quality index.
- SGP30: Sensirion VOC and eCO2 sensor.
- SCD40 and SCD41: real CO2 measurement.
Try it: I2c pullup calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Leaving WAK floating, so the chip never answers.
- Treating eCO2 as a real CO2 reading.
- Trusting readings without burn-in and warm-up.
- Using it on an ESP8266 without handling clock stretching.
Frequently asked questions
What is the CCS811's I2C address?
0x5A with ADD low, 0x5B with ADD high.
Does the CCS811 measure CO2?
It estimates eCO2 from VOCs; it is not an NDIR CO2 sensor.
Why does it not respond?
The WAK pin is probably not low.
Is the CCS811 still made?
No, it has been discontinued; the ENS160 is an alternative.
Does it need 5 V?
No, it is a 3.3 V device.
Parts for this guide
Calculators
Terms in this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.
