The CCS811 Air Quality Sensor Module is a digital gas sensor solution that detects a wide range of Volatile Organic Compounds (VOCs) and carbon monoxide (CO) in real-time. This sensor is designed for indoor air quality monitoring and can be used in various applications such as smart homes, HVAC systems, and air purifiers. It utilizes a micro-hotplate technology and a metal oxide (MOX) sensor, providing a reliable measurement of air contaminants.
Pin Number | Pin Name | Description |
---|---|---|
1 | VDD | Supply voltage (3.3V) |
2 | GND | Ground |
3 | SDA | Serial Data Line for I2C communication |
4 | SCL | Serial Clock Line for I2C communication |
5 | WAKE | Wake pin, active low |
6 | INT | Interrupt pin, active low |
7 | RST | Reset pin, active low |
8 | ADDR | I2C address selection pin |
#include <Wire.h>
#include "Adafruit_CCS811.h"
Adafruit_CCS811 ccs;
void setup() {
Serial.begin(9600);
Wire.begin();
// Initialize the CCS811 sensor
if (!ccs.begin()) {
Serial.println("Failed to start sensor! Please check your wiring.");
while (1);
}
// Wait for the sensor to be ready
while (!ccs.available());
}
void loop() {
// Check if data is available to read
if (ccs.available()) {
// Read sensor data
if (!ccs.readData()) {
// Output the CO2 and TVOC readings
Serial.print("CO2: ");
Serial.print(ccs.geteCO2());
Serial.print("ppm, TVOC: ");
Serial.print(ccs.getTVOC());
Serial.println("ppb");
} else {
Serial.println("ERROR! Unable to read sensor data.");
}
}
delay(500); // Wait for 500 milliseconds before next read
}
Q: Can the CCS811 sensor measure CO2 directly? A: No, the CCS811 sensor estimates CO2 levels based on the detected VOCs. It is not a direct CO2 sensor.
Q: How often should the sensor be calibrated? A: The sensor should be calibrated according to the manufacturer's recommendations or when there is a significant change in the operating environment.
Q: What is the lifespan of the CCS811 sensor? A: The typical lifespan of the CCS811 sensor is around five years, depending on the operating conditions and usage.
Q: Can the sensor operate at 5V? A: No, the CCS811 is designed to operate at 3.3V. Using a higher voltage can damage the sensor.