

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 harmful gases. It operates on the principle of resistive change, where the sensor's resistance varies in response to the concentration of target gases in the air. This makes the MQ-135 an excellent choice for air quality monitoring and environmental safety applications.








The MQ-135 sensor is designed for ease of use and integration into various electronic systems. Below are its key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Load Resistance (RL) | 10 kΩ (typical) |
| Heating Voltage (VH) | 5V ± 0.2V |
| Heating Current (IH) | ≤ 120 mA |
| Detection Range | 10 ppm to 1000 ppm (varies by gas) |
| Preheat Time | ≥ 24 hours for stable operation |
| Sensitivity | Adjustable via external circuit |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | ≤ 95% RH |
| Dimensions | 32mm x 20mm x 22mm (approx.) |
The MQ-135 sensor module typically has four pins. Below is the pinout description:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin. Connect to 5V DC. |
| 2 | GND | Ground pin. Connect to the ground of the circuit. |
| 3 | AOUT | Analog output pin. Provides a voltage proportional to the gas concentration. |
| 4 | DOUT | Digital output pin. Outputs HIGH or LOW based on a preset threshold. |
Below is an example of how to use the MQ-135 sensor with an Arduino UNO to read analog values:
// MQ-135 Gas Sensor Example Code
// Connect AOUT to Arduino analog pin A0
// Connect VCC to 5V and GND to ground
const int mq135Pin = A0; // Analog pin connected to AOUT
int sensorValue = 0; // Variable to store sensor reading
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("MQ-135 Gas Sensor Test");
}
void loop() {
sensorValue = analogRead(mq135Pin); // 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
}
sensorValue will vary based on the gas concentration. You can map this value to a specific gas concentration using calibration data.Inaccurate Readings:
No Output from DOUT:
Fluctuating Analog Values:
Sensor Not Responding:
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 sensor?
A2: Place the sensor in clean air and record the baseline analog value. Use this value as a reference for detecting gas concentrations.
Q3: Can I use the MQ-135 with a 3.3V microcontroller?
A3: The MQ-135 is designed for 5V operation. Use a level shifter or voltage regulator to interface with 3.3V systems.
Q4: How long does the sensor last?
A4: The MQ-135 has a typical lifespan of 2-3 years under normal operating conditions.