Ajantha College and School Students Science Projects materials The Great in project

"In the name of Allah, most
Gracious, most Compassionate"

Phone

044 4213 1795

Mobile

+91 91764 16648
 
Back to Arduino Projects

LPG Leakage Detector using Arduino

LPG Leakage Detector using Arduino

 

In this tutorial we are introducing concept of ADC (Analog to Digital Conversion) in ARDUINO UNO. Arduino board has six ADC channels, as show in figure below. Among those any one or all of them can be used as inputs for analog voltage. The Arduino Uno ADC is of 10 bit resolution (so the integer values from (0-(2^10) 1023)). This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. So for every (5/1024= 4.9mV) per unit.

How to Use ADC in Arduino Uno?

 

While LPG is an essential need of every household, its leakage could lead to a disaster. To alert on LPG leakage and prevent any mishappening there are various products to detect the leakage. Here we have developed an Arduino based LPG gas detector alarm. If gas leakage occurs, this system detects it and makes an alert by buzing the buzzer attached with the circuit. This system is easy to build and anyone who have some knowledge of electronics and programing, can build it..

We have used a LPG gas sensor module to detect LPG Gas. When LPG gas leakage occurs, it gives a HIGH pulse on its DO pin and arduino continuously reads its DO pin. When Arduino gets a HIGH pulse from LPG Gas module it shows “LPG Gas Leakage Alert” message on 16x2 LCD and activates buzzer which beeps again and again until the gas detector module doesn't sense the gas in environment. When LPG gas detector module gives LOW pulse to arduino, then LCD shows “No LPG Gas Leakage” message.

 

How to Use ADC in Arduino Uno?

 

 

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.

 

Gas-Sensor-Module

 

Circuit Diagram and Description

 

Gas-Sensor-Module

 

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.

 

Gas-Sensor-Module

 

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

 

Code :

 

#include
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("Circuit Digest");
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);
}
}

 

 
More Project, Project Video - Click here to visit our website