Home / Wiki / Sensor / Environment
MQ5 Gas Sensor Module

Introduction

MQ5 Gas Sensor module is useful for gas leakage detecting. Sensitivity can be adjusted by the potentiometer, there are two types of the output: analog output and digital output. It can detect these gas: LPG, natural gas, Town gas. Remember to operate it in the controlled environment. The material of gas sensor is SnO­2. There’s a potentiometer used for adjusting the sensitivity, the concept of this sensor module is: conductivity rate become higher and higher with the growth of concentration, therefore, when detect harmful gas, it outputs low power.




Technical Data

Input voltage: DC 5V

Current: 150mA

Digital Output: TTL 0 is 0.1V and TTL 1 is 5V

Analog Output: 0.1 to 0.3V (it seems that there’s almost no pollution), when harmful gas’ concentration reach max, analog output will become 4V

Tip: MQ5 sensor module needs about 20s to preheat, measuring data will be stable in this way, by the way, sensor module will heat, that’s normal, because there’s a heating wire in it, however, if it’s getting too hot, it must have problem in your circuit. 


Symbol        Detect Gas                      Detect Concentration

MQ-2          combustible gas                  300-10000ppm

               Smoke, hydrogen

               propane

MQ-5          LPG, natural gas                  300-10000ppm

                   Town gas

MQ-135        Carbon oxide, coal gas             300-10000ppm


Features

DO: TTL output

AO: Analog output, it will be higher with more such gas.

Preheat time: Over 20s

Being sensitive in detecting gas, town gas and smoking

Analog output voltage getting higher and higher with the gas’ concentration

TTL output low power is effective signal, when detect the harmful gas, it output low power, then indicate led light.


Usage


[code]

int LED=13;            //the build-in LED pin

int MQ5=5;            //the number of MQ5 pin

void setup()

{

 pinMode(LED, OUTPUT);      //LED is output

 pinMode(MQ5, INPUT);       //MQ5 is input

 Serial.begin(9600);       //serial monitor's baud rate is 9600

  }

  void loop()

  {

    int MQValue=digitalRead(MQ5);

    if(MQValue==0)

    {

      digitalWrite(LED, HIGH);      //write high level to LED

      Serial.print("There is harmful gas");

    }

      else

      {

        digitalWrite(LED, LOW);     //write low level to LED

        Serial.print("It's clean");

      }

    }

[/code]


Resource

Program

Datesheet