075582814553
How MQ-2 Gas Sensor Module Works?

FREE-SKY (HK) ELECTRONICS CO.,LIMITED / 01-28 17:34

The MQ-2 gas sensor is widely used because of its ability to detect multiple flammable gases and smoke using a simple operating principle and minimal external circuitry. This article will discuss the MQ-2 gas sensor’s working principle, pin configuration, internal structure, hardware components, specifications, and more.


Catalog

1. MQ-2 Gas Sensor Overview
2. MQ-2 Gas Sensor Working Principle
3. MQ2 Gas Sensor Pinout Details
4. MQ-2 Gas Sensor Structure and Materials
5. MQ-2 Sensor Module Hardware
6. Alternatives & Equivalent Model
7. MQ-2 Gas Sensor Specifications
8. MQ-2 Gas Sensor Features
9. MQ-2 Gas Sensor Test Circuit
10. MQ-2 Gas Sensor Working w/ Arduino
11. MQ-2 Gas Sensor Applications
12. MQ-2 Gas Sensor Safely Operation
13. Comparison: MQ-2 vs MQ-135 Gas Sensor
14. Mechanical Dimensions
15. Conclusion
MQ2 Gas Sensor

MQ-2 Gas Sensor Overview

The MQ-2 gas sensor is a low-cost device used to detect flammable gases and smoke in the air. It is commonly applied in gas leakage alarms, fire detection systems, and microcontroller-based projects due to its simple design and wide availability. The sensor responds to gases such as LPG, methane, propane, hydrogen, alcohol vapor, carbon monoxide, and smoke, making it suitable for general gas and safety monitoring.

Most MQ-2 sensor modules provide both analog and digital outputs. The analog output indicates relative gas concentration, while the digital output triggers when gas levels exceed a preset threshold. A short preheating period is required to ensure stable and reliable readings.

MQ-2 Gas Sensor Working Principle

The MQ-2 operates using a metal-oxide semiconductor (MOS) sensing mechanism. Its sensing element is made of tin dioxide (SnO₂) deposited on an aluminum-oxide ceramic substrate and heated by an internal heater. In clean air, oxygen molecules are adsorbed on the heated SnO₂ surface, capturing free electrons and increasing the sensor’s resistance.

When combustible or reducing gases are present, they react with the adsorbed oxygen and release the trapped electrons back into the sensing material. This reduces the sensor’s resistance and increases current flow, producing a measurable rise in output voltage. These voltage changes allow external circuits to detect gas presence and estimate relative gas concentration.

MQ-2 Gas Sensor Pinout Details

MQ2 Gas Sensor Pinout Details

MQ-2 Gas Sensor (Bare Sensor)

Pin Label
Pin Name
Description
H
Heater Pin 1
Supplies power to the internal heater element
H
Heater Pin 2
Heater return pin
A
Electrode A
Sensing electrode (connected internally)
A
Electrode A
Duplicate sensing electrode
B
Electrode B
Output electrode (connected internally)
B
Electrode B
Duplicate output electrode

MQ-2 Gas Sensor Module

Pin No.
Pin Name
Description
1
VCC (+5V)
Power supply input
2
GND
Ground
3
DOUT
Digital output (threshold-based)
4
AOUT
Analog output (gas concentration level)

MQ-2 Gas Sensor Structure and Materials

MQ-2 Gas Sensor Structure and Materials

• Clamp Ring- The clamp ring secures the metal mesh and internal parts of the sensor. It keeps the structure stable and ensures all components stay aligned during operation.

• Anti-Explosion Network (Metal Mesh) - This stainless-steel mesh prevents sparks inside the sensor from igniting flammable gases outside. It also works as a protective filter against dust and debris.

• Connecting Legs (Pins) - The pins provide electrical connections between the MQ-2 sensor and the external circuit. They include heater pins (H) and signal pins (A and B) for gas sensing output.

• Sensing Element - The sensing element is the core of the MQ-2 sensor. It changes electrical resistance when exposed to gases such as LPG, methane, or smoke, enabling gas detection.

• Aluminum Oxide (Al₂O₃) Based Ceramic - This ceramic tube supports the sensing element and heater. It offers excellent electrical insulation and can withstand high temperatures during operation.

• Tin Dioxide (SnO₂) Coating - The SnO₂ layer is the gas-sensitive material. When gas molecules interact with this coating, its conductivity changes, which the sensor converts into an electrical signal.

• Nickel-Chromium Heating Coil - The heating coil raises the temperature of the sensing element to its optimal working range. Proper heating is essential for accurate and stable gas detection.

• Platinum Wires - Platinum wires connect the sensing layer and heater to the external pins. Platinum is used because it is highly stable and resistant to heat and corrosion.

MQ-2 Sensor Module Hardware

MQ2 Sensor Module Hardware

MQ-2 Gas Sensing Element

