Gas Detection using MQ6 Sensor | Just Arduino Things | TW TechieTube

 Gas Detection using MQ6 Sensor

Just Arduino Things | TW TechieTube

Detect a Gas Leak near surroundings and Make an LED Glow/Buzzer Alarm system.




Principle:

The MQ-6 can detect gas concentrations anywhere from 200 to 10000ppm. This sensor has high sensitivity and a fast response time. The sensor's output is an analogue resistance. The drive circuit is very simple; all you need to do is power the heater coil with 5V, add a load resistance, and connect the output to an ADC.

Components Required:

  • Arduino UNO                 (1)                        
  • MQ6 Sensor                    (1)
  • Breadboard                     (As per Requirement)
  • Jumper Cables                (As per Requirement)
  • Arduino Bus Cable         (1)

Construction:

A Simple project to detect Gas leak using the MQ6 Sensor.




Now connect the Sensors pins with the order given,

Vcc  - Arduino 5v/3.3v Pin
Gnd  - Arduino Gnd Pin
AO   - Any ANlog Pins from A0 to A5 
(OR)
DO   - Any Digital Pins except D1/D2 on UNO.
Incl.  an LED in D13 and Gnd for external value. 

As explained in the Video, the Code is written as Follows.

Code:

//ARDUINO MQ6 Gas Sensor


int MQ6A=A0;

int MQ6D=3;

int BUZZER = 13;

int ValueA, ValueD;

void setup() 

{ pinMode(A0,INPUT);

  pinMode(3, INPUT);

  Serial.begin(9600);

}

void loop() 

{ ValueA=analogRead(A0);

  Serial.println(ValueA);

  ValueD = digitalRead(3);  

  Serial.println(ValueD);  

  if (ValueD == 1)  

     { Serial.println("LPG detected..."); 

       digitalWrite(13, HIGH);  

     }  

     else  

     { Serial.println("No LPG detected.");

       digitalWrite(13, LOW);  

     }  

  delay(1000);

}

Do make the Project, Take a Snap and Tag us @techwiz_india


Comments

Popular posts from this blog

Buzzer Alarm using Touch Sensor

Obstacle Detection using IR Sensor

Human Detection using PIR Sensor