The MQ5 is an analog gas sensor designed to detect flammable gases such as LPG, natural gas, and town gas by measuring changes in the resistance of a heated sensing element. It provides both an analog output proportional to gas concentration and a digital output that can be triggered at a user-defined threshold.
The sensor offers high sensitivity to common fuel gases while maintaining relatively low sensitivity to alcohol vapors and smoke, helping to reduce false alarms in household and industrial environments. Due to its reliability, affordability, and ease of integration, the MQ5 is widely used in gas leak detection systems, safety alarms, industrial monitoring equipment, and portable gas detection devices.
What is MQ5?

The sensitive material of the MQ5 gas sensor is SnO2, which has lower conductivity in clean air. When the target flammable gas is present, the sensor’s conductivity increases along with the gas concentration rising. This change in conductivity is converted to a corresponding output signal of gas concentration through a simple circuit.
The MQ5 has high sensitivity to butane, propane, and methane and can detect methane and propane simultaneously. It is especially well-suited to LPG (propane) detection. Unlike the MQ2, which covers a broad range of flammable and combustible gases including smoke, the MQ5 is tuned more narrowly to natural gas, LPG, and town gas — making it a better fit for domestic piped gas and cylinder gas monitoring where specificity matters.
MQ5 overview
| Parameter | Value |
|---|---|
| Sensor Type | Metal Oxide Semiconductor (MOS) Gas Sensor |
| Target Gas | LPG, Natural Gas (CH4), Town Gas |
| Detection Range | 300 – 10000 ppm (CH4, C3H8) |
| Circuit Voltage (VC) | ≤24V DC (standard 5V ±0.1V) |
| Heater Voltage (VH) | 5.0V ±0.1V AC or DC |
| Heater Resistance | 26Ω ±3Ω (room temperature) |
| Heater Power Consumption | ≤950mW |
| Output Type | Analog (AO) + Digital TTL (DO) |
| Sensor Lifespan | 10 years |
| Operating Temperature | −10°C to +50°C |
| Communication | Analog Voltage / Digital Threshold |
| Mounting Type | Through Hole (6-pin bare sensor) |
| Compatible Boards | Arduino Uno, ESP32, Raspberry Pi |
Pinout

Breakout Module Pinout (4-pin)
| Pin | Type | Description |
|---|---|---|
| VCC | Power | Module supply — 5V |
| GND | Power | Ground |
| AO | Output | Analog output — voltage proportional to gas concentration (0V – 5V) |
| DO | Output | Digital TTL output — LOW when gas exceeds threshold, HIGH otherwise |
Working principle
The sensor requires two voltage inputs: heater voltage (VH) and circuit voltage (VC). VH supplies the standard working temperature to the sensor and can use DC or AC power. VC supplies the detection voltage to the load resistance RL in series with the sensor and must be DC.
As flammable gas concentration rises, sensor resistance RS falls, and the output voltage on AO increases through the voltage divider:
VOUT = VC × RL / (RS + RL)
The DO pin uses an onboard LM393 comparator to convert this into a TTL HIGH/LOW output against a threshold set by the onboard potentiometer.
The sensitivity characteristic shows the sensor’s resistance ratio (Rs/R0) against gas concentration. Rs is the resistance in the target gas at different concentrations, and R0 is the resistance in clean air. The output voltage in 2000ppm propane under standard test conditions is 2.5V to 4.0V, with a recommended load resistance of around 20kΩ (10kΩ to 47kΩ range).
Sensitivity to different gases (relative):
| Gas | Relative Sensitivity |
|---|---|
| LPG / Propane (C3H8) | Highest (primary target) |
| Natural Gas (CH4) | High |
| Town Gas / Butane | High |
| Alcohol (C2H5OH) | Low (interference resistant) |
| Smoke | Low (interference resistant) |
MQ5 module construction

MQ5 Sensor Element The sensor is composed of a micro Al₂O₃ ceramic tube with a tin dioxide (SnO2) sensitive layer, measuring electrodes, and a heater coil, all fixed into a crust made of plastic and stainless steel mesh. The stainless steel mesh allows gas to diffuse into the sensing chamber while acting as a flame arrestor, preventing any internal ignition from propagating outward — critical given that the sensor is designed to detect flammable gases.
LM393 Voltage Comparator Converts the analog signal from the sensor into a digital TTL output. It compares the sensor voltage against the reference set by the potentiometer and switches the DO pin LOW when the threshold is exceeded.
Sensitivity Adjustment Potentiometer Sets the LM393 reference voltage, which directly controls the gas concentration level at which DO triggers. Calibrating against 1000ppm LPG or H₂ with a load resistance of approximately 20kΩ is recommended for accurate threshold setting.
Power LED Illuminates when 5V is applied to VCC, confirming the module is powered and the heater coil is active.
Threshold LED Turns on when the DO pin triggers – providing immediate visual confirmation that the set gas concentration threshold has been crossed without requiring a microcontroller.
Decoupling Capacitors Filter noise on the 5V supply rail. The heater draws close to 190mA continuously at 5V, which can cause supply ripple that affects analog output accuracy without proper filtering.
Specifications
The complete specifications are mentioned below.
| Parameter | Value |
|---|---|
| Target Gas | LPG, Natural Gas (CH4), Town Gas |
| Detection Range | 300 – 10000 ppm (CH4, C3H8) |
| Circuit Voltage (VC) | ≤24V DC (standard 5V ±0.1V) |
| Heater Voltage (VH) | 5.0V ±0.1V (AC or DC) |
| Heater Resistance | 26Ω ±3Ω (room temperature) |
| Heater Power Consumption | ≤950mW |
| Heater Current | ~190mA (typical at 5V) |
| Sensitivity (S) | Rs(air) / Rs(2000ppm C3H8) ≥ 5 |
| Output Voltage (Vs) | 2.5V – 4.0V (in 2000ppm C3H8) |
| Concentration Slope (α) | ≤0.6 (R3000ppm / R1000ppm C3H8) |
| Recommended Load Resistance | 20kΩ (10kΩ – 47kΩ range) |
| Analog Output (AO) | 0V – 5V |
| Digital Output (DO) | TTL — LOW when gas exceeds threshold |
| Comparator IC | LM393 |
| DO Threshold | Adjustable via onboard potentiometer |
| Preheat Time (first use) | ≥48 hours |
| Preheat Time (after 1–6 months storage) | ≥72 hours |
| Preheat Time (after 6+ months storage) | ≥168 hours |
| Minimum O₂ Concentration | 18% (below this, readings are affected) |
| Standard Test Temperature | 20°C ±2°C |
| Standard Test Humidity | 55% ±5% RH |
| Operating Temperature | −10°C to +50°C |
| Operating Humidity | <95% RH (non-condensing) |
| Sensor Lifespan | 10 years |
| Module Supply | 5V DC |
| Sensor Package | 6-pin through hole (Bakelite, metal cap) |
Helpful resources
- Download the datasheet: here
- MQ5 with Arduino
- MQ5 with ESP32