# MQ-4 methane gas sensor: specs and pinout

> MQ-4 semiconductor (SnO2) sensor element for methane and natural gas on a module. The Hanwei sheet lists small sensitivity to alcohol and smoke.

[HTML version](https://soldr.ai/docs/components/mq-4)

[Docs](https://soldr.ai/docs) / [Components](https://soldr.ai/docs/components)

MQ-4 semiconductor (SnO2) sensor element for methane and natural gas on a module. The Hanwei sheet lists small sensitivity to alcohol and smoke.

Every value cites its sourceChip-level pinout

[Buy on Compoden](https://compoden.com/products/mq-4-methane-gas-sensor-module-for-arduino-diy-compoden)

## Specs

| Spec | Value | Source |
|---|---|---|
| Circuit voltage Vc | 5 V +/-0.1, AC or DC | source A. Standard work condition, p.1 |
| Heating voltage VH | 5 V +/-0.1, AC or DC | source A. Standard work condition, p.1 |
| Load resistance | 20 kohm | source A. Standard work condition, p.1 |
| Heater resistance RH | 33 ohm +/-5% (room temperature) | source A. Standard work condition, p.1 |
| Heating consumption PH | less than 750 mW | source A. Standard work condition, p.1 |
| Sensing resistance Rs | 10 kohm to 60 kohm (1000 ppm CH4) | source C. Sensitivity characteristic, p.1 |
| Detecting concentration | 200-10000 ppm CH4, natural gas | source C. Sensitivity characteristic, p.1 |
| Preheat time | Over 24 hours | source C. Sensitivity characteristic, p.1 |
| Using temperature | -10 to 50 C | source B. Environment condition, p.1 |
| Storage temperature | -20 to 70 C | source B. Environment condition, p.1 |
| Relative humidity | less than 95% RH | source B. Environment condition, p.1 |

## Power

| | Value | Source |
|---|---|---|
| Supply | Vc and VH 5 V +/-0.1; heating consumption under 750 mW | source A. Standard work condition, p.1 |
| Current | about 150 mA heater current at 5 V (derived: 5 V / 33 ohm RH; the sheet gives no current figure, only PH under 750 mW). Derived value, not printed in the sheet; module wiring is not documented. | source A. Standard work condition, p.1 |

## Chip pins
These are the pins of the chip on the module, from the chip datasheet. The module's own header may label or expose them differently.

The maker sheet describes the bare MQ-4 sensor element (6 pins: 4 signal, 2 heater), not the module board. The module&#x27;s header labels, regulator, comparator and load resistor are not covered by an official document, so module labels are left empty.

| Pin | Function | Voltage | Notes | Source |
|---|---|---|---|---|
| A / B (4 of the 6 sensor pins) | Sensing electrodes (signal) | | Sensor element, not the module header | source Section D, Fig. 1 and Fig. 2, p.1 |
| H (2 of the 6 sensor pins) | Heater | | Sensor element, not the module header | source Section D, Fig. 1 and Fig. 2, p.1 |

## Build with it
Project ideas for the MQ-4 methane gas sensor. Each link opens Soldr with the prompt filled in; Soldr assigns the pins, checks power and shows how to wire every part.

- [Methane reading display](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20methane%20sensor%20reading%20display%20with%20an%20Arduino%20Uno%20and%20a%2016x2%20LCD): Learning project, not a safety device. The Uno has a 5 V supply and analog inputs for the module output. The heater needs about 150 mA (derived from the heater resistance in the sheet); power the Uno from USB or a 5 V adapter rated 500 mA or more.
- [Methane sensor trend display](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20methane%20sensor%20reading%20trend%20display%20that%20draws%20the%20last%20hour%20of%20readings%20on%20a%200.96%20inch%20OLED%20with%20an%20Arduino%20Uno): Learning project, not a safety device or a gas detector. Shows the raw reading as a trend line, so you see how it changes with the air around it; no alarm or switching. The heater needs about 150 mA (derived from the heater resistance in the sheet); power the Uno from USB or a 5 V adapter rated 500 mA or more.
- [Methane warm-up logger](https://app.soldr.ai/?prompt=I%20want%20to%20build%20a%20methane%20sensor%20warm-up%20logger%20that%20prints%20readings%20to%20the%20serial%20monitor%20using%20an%20Arduino%20Uno): Learning project. Logs the slow change in reading while the sensor heats up so you can see when it settles. The sheet asks for a preheat of 24 hours, so leave it running that long before trusting the numbers. The heater needs about 150 mA (derived from the heater resistance in the sheet); power the Uno from USB or a 5 V adapter rated 500 mA or more.

## Common mistakes

- Skipping the warm-up: the sheet gives a preheat time of over 24 hours. ([source](https://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-4.pdf))
- Powering the sensor from the wrong voltage: circuit and heating voltage are both 5 V +/-0.1, so a 3.3 V supply is outside the sheet&#x27;s condition. ([source](https://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-4.pdf))
- Reading outside the stated range: the detecting concentration is 200-10000 ppm CH4 and the using temperature is -10 to 50 C. ([source](https://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-4.pdf))

## Not covered by the official source

- Module-level supply, outputs, pin order and heater current are not documented; sheet values are for the bare sensor element.

## Sources

- [link](https://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-4.pdf) (Hanwei MQ-4 Technical Data; a hosted copy)
