back to top
Wednesday, November 12, 2025
spot_img

Complete Guide to MQ Series Sensors Modules

Share This Post

MQ series sensors are a popular choice for detecting various gases and monitoring air quality in electronics projects. These air and gas sensor modules are known for being inexpensive, easy to use, and compatible with microcontrollers like Arduino and ESP32. In this comprehensive guide, we’ll explore how MQ series sensors work, discuss their reliability and calibration needs, show wiring to an ESP32 (including schematics). We’ll cover the complete MQ sensor lineup detailing what each sensor detects, how to use it, and why some are cheaper or more expensive than others. A detailed comparison table and downloadable wiring schematics are also provided. By the end, you’ll have a solid understanding of the entire MQ sensor lineup and how to integrate these gas sensors into your own projects.

MQ sensors use a SnO₂ (tin-dioxide) chemi-resistor layer heated to 200 – 500 °C by an internal nichrome coil. Target gases reduce or oxidise the surface, changing resistance; a voltage divider converts that change into an analog voltage you can read on your microcontroller.

image 1

Each sensor in the series is tuned to have higher sensitivity to certain gases or vapors. For example, MQ-2 is a general-purpose sensor for smoke and flammable gases, MQ-3 is more sensitive to alcohol (breathalyzer sensor), MQ-7 targets carbon monoxide, MQ-135 covers a range of air pollutants, and so on. Despite differences in target gases, all MQ sensors share a similar working principle and form factor, which is why they’re discussed as a family.

Why are MQ series sensors so popular? Three reasons: they’re cheap, simple, and effective. Most MQ sensors cost only around $1–$5 USD each, a fraction of the price of professional gas detectors. They require only a heater voltage and a load resistor to output an analog signal. With a suitable ADC (analog-to-digital converter) – which microcontrollers and ESP boards have – you can read the sensor’s voltage and infer gas levels. They’ve been used in countless Arduino projects, DIY air quality stations, and commercial alarms due to this ease of use and low cost.

However, MQ sensors come with caveats. They consume significant power (the built-in heater draws ~120-180 mA continuously, about 0.8W), which means they run hot (you’ll notice the sensor gets warm) and are not ideal for battery-powered projects. They also require a burn-in and calibration period – typically powering the sensor for 24–48 hours initially to stabilize.

MQ Series Sensors Detected Gases

How MQ Series Sensors Work (Principle and Structure)

MQ sensors are based on a metal-oxide-semiconductor (MOS) sensing principle, specifically using tin dioxide (SnO₂) as the sensitive material. Inside the metal can of an MQ sensor is a tiny sensing bead coated with SnO₂, plus a heating coil (usually made of nichrome wire) that keeps the sensor at an elevated temperature (around 200–400 °C). In clean air, the SnO₂ surface is oxidized and has low conductivity (high resistance). When the target gas is present, it reacts with oxygen on the SnO₂ surface, reducing the surface (in a chemical sense) and thereby increasing the conductivity (lowering the resistance) of the sensor.

Mq Sensors - Chemical Heatmap

In simpler terms: the sensor’s resistance changes with gas concentration. More gas = more reaction = lower sensor resistance (for most combustible gases on an SnO₂ sensor). This change is measured via a voltage divider circuit. Typically, you’ll see the sensor wired with a load resistor (RL) in series; the sensor’s resistance (RS) varies with gas, and the output is an analog voltage at the divider between RS and RL. By reading that voltage, we infer RS and thus the gas concentration (with a calibration curve).

Each MQ sensor type has a slightly different chemical makeup or thickness of the SnO₂ layer and possibly a different heater control, which makes it more sensitive to certain gases:

  • For example, MQ-3’s chemistry is tuned for alcohol vapor detection, MQ-6 and MQ-5 are tuned for LPG (propane/butane) detection, etc.
  • Some sensors (MQ-7 for CO, MQ-9 for CO/combustibles) actually require heater voltage cycling to distinguish gases – e.g. MQ-7 is heated at 5V for 60s to clean, then at 1.4V for 90s to measure CO in a lower temperature environment. This is a special case; most MQ sensors are run continuously at ~5V heater.

