MQ135 is primarily used for detecting harmful gases in the air, such as ammonia, hydrogen sulfide, carbon monoxide, and alcohol vapor, and is not specifically designed for detecting carbon dioxide (CO2) and oxygen (O2). For measuring CO2 and O2 levels, other sensor types are typically employed, such as MG811 or MH-Z19B for CO2, and ME2-O2 for oxygen. However, MQ135 can still be utilized for basic air quality assessment, including approximate CO2 level estimation.
Next, I will explain how to use MQ135 and Arduino for basic air quality monitoring:
-
Component Preparation:
- MQ135 Sensor: Used for detecting various gas concentrations in the air.
- Arduino Board (e.g., Arduino UNO): Used for controlling the sensor and processing data.
- Breadboard and Jumper Wires: Used for connecting the sensor and Arduino.
-
Connecting the Sensor:
- Connect the MQ135's VCC to the Arduino's 5V output.
- Connect GND to the Arduino's GND.
- Connect AOUT (analog output) to any analog input pin on the Arduino (e.g., A0).
-
Programming the Arduino:
- Use the Arduino IDE to write and upload the code, which primarily includes logic for reading analog values and converting them to gas concentrations.
- First, initialize the sensor and set the read frequency.
cppint sensorValue; void setup() { Serial.begin(9600); // Initialize serial communication } void loop() { sensorValue = analogRead(A0); // Read sensor value Serial.println(sensorValue); // Print sensor value delay(1000); // Read once per second }
-
Calibration and Reading Interpretation:
- Since MQ135 is not specifically designed for CO2 detection, precise CO2 concentration measurements require calibration using laboratory calibration data.
- Typically, the sensor is calibrated by comparing analog output values under standard gas concentrations.
-
Data Processing and Applications:
- Output values can be viewed via the Serial Monitor, and data can be sent to a computer or cloud platform for further analysis as needed.
- This data can be used for environmental monitoring, indoor air quality control, and other applications.
Example:
In an experiment, I used MQ135 to monitor air quality changes in a closed space. By tracking sensor outputs over different time periods, we observed a significant increase in readings after using household cleaner, indicating higher concentrations of harmful gases. Although this was not a dedicated CO2 experiment, it demonstrates how MQ135 can be used to assess approximate changes in harmful gas levels.