ATTENTION: Due to increased demand and order volume, processing time may take an additional 1-3 business days.
HomeCommunitySubjectHow to Use MQ4 Gas Sensor?

How to Use MQ4 Gas Sensor?

Unclassified This MQ4 Gas Sensor module is useful for gas leakage detection. It is suitable for detecting Methane, Propane, Butane, and other combustible gas. The sensitivity of the sensor can be adjusted by a potentiometer.

63

Oct 16, 2021

Patricia Moulton

Arduino, MQ4 methane gas detector

 

Unclassified

This MQ4 Gas Sensor module is useful for gas leakage detection. It is suitable for detecting Methane, Propane, Butane, and other combustible gas. The sensitivity of the sensor can be adjusted by a potentiometer. In this post, we will see an introduction to the MQ4 methane gas sensor, it's working, interfacing with Arduino, and applications.

MQ 4

Inquiry
Min.: 1 Mult.: 1
Price not displayed? Not available to buy online? Please send an RFQ, and we will respond immediately.
Quick Links

Overview of MQ4 Gas Sensor

The MQ4 methane gas sensor is a MOS (metal oxide semiconductor) type sensor that detects methane gas concentration in the air at home or in the workplace and gives an analog voltage output when read. The concentration range for sensing, in this case, is 300 pm – 10,000 ppm, which is suitable for detecting a leak.

The main component of this gas sensor is a detecting element made of aluminum oxide (Al2O3) ceramic covered with Tin dioxide (SnO2) and organized within a stainless-steel mesh.

MQ4 Gas Sensor Pinout

The pin configuration of the MQ4 methane gas sensor is shown below.

 

Pin Name Function
VCC Positive power supply   pin
GND Reference potential   pin
AO Analog output pin. It generates a signal proportional to the intensity of methane.
DO Digital Output pin.   It also produces a digital signal whose limit can be set using a   potentiometer.

MQ4 Gas Sensor Features

  • Good sensitivity to a wide range of combustible gas

  • High sensitivity to Natural gas

  • Stable and long life

  • Small sensitivity to alcohol, smoke

  • Fast response Stable and long life

MQ4 Gas Sensor Specifications

  • Power requirements: VCC - 5V±0.1

  • DO output: TTL digital 0 and 1 (0.1 and 5V)

  • AO output: 0.1-0 .3 V (relative to pollution), the maximum concentration of a voltage of about 4V

  • Detection Gas: Natural gas/Methane

  • Operating temperature: 14 to 122 °F (-10 to 50°C)

  • RH Related humidity less than 95%Rh

  • O2 Oxygen concentration is 21% (standard condition) - Oxygen concentration can affect sensitivity

  • Load resistance: 20KΩ

  • Sensing Resistance Rs: 10KΩ- 60KΩ (1000ppm CH4)

  • Preheat time:Over 24 hour

  • Detection Concentration: 200-10000ppm (Natural gas / Methane)

  • Interface: 1 TTL compatible input (HSW), 1 TTL compatible output (ALR)

  • Heater consumption: less than 750mw

MQ 4 Tech Specifications

Bel Fuse Inc. MQ 4 technical specifications, attributes, parameters and parts with similar specifications to Bel Fuse Inc. MQ 4.

Product Attribute Attribute Value
Mounting TypeThrough Hole
Package / CaseAxial
Surface MountNO
Terminal ShapePIN WIRE
Operating Temperature-55°C~125°C
PackagingBulk
SeriesMQ
Size / Dimension0.125Diax0.280L 3.18mmx7.10mm
JESD-609 Codee3
Pbfree Codeyes
Part StatusObsolete
Moisture Sensitivity Level (MSL)Not Applicable
ECCN CodeEAR99
Product Attribute Attribute Value
Terminal FinishMatte Tin (Sn)
Additional FeaturePRE-ARCING TIME: OPEN WITHIN 5 SEC AT 200% RATED CURRENT; RATED BREAKING CAPACITY AT 125 VDC: 300 A
HTS Code8536.10.00.40
Current Rating (Amps)4A
Reach Compliance Codecompliant
Reference StandardCE; CSA; UL
Voltage - Rated AC125V
Approval AgencyCE, CSA, cURus
Body Length or Diameter3.18mm
Physical Dimension3.18mm x 7.1mm
Response TimeFast Blow
Fuse TypeBoard Mount (Cartridge Style Excluded)
Breaking Capacity @ Rated Voltage50A AC 300A DC
Product Attribute Attribute Value
Rated Current4A
Melting I2t1.9
DC Cold Resistance0.023Ohm
Circuit Protection TypeELECTRIC FUSE
Blow CharacteristicVERY FAST
Fuse SizeMICRO
Joule Integral-Nom1 J
Trip Time or Delay14400 s
Rated Voltage(DC)125V
Body Height7.1mm
RoHS StatusRoHS Compliant
0 Products View Similar

Working Principle of MQ4 Gas Sensor

