

The Adafruit CCS811 (Part ID: 3566) is a digital air quality sensor designed to measure indoor air quality. It detects the concentration of carbon dioxide (CO2) and total volatile organic compounds (TVOCs) in the air. The sensor uses advanced metal oxide (MOX) technology to provide accurate and reliable measurements. It communicates via the I2C protocol, making it easy to integrate into microcontroller-based systems.








The following table outlines the key technical details of the Adafruit CCS811 sensor:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5V |
| Communication Interface | I2C |
| CO2 Measurement Range | 400 ppm to 8192 ppm |
| TVOC Measurement Range | 0 ppb to 1187 ppb |
| Operating Temperature Range | -40°C to 85°C |
| Operating Humidity Range | 10% to 95% RH (non-condensing) |
| Power Consumption | 1.2mW (typical) |
| Dimensions | 20mm x 18mm x 3mm |
The Adafruit CCS811 sensor has the following pinout:
| Pin Name | Description |
|---|---|
| VIN | Power input (3.3V to 5V). Connect to the power supply of your microcontroller. |
| GND | Ground. Connect to the ground of your circuit. |
| SDA | I2C data line. Connect to the SDA pin of your microcontroller. |
| SCL | I2C clock line. Connect to the SCL pin of your microcontroller. |
| WAKE | Wake pin. Pull low to enable the sensor. Can be tied to GND for continuous use. |
| RST | Reset pin. Pull low to reset the sensor. |
| INT | Interrupt pin. Can be used for event-driven applications. |
0x5A. If the ADDR pin is pulled high, the address changes to 0x5B.Below is an example code snippet to read CO2 and TVOC values from the Adafruit CCS811 sensor using an Arduino UNO:
#include <Wire.h>
#include "Adafruit_CCS811.h"
// Create an instance of the CCS811 sensor
Adafruit_CCS811 ccs;
void setup() {
Serial.begin(9600); // Initialize serial communication
Serial.println("CCS811 Air Quality Sensor Test");
if (!ccs.begin()) {
Serial.println("Failed to start CCS811 sensor! Check connections.");
while (1);
}
// Wait for the sensor to be ready
while (!ccs.available());
}
void loop() {
if (ccs.available()) {
if (!ccs.readData()) {
// Read CO2 and TVOC values
Serial.print("CO2: ");
Serial.print(ccs.geteCO2());
Serial.print(" ppm, TVOC: ");
Serial.print(ccs.getTVOC());
Serial.println(" ppb");
} else {
Serial.println("Error reading data from CCS811 sensor.");
}
}
delay(1000); // Wait 1 second before the next reading
}
Sensor Not Detected on I2C Bus:
0x5A or 0x5B) matches the configuration in your code.Incorrect or Unstable Readings:
Sensor Fails to Initialize:
Q: Can the CCS811 measure outdoor air quality?
A: The CCS811 is optimized for indoor air quality monitoring. Outdoor conditions, such as extreme temperatures and humidity, may affect its performance.
Q: How often should I calibrate the sensor?
A: The CCS811 performs automatic baseline correction. However, for best results, expose the sensor to fresh air periodically.
Q: Can I use the CCS811 with a 3.3V microcontroller?
A: Yes, the CCS811 is compatible with both 3.3V and 5V systems.
Q: What is the lifespan of the CCS811 sensor?
A: The sensor has an estimated operational lifespan of 5 years under normal usage conditions.