This is the main sensor that detects gases such as LPG, methane, hydrogen, and smoke. It changes resistance when gas is present, which the module converts into output signals.

Sensitivity Adjustment (Potentiometer)

This small adjustable knob lets you set how sensitive the sensor is to gas. Turning it changes the gas threshold level for the digital output.

LM393 Comparator

The LM393 compares the sensor signal with the set threshold from the potentiometer. When the gas level exceeds the set limit, it triggers the digital output.

Power LED

This LED turns on when the module is properly powered. It simply shows that voltage is supplied to the board.

Status / Output LED

This LED lights up when the gas concentration crosses the preset threshold. It gives a quick visual alert without needing a microcontroller.

Analog Output (A0)

The analog pin outputs a continuous voltage that changes based on gas concentration. It is useful for measuring relative gas levels.

Digital Output (D0)

The digital pin outputs HIGH or LOW depending on whether the gas level is above the set threshold. It is commonly used for alarms and simple detection.

VCC Pin

Supplies power to the module, typically 5V. This powers both the heater and the onboard electronics.

GND Pin

Provides the ground reference for the module and must be connected to the system ground.

Alternatives & Equivalent Model

Sensor Model
Main Gases Detected
Detection Focus
Typical Detection Range (ppm)
Operating Voltage
Heater Voltage
MQ-2
Methane, LPG, Butane, Smoke
Flammable gases
300 – 10,000
5V
5V
MQ-3
Alcohol, Ethanol, Smoke
Alcohol vapors
25 – 500
5V
5V
MQ-4
Methane, CNG
Natural gas
300 – 10,000
5V
5V
MQ-5
Natural Gas, LPG
Combustible gases
200 – 10,000
5V
5V
MQ-6
LPG, Butane
Gas leakage
300 – 10,000
5V
5V
MQ-7
Carbon Monoxide (CO)
Toxic gas
20 – 2,000
5V
5V
MQ-8
Hydrogen
Hydrogen gas
100 – 10,000
5V
5V
MQ-9
CO, Flammable gases
Mixed gases
10 – 10,000
5V
5V
MQ-131
Ozone (O₃)
Air quality
10 ppb – 2 ppm
5V
5V
MQ-135
NH₃, Benzene, Alcohol, Smoke
Air quality
10 – 1,000
5V
5V
MQ-136
Hydrogen Sulfide (H₂S)
Toxic gas
1 – 200
5V
5V
MQ-137
Ammonia (NH₃)
Ammonia gas
5 – 500
5V
5V
MQ-138
Benzene, Toluene, Alcohol
VOCs
1 – 500
5V
5V
MQ-214
Methane, Natural Gas
Fuel gas
300 – 10,000
5V
5V
MQ-216
Natural Gas, Coal Gas
Industrial gas
300 – 10,000
5V
5V
MQ-303A
Alcohol, Ethanol, Smoke
Alcohol vapors
20 – 500
5V
5V
MQ-306A
LPG, Butane
Gas leakage
300 – 10,000
5V
5V
MQ-307A
Carbon Monoxide
CO gas
10 – 2,000
5V
5V
MQ-309A
CO, Flammable gases
Mixed gases
10 – 10,000
5V
5V

MQ-2 Gas Sensor Specifications

Category
Parameter
Specification
General
Model No.
MQ-2
Sensor Type
Semiconductor (MOS)
Standard Encapsulation
Bakelite (Black Bakelite)
Detection Gas
Combustible gas and smoke
Target Gases
LPG, Butane, Propane, Methane, Hydrogen, Alcohol, Smoke
Detection Concentration
300 – 10,000 ppm (combustible gases)
Electrical
Loop Voltage
≤ 24 V DC
Heater Voltage
5.0 V ± 0.2 V (AC or DC)
Load Resistance
Adjustable
Heater Resistance
31 Ω ± 3 Ω (room temperature)
Heater Power Consumption
≤ 900 mW
Typical Heater Current
≈ 150 mA
Sensing
Sensing Resistance
2 kΩ – 20 kΩ (at 2000 ppm C₃H₈)
Sensitivity
Rs (air) / Rs (1000 ppm isobutane) ≥ 5
Slope
≤ 0.6 (R₅₀₀₀ppm / R₃₀₀₀ppm CH₄)
Response Time
≤ 10 s (typical)
Recovery Time
≤ 30 s (typical)
Environment
Operating Temperature
−10 °C to +50 °C
Storage Temperature
−20 °C to +70 °C
Operating Humidity
≤ 95% RH (non-condensing)
Standard Test Conditions
20 °C ±2 °C; 65% ±5% RH
Circuit
Standard Test Circuit
Vc: 5.0 V ±0.1 V; Vh: 5.0 V ±0.1 V
Output Type
Analog resistance change
Mechanical
Sensor Diameter
~18 mm
Sensor Height
~17 mm
Pin Count
6 pins
Weight
~5 g
Other
Preheat Time
≥ 48 hours (initial use)