The power LED illuminates as soon as the module is turned on. The MQ-4 detects the presence of methane in the atmosphere. The sensor's analog pin then produces an analog signal proportional to the amount of CH4 in the air. An ADC microcontroller can be used to measure a sensor's analog output.

Most microcontrollers nowadays include an ADC peripheral that can be used to read the analog output of sensors like the MQ4. The methane gas sensor's analog output signal is read by the microcontroller, which then performs signal conditioning to transform the observed analog voltage into methane concentration in the air. When methane gas is detected, the digital pin turns HIGH and the built-in LED for the Digital output illuminates. This digital pin can also be used to control other operations using a microcontroller.

 

Digital Output of MQ4 Gas Sensor

When there is methane gas present, the D0 pin creates a high (equal to VCC) signal and a low (equivalent to about 0.1 V) signal. The trimmer pot on the circuit can be used to calibrate this "digital" output.

MQ4 Digital Output Circuit

 

The D0 pin is connected to the Arduino's digital pin 2. The Arduino sketch below uses an interrupt to ensure that the MQ-4 is always detected first by the microcontroller.

MQ4 Arduino Data

Analog Output of MQ4 Gas Sensor

  • Determining PPM Equation

Sensitivity curve of the MQ-4

This graph, taken from the device datasheet, depicts the MQ-4's sensitivity to gases. It's especially sensitive to CH4, the molecular term for methane, as shown above. Propane and butane gases are not included in the curve, even though they are both known components of LPG (which is second to methane in this curve).

The graph depicts the relationship between RS/R0 and gas concentration in parts-per-million on a log-log scale (PPM). The ratio of sensor resistance at target gas (RS) to sensor resistance in clean air (R0) is RS/R0 (R0). As a result, knowing RS/R0 allows us to calculate the gas concentration in PPM.

 

To derive a formula, we take two points on this graph. Later on, we'll use this formula in our Arduino sketch.

When RS/R0 = 1 and PPM = 1000, the most evident point appears. When RS/R0 is around 0.58 and PPM = 5000, the second point is reached. The formula begins with:

From the first point, we'll assign Y1 = 1, X1 = 1000, and from the second point, Y2 = 0.58, X2 = 5000. Substituting these values into the previous equation:

Changing Y to RS/R0 and X to PPM and solving for PPM:

 

  • Methane PPM Output Arduino Diagram

In the presence of methane, the sensor resistance is RS, while in clean air, the sensor resistance is R0. R0 would be the simplest to figure out of the two. Using an ohmmeter, we measure the resistance of electrodes 1-6 or 4-3.

MQ4 Arduino Diagram

 

As can be seen, Aout is connected to one of the electrodes and a resistor RL in parallel. This indicates that the electrode resistance generates a voltage divider with RL, resulting in the following voltage at Aout:

The resistance of our target electrode, RS, fluctuates depending on the amount of methane present.

RL is an SMD resistor with the designation 102, by the way. This is equivalent to a 1k resistance.

So we apply this formula to get RS.

 

MQ4 Gas Sensor Dimension

MQ4 Gas Sensor Dimension

Frequently Asked Questions

What is the use of MQ-4 gas sensor?
MQ-4 gas sensor has a high sensitivity to Methane, also to Propane and Butane. The sensor could be used to detect different combustible gas, especially Methane, which is with low cost and suitable for different applications.
How does MQ-4 gas sensor work?
The MQ-4 works by sensing the methane concentration in the air. The analog pin of the sensor then generates an analog signal proportional to the amount of CH4 in the air. We can measure the analog output of a sensor with an ADC microcontroller.
What is the output of MQ4 sensor?
The MQ4 can detect natural gas concentrations anywhere from 200 to 10000 ppm. This sensor has selective digital or analog output capability which can be measured easily with SPDuino or any other microcontroller.
What is the range of MQ sensor?
The concentration sensing range of 300 ppm to 10,000 ppm is suitable for leak detection. For example, the sensor could detect if someone left a gas stove on but not lit. The sensor can operate at temperatures from -10 to 50°C and consumes less than 150 mA at 5 V.
FAQ
What is the use of MQ-4 gas sensor?
MQ-4 gas sensor has a high sensitivity to Methane, also to Propane and Butane. The sensor could be used to detect different combustible gas, especially Methane, which is with low cost and suitable for different applications.
How does MQ-4 gas sensor work?
The MQ-4 works by sensing the methane concentration in the air. The analog pin of the sensor then generates an analog signal proportional to the amount of CH4 in the air. We can measure the analog output of a sensor with an ADC microcontroller.
What is the output of MQ4 sensor?
The MQ4 can detect natural gas concentrations anywhere from 200 to 10000 ppm. This sensor has selective digital or analog output capability which can be measured easily with SPDuino or any other microcontroller.
What is the range of MQ sensor?
The concentration sensing range of 300 ppm to 10,000 ppm is suitable for leak detection. For example, the sensor could detect if someone left a gas stove on but not lit. The sensor can operate at temperatures from -10 to 50°C and consumes less than 150 mA at 5 V.

TAGS

Share