The SparkFun Air Quality Breakout featuring the CCS811 is an advanced sensor that measures the levels of volatile organic compounds (VOCs) and equivalent carbon dioxide (eCO2) in the air. 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.
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V) |
2 | GND | Ground |
3 | SDA | I2C Data |
4 | SCL | I2C Clock |
5 | WAKE | Wake pin (active low) |
6 | INT | Interrupt pin |
7 | RST | Reset pin (active low) |
8 | ADDR | I2C Address select (float or tie to GND) |
To use the CCS811 sensor in a circuit:
#include <Wire.h>
#include "SparkFunCCS811.h" // Include the CCS811 library
#define CCS811_ADDR 0x5A // Default I2C Address
CCS811 mySensor(CCS811_ADDR);
void setup() {
Serial.begin(9600);
Wire.begin();
if (mySensor.begin() == false) {
Serial.println("CCS811 sensor not found. Please check wiring.");
while (1);
}
}
void loop() {
// Check if data is available to read
if (mySensor.dataAvailable()) {
mySensor.readAlgorithmResults(); // Read sensor data
Serial.print("CO2: ");
Serial.print(mySensor.getCO2());
Serial.print(" ppm, TVOC: ");
Serial.print(mySensor.getTVOC());
Serial.println(" ppb");
}
delay(500); // Delay between readings
}
Q: Can the sensor measure CO2 directly? A: No, the sensor measures eCO2 which is an estimation based on VOC levels.
Q: What is the lifespan of the sensor? A: The CCS811 sensor has a typical lifespan of five years when operated within its specifications.
Q: How often should the sensor be calibrated? A: Calibration frequency depends on the application, but a monthly check is a good practice.
For further assistance, consult the manufacturer's datasheet and the SparkFun CCS811 library documentation.