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

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
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
Arduino UNO Air Quality Monitor with LED Indicator and Piezo Speaker
Image of EXP-2. LED & Buzzer ON/OFF Using MQ-135 Sensor & Arduino: A project utilizing MQ 135 in a practical application
This circuit uses an Arduino UNO to monitor air quality via an MQ 135 sensor and provides visual and auditory feedback using an LED and a piezo speaker. The Arduino is powered by a MAHIR 7.0 power supply, and the LED and speaker are controlled through digital pins D13 and D12, respectively.
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

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 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
Image of EXP-2. LED & Buzzer ON/OFF Using MQ-135 Sensor & Arduino: A project utilizing MQ 135 in a practical application
Arduino UNO Air Quality Monitor with LED Indicator and Piezo Speaker
This circuit uses an Arduino UNO to monitor air quality via an MQ 135 sensor and provides visual and auditory feedback using an LED and a piezo speaker. The Arduino is powered by a MAHIR 7.0 power supply, and the LED and speaker are controlled through digital pins D13 and D12, respectively.
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

Common Applications

  • Air quality monitoring systems
  • Industrial gas detection
  • Smoke and fire detection systems
  • Indoor air pollution monitoring
  • Environmental safety devices

Technical Specifications

Key Technical Details

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 Configuration and Descriptions

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)

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 ground.
  2. Read Analog Output: Connect the AOUT pin to an analog input pin of a microcontroller (e.g., Arduino UNO) to measure gas concentration.
  3. Optional Digital Output: Use the DOUT pin if you want a digital HIGH/LOW signal based on a preset threshold. Adjust the threshold using the onboard potentiometer.
  4. Preheat the Sensor: Allow the sensor to preheat for at least 24 hours for accurate readings.
  5. Calibrate the Sensor: Use a known gas concentration to calibrate the sensor for precise measurements.

Important Considerations and Best Practices

  • Preheating: The sensor requires a long preheating time (≥ 24 hours) for stable and accurate readings.
  • Ventilation: Ensure proper ventilation around the sensor to avoid saturation or false readings.
  • Humidity and Temperature: Operate the sensor within the specified temperature and humidity range for optimal performance.
  • Analog Readings: The analog output is not linear and may require a conversion formula or lookup table for accurate gas concentration values.
  • Avoid Contamination: Keep the sensor away from water, dust, and corrosive gases to prevent damage.

Example Code for Arduino UNO

// 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
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings:

    • Ensure the sensor is properly powered (5V to VCC and GND connected).
    • Verify that the sensor has been preheated for at least 24 hours.
    • Check for loose or incorrect wiring connections.
  2. Fluctuating Readings:

    • Ensure the sensor is in a stable environment without sudden changes in temperature or humidity.
    • Avoid placing the sensor near fans or vents that may cause inconsistent airflow.
  3. Digital Output Not Triggering:

    • Adjust the onboard potentiometer to set the desired threshold level.
    • Verify that the DOUT pin is connected to a digital input pin on the microcontroller.
  4. Sensor Not Responding to Target Gases:

    • Confirm that the gas concentration is within the detectable range of the sensor.
    • Check for contamination or damage to the sensor element.

FAQs

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.