The CCS811 (Keyestudio Part ID: KS0457) is a digital gas sensor designed to measure indoor air quality. It detects levels of carbon dioxide (CO2) and total volatile organic compounds (TVOCs) in the environment. The sensor integrates a metal oxide (MOX) gas sensor and a microcontroller with an analog-to-digital converter (ADC) to provide accurate and reliable air quality data. Communication with the CCS811 is achieved via the I2C interface, making it easy to integrate into various microcontroller-based systems.
Explore Projects Built with CCS811
Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
This circuit features an Ai Thinker A9G development board for GSM/GPRS and GPS/BDS connectivity, interfaced with a Seeeduino XIAO microcontroller for control and data processing. A solar cell, coupled with a TP4056 charging module, charges a 3.3V battery, which powers the system through a 3.3V regulator ensuring stable operation. The circuit likely serves for remote data communication and location tracking, with the capability to be powered by renewable energy and interfaced with additional sensors or input devices via the Seeeduino XIAO.
This circuit is designed for environmental monitoring, featuring a collection of sensors interfaced with an ESP32 microcontroller. It includes a LoRa Ra-02 SX1278 module for long-range communication, various air quality sensors (CCS811, PMS5003, MQ6, MQ-7) for detecting pollutants and gases, and an SHT1x sensor for measuring temperature and humidity. The ESP32 collects sensor data and can transmit it wirelessly via LoRa, enabling remote air quality and climate monitoring.
This circuit integrates an ESP8266 NodeMCU microcontroller with a SIM800L GSM module, a GPS NEO 6M module, and a 16x2 I2C LCD display for communication and location tracking. It also includes a pushbutton for user input, a piezo buzzer for audio alerts, and is powered by a 2x 18650 battery pack through an LM2596 step-down module.
This circuit features an ESP32 microcontroller interfaced with a BME/BMP280 sensor for environmental data and an MH-Z19B sensor for CO2 measurement, both communicating via I2C (SCL, SDA) and serial (TX, RX) connections respectively. It includes a TP4056 module for charging an 18650 Li-ion battery from a solar panel, with a step-up boost converter to provide stable voltage to the MH-Z19B sensor and a voltage regulator for the SIM800L GSM module. The capacitors are likely used for power supply filtering or decoupling.
HVAC (Heating, Ventilation, and Air Conditioning) systems
Environmental monitoring devices
IoT (Internet of Things) applications for air quality tracking
Technical Specifications
The following table outlines the key technical details of the CCS811 sensor:
Parameter
Value
Operating Voltage
3.3V to 5V
Interface
I2C
CO2 Measurement Range
400 ppm to 8192 ppm
TVOC Measurement Range
0 ppb to 1187 ppb
Power Consumption
1.2 mW (typical)
Operating Temperature Range
-40°C to 85°C
Humidity Range
10% to 95% RH (non-condensing)
Dimensions
20mm x 20mm x 3.2mm
Pin Configuration and Descriptions
The CCS811 module has the following pinout:
Pin
Name
Description
1
VIN
Power supply input (3.3V to 5V).
2
GND
Ground connection.
3
SDA
I2C data line. Used for communication with the microcontroller.
4
SCL
I2C clock line. Used for communication with the microcontroller.
5
INT
Interrupt pin. Can be used to signal when new data is available (optional).
6
RST
Reset pin. Pull low to reset the sensor (optional, typically not required).
Usage Instructions
How to Use the CCS811 in a Circuit
Power the Sensor: Connect the VIN pin to a 3.3V or 5V power source and the GND pin to ground.
I2C Communication: Connect the SDA and SCL pins to the corresponding I2C pins on your microcontroller. For an Arduino UNO, connect:
SDA to A4
SCL to A5
Optional Connections:
The INT pin can be connected to a digital input pin on the microcontroller to handle interrupts.
The RST pin can be left unconnected unless a hardware reset is required.
Install Required Libraries: Use the Adafruit CCS811 library or a similar library to simplify communication with the sensor.
Important Considerations and Best Practices
Burn-in Period: The sensor requires a burn-in period of 48 hours for optimal accuracy during the first use.
Warm-up Time: Allow the sensor to warm up for 20 minutes before taking measurements after each power-up.
Environmental Conditions: Avoid exposing the sensor to extreme humidity or temperature conditions outside its operating range.
I2C Address: The default I2C address of the CCS811 is 0x5A. Ensure no other devices on the I2C bus share this address.
Example Code for Arduino UNO
Below is an example code snippet to read CO2 and TVOC values from the CCS811 using the Adafruit CCS811 library:
#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
}
Troubleshooting and FAQs
Common Issues and Solutions
Sensor Not Detected on I2C Bus:
Ensure the SDA and SCL pins are correctly connected to the microcontroller.
Verify the I2C address (0x5A) matches the address used in your code.
Check for loose or faulty wiring.
Incorrect or Unstable Readings:
Allow the sensor to complete its burn-in period (48 hours) for accurate measurements.
Ensure the sensor is operating within the specified temperature and humidity range.
Avoid placing the sensor near sources of contamination, such as solvents or aerosols.
Error Reading Data:
Ensure the sensor is properly powered (3.3V or 5V).
Verify that the library used in your code is compatible with the CCS811.
FAQs
Q: Can the CCS811 measure outdoor air quality?
A: The CCS811 is optimized for indoor air quality monitoring. It may not provide accurate readings in outdoor environments due to varying conditions.
Q: How often should I calibrate the sensor?
A: The CCS811 is factory-calibrated and does not require user calibration. However, ensure proper burn-in and warm-up periods for accurate results.
Q: Can I use the CCS811 with a 3.3V microcontroller?
A: Yes, the CCS811 is compatible with both 3.3V and 5V systems. Ensure the VIN pin is supplied with the appropriate voltage.
Q: What is the lifespan of the CCS811 sensor?
A: The sensor has a typical lifespan of 5 years under normal operating conditions.