MQ-2 Gas Sensor for H2, LPG, CH4, CO, Smoke or Propane Detector
What the MQ2 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 hnical summaries)
How It Works Sensing Principle
Sensing Material: Inside the MQ2 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
MQ2 Module Pins------------------------VCC | 5V DC PowerGND | GroundDO | Digital Output (0/5V)AO | Analog Output (05V)
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: ~30010,000 ppm Working temperature: ~10C to +50C Preheat time: ~20 seconds minimum
(Data derived from module descriptions)
Typical Wiring
Microcontroller MQ2 Module---------------- ----------------5V ---------------- VCCGND ---------------- GNDA0 (ADC) --------------- AOD2 (Digital) ------------- DO
Analog> 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 MQ2 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 Embeddn 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 (~150mA) |
Onboard potentiometer for threshold | Reading variability in harsh conditions |
Summary
The MQ2 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.
ed applications.

