LPG Gas Leakage Detector Simulation
MQ2 MQ6 Sensor with Arduino
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 buzzing 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.
Working of the Project
LPG gas sensor module is used to detect LPG Gas. When LPG gas leakage is sensed, it will give a HIGH pulse on its AO pin and Arduino constantly reads its AO pin.
When Arduino receives a HIGH pulse from the LPG Gas sensor module it displays that LPG Gas Leakage Alert message on 16x2 LCD and stimulates buzzer with red LED glowing and buzzer beeps again until the gas detector module doesn't recognize the gas in the environment.
When Arduino gets a LOW pulse from the LPG Gas detector module, then LCD will show that No LPG Gas Leakage alert message and Green LED glows.
Arduino manages the complete process of this system like reading LPG Gas sensor module output, sending a message to LCD, Glowing respective LEDs and stimulating buzzer. We can set the sensitivity of this sensor module by inbuilt potentiometer located on it.
What is 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.
The Following Components is my Amazon India Affiliates links.
Parts List :-
1. Arduino Uno :- https://amzn.to/3VVxP5q
2. LCD Display:- https://amzn.to/3Qpu4E2
3. Gas Sensor:- https://amzn.to/3Czz7MG
4. 10K potentiometer:- https://amzn.to/3QsFG9p
5. Breadboard + Jumper wires:- https://amzn.to/3k4KZ2N
6. LEDs pack:- https://amzn.to/3ICsehg
7. Buzzer:- https://amzn.to/3IEp0tB
Arduino Code :-
// https://www.youtube.com/channel/UCaXI2PcsTlH5g0et67kdD6g //
// Gas Leakage detector //
// By MOHD SOHAIL //
#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
#define MQPin A0
#define red 9
#define green 10
#define buzzer 11
void setup() {
lcd.begin(16, 2);
pinMode(MQPin, INPUT_PULLUP);
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
pinMode(buzzer, OUTPUT);
lcd.setCursor(0, 0);
lcd.print(" GAS LEAKAGE ");
lcd.setCursor(0, 1);
lcd.print(" DETECTOR - EIF ");
delay(1000);
lcd.clear();
}
void loop() {
int gas_value = digitalRead(MQPin);
if(gas_value==HIGH)
{
digitalWrite(green, LOW);
digitalWrite(buzzer, HIGH);
ledon();
lcdon();
}
else
{
lcdoff();
ledoff();
}
}
void ledon()
{
digitalWrite(red, HIGH);
delay(200);
digitalWrite(red, LOW);
delay(200);
}
void ledoff()
{
digitalWrite(red, LOW);
digitalWrite(green, HIGH);
digitalWrite(buzzer, LOW);
}
void lcdon()
{
lcd.setCursor(0, 0);
lcd.print(" GAS DETECTED ");
lcd.setCursor(0, 1);
lcd.print(" ALERT ALERT !! ");
delay(200);
lcd.clear();
}
void lcdoff()
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" NO GAS ");
lcd.setCursor(0, 1);
lcd.print(" DETECTED ");
delay(200);
}
0 Comments