Output Characteristics: MQ sensors do not output a linear ppm value; instead, they have a logarithmic sensitivity curve. Datasheets provide a log-log plot of RS/R0 (sensor resistance ratio) vs gas concentration for various gases.

Response Time: These sensors are fairly quick to respond to changes (on the order of seconds). A puff of gas or smoke will cause a noticeable rise in sensor output within 1–2 seconds and reach a new equilibrium in under 30 seconds for a large step change. However, preheat time is important – a freshly powered MQ sensor needs some time to stabilize (several minutes if it was already burned-in, or up to 24 hours if brand new).

Life span: MQ sensors are quoted to have a lifetime of around 2–5 years in continuous use. Over time, the sensitivity will decline (the SnO₂ layer “ages” due to high heat and contaminants). For non-critical hobby use, they can work far beyond that with reduced accuracy.

MQ-2 Gas Sensor (Smoke & Combustible Gas)

Target Gases: MQ-2 is a versatile sensor that detects combustible gases (LPG, propane, methane, hydrogen) as well as smoke. It’s often called a “smoke sensor” in kits, but technically it’s sensitive to any flammable gas and to some extent CO as well. This broad sensitivity makes it a good general-purpose gas sensor for home safety. For example, MQ-2 can sense a gas leak from your stove (LPG) or the presence of smoke from a fire.

How it Works: Inside, MQ-2 has the standard SnO₂ sensing element. When exposed to combustibles (like propane or methane), its resistance drops dramatically. It is highly sensitive to hydrogen and LPG (liquefied petroleum gas) and also responds to smoke (which contains complex particulates and gases). Because smoke from organic materials contains CO, methane, etc., MQ-2 serves as a surrogate smoke detector, though not as responsive as a dedicated smoke sensor. The sensor’s response is non-specific – it won’t tell you which gas is present, just that “something combustible is in the air.”

Physical Specs: The MQ-2 sensing element is housed in a round metal can (approx 16 mm diameter). The module form (if you buy an MQ-2 module) typically is a small PCB ~32×22 mm with two outputs: A0 (Analog out) and D0 (Digital out). The analog out gives a voltage proportional to gas concentration; the digital out is triggered when gas level exceeds a set threshold (adjustable via on-board potentiometer). The module usually has 4 pins: VCC, GND, D0, A0. The MQ-2 itself has 6 wire pins (2 for heater, 4 for sensing), but these are pre-soldered to the PCB, so you just use the 4 module pins.

  • Sensor-only dimensions: ~⌀16 mm x 13 mm height (can body) plus ~5 mm pin length. Weight ~5-8 grams.
  • Module dimensions: ~32 mm × 20 mm × 30 mm (including the sensor can height).

Wiring Diagram: To use MQ-2 with an ESP-based microcontroller (like an ESP8266 or ESP32), you supply it with 5V for the heater (some modules work at 5V only; a few can at 3.3V but with reduced sensitivity). Important: If using an ESP8266 (which has only one analog input A0 that expects 0–1V), you’ll need a voltage divider on the analog output because the MQ modules output up to 5V analog. Many MQ-2 modules already have a divider so that at clean air the analog ~2.5V, but check documentation. With ESP32, you can read the analog directly on a GPIO (since ESP32 ADC can handle 0–3.3V; still you may want a divider if powering sensor at 5V). The digital output (D0) can be connected to any digital GPIO if you want a binary alarm signal (the module’s LM393 comparator toggles it). Don’t forget to connect ground to ground.

MQ-2 Module Pinout    Connection to ESP Board (e.g. NodeMCU or ESP32)
------------------------|--------------------------------------------
VCC | 5V (preferred for full sensitivity; 3.3V possible with lower output)
GND | GND
A0 (Analog Output) | ESP Analog Input (NodeMCU A0 or ESP32 GPIO34, etc.)
D0 (Digital Output) | ESP Digital GPIO (if used as threshold alarm, else leave unconnected)

