(SKU:RB-02S015)MQ-2 Gas Sensor

From ALSRobot-Wki
Jump to: navigation, search



now the environmental awareness of society deeply masses, environmental protection for now most of the pursuit of life taste of the people demand more and more. Therefore, the development of green products has become the major companies in the pursuit of goals. 2013 latest MQ-X series of gas sensor is adapted to the market demand and design, the smoke sensor uses mq-2 gas sensing element and can be very sensitive detection to the air in the smoke, and methane gas. Through the 3P sensor connecting wire can be directly plugged into the Arduino sensor expansion board through the Arduino mega168 programming controller is easy to use, combined with buzzer module and a relay module, smoke alarm, methane leakage alarm, automatic smoke row fan and other products can be produced, the indoor air to reach the ideal sensor of environmental standards.

Technical parameters and performance

  1. heating voltage: 5 + 0.2V (AC or DC)
  2. loop voltage: 10V (DC 24V)
  3. load resistance: 5K (adjustable)
  4. clean air voltage: less than 1.5V
  5. sensitivity: 3
  6. response time: less than 10S
  7. recovery time: less than 30S
  8. components: power consumption less than 0.7W
  9. service life: 5 years
  10. module size: 20.5mm * 41mm
  11. weight: 7g

Note: this sensor is equipped with a sensitivity adjustment potentiometer: clockwise adjustment of large, counter clockwise. By adjusting the sensitivity of the smoke sensor, a satisfactory smoke concentration fan can be obtained.

using method

Pin definition

The sensor pin is defined as

  • S: output signal
  • +: power supply (VCC)
  • -: (GND)

Connect Icon


Installation method

Step 1: wiring.

S port is connected to the I/O port of the controller. +, - received +5V and GND.

Step two: fixed. According to the passage diameter: 3 connecting pieces (screws, bolts, cylinders etc.) are fixed.

Application Routine

we use the Arduino controller to do a test, the internal Arduino 10 AD sampling circuit, the use is very convenient, the program is also very simple. Need to use hardware equipment as follows:
  1. controller Arduino * 1

The Arduino sensor # expansion board * 1

  1. MQ-2 gas sensor module * 1
  2. general 3P sensor cable * 2
  3. USB data communication line x 1

As shown in figure, the gas sensor belongs to the analog sensor, using the sensor connecting line to connect the gas sensor to the simulation interface of the Arduino sensor expansion board 0. Because of the large power consumption of the gas sensor, if the long time use, it is recommended that the whole system uses external power supply. Download the sample program to the Arduino controller and monitor it.

Sample code

int Buzzer=8;   //定义数字口8为Buzzer(蜂鸣器)
void setup()
  pinMode(Buzzer,OUTPUT); //定义数字口8为输出模式
void loop()
  int val;
        digitalWrite(Buzzer,HIGH); //蜂鸣器不响
  digitalWrite(Buzzer,LOW); //蜂鸣器响

Program effect

Code function is to collect the gas sensor signal through the analog port 0, and then output to the computer through the serial port, we can use serial debug assistant software to see the results. The following data is obtained from our experimental tests, for reference only, because the experimental environment of the different tests of the data will be different. According to the internal structure of the gas sensor, plus the need to wait for 1 minutes after the electric heating to measure, after preheating can feel the probe has a clear temperature.

first of all, we look at the probe of the data exposed in the air. When the probe is warm up, the data will be between 50 and the following figure:
the second is butane detection, we used gas lighter is the use of butane, the lighter into probe below, release of butane gas, probe will be detected, we through the serial port assistant observation data
the third is the smoke detection, the paper goes out, put into the bottom of the probe, the smoke will be detected by the probe, we can observe the data through serial port assistant.

Product recommendation

Buy address:MQ-2 Gas Sensor

Personal tools