

The MQ-135 is a versatile gas sensor manufactured by Flying Fish, 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 makes it an ideal 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.1V |
| Heating Current (IH) | ≤ 120 mA |
| Detection Range | 10 ppm to 1000 ppm |
| Preheat Time | ≥ 24 hours for stable output |
| Sensitivity | Detects NH₃, C₆H₆, alcohol, smoke, etc. |
| Operating Temperature | -20°C to 50°C |
| Humidity Range | ≤ 95% RH |
| Dimensions | 32mm x 20mm x 22mm |
The MQ-135 sensor module typically comes with a 4-pin interface. Below is the pinout description:
| Pin Name | Description |
|---|---|
| VCC | Power supply input (5V DC) |
| GND | Ground |
| AOUT | Analog output signal (proportional to gas concentration) |
| DOUT | Digital output signal (threshold-based, adjustable via onboard potentiometer) |
VCC pin to a 5V DC power source and the GND pin to ground.AOUT pin for analog readings to measure gas concentration levels.DOUT pin for digital output, which triggers when the gas concentration exceeds a preset threshold. Adjust the threshold using the onboard potentiometer.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
// Connect VCC to 5V and GND to GND
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 represents the raw analog output from the sensor. You can map this value to gas concentration levels using calibration data.No Output or Incorrect Readings:
Fluctuating Readings:
Digital Output Not Triggering:
DOUT pin connection to the microcontroller.Q: Can the MQ-135 detect CO₂?
A: While the MQ-135 is sensitive to a variety of gases, it is not specifically calibrated for CO₂ detection. For precise CO₂ measurements, consider using a dedicated CO₂ sensor.
Q: How do I calibrate the MQ-135?
A: Place the sensor in a clean air environment and record the baseline resistance value. Use this value to calculate gas concentrations based on the sensor's datasheet.
Q: Can I use the MQ-135 with a 3.3V system?
A: The MQ-135 is designed for 5V operation. If using a 3.3V system, you may need a level shifter or voltage regulator to ensure proper operation.
Q: How long does the sensor last?
A: The MQ-135 has a typical lifespan of 2-3 years under normal operating conditions. Regular calibration and proper usage can extend its lifespan.
By following this documentation, you can effectively integrate the MQ-135 gas sensor into your projects for reliable air quality monitoring and gas detection.