meta data for this page
Differences
This shows you the differences between two versions of the page.
| sensor:ccs811 [2026/03/21 22:25] – created vamsan | sensor:ccs811 [2026/03/21 23:08] (current) – vamsan | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| The CJMCU-811 is a small, ultra-low-power digital gas sensor module designed to monitor indoor air quality. It is built around the CCS811 sensor from AMS, which uses a metal oxide (MOX) multi-gas sensor to detect a broad range of Volatile Organic Compounds (VOCs). | The CJMCU-811 is a small, ultra-low-power digital gas sensor module designed to monitor indoor air quality. It is built around the CCS811 sensor from AMS, which uses a metal oxide (MOX) multi-gas sensor to detect a broad range of Volatile Organic Compounds (VOCs). | ||
| - | * This type of digital sensor is used for the measurement of changes in volatile organic compounds, | + | * This type of digital sensor is used to measure |
| - | * The sensor is characterized by a relatively | + | * The sensor is known for its low power consumption, making it suitable for use in battery-powered devices. |
| - | * This device is mainly | + | * This device is primarily |
| - | * Due to its complex design, the module is very sensitive and able to accurately | + | * Because of its complex design, the module is highly |
| + | |||
| + | * **ETVOC** measurement range: 0 ~ 32768 ppb | ||
| + | * **ECO2** measurement range: 400 ~ 32768 ppm | ||
| + | |||
| + | **Key Capabilities** | ||
| + | |||
| + | The sensor measures atmospheric conditions and outputs digitized values via an I²C interface: | ||
| + | |||
| + | * **eCO² (Equivalent CO²):** Calculates carbon dioxide levels based on volatile organic compounds, usually ranging from 400 to 8,192 ppm. | ||
| + | * **TVOC (Total Volatile Organic Compounds): | ||
| + | * **On-board Processing: | ||
| + | |||
| + | ==== Technical Specifications ==== | ||
| + | |||
| + | ^Feature^Details| | ||
| + | ^Operating Voltage|1.8V to **3.3V** DC (Note: //Some modules include a regulator for 5V compatibility// | ||
| + | ^Power Consumption|~30mA average; extremely low power in idle modes (< 6µW)| | ||
| + | ^Interface|I2C (standard address is often 0x5A or 0x5B)| | ||
| + | ^Dimensions|Roughly 15mm x 21mm| | ||
| + | ^Environment|Operating temperature from -40°C to 125°C| | ||
| + | |||
| + | **Usage Considerations** | ||
| + | |||
| + | * **" | ||
| + | * **Burn-in & Run-in:** New sensors need a 48-hour burn-in period to achieve stability. Moreover, after turning on the device, the sensor typically requires about 20 minutes of run-in time to produce accurate readings. | ||
| + | * **Baseline Calibration: | ||
| + | |||
| + | ==== Pin Descriptions ==== | ||
| + | The CJMCU-811 (featuring the CCS811 sensor) is typically an 8-pin breakout board. For basic operation, you must connect VCC, GND, SDA, SCL, and WAKE. | ||
| + | |||
| + | ^Pin Name^Function^Description | ||
| + | ^VCC|Power Supply|**1.8V to 3.6V** (//Some boards include a 5V regulator// | ||
| + | ^GND|Ground|Common ground for power and logic.| | ||
| + | ^SCL|I²C Clock|Serial clock line for communication.| | ||
| + | ^SDA|I²C Data|Serial data line for communication.| | ||
| + | ^WAKE|Wake (Active Low)|Crucial: | ||
| + | ^INT|Interrupt (Active Low)|Optional; | ||
| + | ^RST|Reset (Active Low)|Optional; | ||
| + | ^ADDR|I²C Address Select|Connect to GND for 0x5A (default) or VCC for 0x5B.| | ||
| + | |||
| + | **Connection Tips** | ||
| + | |||
| + | * **WAKE Pin:** On many CJMCU-811 modules, the sensor will not respond to I2C commands if the WAKE pin is left floating. Connect it directly to a GND pin for continuous operation. | ||
| + | * **Voltage Logic:** While the sensor chip runs at 3.3V, many breakout boards, such as those from Adafruit or standard CJMCU versions, include level shifters, making them safe for use with 5V microcontrollers like the Arduino Uno. | ||
| + | * **I²C Speed:** If using a Raspberry Pi, you may need to lower the I²C baud rate to 10kHz because the Pi's hardware sometimes struggles with the //" | ||
| + | |||
| + | ==== Arduino example code ==== | ||
| + | To use the CJMCU-811 with an Arduino, the most common approach is to use the **Adafruit CCS811** Library. | ||
| + | |||
| + | **Arduino Wiring** | ||
| + | |||
| + | Connect your CJMCU-811 breakout to the Arduino as follows: | ||
| + | |||
| + | * **VCC → 3.3V** (or 5V if your board has a regulator) | ||
| + | * **GND → GND** | ||
| + | * **SDA → A4** (on Uno/Nano) or Pin 20 (Mega) | ||
| + | * **SCL → A5** (on Uno/Nano) or Pin 21 (Mega) | ||
| + | * **WAKE → GND** (Required to keep the sensor active) | ||
| + | |||
| + | This basic sketch initializes the sensor and prints eCO2 and TVOC levels to the Serial Monitor. | ||
| + | |||
| + | <code c> | ||
| + | #include " | ||
| + | |||
| + | Adafruit_CCS811 ccs; | ||
| + | |||
| + | void setup() { | ||
| + | Serial.begin(115200); | ||
| + | Serial.println(" | ||
| + | |||
| + | // Initialize the sensor | ||
| + | if(!ccs.begin()){ | ||
| + | Serial.println(" | ||
| + | while(1); | ||
| + | } | ||
| + | |||
| + | // Wait for the sensor to be ready | ||
| + | while(!ccs.available()); | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | if(ccs.available()){ | ||
| + | // readData returns false if there is no error | ||
| + | if(!ccs.readData()){ | ||
| + | Serial.print(" | ||
| + | Serial.print(ccs.geteCO2()); | ||
| + | Serial.print(" | ||
| + | Serial.print(ccs.getTVOC()); | ||
| + | Serial.println(" | ||
| + | } else { | ||
| + | Serial.println(" | ||
| + | while(1); | ||
| + | } | ||
| + | } | ||
| + | delay(1000); | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Common Troubleshooting | ||
| + | |||
| + | * **I²C Address:** If the code fails to start, your board might use address 0x5B instead of the default 0x5A. You can try // | ||
| + | * **Serial Monitor Speed:** Ensure the baud rate in your Serial Monitor matches // | ||
| + | * **Accuracy: | ||
| + | |||
| + | ===== I²C topics on lamaPLC ===== | ||
| + | {{topic> | ||
| + | |||
| + | {{tag> | ||
| + | |||
| + | This page has been accessed for: Today: {{counter|today}}, | ||