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 makes it an ideal choice for air quality monitoring and environmental safety 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!
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 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.
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.
Digital output pin (high/low signal based on threshold)
Usage Instructions
How to Use the MQ135 in a Circuit
Power the Sensor: Connect the VCC pin to a 5V DC power source and the GND pin to ground.
Choose Output Type:
Use the AOUT pin for analog readings to measure gas concentration levels.
Use the DOUT pin for digital output, which provides a high or low signal based on the threshold set by the onboard potentiometer.
Preheat the Sensor: Allow the sensor to preheat for at least 24 hours before taking stable readings.
Connect to a Microcontroller: For example, connect the AOUT pin to an analog input pin on an Arduino UNO for precise gas concentration measurements.
Important Considerations
Preheating: The MQ135 requires a preheating period of at least 24 hours for accurate and stable readings.
Calibration: Calibrate the sensor in a clean air environment to establish a baseline resistance value.
Ventilation: Ensure proper ventilation around the sensor to avoid saturation or false readings.
Power Supply: Use a stable 5V DC power source to avoid fluctuations in sensor performance.
Example Code for Arduino UNO
// MQ135 Gas Sensor Example Code for Arduino UNO
// This code reads the analog output (AOUT) of the MQ135 sensor and prints
// the gas concentration value to the Serial Monitor.
const int mq135Pin = A0; // Connect AOUT pin of MQ135 to Arduino A0
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
Serial.println("MQ135 Gas Sensor Test");
}
void loop() {
int sensorValue = analogRead(mq135Pin); // Read analog value from MQ135
float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage
Serial.print("Sensor Value: ");
Serial.print(sensorValue); // Print raw sensor value
Serial.print(" | Voltage: ");
Serial.print(voltage); // Print voltage value
Serial.println(" V");
delay(1000); // Wait for 1 second before next reading
}
Troubleshooting and FAQs
Common Issues and Solutions
Unstable Readings:
Cause: Insufficient preheating time.
Solution: Ensure the sensor is preheated for at least 24 hours before use.
No Output from DOUT Pin:
Cause: Threshold not set correctly.
Solution: Adjust the onboard potentiometer to set the desired threshold.
Incorrect Analog Readings:
Cause: Power supply fluctuations or improper calibration.
Solution: Use a stable 5V DC power source and calibrate the sensor in clean air.
Sensor Not Responding:
Cause: Faulty wiring or damaged sensor.
Solution: Check all connections and replace the sensor if necessary.
FAQs
Q1: Can the MQ135 detect specific gases individually?
A1: No, the MQ135 is a general-purpose gas sensor and cannot differentiate between specific gases. It provides a combined response to all detectable gases in its range.
Q2: How do I calibrate the MQ135 sensor?
A2: Place the sensor in a clean air environment and record the baseline resistance value. Use this value to calculate gas concentrations in your application.
Q3: Can the MQ135 be used outdoors?
A3: The MQ135 is not designed for outdoor use as it is sensitive to humidity and temperature variations. Use it in controlled indoor environments for best results.
Q4: What is the lifespan of the MQ135 sensor?
A4: The MQ135 has a typical lifespan of 2-3 years under normal operating conditions.