

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 makes it an ideal choice for air quality monitoring and environmental safety applications.








The MQ135 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 Current | ≤ 120 mA |
| Heating Voltage | 5V ± 0.2V |
| Detection Range | 10 ppm to 1000 ppm |
| Preheat Time | ≥ 24 hours for stable operation |
| Sensitivity | Detects NH3, NOx, alcohol, benzene, smoke, and CO2 |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | ≤ 95% RH |
| Dimensions | 32mm x 20mm x 22mm (approx.) |
The MQ135 sensor typically comes with a 4-pin interface. 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 a voltage proportional |
| to the gas concentration | ||
| 4 | DOUT | Digital output pin; outputs HIGH or LOW based on |
| a preset threshold (adjustable via onboard potentiometer) |
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 analog pin A0
// Connect VCC to 5V and GND to GND
const int analogPin = A0; // Analog pin connected to AOUT
int sensorValue = 0; // Variable to store sensor reading
void setup() {
Serial.begin(9600); // Initialize serial communication
Serial.println("MQ135 Gas Sensor Test");
}
void loop() {
sensorValue = analogRead(analogPin); // Read analog value from sensor
Serial.print("Sensor Value: ");
Serial.println(sensorValue); // Print sensor value to Serial Monitor
delay(1000); // Wait 1 second before next reading
}
analogRead() function reads the voltage from the AOUT pin and converts it to a digital value (0-1023).No Output or Incorrect Readings
Fluctuating Readings
Sensor Saturation
Digital Output Not Triggering
Q1: Can the MQ135 detect CO2?
Yes, the MQ135 can detect CO2, but it is more sensitive to gases like ammonia, benzene, and smoke. For precise CO2 measurements, a dedicated CO2 sensor is recommended.
Q2: How do I calibrate the MQ135?
Calibration involves exposing the sensor to a known concentration of the target gas and adjusting the readings accordingly. Refer to the sensor's datasheet for detailed calibration instructions.
Q3: Can I use the MQ135 with a 3.3V microcontroller?
The MQ135 is designed for 5V operation. If using a 3.3V microcontroller, a level shifter or voltage divider is required for proper interfacing.
Q4: How long does the MQ135 last?
The sensor has a typical lifespan of 2-3 years under normal operating conditions. Regular maintenance and proper usage can extend its life.
Q5: Is the MQ135 suitable for outdoor use?
The MQ135 is not weatherproof and should be used in controlled environments. For outdoor applications, additional protection is required.