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

How to Use mq6: Examples, Pinouts, and Specs

Image of mq6
Cirkit Designer LogoDesign with mq6 in Cirkit Designer

Introduction

The MQ-6 is a gas sensor designed to detect various gases, including LPG (liquefied petroleum gas), propane, and butane. Manufactured by ESP32, this sensor operates on the principle of resistive change when exposed to target gases. It provides an analog output proportional to the concentration of the detected gas, making it suitable for a wide range of gas detection applications.

Explore Projects Built with mq6

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 mq6 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 and A9G GSM/GPRS GPS-Based Air Quality Monitoring System
Image of A9G Smoke Sensor: A project utilizing mq6 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 Gas Leak Detector with GSM Notification and Servo Valve Control
Image of lpg detector: A project utilizing mq6 in a practical application
This circuit is designed as a gas leakage detection system with SMS alert capabilities. It uses an Arduino UNO to monitor MQ-6 and MQ-7 gas sensors for LPG and CO levels, respectively, and activates a servo-controlled valve, buzzer, and exhaust fan if gas concentrations exceed preset thresholds. Additionally, the system uses a SIM900A GSM module to send SMS alerts in case of gas detection, and it is powered by a series of 18650 Li-ion batteries managed by a protection board.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560-Based Smart Sensor Hub with Battery Power
Image of PROTOTYPE TEST: A project utilizing mq6 in a practical application
This circuit is a sensor-based data acquisition system using an Arduino Mega 2560. It integrates various sensors including an MPU-6050 accelerometer, HC-SR04 ultrasonic sensor, DHT11 temperature and humidity sensor, GPS NEO 6M, MQ135 gas sensor, and multiple IR sensors, all powered by a 2.1mm barrel jack and 18650 Li-ion batteries. The system is designed to collect and transmit environmental data via Bluetooth using an HC-06 module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with mq6

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 mq6 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 A9G Smoke Sensor: A project utilizing mq6 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 lpg detector: A project utilizing mq6 in a practical application
Arduino UNO Based Gas Leak Detector with GSM Notification and Servo Valve Control
This circuit is designed as a gas leakage detection system with SMS alert capabilities. It uses an Arduino UNO to monitor MQ-6 and MQ-7 gas sensors for LPG and CO levels, respectively, and activates a servo-controlled valve, buzzer, and exhaust fan if gas concentrations exceed preset thresholds. Additionally, the system uses a SIM900A GSM module to send SMS alerts in case of gas detection, and it is powered by a series of 18650 Li-ion batteries managed by a protection board.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of PROTOTYPE TEST: A project utilizing mq6 in a practical application
Arduino Mega 2560-Based Smart Sensor Hub with Battery Power
This circuit is a sensor-based data acquisition system using an Arduino Mega 2560. It integrates various sensors including an MPU-6050 accelerometer, HC-SR04 ultrasonic sensor, DHT11 temperature and humidity sensor, GPS NEO 6M, MQ135 gas sensor, and multiple IR sensors, all powered by a 2.1mm barrel jack and 18650 Li-ion batteries. The system is designed to collect and transmit environmental data via Bluetooth using an HC-06 module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Gas leak detection in homes and industries
  • Safety systems for detecting combustible gases
  • Portable gas detectors
  • Air quality monitoring systems
  • IoT-based gas monitoring solutions

Technical Specifications

The MQ-6 sensor is a versatile and reliable component with the following key specifications:

Parameter Value
Operating Voltage 5V DC
Load Resistance (RL) Adjustable (typically 10 kΩ)
Heater Voltage (VH) 5V ± 0.2V
Heater Power Consumption ≤ 750 mW
Detection Range 200 ppm to 10,000 ppm (LPG, propane, butane)
Preheating Time ≥ 20 seconds
Output Signal Analog voltage
Operating Temperature -10°C to 50°C
Humidity Range ≤ 95% RH
Dimensions 32mm x 20mm x 22mm

Pin Configuration and Descriptions

The MQ-6 sensor typically comes with four pins or six pins, depending on the module. Below is the pin configuration for a common MQ-6 module:

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)

Note: Some modules may have additional pins for calibration or other features. Always refer to the specific module's datasheet for details.

Usage Instructions

How to Use the MQ-6 in a Circuit

  1. Power the Sensor: Connect the VCC pin to a 5V DC power supply and the GND pin to ground.
  2. Connect the Output:
    • Use the AOUT pin to read the analog signal corresponding to the gas concentration.
    • Optionally, use the DOUT pin for a digital signal if the module includes a comparator circuit.
  3. Preheat the Sensor: Allow the sensor to preheat for at least 20 seconds before taking measurements. This ensures accurate readings.
  4. Read the Output:
    • For analog output, connect the AOUT pin to an ADC (Analog-to-Digital Converter) pin on a microcontroller (e.g., Arduino UNO).
    • For digital output, connect the DOUT pin to a digital input pin on the microcontroller.

Important Considerations and Best Practices

  • Calibration: The sensor may require calibration to ensure accurate gas concentration readings. Use a known gas concentration for calibration.
  • Ventilation: Ensure proper ventilation around the sensor to avoid saturation and improve response time.
  • Avoid Contaminants: Keep the sensor away from water, oil, and other contaminants that may damage the sensing element.
  • Power Supply: Use a stable 5V power supply to avoid fluctuations in the sensor's output.

Example Code for Arduino UNO

Below is an example code snippet to interface the MQ-6 sensor with an Arduino UNO and read the analog output:

// Define the analog pin connected to the MQ-6 sensor
const int mq6Pin = A0; 

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  pinMode(mq6Pin, INPUT); // Set the MQ-6 pin as input
}

void loop() {
  int sensorValue = analogRead(mq6Pin); // 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.println(voltage);

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

Note: The analog output from the MQ-6 sensor is not directly proportional to the gas concentration. Use the sensor's datasheet to map the output voltage to the gas concentration.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings:

    • Cause: Insufficient preheating time.
    • Solution: Allow the sensor to preheat for at least 20 seconds before taking measurements.
  2. Fluctuating Readings:

    • Cause: Unstable power supply or environmental noise.
    • Solution: Use a stable 5V power supply and ensure proper grounding.
  3. Sensor Not Responding to Gas:

    • Cause: Sensor may be damaged or contaminated.
    • Solution: Inspect the sensor for physical damage or contamination. Replace if necessary.
  4. Digital Output Not Triggering:

    • Cause: Incorrect threshold setting on the module.
    • Solution: Adjust the potentiometer on the module to set the desired threshold.

FAQs

Q1: Can the MQ-6 detect gases other than LPG, propane, and butane?
A1: While the MQ-6 is optimized for LPG, propane, and butane, it may also respond to other combustible gases. However, its sensitivity and accuracy for other gases may vary.

Q2: How do I calibrate the MQ-6 sensor?
A2: Expose the sensor to a known concentration of the target gas and adjust the load resistance (RL) or module potentiometer to match the expected output.

Q3: Can I use the MQ-6 with a 3.3V microcontroller like ESP32?
A3: The MQ-6 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.

Q4: How long does the MQ-6 sensor last?
A4: The typical lifespan of the MQ-6 sensor is around 2-3 years under normal operating conditions.