MQ-2 Gas & Smoke Sensor
Detects LPG, smoke, and combustible gases — the standard gas sensor for safety projects.
A widely used analog gas sensor tuned for detecting LPG, smoke, and combustible gases in DIY safety and air-quality projects.
Specifications
| Sensing element | SnO2 (tin dioxide) semiconductor — resistance drops in the presence of combustible gases |
| Operating voltage | 5V DC (heater and sensing circuit both run continuously on 5V, no duty-cycle required) |
| Detection range | 300-10,000 ppm — LPG, propane, hydrogen, methane, and smoke |
| Preheat time | Usable within ~20s of power-up; full baseline stabilization takes 24-48 hours of burn-in |
| Current draw | ~150 mA, dominated by the heating element running continuously |
| Output | Analog voltage (AOUT) proportional to gas concentration, plus a threshold digital output (DOUT) via onboard comparator |
| Interface | Analog (AOUT) — requires an ADC and a datasheet Rs/Ro curve to convert to ppm; DOUT is a simple threshold trigger |
Pinout
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power, 5V DC — also powers the internal heating element continuously |
| 2 | GND | Ground |
| 3 | AOUT | Analog voltage output, proportional to gas concentration — read with an ADC, not a direct ppm value |
| 4 | DOUT | Digital threshold output — trips based on the onboard comparator, threshold set by the potentiometer on the module |
Heater runs constantly at 5V — unlike the MQ-7/MQ-9, the MQ-2 doesn't need a duty-cycled heating voltage; a plain, constant 5V supply is correct per its datasheet. Just budget for the ~150mA continuous draw, which is easy to underestimate if your power rail is shared with other sensors.
AOUT is a raw voltage, not ppm — converting a reading to an actual ppm figure needs the Rs/Ro resistance ratio and the datasheet's gas-response curve, plus a clean-air calibration step to establish your specific sensor's Ro baseline. Don't treat raw analogRead() values as calibrated gas concentrations.
DOUT threshold needs manual calibration — the onboard potentiometer sets the trip point for DOUT and is not accurate out of the box; adjust it in known clean air before trusting it as an alarm trigger.
Don't touch the sensing element while powered — the metal mesh cap covers an actively heated element; it gets warm during normal operation.
Expect drift and burn-in behavior — readings during the first uses after unboxing will be noisier and less accurate than after ~24-48 hours of cumulative on-time; don't calibrate against a brand-new, un-burned-in sensor.
Variants
The MQ-2 is the right default for a general "is there a combustible gas or smoke in the air" project and is what almost every beginner gas-sensor tutorial assumes. If carbon monoxide specifically is the target, don't rely on the MQ-2's partial CO cross-sensitivity — use the MQ-7 or MQ-9, both of which have a heating cycle designed for CO selectivity.
| Variant | Temp range | Hum range | Accuracy | Protocol | Price |
|---|---|---|---|---|---|
| MQ-2 | ~$1-3 | ||||
| MQ-5 | ~$1-3 | ||||
| MQ-6 | ~$1-3 | ||||
| MQ-9 | ~$2-4 |