Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

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

Image of MQ 135Design 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, nitrogen, oxygen, alcohols, aromatic compounds, sulfide, and smoke. It is widely used in air quality monitoring systems, industrial applications, and safety systems to ensure a healthy and safe environment. The sensor provides an analog output that can be easily interfaced with microcontrollers like the Arduino UNO for real-time monitoring and data logging.

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 UNO Based Air Quality Monitoring and GSM Notification System: 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.

Open Project in Cirkit Designer
Image of Arduino UNO Based Gas Detection and GSM Alert System: 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.

Open Project in Cirkit Designer

Technical Specifications

Key Technical Details

Parameter Value
Operating Voltage 5V DC
Load Resistance 20kΩ (typical)
Heating Resistance 33Ω ± 5%
Heating Power ≤ 800mW
Sensing Resistance 10kΩ - 60kΩ (in clean air)
Detection Range 10 - 1000 ppm (NH3, NOx, etc.)
Preheat Time ≥ 24 hours
Response Time ≤ 10 seconds
Recovery Time ≤ 30 seconds
Operating Temperature -20°C to 50°C
Humidity Range 20% - 90% RH

Pin Configuration and Descriptions

Pin No. Pin Name Description
1 VCC Power supply (5V DC)
2 GND Ground
3 AOUT Analog output voltage proportional to gas concentration
4 DOUT Digital output (threshold-based)

Usage Instructions

How to Use the Component in a Circuit

  1. Power Supply: Connect the VCC pin to a 5V DC power supply and the GND pin to the ground.
  2. Analog Output: Connect the AOUT pin to an analog input pin on your microcontroller (e.g., A0 on Arduino UNO).
  3. Digital Output: Optionally, connect the DOUT pin to a digital input pin on your microcontroller if you want to use the threshold-based digital output.

Important Considerations and Best Practices

Sample Arduino Code

// MQ-135 Gas Sensor - Arduino UNO Example Code

const int analogPin = A0; // Analog input pin connected to AOUT
const int digitalPin = 2; // Digital input pin connected to DOUT (optional)
int sensorValue = 0;      // Variable to store the analog value

void setup() {
  Serial.begin(9600);     // Initialize serial communication at 9600 bps
  pinMode(digitalPin, INPUT); // Set digital pin as input (optional)
}

void loop() {
  sensorValue = analogRead(analogPin); // Read the analog value from the sensor
  Serial.print("Analog Value: ");
  Serial.println(sensorValue); // Print the analog value to the serial monitor

  // Optional: Read the digital output
  int digitalValue = digitalRead(digitalPin);
  Serial.print("Digital Value: ");
  Serial.println(digitalValue); // Print the digital value to the serial monitor

  delay(1000); // Wait for 1 second before taking the next reading
}

Troubleshooting and FAQs

Common Issues Users Might Face

  1. No Output or Incorrect Readings:

    • Solution: Ensure the sensor is properly connected to the power supply and ground. Check for loose connections and ensure the preheat time is met.
  2. Fluctuating Readings:

    • Solution: Ensure the sensor is in a stable environment with consistent airflow. Avoid placing the sensor near sources of interference or contaminants.
  3. Slow Response Time:

    • Solution: Verify that the sensor is not saturated with high concentrations of gas. Allow the sensor to recover in clean air if necessary.

FAQs

  1. How long does the sensor last?

    • The MQ-135 sensor has a lifespan of approximately 2 years under normal operating conditions.
  2. Can the sensor detect multiple gases simultaneously?

    • Yes, the sensor can detect a range of gases, but it provides a combined output. Specific gas concentration detection requires calibration and additional processing.
  3. Is the sensor waterproof?

    • No, the MQ-135 sensor is not waterproof. Avoid exposure to water and other liquids.

By following this documentation, users can effectively integrate the MQ-135 gas sensor into their projects, ensuring accurate and reliable gas detection for various applications.