

The MQ135 is a versatile gas sensor designed to detect a wide range of gases, including ammonia (NH3), benzene (C6H6), alcohol, smoke, and other harmful gases. It operates on the principle of resistive change, where the sensor's resistance varies in the presence of target gases. This change is converted into an analog output signal, making it suitable for air quality monitoring and environmental sensing applications.








The MQ135 sensor is designed for ease of use and integration into various systems. Below are its key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Load Resistance (RL) | 10 kΩ (typical) |
| Heating Current | ≤ 120 mA |
| Heating Voltage | 5V ± 0.2V |
| Detection Range | 10 ppm to 1000 ppm |
| Preheat Time | ≥ 24 hours for stable operation |
| Output Signal | Analog voltage (0-5V) |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | ≤ 95% RH |
| Sensor Life | ≥ 2 years (under normal use) |
The MQ135 sensor typically comes with four pins. Below is the pinout description:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (5V DC) |
| 2 | GND | Ground connection |
| 3 | AOUT | Analog output pin (provides gas concentration signal) |
| 4 | DOUT | Digital output pin (threshold-based signal) |
Below is an example of how to interface the MQ135 with an Arduino UNO to read analog values:
// MQ135 Gas Sensor Example Code
// Connect AOUT to Arduino A0 pin, VCC to 5V, and GND to GND
const int analogPin = A0; // Analog pin connected to MQ135 AOUT
int sensorValue = 0; // Variable to store sensor reading
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("MQ135 Gas Sensor Test");
}
void loop() {
sensorValue = analogRead(analogPin); // Read analog value from sensor
Serial.print("Sensor Value: ");
Serial.println(sensorValue); // Print the sensor value to the Serial Monitor
delay(1000); // Wait for 1 second before the next reading
}
analogRead() function reads the analog voltage from the sensor and converts it to a digital value (0-1023).Inconsistent Readings:
No Output Signal:
High Sensor Values in Clean Air:
Digital Output Not Triggering:
Q1: Can the MQ135 detect multiple gases simultaneously?
A1: The MQ135 provides a combined response to all detectable gases. It cannot differentiate between specific gases without additional calibration and processing.
Q2: How do I calibrate the MQ135 sensor?
A2: Place the sensor in a clean air environment and record the baseline analog value. Use this value as a reference for detecting gas concentrations.
Q3: Can the MQ135 be used outdoors?
A3: While the MQ135 can operate outdoors, it should be protected from extreme weather conditions and high humidity to ensure accurate readings and longevity.
Q4: What is the lifespan of the MQ135 sensor?
A4: Under normal operating conditions, the sensor has a lifespan of approximately 2 years.