MQ-2 Gas Sensor Features

5V Operating Voltage

The MQ-2 gas sensor operates at a standard 5V supply, making it fully compatible with common microcontrollers such as Arduino, ESP32 (with proper interfacing), and Raspberry Pi modules. This simplifies power design and integration in DIY and embedded projects.

Wide Gas Detection Capability

This sensor can detect LPG, alcohol, propane, hydrogen, carbon monoxide, and methane. Its broad sensitivity makes it suitable for gas leakage alarms, smoke detectors, and general safety monitoring where multiple combustible gases may be present.

Analog Output (0V to 5V)

The analog output provides a continuous voltage level that changes with gas concentration. This allows users to estimate relative gas levels and perform calibration for more precise monitoring applications.

Digital Output (TTL Logic: 0V or 5V)

The digital output switches HIGH or LOW when gas concentration exceeds a preset threshold. This is ideal for simple alarm systems that only require gas presence detection.

Short Preheat Duration (Module Level)

The module can provide initial readings after a short warm-up period, allowing quicker testing and demonstrations, though long-term stability improves with extended preheating.

Dual Analog and Digital Operation

The MQ-2 can be used as either an analog sensor for variable readings or a digital sensor for threshold-based alerts, offering flexibility for different project requirements.

Adjustable Sensitivity via Potentiometer

An onboard potentiometer allows easy adjustment of the digital output sensitivity, enabling users to fine-tune the trigger level based on environmental conditions.

High Sensitivity to Combustible Gases

The sensor shows strong sensitivity across a wide range of combustible gases, making it effective for early gas leak detection.

Optimized for LPG, Propane, and Hydrogen

The MQ-2 is particularly sensitive to LPG, propane, and hydrogen, which are common fuels in household and industrial environments.

Long Life and Low Cost

Built with durable materials and a simple internal structure, the MQ-2 offers long operational life at a very low cost, ideal for mass deployment and educational use.

Simple Drive Circuit

The sensor requires only minimal external components to operate, reducing circuit complexity and making it easy for beginners to use.

MQ-2 Gas Sensor Test Circuit

The MQ-2 gas sensor test circuit shows how the sensor is powered and how its gas-sensitive resistance is converted into a measurable voltage. The circuit is divided into two main parts: the heater circuit and the signal (sensing) circuit. Each part has a different role in enabling proper gas detection.

The heater circuit uses the VH supply to power the internal heater (H–H pins). This heater raises the temperature of the sensing material so that gas molecules can react with it. Without this heating, the sensor would not respond correctly to combustible gases. The heater circuit is referenced to GND, completing the power path.

MQ2 Gas Sensor Test Circuit

The sensing circuit is formed by the internal sensing resistance (Rs, between pins A and B) and the external load resistor (RL). A supply voltage (Vc) is applied across this series combination. When gas concentration changes, the resistance of Rs changes, which causes a corresponding change in voltage across RL.

The output voltage (VRL) is measured across the load resistor RL. As gas concentration increases, Rs typically decreases, causing VRL to rise. This voltage is the usable signal that can be read by an analog input of a microcontroller or compared against a threshold for gas detection.

MQ-2 Gas Sensor Working w/ Arduino

In the diagram, the MQ-2 gas sensor module is connected to an Arduino Uno using four basic connections: power, ground, analog output, and optional digital output. The VCC pin of the MQ-2 module is connected to the Arduino’s 5V pin, while the GND pin is connected to Arduino GND. These two connections power the sensor’s internal heater and onboard circuitry, allowing the sensor to operate correctly.

The analog output pin (A0) of the MQ-2 module is connected to one of the Arduino’s analog input pins, such as A0. This connection allows the Arduino to read a variable voltage that represents the gas concentration. As the level of combustible gas or smoke increases, the voltage on the A0 pin also changes, and the Arduino converts this voltage into a digital value using its internal ADC.

MQ2 Gas Sensor Working w/ Arduino

If digital detection is needed, the digital output pin (D0) can be connected to any Arduino digital input pin. The digital output is controlled by the onboard LM393 comparator and responds when gas concentration exceeds a preset threshold. This threshold is adjusted using the sensitivity potentiometer on the sensor module.

Once powered, the MQ-2 sensor requires a warm-up period so the internal heating coil can reach its working temperature. During operation, the tin dioxide (SnO₂) sensing layer changes resistance when exposed to gases such as LPG, methane, or smoke. The module converts this resistance change into an electrical signal that the Arduino continuously monitors.

By reading the analog or digital output, the Arduino can process gas concentration levels in software. Based on these readings, the system can trigger alarms, display values on a screen, or activate safety devices. This simple wiring and working principle make the MQ-2 gas sensor easy to integrate into Arduino-based gas detection and safety projects.


Processed in 0.744065 Second , 23 querys.