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 and sensitive gas sensor capable of detecting a wide range of gases including ammonia (NH3), nitrogen oxides (NOx), alcohols, aromatic compounds, sulfides, and carbon dioxide (CO2). Due to its sensitivity and fast response time, it is widely used in both indoor and outdoor air quality monitoring systems. Common applications include environmental monitoring, air purifiers, ventilation systems, and smart home devices for ensuring the safety and well-being of occupants.

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 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
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 UNO Based Air Quality Monitor with Buzzer Alert
Image of smoke detector: A project utilizing MQ135 in a practical application
This circuit consists of an Arduino UNO microcontroller connected to an MQ135 air quality sensor and a buzzer module. The MQ135 sensor's analog output (A0) is connected to the Arduino's analog input (A0) to monitor air quality, while the buzzer's I/O pin is connected to the Arduino's digital pin (D9) to potentially alert based on sensor readings. The Arduino, sensor, and buzzer share a common power supply (5V) and ground (GND), indicating that the Arduino controls both the sensor data acquisition and the buzzer activation.
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 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
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 smoke detector: A project utilizing MQ135 in a practical application
Arduino UNO Based Air Quality Monitor with Buzzer Alert
This circuit consists of an Arduino UNO microcontroller connected to an MQ135 air quality sensor and a buzzer module. The MQ135 sensor's analog output (A0) is connected to the Arduino's analog input (A0) to monitor air quality, while the buzzer's I/O pin is connected to the Arduino's digital pin (D9) to potentially alert based on sensor readings. The Arduino, sensor, and buzzer share a common power supply (5V) and ground (GND), indicating that the Arduino controls both the sensor data acquisition and the buzzer activation.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

  • Detection Gas: Ammonia, Nitrogen oxides, Alcohols, Aromatic compounds, Sulfides, Carbon dioxide
  • Concentration Range: 10 to 1000 ppm (parts per million) for various gases
  • Preheat Duration: 20 seconds
  • Supply Voltage: 5V ± 0.1
  • Output Voltage: 0.1-0.3V (clean air baseline), up to 5V depending on gas concentration
  • Load Resistance: Adjustable
  • Operating Temperature: -20°C to 50°C
  • Heater Power Consumption: Approx. 800mW

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 VCC Power supply (5V)
2 GND Ground
3 DOUT Digital output (TTL logic level)
4 AOUT Analog output (Voltage proportional to gas concentration)

Usage Instructions

Integration with a Circuit

  1. Power Supply: Connect the VCC pin to a 5V power supply and the GND pin to the ground.
  2. Signal Output: The MQ135 provides both digital and analog outputs:
    • Digital Output (DOUT): Connect to a digital input pin on your microcontroller. The digital output goes high when the gas concentration exceeds a certain threshold, which can be adjusted using the onboard potentiometer.
    • Analog Output (AOUT): Connect to an analog input pin for reading the variable voltage that corresponds to the gas concentration.

Important Considerations and Best Practices

  • Calibration: The MQ135 sensor requires calibration to establish a baseline for clean air. This is typically done by adjusting the onboard potentiometer until the digital output switches from high to low in a clean air environment.
  • Preheating: Allow the sensor to preheat for at least 20 seconds to stabilize the readings.
  • Temperature and Humidity: Be aware that the sensor's readings can be affected by temperature and humidity. Compensate for these factors in your application if precise measurements are required.
  • Avoid Contaminants: Keep the sensor away from organic solvents, oils, and other contaminants to prevent sensor poisoning.

Example Code for Arduino UNO

// MQ135 Gas Sensor with Arduino UNO
int analogPin = A0; // Analog input pin connected to AOUT on the MQ135
int digitalPin = 2; // Digital input pin connected to DOUT on the MQ135
int sensorValue = 0; // Variable to store the sensor value

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

void loop() {
  sensorValue = analogRead(analogPin); // Read the analog value from sensor
  Serial.print("Gas concentration: ");
  Serial.println(sensorValue); // Print the sensor value to the serial monitor
  
  // Check the digital pin for threshold exceedance
  if (digitalRead(digitalPin) == HIGH) {
    // Gas concentration is above the threshold
    Serial.println("Gas level is high!");
  } else {
    // Gas concentration is below the threshold
    Serial.println("Gas level is normal.");
  }
  delay(1000); // Wait for 1 second before reading again
}

Troubleshooting and FAQs

Common Issues

  • Inaccurate Readings: If the sensor provides inconsistent or inaccurate readings, ensure that it has been properly calibrated and that there are no environmental factors such as temperature or humidity affecting the sensor.
  • No Response: If the sensor does not respond, check the power supply and wiring connections. Ensure that the sensor has been preheated for the recommended duration.

Solutions and Tips

  • Calibration: Perform calibration in a well-ventilated area to establish a baseline for clean air.
  • Sensor Lifespan: The MQ135 sensor has a lifespan of around 2 years when used continuously. Replace the sensor after this period or if it shows signs of degradation.
  • Avoid High Concentrations: Prolonged exposure to high concentrations of gas can saturate the sensor and shorten its lifespan.

FAQs

Q: Can the MQ135 detect CO2 accurately? A: The MQ135 can detect CO2, but it is not a dedicated CO2 sensor. For precise CO2 measurements, a specialized infrared CO2 sensor is recommended.

Q: How do I adjust the sensitivity of the digital output? A: Use the onboard potentiometer to adjust the threshold for the digital output. Turn it clockwise to increase sensitivity and counterclockwise to decrease it.

Q: Is the MQ135 sensor suitable for outdoor use? A: While the MQ135 can be used outdoors, it should be protected from water, dust, and direct sunlight to ensure accurate readings.