MQ-2 Gas Sensor Price in Pakistan — Pinout, Wiring and Uses

The MQ-2 is the most common smoke and combustible-gas sensor used in student and hobby projects in Pakistan. This guide explains the MQ-2 gas sensor price in Pakistan, pinout, Arduino and ESP32 wiring, and practical uses so you can choose and connect the right module with confidence. At Electronics Pro, Hall Road, Lahore, the MQ2 Gas Sensor Detector Module is currently listed at Rs 280 and in stock (verified 4 December 2026 — always check the live price and stock on the product page before ordering). Browse the full Sensors range for related gas, temperature and environmental modules with cash on delivery across Pakistan.
What the MQ-2 Detects
The MQ-2 uses a tin-dioxide (SnO2) sensing element whose resistance falls when combustible gases are present. It is sensitive to smoke, LPG, methane, propane, butane, hydrogen and alcohol vapour, with some response to carbon monoxide. That broad response makes it useful for leak indication and air-quality experiments, but it cannot identify which gas caused the reading. Most importantly, the MQ-2 is not a certified safety alarm. Do not rely on it as your only protection against gas leaks or fire. Use it for learning, prototyping and supplementary indication alongside certified detectors where safety matters.
Pinout and Specifications
Standard MQ-2 modules have four pins: VCC (5V supply), GND (ground), DO (digital output from the onboard LM393 comparator) and AO (analog output, roughly 0V to 5V depending on gas concentration). Inside the metal mesh is a heater coil that keeps the sensing element hot; the module draws about 150mA, so power it from a stable 5V source, not from a weak GPIO pin. After power-on, allow at least 20 seconds of preheat before trusting readings, and note that new sensors need 24 to 48 hours of burn-in for stable baselines. The small potentiometer on the module sets the DO threshold. Typical module size is about 36 x 20 x 21 mm.
Wiring with Arduino Uno and ESP32
Arduino Uno: Connect VCC to 5V, GND to GND, AO to A0 and DO to D2. Read AO with analogRead(A0) for a 0–1023 value, or read DO with digitalRead(2) for a simple threshold alarm. Adjust the potentiometer until the DO LED just turns off in clean air. Any board from our Arduino Products category works the same way.
ESP32: Power the MQ-2 from 5V (USB or VIN with a proper 5V supply) and join grounds. ESP32 analog inputs accept only 0–3.3V, so you must use a voltage divider on AO — for example 10k ohm from AO to the GPIO and 20k ohm from GPIO to GND — and connect the divided signal to an ADC pin such as GPIO 34. Treat DO the same way or use a level shifter; never feed 5V directly into an ESP32 pin. If you are new to the platform, read our ESP32 Price in Pakistan Guide for power and pin guidance before wiring.
Reading Values and Calibration Basics
In clean air, record the analog baseline after full warm-up, then expose the sensor briefly to a safe test source (for example, unlit lighter gas at a distance) and watch the value rise. For repeatable projects, average several readings, ignore the first minute after power-on, and set your alarm threshold well above normal drift. True ppm conversion needs the datasheet Rs/Ro curve and known-gas calibration, so treat MQ-2 numbers as relative indication, not laboratory measurement. Keep the sensor away from steam, cooking fumes and direct heat to reduce false triggers, and re-check the baseline if temperature or humidity changes a lot.
Newest in the store
Project Ideas
- Kitchen LPG leak indicator: Arduino + MQ-2 + buzzer and LED, with DO threshold tuned for clear warning.
- Workshop smoke alert: ESP32 logger that sends a phone notification when smoke rises above baseline.
- IoT air-quality logger: Record AO trends over time with an ESP32 and display them on a small OLED for classroom demos.
Buying Guide: Module vs Bare Sensor
Buy the module if you want plug-and-play wiring: it includes the LM393 comparator, threshold potentiometer, power and DO LEDs, and both analog and digital outputs. Buy the bare sensor only if you are designing your own PCB and can add the load resistor and heater supply yourself. For most Arduino and ESP32 builds, the module saves time and wiring errors. Check that the mesh is undamaged, pins are straight, and the seller tests stock. You can order the MQ-2 smoke and LPG sensor module for Arduino and ESP32 from Hall Road with nationwide COD, and compare other MQ types in the Sensors category for methane, alcohol or air-quality work.
Frequently Asked Questions
Which MQ sensor should I use for LPG?
MQ-2 and MQ-6 are the usual choices for LPG. MQ-2 also responds to smoke and methane, which suits general kitchen and lab indication. Check the datasheet sensitivity curves for your target gas.
Can the MQ-2 detect carbon monoxide reliably?
It responds to CO but also to many other gases, so it cannot measure CO selectively. For CO safety, use a certified CO detector or a dedicated CO sensor such as MQ-7 with proper calibration.
How long does the MQ-2 need to warm up?
Allow at least 20 seconds after each power-on before reading, and 24–48 hours of initial burn-in for a new sensor to stabilise. Readings taken too early will drift and cause false alarms.
Can I use the MQ-2 as a home safety alarm?
No. The MQ-2 is a hobby and prototyping sensor, not a certified safety alarm. Use it for learning and supplementary alerts only, and install certified smoke and gas detectors for real protection.
