meta data for this page
Differences
This shows you the differences between two versions of the page.
| sensor:mics6814 [2026/02/13 16:09] – created vamsan | sensor:mics6814 [2026/02/13 16:26] (current) – [LamaPLC: CJMCU-6814 combined gas sensor module for CO, NO₂, NH₃] vamsan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== LamaPLC: CJMCU-6814 combined gas sensor module for CO, NO2, NH3 ====== | + | ====== LamaPLC: CJMCU-6814 combined gas sensor module for CO, NO₂, NH₃ ====== |
| + | {{ : | ||
| The CJMCU-6814 is a specialized gas sensor module designed for air quality monitoring, primarily built around the MiCS-6814 sensor. It is a " | The CJMCU-6814 is a specialized gas sensor module designed for air quality monitoring, primarily built around the MiCS-6814 sensor. It is a " | ||
| Line 9: | Line 10: | ||
| * **Ammonia (NH₃):** 1 – 500 ppm. | * **Ammonia (NH₃):** 1 – 500 ppm. | ||
| * **Secondary detection: | * **Secondary detection: | ||
| - | * **Operating Voltage:** 4.9V – 5.1V. | + | * **Operating Voltage:** **4.9V – 5.1V**. |
| * **Output:** Three analog output pins (Red, Ox, NH3) corresponding to the internal sensing elements. | * **Output:** Three analog output pins (Red, Ox, NH3) corresponding to the internal sensing elements. | ||
| **Important Usage Notes** | **Important Usage Notes** | ||
| - | * **Warm-up Period:** The sensor requires a significant warm-up time to reach a stable operating temperature. The datasheet indicates it can take over 120 minutes for the internal heater to stabilize. | + | * **Warm-up Period:** The sensor requires a significant warm-up time to reach a stable operating temperature. The datasheet indicates |
| * **Calibration: | * **Calibration: | ||
| - | * **No I2C:** Unlike some other MiCS-6814 breakout boards, the purple CJMCU version typically does not support | + | * **No I²C:** Unlike some other MiCS-6814 breakout boards, the purple CJMCU version typically does not support |
| - | * **External Resistors: | + | * **External Resistors: |
| ==== Arduino code ==== | ==== Arduino code ==== | ||
| + | To interface the CJMCU-6814 with an Arduino, you read the three analog output channels (CO, NH₃, NO₂) using analogRead(). This sensor typically does not use I²C, so you must connect the pins directly to the Arduino' | ||
| + | |||
| + | This sketch reads the raw voltage from each sensor channel every 5 seconds. | ||
| + | |||
| <code c> | <code c> | ||
| - | sample | + | // CJMCU-6814 Basic Reading Example |
| + | const int pinCO = A0; // Carbon Monoxide (RED channel) | ||
| + | const int pinNH3 = A1; // Ammonia (NH3 channel) | ||
| + | const int pinNO2 = A2; // Nitrogen Dioxide (OX channel) | ||
| + | |||
| + | void setup() { | ||
| + | Serial.begin(9600); | ||
| + | Serial.println(" | ||
| + | // Sensor requires a long warm-up (up to 30-120 mins) for stability | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | // Read raw values (0-1023) | ||
| + | int rawCO = analogRead(pinCO); | ||
| + | int rawNH3 = analogRead(pinNH3); | ||
| + | int rawNO2 = analogRead(pinNO2); | ||
| + | |||
| + | // Convert to voltage (assuming 5V Arduino) | ||
| + | float voltCO | ||
| + | float voltNH3 = rawNH3 * (5.0 / 1023.0); | ||
| + | float voltNO2 = rawNO2 * (5.0 / 1023.0); | ||
| + | |||
| + | // Print results | ||
| + | Serial.print(" | ||
| + | Serial.print(" | ||
| + | Serial.print(" | ||
| + | |||
| + | delay(5000); | ||
| + | } | ||
| </ | </ | ||
| - | ===== I²C topics on lamaPLC ===== | + | ===== CJMCU topics on lamaPLC ===== |
| - | {{topic>i2c}} | + | {{topic>cjmcu}} |
| \\ | \\ | ||
| \\ | \\ | ||
| - | {{tag>ENS160 ScioSense gas-quality i2c communication | + | {{tag>analog CJMCU CJMCU-6814 mics6814 MICS-6814 |
| This page has been accessed for: Today: {{counter|today}}, | This page has been accessed for: Today: {{counter|today}}, | ||