MQ-2 Gas Sensor Module

From Wiki
Jump to: navigation, search

Introduction

Mq-2 Gas Senseor.jpg MQ-1.jpg

The gas sensitive material used in the MQ-2 gas sensor is SnO2, a low electrically conductive material in clean air. When there is combustible gas in the surrounding air, the electrical conductivity of the sensor will increase with the higher intensity of the combustible gas. Here, we can convert the changing electrical conductivity into output signal by building a simple circuit.

Main Features

  • Detected Gas: Combustible Gas, Smoke
  • Detection Intensity: 300~10000ppm(Combustible Gas)
  • Working Voltage: 5.0V±0.1V AC or DC
  • Preheating Time: ≥2 minutes

Introduction of the Pins

  • VCC: 5V Working Voltage
  • GND: Ground.
  • D0: Output Interface of Digital Switch (0 and 1).
  • A0: Analog Output Interface

Working Principle

MQ-3.jpg
After wiring VCC and GND, the Power LED of the module lights up. Before your using, the power supply preheats for at least 2 minutes. It is normal for the sensor to generate heat slightly, because there is heating wire inside. But it is abnormal that the sensor becomes overheating. When there is no impact of the sensible gas or the gas concentration is not more than the preset threshold, the digital interface D0 outputs high level and the voltage of the analog interface A0 is around 0V. When the gas concentration is beyond the threshold, the digital interface D0 outputs low level and the digital indicator light is on. And the output voltage of the analog interface A0 increases with the raising of the gas concentration,A0 Output: 0.1-0.3V (relatively non-polluted). With the gas concentration being higher, the voltage can reach up to 4V. Rotate the knob of the potentiometer clockwise, you can get the sensing range of the gas concentration wider (only for the sensitivity of the TTL output). The digital output D0 can drive the relay module directly, which can form a gas switch. The digital output D0 can also drive the positive buzzer module and this module can be used to make up a gas alarm. The analog output A0 can be connected to AD module and get the approximate values of the ambient gas concentration via AD conversion.

For Arduino

Using Steps
Step 1: Connect the circuit.

MQ-6.jpg

MQ-4.jpg

Step 2: Copy the following codes and paste them in Arduino.

///Arduino Sample Code
void setup()
{
  Serial.begin(9600); //Set serial baud rate to 9600 bps
}
void loop()
{
int val;
val=analogRead(0);//Read Gas value from analog 0
Serial.println(val,DEC);//Print the value to serial port
delay(100);
}

The codes above are used to acquire the signal of the gas sensor via the analog interface 0 and to output the signals into the computer via serial port. To observe the consequence, we can use serial port monitor.

MQ-5.jpg

Due to the internal structure of the gas sensor, the measurement can only begin after one minute's preheating. During preheating, you can easily feel the hot of the probe. When the preheat is finished, the data are around 120 (only for reference, the value can be variable with the changing of the circumstance). According to the parameter of the probe, in the clean air, the data value might be less than 310.

Resource

MQ-2_Datasheet
Test Experiment for ArduinoLINK.jpg
Test Experiment for Raspberry PiLINK.jpg