Skip to content

All items ship from our office in Colorado USA - $5.95 Flat-Rate US shipping & free shipping on orders over $75!

MQ-2 Smoke Hydrogen Butane LPG Methane Sensor Detector Module User Guide

MQ-2 Smoke Hydrogen Butane LPG Methane Sensor Detector Module

📋 Overview

The MQ-2 smoke and gas sensor detector module is designed to detect smoke and a wide range of combustible gases including hydrogen (H₂), methane (CH₄), butane, alcohol, and LPG (Liquified Petroleum Gas). Its broad detection range makes it one of the most versatile gas sensors in the MQ family, suitable for both home and industrial use.

The module is built around the ZYMQ-2 semiconductor gas sensor element mounted on a convenient breakout board with onboard signal conditioning. It provides both an analog output (AO) that varies with gas or smoke concentration and a digital TTL output (DO) that triggers when concentration exceeds an adjustable threshold. The threshold is set using the onboard potentiometer.

With its fast response and recovery characteristics, long service life, and reliable stability, the MQ-2 module is a popular choice for smoke alarms, gas leak detection systems, air quality monitors, and Arduino-based safety projects.


⭐ Key Features

  • Smoke & Multi-Gas Detection — Detects smoke, hydrogen, methane, butane, alcohol, and LPG
  • Wide Detection Range — 300–10,000 ppm for flammable gases
  • Dual Signal Output — Analog (AO) and digital TTL (DO) outputs for flexible integration
  • Adjustable Threshold — Onboard potentiometer to set the digital output trigger level
  • Indicator LEDs — Power LED and digital output (DO) status LED for visual feedback
  • Fast Response & Recovery — Quick detection and return to baseline for reliable monitoring
  • Simple Interface — Only 4 pins (VCC, GND, AO, DO) — no library required
  • 5V Compatible — Works directly with Arduino, ESP8266, and other 5V development boards

📊 Specifications

Parameter Value
Detector Type MQ-2 Gas Sensor
Operating Voltage 5V DC
Maximum Power Consumption 800 mW (160 mA at 5V)
Detectable Concentration 300–10,000 ppm (flammable gas)
Detectable Gases Smoke, hydrogen (H₂), methane (CH₄), butane, alcohol, LPG
Analog Output (AO) 0V to ~5V (proportional to gas/smoke concentration)
Digital Output (DO) TTL level — LOW normally, HIGH when gas/smoke detected
Threshold Adjustment Onboard potentiometer
Preheat / Warm-Up Time 24–48 hours (initial); ~2–5 minutes for subsequent power-ons
Indicator LEDs Power LED, DO (Digital Output) LED
Dimensions Approx. 32 × 20 × 27 mm (1.25 x 0.8 x 1.1 inches) L × W × H
Weight ~7 grams

 


📌 Pinout

The MQ-2 module has 4 pins arranged in a single header row:

Pin Label Description
1 VCC Power supply input — connect to +5V
2 GND Ground — connect to GND
3 DO Digital output — TTL HIGH when gas/smoke exceeds threshold
4 AO Analog output — voltage proportional to gas/smoke concentration (0–5V)
📝 Note: Pin order may vary slightly between manufacturers. Always verify the silkscreen labels printed on your specific module before wiring.

🏗️ Schematic / Circuit Diagram

The schematic below shows the onboard circuit of the MQ-2 gas and smoke sensor detector module, including the sensor element, comparator (LM393), potentiometer for threshold adjustment, and indicator LEDs.

MQ Series Gas Sensor Module Schematic

Key components on the module:

  • MQ-2 Sensor Element — The cylindrical metal-mesh component that detects combustible gases and smoke
  • LM393 Comparator — Compares the sensor signal against the potentiometer threshold to produce the digital output
  • Potentiometer — Adjusts the gas/smoke concentration threshold for the digital (DO) output. Turn clockwise to increase sensitivity (trigger at lower concentrations), counter-clockwise to decrease
  • Power LED — Illuminates when the module is powered
  • DO LED — Illuminates when the digital output is triggered (gas or smoke detected above threshold)

🔌 Wiring to Arduino

The MQ-2 module connects to an Arduino Uno (or compatible board) with just 4 wires. No external components are needed.

Wiring Table

