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 module, manufactured by Tengxing, is a widely used sensor that detects the presence of various gases such as LPG (liquefied petroleum gas), natural gas, and coal gas. It is commonly utilized in gas leakage detecting equipment for homes and industries. Its high sensitivity and fast response time make it an ideal component for safety systems in gas-powered appliances and monitoring devices.

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 and Use Cases

  • Domestic gas leakage detectors
  • Industrial gas detectors
  • Portable gas detectors
  • Gas leak alarm systems
  • Air quality monitoring

Technical Specifications

Key Technical Details

  • Sensor Type: Semiconductor
  • Detection Gases: LPG, natural gas, coal gas
  • Concentration Range: 300 to 10000 ppm
  • Preheat Duration: 20 seconds
  • Supply Voltage: 5V DC
  • Output Voltage: 0.1-0.3V (idle), up to 5V (detection)
  • Operating Temperature: -10°C to 50°C
  • Heater Power Consumption: Approx. 800mW

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 VCC Power supply (5V DC)
2 GND Ground
3 DOUT Digital output (TTL logic level)
4 AOUT Analog output (variable voltage)

Usage Instructions

How to Use the Component in 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 MQ-5 module provides two outputs:
    • Digital Output (DOUT): Connect to a digital input pin on a microcontroller. The digital output goes high when the gas concentration exceeds a certain threshold.
    • Analog Output (AOUT): Connect to an analog input pin for reading the gas concentration levels. The voltage level on this pin varies proportionally with the gas concentration.

Important Considerations and Best Practices

  • Ensure the module is preheated for at least 20 seconds before taking accurate readings.
  • Avoid exposure to high concentrations of gas for long periods, as it may affect the sensor's longevity.
  • Calibrate the sensor for the specific gas you intend to detect.
  • Implement proper ventilation when testing the sensor to prevent accumulation of gases.

Example Arduino UNO Code

// MQ-5 Gas Sensor with Arduino UNO
int analogPin = A0; // Analog output of the MQ-5 sensor connected to A0
int digitalPin = 2; // Digital output of the MQ-5 sensor connected to pin 2
int analogValue = 0; // Variable to store the analog value
int digitalValue = 0; // Variable to store the digital value

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

void loop() {
  analogValue = analogRead(analogPin); // Read the analog value from sensor
  digitalValue = digitalRead(digitalPin); // Read the digital value from sensor

  // Print the values to the serial monitor
  Serial.print("Analog Value: ");
  Serial.print(analogValue);
  Serial.print(" | Digital Value: ");
  Serial.println(digitalValue);

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

Troubleshooting and FAQs

Common Issues Users Might Face

  • Inconsistent Readings: Ensure the sensor is properly preheated and calibrated for the target gas.
  • No Response to Gas: Check the power supply and wiring connections. Ensure the sensor is not damaged.
  • High Background Noise: Use shielded cables and keep the sensor away from sources of electromagnetic interference.

Solutions and Tips for Troubleshooting

  • Calibration: Perform calibration in a controlled environment with a known concentration of the target gas.
  • Sensor Replacement: If the sensor has been exposed to high gas concentrations for an extended period, consider replacing it.
  • Environmental Factors: Be aware of ambient conditions such as humidity and temperature that can affect sensor performance.

FAQs

Q: How often should the MQ-5 sensor be calibrated? A: Calibration frequency depends on the usage and environment. It is recommended to calibrate the sensor before initial use and periodically thereafter.

Q: Can the MQ-5 sensor detect smoke? A: The MQ-5 is designed for gas detection and may not be suitable for smoke detection. For smoke, consider using a dedicated smoke sensor.

Q: What is the lifespan of the MQ-5 sensor? A: With proper usage and maintenance, the MQ-5 sensor can last for several years. However, exposure to high concentrations of gas can reduce its lifespan.