MQ-2 Gas Sensor for H2, LPG, CH4, CO, Smoke or Propane Detector
🧠 What the MQ‑2 Sensor Is
A semiconductor gas sensor module designed to detect combustible gases and smoke. It’s especially common in hobby and safety systems like gas leakage alarms, air quality monitors, and embedded safety circuits.
📌 Key Features
+-----------------------------------------------------+
| MQ-2 Gas Sensor |
+-----------------------------------------------------+
| 🚨 Detects Gases: |
| • H₂ (Hydrogen) |
| • LPG (Liquefied Petroleum Gas) |
| • CH₄ (Methane) |
| • CO (Carbon Monoxide) |
| • Smoke |
| • Propane |
+-----------------------------------------------------+
| 🔧 Output Types: Analog + Digital |
| 🎚 Adjustable sensitivity via onboard potentiometer |
| ⏱ Response Time: Fast (within seconds) |
| ⚡ Power Supply: 5V DC |
| 🪶 Preheat Required (~20 sec‑mins) |
+-----------------------------------------------------+(Combined from multiple technical summaries)
🔍 How It Works — Sensing Principle
Sensing Material:
Inside the MQ‑2 sensor is a heated semiconductor element made of tin dioxide (SnO₂).In Clean Air:
The SnO₂ has relatively high electrical resistance because oxygen molecules absorb on its surface.When Gas is Present:
Combustible gases react with the surface oxygen, reducing resistance — this change is detected and converted into an electrical signal.Outputs:
Analog (AO): Provides a continuous voltage proportional to gas concentration.
Digital (DO): TTL logic HIGH/LOW output based on a threshold set by the potentiometer.
🔌 Pin / Connector Overview
MQ‑2 Module Pins (Typical)
Pin | Function
-----------|----------------------------
VCC | 5V DC Power
GND | Ground
DO | Digital Output (0/5V)
AO | Analog Output (0–5V)
✔ AO pin: Read with analog input on a microcontroller to measure relative gas concentration.
✔ DO pin: Triggered when gas level crosses a set threshold (potentiometer set).
🧪 Electrical & Operating Specs
• Operating voltage: 5V DC (typical)
• Current consumption: ~150 mA
• Detectable gas range: ~300–10,000 ppm
• Working temperature: ~‑10°C to +50°C
• Preheat time: ~20 seconds minimum
(Data derived from module descriptions)
📊 Typical Wiring
Microcontroller MQ‑2 Module
---------------- ----------------
5V ----------------→ VCC
GND ----------------→ GND
A0 (ADC) ←--------------- AO
D2 (Digital) ←------------- DO
✔ Analog readings give a rough measure of gas concentration but require calibration.
✔ Digital pin is useful for simple threshold alarms.
🧠 Practical Notes & Behavior
⚠ Preheat & Stabilization
The sensor needs to heat up before giving stable outputs — often up to 20 sec or more. Some advanced use suggests even longer for better consistency.
⚠ Not Gas‑Specific
The MQ‑2 detects many gases but cannot tell which one is present; it shows increasing signal with increasing combustible gas concentration.
🔧 Calibration
For more accurate estimation of gas concentration in parts per million (ppm), you must calibrate the analog output against known gas concentrations — often using curves from a datasheet.
🛠 Applications
✔ Gas leak detectors (LPG, propane, methane)
✔ Smoke detection systems
✔ Air quality / environmental monitoring
✔ Home safety alarm systems
✔ Embedded IoT safety projects
✔ Robotics and automation requiring gas detection
(Common use cases from multiple references)
📈 Pros & Cons
| Pros | Cons |
|---|---|
| Detects multiple combustible gases | Not selective to specific gas |
| Dual analog + digital outputs | Needs calibration for accurate PPM |
| Low‑cost, easy to interface | Requires warm‑up before accurate use |
| Compatible with microcontrollers | Higher power consumption (~150 mA) |
| Onboard potentiometer for threshold | Reading variability in harsh conditions |
🧩 Summary
The MQ‑2 Smoke & Flammable Gas Sensor Module is a versatile semiconductor gas sensor able to:
Detect common combustible gases (H₂, LPG, CH₄, CO, propane, smoke).
Provide both analog and digital outputs for flexible interfacing.
Be used in safety systems, monitoring, and embedded applications.
