The CJMCU-8128 is a multi-functional air quality sensor module that integrates the CCS811 and HDC1080 sensors. This module is designed to measure indoor air quality, including CO2 and Total Volatile Organic Compounds (TVOC) levels, as well as temperature and humidity. It is widely used in applications such as smart home systems, HVAC systems, air purifiers, and environmental monitoring.
Parameter | Value |
---|---|
Operating Voltage | 3.3V |
Operating Current | 20mA (typical) |
CO2 Measurement Range | 400 to 8192 ppm |
TVOC Measurement Range | 0 to 1187 ppb |
Temperature Range | -40°C to 125°C |
Humidity Range | 0% to 100% RH |
Communication Interface | I2C |
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V) |
2 | GND | Ground |
3 | SDA | I2C data line |
4 | SCL | I2C clock line |
5 | INT | Interrupt output (optional, for CCS811) |
6 | RST | Reset (optional, for CCS811) |
Below is an example code to interface the CJMCU-8128 with an Arduino UNO. This code reads CO2, TVOC, temperature, and humidity values and prints them to the serial monitor.
#include <Wire.h>
#include "Adafruit_CCS811.h"
#include "Adafruit_HDC1000.h"
// Create instances for CCS811 and HDC1080 sensors
Adafruit_CCS811 ccs;
Adafruit_HDC1000 hdc = Adafruit_HDC1000();
void setup() {
Serial.begin(9600);
Wire.begin();
// Initialize CCS811 sensor
if (!ccs.begin()) {
Serial.println("Failed to start CCS811 sensor! Please check your wiring.");
while (1);
}
// Initialize HDC1080 sensor
if (!hdc.begin()) {
Serial.println("Failed to start HDC1080 sensor! Please check your wiring.");
while (1);
}
// Wait for the sensors to be ready
delay(1000);
}
void loop() {
// Check if data is available from CCS811
if (ccs.available()) {
if (!ccs.readData()) {
Serial.print("CO2: ");
Serial.print(ccs.geteCO2());
Serial.print(" ppm, TVOC: ");
Serial.print(ccs.getTVOC());
Serial.println(" ppb");
} else {
Serial.println("Error reading from CCS811 sensor!");
}
}
// Read temperature and humidity from HDC1080
float temperature = hdc.readTemperature();
float humidity = hdc.readHumidity();
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" °C, Humidity: ");
Serial.print(humidity);
Serial.println(" %");
// Wait for 1 second before the next reading
delay(1000);
}
By following this documentation, you should be able to effectively integrate and use the CJMCU-8128 air quality sensor module in your projects. If you encounter any issues, refer to the troubleshooting section or consult the sensor datasheets for more detailed information.