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

How to Use mq135: Examples, Pinouts, and Specs

Image of mq135
Cirkit Designer LogoDesign with mq135 in Cirkit Designer

Introduction

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 change is converted into an analog output signal, making it suitable for air quality monitoring and environmental sensing applications.

Explore Projects Built with mq135

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 mq135 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 mq135 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-Based Environmental Monitoring and GSM Reporting System
Image of sih: A project utilizing mq135 in a practical application
This circuit is designed for environmental monitoring and control, featuring an Arduino UNO as the central processing unit. It includes a DHT11 sensor for humidity and temperature readings, an MQ135 sensor for air quality, and an industrial pressure sensor, all interfaced with the Arduino. Additionally, the circuit uses an L298N motor driver to control a Nema 17 stepper motor, and a SIM800L module for GSM communication, allowing sensor data to be sent over a cellular network.
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 mq135 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

Explore Projects Built with mq135

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 mq135 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 mq135 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 sih: A project utilizing mq135 in a practical application
Arduino-Based Environmental Monitoring and GSM Reporting System
This circuit is designed for environmental monitoring and control, featuring an Arduino UNO as the central processing unit. It includes a DHT11 sensor for humidity and temperature readings, an MQ135 sensor for air quality, and an industrial pressure sensor, all interfaced with the Arduino. Additionally, the circuit uses an L298N motor driver to control a Nema 17 stepper motor, and a SIM800L module for GSM communication, allowing sensor data to be sent over a cellular network.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of EXP-2. LED & Buzzer ON/OFF Using MQ-135 Sensor & Arduino: A project utilizing mq135 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

Common Applications

  • Air quality monitoring systems
  • Industrial gas detection
  • Smoke and fire detection systems
  • Environmental pollution monitoring
  • Home automation for air quality control

Technical Specifications

The MQ135 sensor is designed for ease of use and integration into various 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
Output Signal Analog voltage (0-5V)
Operating Temperature -20°C to 50°C
Humidity Range ≤ 95% RH
Sensor Life ≥ 2 years (under normal use)

Pin Configuration

The MQ135 sensor typically comes with four pins. Below is the pinout description:

Pin Name Description
1 VCC Power supply pin (5V DC)
2 GND Ground connection
3 AOUT Analog output pin (provides voltage proportional to gas concentration)
4 DOUT Digital output pin (high/low signal based on threshold)

Usage Instructions

The MQ135 sensor is straightforward to use in a circuit. Follow the steps below to integrate it into your project:

Circuit Connection

  1. Connect the VCC pin to a 5V power supply.
  2. Connect the GND pin to the ground of your circuit.
  3. Connect the AOUT pin to an analog input pin of your microcontroller (e.g., Arduino).
  4. Optionally, connect the DOUT pin to a digital input pin if you want to use the digital threshold feature.

Important Considerations

  • Preheating: The sensor requires a preheating time of at least 24 hours for accurate readings. During this time, the internal heater stabilizes the sensor's performance.
  • Calibration: The sensor's output varies with environmental conditions. Calibrate the sensor in a controlled environment to ensure accurate gas concentration readings.
  • Power Supply: Use a stable 5V power source to avoid fluctuations in the sensor's output.
  • Ventilation: Ensure proper ventilation around the sensor to allow free flow of air for accurate gas detection.

Example Code for Arduino UNO

Below is an example of how to use the MQ135 sensor with an Arduino UNO to read analog values:

// MQ135 Gas Sensor Example Code
// This code reads the analog output of the MQ135 sensor and prints the value
// to the Serial Monitor. Ensure the sensor is connected to the correct pins.

const int analogPin = A0; // Connect AOUT pin of MQ135 to A0 on Arduino

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  Serial.println("MQ135 Gas Sensor Test");
  delay(1000); // Allow time for the sensor to stabilize
}

void loop() {
  int sensorValue = analogRead(analogPin); // Read analog value from MQ135
  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 1 second before the next reading
}

Notes on Code

  • The analog value read from the sensor can be used to estimate gas concentration after proper calibration.
  • The voltage variable represents the sensor's output voltage, which is proportional to the gas concentration.

Troubleshooting and FAQs

Common Issues

  1. No Output or Incorrect Readings

    • Cause: Insufficient preheating time.
    • Solution: Allow the sensor to preheat for at least 24 hours before taking measurements.
  2. Fluctuating Readings

    • Cause: Unstable power supply or environmental interference.
    • Solution: Use a regulated 5V power source and ensure the sensor is placed in a stable environment.
  3. Low Sensitivity

    • Cause: Sensor aging or contamination.
    • Solution: Replace the sensor if it has been in use for more than 2 years or exposed to harsh conditions.
  4. Digital Output Not Triggering

    • Cause: Incorrect threshold setting.
    • Solution: Adjust the potentiometer on the sensor module to set the desired threshold.

FAQs

  1. Can the MQ135 detect multiple gases simultaneously?

    • Yes, the MQ135 can detect a variety of gases, but it does not differentiate between them. Calibration is required to estimate specific gas concentrations.
  2. How do I calibrate the MQ135 sensor?

    • Calibration involves exposing the sensor to a known concentration of the target gas and recording the corresponding output voltage. Use this data to create a mapping function for your application.
  3. Is the MQ135 suitable for outdoor use?

    • The MQ135 can be used outdoors, but it should be protected from extreme weather conditions and high humidity to ensure accurate readings.
  4. What is the lifespan of the MQ135 sensor?

    • Under normal operating conditions, the sensor has a lifespan of approximately 2 years.

By following this documentation, you can effectively integrate the MQ135 gas sensor into your projects and ensure reliable performance.