Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use MQ-135: Examples, Pinouts, and Specs

Image of MQ-135
Cirkit Designer LogoDesign with MQ-135 in Cirkit Designer

Introduction

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.

Explore Projects Built with MQ-135

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO Based Air Quality Monitoring and GSM Notification System
Image of Arduino wild: A project utilizing MQ-135 in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an MQ135 air quality sensor, an MPU-6050 accelerometer/gyroscope, a SIM900A GSM communication module, and a buzzer. The Arduino reads analog data from the MQ135 sensor and communicates with the MPU-6050 via I2C, while also controlling the buzzer and handling serial communication with the SIM900A module. The purpose of this circuit is likely to monitor air quality and motion, provide alerts through the buzzer, and enable remote communication via GSM.
Cirkit Designer LogoOpen Project in Cirkit Designer
GPS-Enabled Telemetry Drone with Speedybee F405 WING and Brushless Motor
Image of Pharmadrone Wiring: A project utilizing MQ-135 in a practical application
This circuit is designed for a remote-controlled vehicle or drone, featuring a flight controller that manages a brushless motor, servomotors for actuation, telemetry for data communication, and a GPS module for positioning. It is powered by a lipo battery and includes a receiver for remote control inputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Air Quality Monitoring System with Multiple Sensors
Image of IIIT_H_mini_project: A project utilizing MQ-135 in a practical application
This circuit is an air quality monitoring system that uses an ESP32 microcontroller to collect data from various sensors, including the MQ135 and MQ-2 gas sensors, a DHT11 temperature and humidity sensor, and a PMS5003 PM2.5 air quality sensor. The ESP32 processes the sensor data and can potentially transmit it for further analysis or display.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Gas Detection and GSM Alert System
Image of Copy of Copy of gas sensor: A project utilizing MQ-135 in a practical application
This circuit is designed to monitor air quality using an MQ135 sensor and provide visual and audible alerts. It features an Arduino UNO microcontroller interfaced with a GSM module for communication, an I2C LCD for display, and LEDs and a buzzer for local alerts. The Arduino runs embedded code to read the MQ135 sensor data, display air quality index (AQI) on the LCD, and trigger SMS and call alerts via the GSM module when gas is detected above a certain threshold.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with MQ-135

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino wild: A project utilizing MQ-135 in a practical application
Arduino UNO Based Air Quality Monitoring and GSM Notification System
This circuit features an Arduino UNO microcontroller interfaced with an MQ135 air quality sensor, an MPU-6050 accelerometer/gyroscope, a SIM900A GSM communication module, and a buzzer. The Arduino reads analog data from the MQ135 sensor and communicates with the MPU-6050 via I2C, while also controlling the buzzer and handling serial communication with the SIM900A module. The purpose of this circuit is likely to monitor air quality and motion, provide alerts through the buzzer, and enable remote communication via GSM.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Pharmadrone Wiring: A project utilizing MQ-135 in a practical application
GPS-Enabled Telemetry Drone with Speedybee F405 WING and Brushless Motor
This circuit is designed for a remote-controlled vehicle or drone, featuring a flight controller that manages a brushless motor, servomotors for actuation, telemetry for data communication, and a GPS module for positioning. It is powered by a lipo battery and includes a receiver for remote control inputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of IIIT_H_mini_project: A project utilizing MQ-135 in a practical application
ESP32-Based Air Quality Monitoring System with Multiple Sensors
This circuit is an air quality monitoring system that uses an ESP32 microcontroller to collect data from various sensors, including the MQ135 and MQ-2 gas sensors, a DHT11 temperature and humidity sensor, and a PMS5003 PM2.5 air quality sensor. The ESP32 processes the sensor data and can potentially transmit it for further analysis or display.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of Copy of gas sensor: A project utilizing MQ-135 in a practical application
Arduino UNO Based Gas Detection and GSM Alert System
This circuit is designed to monitor air quality using an MQ135 sensor and provide visual and audible alerts. It features an Arduino UNO microcontroller interfaced with a GSM module for communication, an I2C LCD for display, and LEDs and a buzzer for local alerts. The Arduino runs embedded code to read the MQ135 sensor data, display air quality index (AQI) on the LCD, and trigger SMS and call alerts via the GSM module when gas is detected above a certain threshold.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Air quality monitoring systems
  • Industrial gas detection
  • Smoke and fire detection systems
  • Environmental pollution monitoring
  • Home and office air purifiers

Technical Specifications

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.)

Pin Configuration and Descriptions

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.

Usage Instructions

How to Use the MQ-135 in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 5V DC power source and the GND pin to the ground.
  2. Choose Output Type:
    • Use the AOUT pin for analog readings to measure gas concentration levels.
    • Use the DOUT pin for digital readings, which indicate whether the gas concentration exceeds a preset threshold.
  3. Preheat the Sensor: Allow the sensor to preheat for at least 24 hours for accurate and stable readings.
  4. Connect to a Microcontroller: For example, connect the AOUT pin to an analog input pin on an Arduino UNO for real-time monitoring.

Important Considerations

  • Preheating: The sensor requires a long preheating time (≥ 24 hours) for optimal performance.
  • Calibration: Calibrate the sensor in a clean air environment to set a baseline for gas concentration.
  • Power Supply: Ensure a stable 5V power supply to avoid fluctuations in readings.
  • Ventilation: Place the sensor in a well-ventilated area for accurate air quality measurements.

Example Code for Arduino UNO

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
}

Notes:

  • The sensorValue will vary based on the gas concentration. You can map this value to a specific gas concentration using calibration data.
  • Use an external potentiometer to adjust the threshold for the digital output (DOUT).

Troubleshooting and FAQs

Common Issues and Solutions

  1. Inaccurate Readings:

    • Cause: Insufficient preheating time.
    • Solution: Ensure the sensor is preheated for at least 24 hours before use.
  2. No Output from DOUT:

    • Cause: Threshold not properly set.
    • Solution: Adjust the potentiometer on the module to set the desired threshold.
  3. Fluctuating Analog Values:

    • Cause: Unstable power supply or environmental interference.
    • Solution: Use a regulated 5V power supply and avoid placing the sensor near strong electromagnetic sources.
  4. Sensor Not Responding:

    • Cause: Incorrect wiring or damaged sensor.
    • Solution: Double-check the wiring and ensure the sensor is not physically damaged.

FAQs

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.