

The MQ-135 is a versatile gas sensor designed to detect a wide range of gases, including ammonia (NH₃), benzene (C₆H₆), alcohol, smoke, and other air quality indicators. It operates on the principle of resistive change, where the sensor's resistance varies in the presence of target gases. The MQ-135 provides an analog output proportional to the concentration of detected gases, making it ideal for air quality monitoring and environmental sensing applications.








The MQ-135 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) |
| Heater Voltage (VH) | 5V ± 0.1V |
| Heater Power Consumption | ≤ 800 mW |
| Detection Range | 10 ppm to 1000 ppm (varies by gas) |
| Preheat Time | ≥ 24 hours for stable readings |
| Output Signal | Analog voltage (0-5V) |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | ≤ 95% RH |
| Dimensions | 32mm x 20mm x 22mm |
The MQ-135 sensor typically comes with four pins. Below is the pinout description:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (5V DC) |
| 2 | GND | Ground pin |
| 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 MQ-135 with an Arduino UNO to read analog values:
// MQ-135 Gas Sensor Example Code
// Connect AOUT to Arduino analog pin A0
const int analogPin = A0; // Define the analog pin connected to AOUT
int sensorValue = 0; // Variable to store the sensor reading
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("MQ-135 Gas Sensor Test");
}
void loop() {
sensorValue = analogRead(analogPin); // Read the analog value from the sensor
Serial.print("Sensor Value: ");
Serial.println(sensorValue); // Print the sensor value to the Serial Monitor
// Add a delay to avoid flooding 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 MQ-135 detect specific gases?
A1: Yes, the MQ-135 can detect gases like ammonia, benzene, alcohol, and smoke. However, it is not selective and may respond to multiple gases simultaneously.
Q2: How do I calibrate the MQ-135?
A2: Place the sensor in a clean air environment and record the baseline analog output. Use this value to calculate gas concentrations relative to the baseline.
Q3: Can I use the MQ-135 outdoors?
A3: While the MQ-135 can be used outdoors, ensure it is protected from extreme humidity, temperature, and direct exposure to water.
Q4: What is the lifespan of the MQ-135 sensor?
A4: The sensor typically lasts for several years under normal operating conditions, but its sensitivity may degrade over time. Regular calibration is recommended.