🎉
ESPBoards Store is Now Open! Find the best ESP32, ESP8266 boards & accessories

CCS811 Digital Gas Sensor

CCS811 Digital Gas Sensor image

View on Amazon

Overview

The CCS811 is a digital gas sensor for monitoring indoor air quality. It measures levels of Total Volatile Organic Compounds (TVOCs) and equivalent CO₂ (eCO₂), providing valuable data for applications like air purifiers, HVAC systems, and smart home devices. Operating over an I²C interface, it simplifies integration into various projects.

About CCS811 Digital Gas Sensor

The CCS811 is an ultra-low power digital gas sensor designed for indoor air quality monitoring. It detects volatile organic compounds (VOCs) and provides equivalent CO₂ (eCO₂) levels, making it useful for smart home automation, HVAC systems, and environmental monitoring.

Key Features

  • VOC & eCO₂ Detection – Monitors air quality and pollution levels.
  • Integrated MCU & ADC – Simplifies processing and reduces external component requirements.
  • Ultra-Low Power Consumption – Ideal for battery-powered applications.
  • I²C Interface – Seamlessly integrates with ESP32, Arduino, and other microcontrollers.
Where to Buy

Get Your CCS811

CCS811 Digital Gas Sensor

Starting from

$12 per piece

Amazon com
Amazon.com Ships worldwide
Amazon de
Amazon.de Ships to EU
Aliexpress
AliExpress Best value option

💡 Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specs

CCS811 Specifications

Complete technical specification details for CCS811 Digital Gas Sensor

📊 Technical Parameters

Operating Voltage 3.3V to 5V DC
Current Consumption 0.7µA (sleep mode), 1.2mA (active mode)
Measurement Range 400 to 8192 ppm (eCO₂), 0 to 1187 ppb (TVOC)
Interface I²C
Operating Temperature -5°C to 50°C
Operating Humidity 10% to 95% RH
Dimensions 2.7mm x 4.0mm x 1.1mm
Pin Configuration

CCS811 Pinout

The CCS811 has 8 pins for I²C communication, power, and optional control signals.

Visual Pinout Diagram

Pinout Diagram Primary
CCS811 Digital Gas Sensor pinout
8
Total Pins

Pin Types

Power
2
Control
2

Quick Tips

[object

Object],Measures TVOC (0-1187 ppb) and eCO₂ (400-8192 ppm)

[object

Object],Integrated MCU and ADC for simplified processing

Requires

20-minute burn-in period for first use,[object Object]

Pin Descriptions

Pin NameTypeDescriptionNotes
1 VDD
Power

Supply voltage (3.3V to 5V). Powers the sensor.

Use stable power supply for accurate readings.

2 GND
Power

Ground connection. Connect to system ground.

3 SDA
I2C

I²C data line. Bidirectional data communication.

Connect to ESP32 GPIO 21. Requires pull-up resistor.

4 SCL
I2C

I²C clock line. Clock signal for I²C communication.

Connect to ESP32 GPIO 22. Requires pull-up resistor.

5 nWAKE
Control

Wake pin (active low). Pull low to enable communication.

Connect to GND for continuous operation, or GPIO for power saving.

6 nINT
Interrupt

Interrupt pin (optional). Indicates data ready.

Active low. Connect to GPIO for interrupt-driven reading.

7 nRESET
Control

Reset pin (active low). Used to reset the sensor.

Optional - pull high or connect to GPIO for software reset.

8 ADDR
Address

I²C address select. Connect to GND (0x5A) or VDD (0x5B).

Default: GND (address 0x5A).

Connection Guide

Wiring CCS811 to ESP32

To interface the CCS811 with an ESP32 via I²C, connect VDD to 3.3V or 5V, GND to ground, SDA to GPIO 21, SCL to GPIO 22, and nWAKE to GND.

Visual Wiring Diagram

Wiring Diagram Recommended
CCS811 Digital Gas Sensor wiring with ESP32
8
Connections

Connection Status

Required
6
Optional
2

Protocol

I2C

Pin Connections

CCS811 PinConnectionESP32 PinDescription
1 VDD Required
3.3V

Power supply. Use 3.3V for most modules.

2 GND Required
GND

Ground connection.

3 SDA Required
GPIO 21

I²C data line. Add 4.7kΩ pull-up resistor.

4 SCL Required
GPIO 22

I²C clock line. Add 4.7kΩ pull-up resistor.

5 nWAKE Required
GND

Wake control. Connect to GND for continuous operation.

6 ADDR Required
GND or VDD

Address select. GND=0x5A (default), VDD=0x5B.

7 nINT Optional
Optional GPIO

Interrupt output for data ready indication.

8 nRESET Optional
Optional GPIO or VDD

Reset control. Pull high for normal operation.

I²C

pull-up resistors (4.7kΩ) required on SDA and SCL

[object

Object]

[object

Object]

[object

Object]

[object

Object]

Use

Adafruit_CCS811 or SparkFun_CCS811 library

[object

Object]

Indoor

use only - not for safety-critical gas detection

Help & Support

CCS811 Troubleshooting

Common issues and solutions to help you get your sensor working

Common Issues

Debugging Tips

Code Examples

CCS811 Programming Examples

Ready-to-use code examples for different platforms and frameworks

Summary

Wrapping Up CCS811

The ESP32 CCS811 Digital Gas Sensor is a powerful Air Quality sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.

Best Practices

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Safety First

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.

Ready to Start Building?

Now that you have all the information you need, it's time to integrate the CCS811 into your ESP32 project and bring your ideas to life!