Deployment Tips: Place the MQ-2 sensor near the potential source of gas/smoke but with some ventilation. For smoke detection, higher placement (ceiling) is better because smoke rises. For LPG (propane/butane) which is heavier than air, lower placement (floor level near gas appliance) is better. Because MQ-2 responds to both, you have to judge based on primary use. Avoid extremely humid environments or strong drafty areas – humidity can affect readings, and wind can disperse the gas before it reaches the sensor. Also, avoid enclosed spaces around the sensor; it needs ambient air flow. A common mistake is sticking the sensor inside a tiny project box without vents – that will dramatically slow response.

Tuning & Calibration: When first powered, MQ-2 might drift a bit. It’s good to let it warm up for a few minutes before taking readings. If using the digital output for an alarm, adjust the potentiometer on the module while observing D0 LED or reading, using a test smoke/gas if possible. For analog calibration (in ESPHome or code), you’ll need to determine the Rs/R0 ratio in clean air and the target gas. For instance, one method: assume the sensor’s resistance in clean air (R0) corresponds to known RS/R0 for 100 ppm of a gas from the datasheet curves

Typical Values: In clean air, an MQ-2 module might output around ~1–2 V (this corresponds to a certain baseline resistance). When it detects a lot of smoke or gas, it could swing up near 4 V or higher (if powered at 5 V). You can observe the analog values in Home Assistant to get a feel for baseline vs event. Keep in mind temperature changes (like a hot day vs cool day) can shift the baseline a bit due to the heater’s interaction with ambient temp.

Use Cases: MQ-2 is often the go-to for smoke alarmsgas leak alarms (LPG or methane), and fire detection in DIY projects. For example, a NodeMCU + MQ-2 can be used to send an alert to Home Assistant if smoke is detected while you’re away. It’s also used in some “air quality” DIY devices as a broad indicator of pollution (though MQ-135 is more tailored for that, MQ-2 will still respond to some pollutants or high CO levels).

Average Price: The MQ-2 sensor alone costs about $1 (in bulk or from China) and the MQ-2 module (with breakout board) is around $2 to $5 online. The low cost comes at the expense of precision – it’s not lab-quality, but it’s a fantastic value for general detection. When using it for critical safety (like a home gas alarm), consider it as an extra layer of warning rather than relying on it as the sole device, unless you’ve thoroughly tested and calibrated it.

MQ-3 Gas Sensor (Alcohol/Ethanol)

Target Gases: MQ-3 is famously known as the “alcohol sensor.” Its primary sensitivity is to ethanol (the alcohol in beverages), which is why MQ-3 is used in many DIY breathalyzer projects. It also has some sensitivity to Benzene and other organic vapors, and even to smoke to a lesser degree, which is why MQ-3 is used in many DIY breathalyzer projects. It also has some sensitivity to Benzene and other organic vapors, and even to smoke to a lesser degree (which corresponds roughly from mild to very intoxicated breath levels in a breathalyzer context).

How it Works: Internally it’s the same SnO₂ sensor type, but calibrated for alcohol. When ethanol molecules come into contact with the heated SnO₂ surface, the sensor’s resistance drops. MQ-3 has a coating or doping that makes it particularly sensitive to the hydroxyl group in ethanol (and other solvents). In practical terms, MQ-3 can detect the presence of alcohol in the air from sources like breath, liquor fumes, or even hand sanitizer vapours. It also responds to gasoline vapours and smoke somewhat (gasoline has aromatic hydrocarbons which MQ-3 can pick up, and indeed the MQ-3 is sometimes suggested for gasoline vapor detection too). But note it’s not selective – if you breathe acetone or methanol on it, it will react as well.

