meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sensor:mics6814 [2026/02/13 16:09] – created vamsansensor: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, NO2NH3 ======+====== 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. 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.
  
Line 9: Line 10:
   * **Ammonia (NH₃):** 1 – 500 ppm.   * **Ammonia (NH₃):** 1 – 500 ppm.
   * **Secondary detection:** Detects Ethanol, Hydrogen, Methane, and Propane.   * **Secondary detection:** Detects Ethanol, Hydrogen, Methane, and Propane.
-  * **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 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.   * **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 I2C:** Unlike some other MiCS-6814 breakout boards, the purple CJMCU version typically does not support I2C. You must use the Arduino analog pins (e.g., A0, A1, A2) to read data. +  * **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., 47kΩ) or a combination with a 10kΩ potentiometer to tune the output range. +  * **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. 
  
  
 ==== 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's analog inputs.
 +
 +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("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);  
 +}
 </code> </code>
  
-===== I²C topics on lamaPLC ===== +===== CJMCU topics on lamaPLC ===== 
-{{topic>i2c}}+{{topic>cjmcu}}
  
 \\ \\
 \\ \\
  
-{{tag>ENS160 ScioSense gas-quality i2c communication sensor arduino code}}+{{tag>analog CJMCU CJMCU-6814 mics6814 MICS-6814 sensor arduino code CO NH3 NO2}}
  
 This page has been accessed for: Today: {{counter|today}}, Until now: {{counter|total}} This page has been accessed for: Today: {{counter|today}}, Until now: {{counter|total}}