At Enviro Education Tools, we document low-cost environmental monitoring tools for STEM education.
This article describes a basic air quality monitor concept using Arduino and MQ135 for classroom understanding β presented as a qualitative educational experiment, not a certified monitor.
What the MQ135 can and cannot tell us
The MQ135 is a broad metal-oxide sensor sensitive to NH3, NOx, alcohol, benzene, smoke, and CO2.
Important: The raw analog value is not a calibrated PPM or Air Quality Index.
- Cross-sensitivity: It responds to multiple gases at once. You cannot reliably isolate CO2 without laboratory calibration and compensation.
- Environmental dependence: Temperature and humidity affect sensor resistance. Readings shift without correction.
- Qualitative use: In STEM education, use it to discuss relative changes (e.g., window open vs closed) rather than absolute air-quality scores.
Hardware concept
- Arduino Uno R3
- MQ135 module (AOUT to A0)
- Breadboard, jumper wires, USB cable
This article is a project guide and documentation β no hardware demonstration is claimed here.
Wiring concept
MQ135 VCC -> Arduino 5V
MQ135 GND -> Arduino GND
MQ135 AOUT -> Arduino A0
Note: Ensure stable 5V supply β unstable USB hubs affect analog readings.
Sensor conditioning vs warm-up
Per Winsen MQ135 datasheet:
- Initial conditioning: When new, power the sensor for over 48 hours in clean air for initial stabilization. This is a one-time burn-in.
- Pre-heat before readings: After initial conditioning, allow 20-30 minutes warm-up at each power-on before taking comparative readings.
Full sketch (reproducible)
This sketch is provided in the repository at examples/arduino/air_quality_demo/air_quality_demo.ino.
It logs raw ADC and estimated voltage. Voltage calculation assumes nominal 5.0V ADC reference.
const int SENSOR_PIN = A0;
const float ADC_REF = 5.0;
void setup() {
Serial.begin(9600);
delay(1000);
Serial.println("MQ135 Concept - Raw reading and voltage");
Serial.println("Allow 20-30 min warm-up after initial 48h conditioning");
Serial.println("Raw, Voltage(V)");
}
void loop() {
int sensorValue = analogRead(SENSOR_PIN);
float voltage = sensorValue * (ADC_REF / 1023.0);
Serial.print(sensorValue);
Serial.print(", ");
Serial.println(voltage, 3);
delay(2000);
}
Expected serial output at 9600 baud:
245, 1.197
247, 1.207
Setup steps
- Wire as above, upload via Arduino IDE
- Open Serial Monitor at 9600 baud
- Allow 20-30 min warm-up after initial 48h conditioning
- Log relative changes for classroom discussion, not as official AQI ```
Resources
-
Full project files: https://gitlab.com/enviro-education-tools/enviro-education-tools β see
examples/arduino/air_quality_demo/ - Sensor type comparison: Air Quality & Atmospheric Testers Overview
What do you think about using low-cost sensors for STEM? Drop a comment below π
Top comments (0)