Components Used

  1. Arduino Pro Mini
  2. LPG Gas sensor Module
  3. Buzzer
  4. BC 547 Transistor
  5. 16x2 LCD
  6. 1K resistor
  7. Bread board
  8. 9 volt battery
  9. Connecting wires

LPG Gas Sensor Module

This module contains a MQ3 sensor which actually detects LPG gas, a comparator (LM393) for comparing MQ3 output voltage with reference voltage. It gives a HIGH output when LPG gas is sensed. A potentiometer is also used for controlling sensitivity of gas sensing. This module is very easy to interface with microcontrollers and arduino and easily available in market by name “LPG Gas Sensor Module”. We can also build it by using LM358 or LM393 and MQ3.




Circuit Diagram and Description



As shown in the schematic diagram above, it contains Arduino board, LPG GAS Sensor Module, buzzer and 16x2 LCD module. Arduino controls the whole process of this system like reading LPG Gas sensor module output, sending message to LCD and activating buzzer. We can set sensitivity of this sensor module by inbuilt potentiometer placed on it.


LPG gas sensor module's DO pin is directly connected to pin 18 (A4) of Arduino and Vcc and GND are connected to Vcc and GND of arduino. LPG gas sensor module consist a MQ3 sensor which detects LPG gas. This MQ3 sensor has a heater inside which needs some heater supply to heat up and it may takes up to 15 minute to get ready for detecting LPG gas. And a comparator circuit is used for converting Analog output of MQ3 in digital. A 16x2 LCD is connected with arduino in 4-bit mode. Control pin RS, RW and En are directly connected to arduino pin 2, GND and 3. And data pin D0-D7 are connected to 4, 5, 6, 7 of arduino. A buzzer is connected with arduino pin number 13 through a NPN BC547 transistor having a 1 k resistor at its base.


Program Description


In programming we have used digital read function to read output of LPG gas sensor module and then performed operation according to input.



For testing this project we have used a cigarette lighter which contains LPG gas.

Code
#include <LiquidCrystal.h>
LiquidCrystal LCD (3, 2, 4, 5, 6, 7);

#define lpg_sensor 18
#define buzzer 13

void setup ()
{
   pinMode (lpg_sensor, INPUT);
   pinMode (buzzer, OUTPUT);
   lcd.begin (16, 2);
   lcd.print ("LPG Gas Detector");
   lcd.setCursor (0,1);
   lcd.print ("Mechatronicslab");
   delay (2000);
}

void loop ()
{
   if (digitalRead (lpg_sensor))
   {
     digitalWrite (buzzer, HIGH);
     lcd.clear ();
     lcd.print ("LPG Gas Leakage");
     lcd.setCursor (0, 1);
     lcd.print ("Alert");
     delay (400);
     digitalWrite (buzzer, LOW);
     delay (500);
   }
  
   else
   {
     digitalWrite (buzzer, LOW);
     lcd.clear ();
     lcd.print ("No LPG Gas");
     lcd.setCursor (0,1);
     lcd.print ("leakage");
     delay (1000);
   }
}



No comments

Theme images by Dizzo. Powered by Blogger.