The MQ-2 Smoke and Gas Sensor Module is a versatile gas detection module designed to detect combustible gases and smoke in the surrounding environment. It is sensitive to LPG, propane, butane, methane, hydrogen, alcohol vapors, and smoke, making it suitable for gas monitoring, electronic safety demonstrations, and IoT projects.
The module uses a Metal Oxide Semiconductor (MOS) sensing element whose electrical resistance changes when exposed to certain gases. It provides both analog and digital outputs, allowing easy integration with Arduino, ESP32, Raspberry Pi (with additional interfacing), and other microcontrollers.
Operating at 5V DC, the MQ-2 features an onboard potentiometer for adjusting the digital detection threshold, along with indicator LEDs for power and detection status.
Key Features
-
Multi-Gas Detection: Sensitive to LPG, propane, butane, methane, hydrogen, alcohol vapors, and smoke.
-
Analog Output (AO): Provides a variable voltage corresponding to changes in gas concentration.
-
Digital Output (DO): Provides HIGH/LOW signals based on the adjustable detection threshold.
-
Adjustable Detection Threshold: Onboard potentiometer for setting the digital trigger level.
-
5V Operating Voltage: Suitable for common microcontroller-based projects.
-
Fast Response: Detects changes in combustible gas concentrations.
-
Onboard Indicator LEDs: Power and digital detection status.
-
Compact Module Design: Easy to integrate into electronic circuits.
-
Continuous Monitoring: Suitable for applications requiring repeated gas measurements.
Technical Specifications
| Specification |
Details |
| Product Model |
MQ-2 |
| Sensor Type |
Metal Oxide Semiconductor (MOS) |
| Sensing Material |
Tin Dioxide (SnO2) |
| Operating Voltage |
5V DC |
| Typical Power Consumption |
Approximately 800mW |
| Gas Detection |
LPG, Butane, Propane, Methane, Hydrogen, Alcohol Vapors, Smoke |
| Typical Detection Range |
200–10,000 ppm for specified combustible gases |
| Analog Output |
Variable Voltage, Approximately 0–5V |
| Digital Output |
HIGH/LOW, 5V Logic |
| Sensitivity Adjustment |
Onboard Potentiometer |
| Interface |
Analog and Digital |
| Initial Response Time |
Approximately 20 Seconds (Not Full Calibration) |
| Sensor Preheating |
Extended Preheating Required for Stable Measurements |
| Sensor Technology |
Heated Semiconductor |
| Module Type |
4-Pin Gas Sensor Module |
Pin Configuration
| Pin |
Description |
| VCC |
5V DC Power Supply |
| GND |
Ground |
| AO |
Analog Gas Sensor Output |
| DO |
Digital Threshold Output |
Arduino UNO Connection Example
| MQ-2 Pin |
Arduino UNO |
| VCC |
5V |
| GND |
GND |
| AO |
A0 |
| DO |
D2 (Optional) |
The Arduino can monitor changes in gas concentration through the analog output or detect when the gas level exceeds the adjustable digital threshold.
ESP32 Connection Example
| MQ-2 Pin |
ESP32 |
| VCC |
5V |
| GND |
GND |
| AO |
GPIO34 Through Voltage Divider |
| DO |
Digital GPIO Through Level Shifter |
Important: The MQ-2 operates at 5V, while ESP32 GPIO pins operate at 3.3V. Use a voltage divider or suitable level shifter to protect the ESP32 from excessive input voltage.
Raspberry Pi Compatibility
The MQ-2 can be connected to Raspberry Pi boards for gas detection projects.
-
Analog Reading: Requires an external ADC module such as ADS1115 or MCP3008.
-
Digital Reading: Requires appropriate 5V-to-3.3V level shifting.
-
Power Supply: The sensor module requires a suitable 5V supply.
Applications
- Combustible gas detection projects
- LPG and propane monitoring prototypes
- Smoke detection demonstrations
- Arduino and ESP32 sensor projects
- IoT environmental monitoring
- Smart home automation experiments
- Gas leakage alarm prototypes
- Robotics and electronic sensing systems
- Educational STEM projects
- Laboratory gas sensing experiments
Important Notes
-
The MQ-2 is a general-purpose combustible gas and smoke sensor, not a certified gas leakage alarm.
- The sensor responds to multiple gases and cannot reliably identify which specific gas is present.
- The analog output is not a direct ppm reading. Accurate concentration estimates require calibration and appropriate conversion methods.
- The onboard potentiometer adjusts the digital output threshold, not the underlying sensor sensitivity.
- Allow sufficient preheating before taking measurements. Initial conditioning may require 24–48 hours or longer, depending on the sensor's condition and manufacturer recommendations.
- The internal heating element becomes warm during operation.
- Temperature and humidity may affect measurement accuracy.
- Do not connect the module's 5V outputs directly to 3.3V-only microcontroller GPIO pins.
- This module is intended for educational, experimental, and non-safety-critical monitoring applications.
- Do not use it as a replacement for certified smoke detectors or combustible gas alarms.
Package Includes