

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 voltage proportional to gas concentration) |
| 4 | DOUT | Digital output pin (high/low signal based on threshold) |
The MQ135 sensor is straightforward to use in a circuit. Follow the steps below to integrate it into your project:
Below is an example of how to use the MQ135 sensor with an Arduino UNO to read analog values:
// MQ135 Gas Sensor Example Code
// This code reads the analog output of the MQ135 sensor and prints the value
// to the Serial Monitor. Ensure the sensor is connected to the correct pins.
const int analogPin = A0; // Connect AOUT pin of MQ135 to A0 on Arduino
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("MQ135 Gas Sensor Test");
delay(1000); // Allow time for the sensor to stabilize
}
void loop() {
int sensorValue = analogRead(analogPin); // Read analog value from MQ135
float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage (0-5V)
// Print the raw sensor value and voltage to the Serial Monitor
Serial.print("Sensor Value: ");
Serial.print(sensorValue);
Serial.print(" | Voltage: ");
Serial.print(voltage);
Serial.println(" V");
delay(1000); // Wait 1 second before the next reading
}
voltage variable represents the sensor's output voltage, which is proportional to the gas concentration.No Output or Incorrect Readings
Fluctuating Readings
Low Sensitivity
Digital Output Not Triggering
Can the MQ135 detect multiple gases simultaneously?
How do I calibrate the MQ135 sensor?
Is the MQ135 suitable for outdoor use?
What is the lifespan of the MQ135 sensor?
By following this documentation, you can effectively integrate the MQ135 gas sensor into your projects and ensure reliable performance.