MQ-2 Module Pin Arduino Pin
VCC 5V
GND GND
AO A0 (Analog Input)
DO D2 (Digital Input)
⚠️ Important: The MQ-2 sensor element draws up to 160 mA. When powering from an Arduino's 5V pin, make sure you are using USB power or an external supply that can provide sufficient current. If you experience unstable readings, use an external 5V power supply for the module's VCC pin (with a shared GND connection to the Arduino).

🔧 How It Works

The MQ-2 module uses a tin dioxide (SnO₂) semiconductor sensor element. Here's how it operates:

  1. Heating: The sensor contains a small heater coil that raises the SnO₂ element to its operating temperature. This is why the module draws relatively high current (~160 mA) and requires a warm-up period.
  2. Gas & Smoke Detection: When combustible gas molecules or smoke particles contact the heated SnO₂ surface, the sensor's electrical resistance decreases. Higher gas or smoke concentration means lower resistance.
  3. Analog Output (AO): The onboard voltage divider converts the resistance change into a voltage signal (0–5V). Higher gas or smoke concentration produces a higher voltage on the AO pin.
  4. Digital Output (DO): The LM393 comparator compares the analog signal against a reference voltage set by the potentiometer. When the gas or smoke concentration exceeds the threshold, the DO pin goes HIGH and the DO LED illuminates.

🚀 Step 1: Reading Analog Gas & Smoke Levels

This basic sketch reads the analog output from the MQ-2 sensor and prints the raw value (0–1023) to the Serial Monitor. Use this to observe how the sensor responds to gas and smoke, and to help calibrate your threshold.

/*
 * MQ-2 Smoke & Gas Sensor — Analog Reading
 * Envistia Mall - Product Support
 *
 * Reads the analog output of the MQ-2 sensor
 * and prints the value to the Serial Monitor.
 *
 * Connections:
 *   MQ-2 VCC -> Arduino 5V
 *   MQ-2 GND -> Arduino GND
 *   MQ-2 AO  -> Arduino A0
 *   MQ-2 DO  -> Arduino D2 (optional for this sketch)
 */

const int gasSensorAnalog = A0;  // Analog input pin

void setup() {
  Serial.begin(9600);
  Serial.println("MQ-2 Smoke & Gas Sensor - Analog Reading");
  Serial.println("Warming up sensor (allow 2-5 minutes)...");
  Serial.println();
}

void loop() {
  int sensorValue = analogRead(gasSensorAnalog);

  Serial.print("Gas/Smoke Level (raw): ");
  Serial.print(sensorValue);
  Serial.print("  |  Voltage: ");
  Serial.print(sensorValue * (5.0 / 1023.0), 2);
  Serial.println(" V");

  delay(1000);  // Read once per second
}

How to Use:

  1. Wire the MQ-2 module to your Arduino as shown in the wiring table above
  2. Upload the sketch to your Arduino
  3. Open the Serial Monitor at 9600 baud
  4. Allow the sensor 2–5 minutes to warm up — readings will stabilize as the heater reaches operating temperature
  5. Observe the baseline reading in clean air, then bring a smoke or gas source near the sensor to see the value increase

🚀 Step 2: Digital Threshold Detection with Alarm

This sketch uses both the analog and digital outputs. The digital output (DO) triggers when gas or smoke concentration exceeds the threshold set by the onboard potentiometer. This example also demonstrates a simple serial alarm message.

/*
 * MQ-2 Smoke & Gas Sensor — Digital Threshold Detection
 * Envistia Mall - Product Support
 *
 * Reads both analog and digital outputs.
 * Prints an alarm when gas or smoke exceeds the
 * potentiometer-set threshold.
 *
 * Connections:
 *   MQ-2 VCC -> Arduino 5V
 *   MQ-2 GND -> Arduino GND
 *   MQ-2 AO  -> Arduino A0
 *   MQ-2 DO  -> Arduino D2
 */

const int gasSensorAnalog = A0;   // Analog input pin
const int gasSensorDigital = 2;   // Digital input pin

void setup() {
  Serial.begin(9600);
  pinMode(gasSensorDigital, INPUT);
  Serial.println("MQ-2 Smoke & Gas Sensor - Threshold Detection");
  Serial.println("Warming up sensor (allow 2-5 minutes)...");
  Serial.println();
}