Physical Specs: Similar form factor to MQ-2. The sensor module usually labeled “MQ-3” is again a small PCB with 4 pins (VCC, GND, A0, D0). Dimension and pin-out are identical to MQ-2’s module:

  • Sensor can ~16 mm diameter. Often, MQ-3 sensors have an orange or red coating on the can (just a cosmetic difference some manufacturers use).
  • Module size ~32×22 mm, height ~30 mm including sensor. Pin connections are VCC, GND, analog, digital (threshold) – same arrangement as MQ-2.

The MQ-3 draws about the same current (~120-150 mA) for the heater at 5V. Preheat time recommended is at least 24 hours initially, and a few minutes on each power-up to get stable readings.

Wiring Diagram: Wiring is identical to the MQ-2 (and most MQ modules):

MQ-3 Module Pin      | Connection to ESP 
-----------------------|-------------------------------
VCC                       | 5V (or 3.3V, see note)
GND                      | GND
A0 (Analog Out)     | Analog input (A0 on ESP8266, or an ADC GPIO on ESP32)
D0 (Digital Out)     | GPIO (if using the threshold alarm output)

Note: The MQ-3 will technically run on 3.3V but at reduced heater temperature, which might reduce its sensitivity or change calibration. It’s designed for 5V heating. If using on a 3.3V system, you can still power the heater with 5V and use a divider or the module’s comparator to interface the output. The modules usually have a LM393 that runs on 5V too, so for the digital output to toggle correctly it expects 5V supply. Therefore, it’s common to power the module with 5V and just ensure the analog output going into your ESP is clamped or scaled to 0–3.3V range.

Deploying MQ-3: If you’re making a DIY breathalyzer, a common setup is to use a small 5V fan or simply instruct the person to blow on the sensor after it’s been preheated for some time. The MQ-3 should be in a well-ventilated enclosure if used for continuous air monitoring (so that vapors like alcohol can reach it freely). Tip: The MQ-3 is sensitive to many solvents; if you just cleaned something with isopropyl alcohol in the same room, it might trigger. Also high fumes of petrol or paint thinner will trigger it. Be mindful if using it in a garage (it could alarm from gasoline or exhaust fumes as well as drinking alcohol).

Applications: As mentioned, the classic is a breathalyzer. It won’t give a legal-grade BAC reading, but it can give a rough indication (e.g., LED bar graph or a value on Home Assistant that correlates with breath alcohol). Another use: distilleries or breweries could use MQ-3 to detect leaks of ethanol vapor or to roughly monitor fermentation (ethanol evaporating). It has even been used to detect fruit ripeness – ripe fruits emit ethanol, so MQ-3 could theoretically gauge if fruit is fermenting or overripe (this is a very experimental use though!).

Calibration Note: For serious use, calibrate the MQ-3 with known alcohol-air mixtures. A trick some hobbyists use: open a tiny bottle of vodka near the sensor and see the reading, then back-calc approximate ppm. (Vodka evaporating in a fixed volume container can give a known ppm.) Keep in mind temperature: MQ-3 readings can drift if the ambient temp changes a lot because that affects sensor baseline and ethanol evaporation rate.

Average Price: Similar to MQ-2, the MQ-3 sensor is around $1–$3, modules a bit more. It might be slightly pricier than MQ-2 because of demand, but generally still under $5. There are also ready-made DIY Breathalyzer kits that include MQ-3 with a display for $10–$20. The cost is low because, like other MQ sensors, it’s just a basic heater and chemical resistor – mass-produced cheaply.

MQ-4 Gas Sensor (Methane/CNG)

Target Gases: MQ-4 is a sensor specifically designed for Methane detection. Methane (CH₄) is the primary component of natural gas and biogas. So MQ-4 is used for detecting natural gas leaks (like from gas pipelines, CNG cylinders, etc.). It’s highly sensitive to methane in the range roughly 200–10000 ppm (0.02–1% volume). It also has good sensitivity to other alkanes like CNG (compressed natural gas, which is mostly methane) and LNG, and some sensitivity to Propane/Butane albeit slightly less than an MQ-6 would. It’s relatively insensitive to alcohol and smoke, which is a desirable trait if you want to specifically monitor for natural gas without false alarms from, say, cooking smoke.

