CCS811 Carbon Dioxide and TVOC Air Quality Sensor
Overview
A gas sensor capable of detecting a wide range of volatile organic compounds (VOCs), measuring eCO2 (equivalent calculated carbon-dioxide) concentrations in the range of 400 to 8192ppm and TVOC (Total Volatile Organic Compound) concentrations in the range of 0 to 1187ppb. It can be used to detect alcohols, aldehydes, ketones, organic acids, amines, aliphatic and aromatic hydrocarbons. It uses an I2C interface.

Specifications
- Voltage: 1.8 – 3.3V DC (3.3V recommended)
- Current (continuous in mode 1): 30mA
- Power (sleep mode): 19mA (at 1.8V)
- Current (peak): 54mA
- Temperature range (operation): -40°C to +85°C
- Humidity range (operation): 10 – 95%
Supported GPIO
- Raspberry Pi 0~4 (software interface only)
- Raspberry Pi 5
- BeagleBone Black/Green
- Jetson Nano
- FT232H, FT2232H, FT4232H
- MCP2221
Commands
[INIT]
Enters initial configuration settings.
Item | Type | Description |
---|---|---|
Measurement Mode * | WRITE | Selects the measurement mode. (idle, 1s, 10s, 60s, 250ms) |
[SET_DRIVE_MODE]
Sets or changes the measurement mode.
Item | Type | Description |
---|---|---|
Measurement Mode | WRITE | Selects the measurement mode. (idle, 1s, 10s, 60s, 250ms) |
[READ_DATA]
Reads CO2 and TVOC concentrations.
Item | Type | Description |
---|---|---|
CO2 (ppm) | READ | eCO2 (equivalent calculated carbon-dioxide) concentration |
TVOC (ppb) | READ | TVOC (Total Volatile Organic Compound) concentration |
[SET_ENV_DATA]
Inputs environmental information (temperature, humidity). Used for more accurate CO2 and TVOC measurements.
Item | Type | Description |
---|---|---|
Humidity (%) | WRITE | Humidity of the measurement environment |
Temperature (℃) | WRITE | Temperature of the measurement environment |
[SET_BASELINE]
Sets the baseline.
Item | Type | Description |
---|---|---|
Baseline | WRITE | Enters the baseline value. |
[GET_BASELINE]
Reads the configured baseline.
Item | Type | Description |
---|---|---|
Baseline * | READ | Reads the baseline. Should be read at least 20 minutes after the module is powered on. |
Example
Objective
Read CO2 and TVOC concentrations from the sensor and display them on dashboard widgets.
Parts
Part | Quantity |
---|---|
Raspberry Pi 4 * | 1 |
CCS811 | 1 |
Wiring
CCS811 | GPIO |
---|---|
VIN | 3.3V |
GND | GND |
SCL | 23 * |
SDA | 24 * |
WAK | GND |
ADD | Not Connected ** |
** If not connected, I2C address is 0x5A; if connected to 3.3V, it is 0x5B. (May vary depending on module manufacturer.)

Project Link
Baseline Setting Method
- Execute the GET_BASELINE command 20 minutes after the module is powered on to read the baseline.
- Execute the SET_BASELINE command with the obtained baseline to store it in the module.
- From now on, the stored baseline will be applied every time the module starts.
- However, since measurement errors accumulate over time, the baseline should be reset after a certain period (several months).