void loop() {
  int analogValue = analogRead(gasSensorAnalog);
  int digitalValue = digitalRead(gasSensorDigital);

  Serial.print("Analog: ");
  Serial.print(analogValue);
  Serial.print("  |  Digital: ");
  Serial.print(digitalValue);

  if (digitalValue == HIGH) {
    Serial.print("  |  *** SMOKE/GAS DETECTED! ***");
  } else {
    Serial.print("  |  Normal");
  }

  Serial.println();
  delay(500);
}

How to Use:

  1. Wire the MQ-2 module to your Arduino including both AO and DO connections
  2. Upload the sketch to your Arduino
  3. Open the Serial Monitor at 9600 baud
  4. Allow the sensor to warm up for 2–5 minutes
  5. Use a small screwdriver to adjust the onboard potentiometer — turn it to set the threshold where the DO LED just turns off in clean air
  6. Introduce smoke or gas near the sensor — when the concentration exceeds your threshold, you'll see "SMOKE/GAS DETECTED!" in the Serial Monitor and the DO LED will illuminate

💡 Tips & Best Practices

  • Initial Burn-In: For best accuracy, the MQ-2 datasheet recommends a 24–48 hour initial burn-in period the first time you use the sensor. After this initial period, subsequent warm-ups only take about 2–5 minutes.
  • Potentiometer Calibration: Adjust the potentiometer in clean air so the DO LED is just off. This sets your baseline. Then test with a known gas or smoke source to verify the trigger point.
  • Ventilation: After gas or smoke exposure, allow the sensor to return to clean air. The readings will gradually return to baseline — this is normal recovery behavior.
  • Smoke Testing: A safe way to test smoke detection is to light a match, blow it out, and hold the smoldering match near the sensor. The readings should increase noticeably.
  • Analog Readings: The raw analog value (0–1023) is not a direct PPM measurement. For approximate PPM conversion, you would need to calibrate against a known gas concentration and apply the sensitivity curves from the MQ-2 datasheet.
  • Power Supply: If readings seem erratic, try powering the module from an external 5V supply rather than the Arduino's 5V pin. The sensor's heater draws significant current that can affect other components.
  • Cross-Sensitivity: The MQ-2 detects multiple gases and smoke. It cannot distinguish between them on its own. If you need to identify a specific gas, consider using it alongside other MQ-series sensors (e.g., MQ-5 for natural gas, MQ-7 for carbon monoxide) and comparing readings.

⚠️ Important Notes

  • The sensor element gets hot during operation. Do not touch the metal mesh cylinder while the module is powered — it can cause burns.
  • This module is intended for gas and smoke detection and indication only. It is not a certified safety device and should not be used as the sole protection against gas leaks or fire in life-safety applications.
  • Do not expose the sensor to high concentrations of gas or dense smoke for extended periods, as this can degrade the sensor element over time.
  • The MQ-2 is a broad-spectrum sensor — it responds to multiple gases and smoke simultaneously. It cannot differentiate between gas types on its own.
  • Keep the sensor away from direct airflow (fans, HVAC vents) that could dilute gas or smoke concentrations and cause missed detections.

🎯 Typical Applications

  • Smoke detection and fire alarm systems
  • Home gas leak detection (kitchen, furnace room, garage)
  • Industrial gas monitoring systems
  • Arduino and microcontroller safety projects
  • Portable gas and smoke sniffers
  • Smart home automation — trigger ventilation fans, alarms, or shut-off valves when gas or smoke is detected
  • Air quality monitoring stations
  • Educational and STEM projects demonstrating analog sensor interfacing


🏪 Where to Buy the MQ-2 Gas Sensor Module

This module is available at envistiamall.com.

  • 📦 Fast US Shipping
  • 🔄 Hassle-Free Returns
  • 📧 Responsive Customer Support

📚 Additional Resources


This guide is provided by Envistia Mall for educational and technical reference purposes. The manufacturer and Envistia LLC (dba Envistia Mall) are not responsible for any damages or losses resulting from the use of this product. Always follow proper electrical safety practices when working with electronic components. Specifications are based on manufacturer data and are subject to change without notice.

Share this guide:
in

🛒 Related Products

Find the components mentioned in this guide in our store.

Browse Products →