How it Works: The MQ-4’s SnO₂ layer and heating setup are optimized for methane’s combustion reaction. Methane requires a certain temperature to react on the sensor surface; MQ-4 likely runs its heater at around 5V continuously (like 800 mW) to keep at that temperature. When methane is present, sensor resistance drops; according to datasheets, the MQ-4 can detect from ~300 ppm up to tens of thousands ppm (several percent gas). It’s basically your go-to sensor for a gas leak detector for natural gas (methane). One important thing: methane is lighter than air (it rises), so methane detectors should be mounted high (near the ceiling) above the source.

The MQ-4 is often included in multi-gas sensor kits for building a DIY “air analyzer.” If you have a home with piped natural gas or a CNG vehicle, MQ-4 can be used to trigger alarms or ventilation if there’s a leak.

Physical Specs: Exactly like MQ-2/3 physically. Usually the module is labeled “MQ-4” and often colored similarly. The internal pins and usage are the same. Dimensions: sensor 16 mm diameter can. Module ~32×22 mm. 5V operation recommended.

Wiring: Same 4-pin wiring:

MQ-4 Modul | ESP Connection
--------------|----------------
VCC            | 5V
GND           | GND
A0              | ADC input (ESP32 GPIO, or ESP8266 A0 with proper scaling)
D0              | Digital input (if using the comparator output)

Placement note: If you’re using MQ-4 for actual natural gas leak detection, mount the sensor high up (near ceiling) above the gas appliance, because methane rises. Conversely, LPG leaks (propane/butane) sink – for those MQ-6 is used near floor. So placement varies with gas density.

Calibration: The MQ-4 datasheet often gives a calibration curve at 5000 ppm CH₄ as a reference point. For a safety alarm (like 20% LEL of methane, which is ~1% volume or 10,000 ppm), you might set the threshold at some analog value corresponding to a few thousand ppm. Keep in mind that an explosive concentration of methane is 5% to 15% in air. You want the detector to alarm well before that (like at 1% or 2%). So calibrate it to alarm around 2000–5000 ppm ideally. 

Average Price: MQ-4 is priced similarly to other MQs, around $2 for the module. It’s widely available. Because it’s one of the “standard” MQ series sensors, cost is low. There are more advanced methane sensors (like catalytic bead sensors or NDIR sensors) which cost more, but the MQ-4 remains a cheap solution for basic needs.

Continues on Next Page ->

Pilāni
clear sky
28 ° C
28 °
28 °
10 %
3.7kmh
0 %
Wed
28 °
Thu
28 °
Fri
28 °
Sat
28 °
Sun
28 °

Related Posts

How to Get the Best FPS in CS2 on Any PC (Ultimate Settings Guide)

This comprehensive guide covers all CS2 video settings that impact performance and quality to Get the Best FPS in CS2 on Any PC

Helldivers 2 Weapons Tier List | All Guns Ranked & Best Uses

This updated Helldivers 2 Weapons Tier List August 2025 ranks every primary and secondary weapon, including Warbond weapons – from S-tier to D-tier. Discover each gun’s stats, strengths, and best scenarios (which factions or missions they excel in) so you can optimize your Helldivers 2 loadout and bring Democracy to the enemies of Super Earth with the right firepower!

Comprehensive Guide to Bambu Lab 3D Printers Lineup (2025)

Bambu Lab has rapidly become a leading name in...

Bambu Lab Calibration Guide (P1, X1, A1 Mini & H2D)

Bambu Lab’s 3D printers are renowned for their automated...

Using Seeed Studio mmWave Module with ESPHome

In the ever-expanding universe of smart technology, the fusion...

Raspberry Pi Automatic Fans Using L298n PWM

Welcome, We all know Raspberry Pi SBC Likes to...
- Advertisement -spot_img