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

How to Use MQ-5 : Examples, Pinouts, and Specs

Image of MQ-5
Cirkit Designer LogoDesign with MQ-5 in Cirkit Designer

Introduction

The MQ-5 Gas Sensor, manufactured by Tengxing (Part ID: Gas Sensor), is a versatile and reliable sensor designed to detect various gases, including natural gas, LPG (liquefied petroleum gas), and other combustible gases. It operates on the principle of resistive change in the presence of gas, providing an analog output proportional to the gas concentration. This sensor is widely used in applications such as gas leak detection, air quality monitoring, and safety systems in industrial and domestic environments.

Explore Projects Built with MQ-5

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 and A9G GSM/GPRS GPS-Based Air Quality Monitoring System
Image of A9G Smoke Sensor: A project utilizing MQ-5  in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an A9G GSM/GPRS+GPS module and an MQ2 gas sensor. The Arduino communicates with the A9G module via digital pins D11 and D10 for data transmission, and it reads analog gas concentration levels from the MQ2 sensor through analog pin A5. Both the A9G module and the MQ2 sensor are powered by the Arduino's 5V output, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Based Air Quality Monitoring and GSM Notification System
Image of Arduino wild: A project utilizing MQ-5  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 Notification System
Image of gsm home security system: A project utilizing MQ-5  in a practical application
This circuit features an Arduino UNO microcontroller interfaced with an MQ-5 gas sensor, a SIM900A GSM module, a green LED, a red LED, and a piezo buzzer. The MQ-5 sensor's analog output is connected to the Arduino's A5 pin for gas concentration measurement. The Arduino controls the LEDs and buzzer, and communicates with the SIM900A module for potential SMS notifications or calls in response to gas detection.
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 MQ-5  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

Explore Projects Built with MQ-5

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 A9G Smoke Sensor: A project utilizing MQ-5  in a practical application
Arduino UNO and A9G GSM/GPRS GPS-Based Air Quality Monitoring System
This circuit features an Arduino UNO microcontroller interfaced with an A9G GSM/GPRS+GPS module and an MQ2 gas sensor. The Arduino communicates with the A9G module via digital pins D11 and D10 for data transmission, and it reads analog gas concentration levels from the MQ2 sensor through analog pin A5. Both the A9G module and the MQ2 sensor are powered by the Arduino's 5V output, and all components share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Arduino wild: A project utilizing MQ-5  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 gsm home security system: A project utilizing MQ-5  in a practical application
Arduino UNO Based Gas Detection and GSM Notification System
This circuit features an Arduino UNO microcontroller interfaced with an MQ-5 gas sensor, a SIM900A GSM module, a green LED, a red LED, and a piezo buzzer. The MQ-5 sensor's analog output is connected to the Arduino's A5 pin for gas concentration measurement. The Arduino controls the LEDs and buzzer, and communicates with the SIM900A module for potential SMS notifications or calls in response to gas detection.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of Copy of gas sensor: A project utilizing MQ-5  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

Common Applications:

  • Gas leak detection in homes and industries
  • Air quality monitoring systems
  • Safety alarms for combustible gases
  • IoT-based environmental monitoring systems

Technical Specifications

Key Technical Details:

Parameter Value
Operating Voltage 5V DC
Load Resistance (RL) Adjustable (typically 10 kΩ)
Heater Voltage (VH) 5V ± 0.2V
Heater Power Consumption ≤ 800 mW
Detection Range 200 - 10,000 ppm (gas-specific)
Preheat Time ≥ 24 hours for stable output
Output Signal Analog (voltage proportional to gas concentration)
Operating Temperature -20°C to 50°C
Humidity Range ≤ 95% RH
Dimensions 32mm x 20mm x 22mm

Pin Configuration and Descriptions:

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

Usage Instructions

How to Use the MQ-5 Gas Sensor in a Circuit:

  1. Power Supply: Connect the VCC pin to a 5V DC power source and the GND pin to the ground.
  2. Analog Output: Connect the AOUT pin to an analog input pin of a microcontroller (e.g., Arduino) to read the gas concentration as a voltage signal.
  3. Digital Output: Optionally, connect the DOUT pin to a digital input pin of a microcontroller. The DOUT pin provides a high/low signal based on the gas concentration exceeding a preset threshold, which can be adjusted using the onboard potentiometer.
  4. Preheat Time: Allow the sensor to preheat for at least 24 hours before taking accurate readings.
  5. Calibration: For precise measurements, calibrate the sensor in a known gas concentration environment.

Important Considerations and Best Practices:

  • Ventilation: Ensure proper ventilation around the sensor to avoid saturation or false readings.
  • Avoid Contaminants: Keep the sensor away from water, oil, and corrosive gases to prevent damage.
  • Stable Power Supply: Use a stable 5V power source to avoid fluctuations in readings.
  • Preheat Period: Always allow the sensor to preheat for the recommended time before use.
  • Threshold Adjustment: Use the onboard potentiometer to set the desired gas concentration threshold for the digital output.

Example Code for Arduino UNO:

// MQ-5 Gas Sensor Example Code for Arduino UNO
// This code reads the analog output (AOUT) of the MQ-5 sensor and prints the
// gas concentration to the Serial Monitor.

const int analogPin = A0; // Connect AOUT pin of MQ-5 to Arduino A0
int sensorValue = 0;      // Variable to store the analog reading

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  Serial.println("MQ-5 Gas Sensor Test");
}

void loop() {
  sensorValue = analogRead(analogPin); // Read the analog value from the sensor
  float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage (0-5V)
  
  // Print the 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 for 1 second before the next reading
}

Troubleshooting and FAQs

Common Issues and Solutions:

  1. No Output or Incorrect Readings:

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

    • Cause: Unstable power supply or environmental interference.
    • Solution: Use a regulated 5V power source and ensure proper ventilation.
  3. Digital Output Not Triggering:

    • Cause: Incorrect threshold setting.
    • Solution: Adjust the potentiometer to set the desired gas concentration threshold.
  4. Sensor Not Responding to Gas:

    • Cause: Sensor contamination or damage.
    • Solution: Ensure the sensor is clean and free from contaminants. Replace if necessary.

FAQs:

  • Q: Can the MQ-5 detect gases other than natural gas and LPG?

    • A: Yes, the MQ-5 can detect other combustible gases, but its sensitivity varies depending on the gas type.
  • Q: How do I calibrate the MQ-5 sensor?

    • A: Expose the sensor to a known concentration of gas and adjust the load resistance (RL) or potentiometer to match the expected output.
  • Q: Can I use the MQ-5 with a 3.3V microcontroller?

    • A: The MQ-5 requires a 5V power supply for the heater. However, you can use a voltage divider or level shifter to interface the analog output with a 3.3V microcontroller.
  • Q: How long does the MQ-5 sensor last?

    • A: The sensor typically lasts for several years under normal operating conditions, but its sensitivity may degrade over time.

By following this documentation, users can effectively integrate the MQ-5 Gas Sensor into their projects and ensure reliable performance.