Overview

The MQ-2 is a semiconductor gas sensor manufactured by Winsen Electronics. It uses a tin-dioxide (SnO2\text{SnO}_2) sensitive layer whose electrical conductivity increases in the presence of combustible gases and smoke.

Breakout modules incorporate an internal internal micro-heater, an LM393 voltage comparator IC with a sensitivity adjustment potentiometer, a digital switching output (DO), and an analog output (AO) producing a voltage proportional to gas concentration.

Quick reference

Operating voltage (VCC)5.0 V ±0.1 V\pm 0.1\text{ V} DC (5V required for internal heater)
Heater resistance (RHR_H)31 Ω±3 Ω31\text{ }\Omega \pm 3\text{ }\Omega
Heater power consumption800 mW\sim 800\text{ mW} (160 mA current draw160\text{ mA} \text{ current draw})
Target gasesLPG, Propane, Methane, Hydrogen, Alcohol, Smoke
Concentration range300 ppm to 10,000 ppm (combustible gases)
OutputsAnalog voltage (AO: 0.1 V – 4.0 V) / Digital threshold (DO: TTL LOW when gas detected)

Pinout

Standard 4-Pin Breakout Module

PinNameTypeDescription
1VCCPowerSupply voltage (+5 V DC required for internal heater coil)
2GNDPowerGround (0 V)
3DODigital OutputDigital Output (HIGH in clean air, goes LOW when gas concentration exceeds threshold set by potentiometer)
4AOAnalog OutputAnalog Output voltage (0.1 V in clean air, increases up to ~4.5 V as gas concentration rises)

Specifications

ParameterSymbolMinTypMaxUnitConditions
Sensor Circuit VoltageVCV_C5.05.0VDC
Heater VoltageVHV_H5.05.0VAC or DC
Load ResistanceRLR_L20Adjustable on breakout
Heater ResistanceRHR_H283134ΩRoom temperature (20 C20\text{ }^\circ\text{C})
Heater PowerPHP_H800mWVH=5.0 VV_H = 5.0\text{ V}
Sensing ResistanceRSR_S220in 2000 ppm C3H8C_3H_8 (Propane)
Preheat Timetpret_{pre}2448hoursInitial burn-in / stabilization

Sensitivity characteristics & calibration

The MQ-2 measures gas concentration by observing the resistance ratio RSR0\frac{R_S}{R_0}:

  • RSR_S: Sensor resistance in target gas at various concentrations.
  • R0R_0: Sensor resistance in clean air at specified temperature/humidity (20 C20\text{ }^\circ\text{C}, 65% RH).

Sensor Resistance (RS)=(VCVAOVAO)×RL\text{Sensor Resistance } (R_S) = \left(\frac{V_C - V_{AO}}{V_{AO}}\right) \times R_L

To convert analog voltage (VAOV_{AO}) to estimated gas concentration in PPM, calibrate R0R_0 in clean air, then apply the logarithmic power-law formula:

log10(PPM)=log10(RS/R0)bm\log_{10}(\text{PPM}) = \frac{\log_{10}(R_S / R_0) - b}{m}

where mm and bb are derived from the datasheet's sensitivity characteristic curve for the specific target gas (e.g. LPG or Methane).

Wiring

MQ-2 ModuleMicrocontroller (Arduino Uno / ESP32)Notes
VCC5VMust be 5V DC (3.3V will not heat element sufficiently)
GNDGNDGround
AOAnalog Pin A0 (or ESP32 ADC1)Connects to ADC for quantitative measurement
DODigital Pin 2Optional digital alarm threshold input
Warning

High Current & Heating Hazard:

  • The MQ-2 internal heater draws up to 160 mA continuous current. Do NOT power the sensor from a microcontroller's 3.3V rail or low-current GPIO pin.
  • The sensor body gets warm to the touch during normal operation. This is normal behavior required to burn off contaminants on the SnO2\text{SnO}_2 substrate.

Common mistakes

  • Skipping preheat / burn-in period: New MQ-2 sensors require a 24 to 48-hour initial burn-in period to stabilize baseline readings. Even after initial burn-in, allow 1–3 minutes of preheating upon power-up before taking measurements.
  • Powering with 3.3V: Operating the heater on 3.3V prevents the heating element from reaching its operating temperature (300 C300\text{ }^\circ\text{C} to 400 C400\text{ }^\circ\text{C} internal), causing the sensor to output flat or erratic values.
  • Expecting non-selective gas detection: The MQ-2 is a general semiconductor gas sensor. It cannot distinguish between LPG, Propane, Methane, or Smoke when multiple gases are present simultaneously.

Notes

  • Environmental Compensation: Temperature and humidity significantly affect RSR_S. For accurate measurements outdoors or across seasons, ambient temperature/humidity compensation curves from the Winsen datasheet should be applied in software.

Assets & downloads