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 air quality indicators. It operates on the principle of resistive change, where the sensor's resistance varies in the presence of target gases. The MQ-135 provides an analog output proportional to the concentration of detected gases, making it ideal for air quality monitoring and environmental sensing 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!
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.
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.
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.
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.
The MQ-135 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)
Heater Voltage (VH)
5V ± 0.1V
Heater Power Consumption
≤ 800 mW
Detection Range
10 ppm to 1000 ppm (varies by gas)
Preheat Time
≥ 24 hours for stable readings
Output Signal
Analog voltage (0-5V)
Operating Temperature
-20°C to 50°C
Humidity Range
≤ 95% RH
Dimensions
32mm x 20mm x 22mm
Pin Configuration
The MQ-135 sensor typically comes with four pins. Below is the pinout description:
Pin
Name
Description
1
VCC
Power supply pin (5V DC)
2
GND
Ground pin
3
AOUT
Analog output pin (provides gas concentration signal)
4
DOUT
Digital output pin (threshold-based signal)
Usage Instructions
How to Use the MQ-135 in a Circuit
Power the Sensor: Connect the VCC pin to a 5V DC power source and the GND pin to ground.
Read the Output:
Use the AOUT pin to read the analog signal corresponding to gas concentration.
Optionally, use the DOUT pin for a digital signal if a threshold is set using the onboard potentiometer.
Preheat the Sensor: Allow the sensor to preheat for at least 24 hours before taking stable readings.
Connect to a Microcontroller: The analog output can be connected to an ADC (Analog-to-Digital Converter) pin of a microcontroller like the Arduino UNO.
Important Considerations
Preheating: The sensor requires a long preheating time (≥ 24 hours) for accurate and stable readings.
Calibration: Calibrate the sensor in a clean air environment to establish a baseline reading.
Power Supply: Ensure a stable 5V power supply to avoid fluctuations in readings.
Environmental Factors: Avoid exposing the sensor to high humidity or temperatures outside its operating range.
Example Code for Arduino UNO
Below is an example of how to interface the MQ-135 with an Arduino UNO to read analog values:
// MQ-135 Gas Sensor Example Code
// Connect AOUT to Arduino analog pin A0
const int analogPin = A0; // Define the analog pin connected to AOUT
int sensorValue = 0; // Variable to store the sensor reading
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("MQ-135 Gas Sensor Test");
}
void loop() {
sensorValue = analogRead(analogPin); // Read the analog value from the sensor
Serial.print("Sensor Value: ");
Serial.println(sensorValue); // Print the sensor value to the Serial Monitor
// Add a delay to avoid flooding the Serial Monitor
delay(1000); // Wait for 1 second before the next reading
}
Notes on the Code
The analogRead() function reads the analog voltage from the sensor and converts it to a digital value (0-1023).
The sensor value can be mapped to gas concentration using calibration data specific to the target gas.
Troubleshooting and FAQs
Common Issues and Solutions
Inconsistent Readings:
Cause: Insufficient preheating time or unstable power supply.
Solution: Ensure the sensor is preheated for at least 24 hours and use a regulated 5V power source.
No Output Signal:
Cause: Incorrect wiring or damaged sensor.
Solution: Verify the connections and ensure the sensor is not physically damaged.
High Sensor Values in Clean Air:
Cause: Improper calibration or environmental interference.
Solution: Calibrate the sensor in a clean air environment and shield it from external interference.
Digital Output Not Triggering:
Cause: Threshold not set correctly.
Solution: Adjust the onboard potentiometer to set the desired threshold level.
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?
A2: Place the sensor in a clean air environment and record the baseline analog output. Use this value to calculate gas concentrations relative to the baseline.
Q3: Can I use the MQ-135 outdoors?
A3: While the MQ-135 can be used outdoors, ensure it is protected from extreme humidity, temperature, and direct exposure to water.
Q4: What is the lifespan of the MQ-135 sensor?
A4: The sensor typically lasts for several years under normal operating conditions, but its sensitivity may degrade over time. Regular calibration is recommended.