

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 the presence of target gases. This change is converted into an analog output signal, making it suitable for air quality monitoring and environmental safety applications.








| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Load Resistance (RL) | 10 kΩ (typical) |
| Heater Voltage (VH) | 5V ± 0.1V |
| Heater Power Consumption | ≤ 800 mW |
| Detectable Gases | Ammonia, Benzene, Alcohol, Smoke |
| Output Signal | Analog voltage (0-5V) |
| Preheat Time | ≥ 24 hours for stable operation |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | ≤ 95% RH |
| Sensitivity Range | 10 ppm to 1000 ppm (varies by gas) |
| Pin Name | Description |
|---|---|
| VCC | Power supply pin (5V DC) |
| GND | Ground pin |
| AOUT | Analog output pin (provides gas concentration) |
| DOUT | Digital output pin (threshold-based signal) |
// MQ-135 Gas Sensor Example Code for Arduino UNO
// This code reads the analog output of the MQ-135 sensor and prints the value
// to the Serial Monitor. Ensure the sensor is connected to the correct pins.
const int MQ135_PIN = A0; // Analog pin connected to AOUT of MQ-135
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
pinMode(MQ135_PIN, INPUT); // Set the MQ-135 pin as input
}
void loop() {
int sensorValue = analogRead(MQ135_PIN); // Read analog value from sensor
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 for 1 second before the next reading
}
No Output or Incorrect Readings:
Fluctuating Readings:
Digital Output Not Triggering:
Sensor Not Responding to Target Gases:
Q: Can the MQ-135 detect multiple gases simultaneously?
A: Yes, the MQ-135 can detect multiple gases, but it does not differentiate between them. Additional calibration or sensors may be required for specific gas identification.
Q: How do I calibrate the MQ-135 sensor?
A: Use a known concentration of the target gas and measure the sensor's output. Adjust your code or calculations to map the analog output to the gas concentration.
Q: Is the MQ-135 suitable for outdoor use?
A: The MQ-135 is not designed for prolonged outdoor use due to potential exposure to extreme weather conditions and contaminants. Use it in controlled environments for best results.
Q: How long does the sensor last?
A: The MQ-135 has a typical lifespan of 2-3 years under normal operating conditions. Proper care and maintenance can extend its life.