====== LamaPLC: CJMCU-6814 combined gas sensor module for CO, NO₂, NH₃ ====== {{ :sensor:cjmcu_6814.png?180|CJMCU-6814 combined gas sensor module for CO, NO2, NH3}} The CJMCU-6814 is a specialized gas sensor module designed for air quality monitoring, primarily built around the MiCS-6814 sensor. It is a "3-in-1" device capable of detecting carbon monoxide (CO), nitrogen dioxide (NO₂), and ammonia (NH₃) simultaneously through three independent analog channels. **Key Technical Specifications** * **Target Gases & Range:** \\ * **Carbon Monoxide (CO):** 1 – 1000 ppm. * **Nitrogen Dioxide (NO₂):** 0.05 – 10 ppm. * **Ammonia (NH₃):** 1 – 500 ppm. * **Secondary detection:** Detects Ethanol, Hydrogen, Methane, and Propane. * **Operating Voltage:** **4.9V – 5.1V**. * **Output:** Three analog output pins (Red, Ox, NH3) corresponding to the internal sensing elements. **Important Usage Notes** * **Warm-up Period:** The sensor requires a significant warm-up time to reach a stable operating temperature. The datasheet indicates that it can take more than //120 minutes// for the internal heater to stabilize. * **Calibration:** It is designed for relative measurement, not absolute precision. You must calibrate it in your specific environment (e.g., "clean air" as a baseline) to convert analog voltage changes into meaningful ppm estimates. * **No I²C:** Unlike some other MiCS-6814 breakout boards, the purple CJMCU version typically does not support I²C. You must use the Arduino analog pins (e.g., A0, A1, A2) to read data. * **External Resistors:** For optimal results and to prevent sensor damage, it is often recommended to use external pull-up resistors (e.g., 47 kΩ) or a combination with a 10kΩ potentiometer to tune the output range. {{page>:tarhal}} ==== 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's analog inputs. This sketch reads the raw voltage from each sensor channel every 5 seconds. // 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("CJMCU-6814 Gas Sensor Initializing..."); // 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 = rawCO * (5.0 / 1023.0); float voltNH3 = rawNH3 * (5.0 / 1023.0); float voltNO2 = rawNO2 * (5.0 / 1023.0); // Print results Serial.print("CO: "); Serial.print(voltCO); Serial.print("V | "); Serial.print("NH3: "); Serial.print(voltNH3); Serial.print("V | "); Serial.print("NO2: "); Serial.print(volt8); Serial.println("V"); delay(5000); } ===== CJMCU topics on lamaPLC ===== {{topic>cjmcu}} \\ \\ {{tag>analog CJMCU CJMCU-6814 mics6814 MICS-6814 sensor arduino code Carbon_monoxide CO Ammonia NH₃ Nitrogen_dioxide NO₂}} This page has been accessed for: Today: {{counter|today}}, Until now: {{counter|total}}