Gas Detecting Alarm System With Arduino Uno
by prajaktagumphalwar in Circuits > Arduino
94 Views, 1 Favorites, 0 Comments
Gas Detecting Alarm System With Arduino Uno
Gas detecting system using Arduino Uno is safety system designed to detected the harmful gases in the environment alert the people. Use in Homes , industries , laboratory & Kitchen to prevent the accident cause and Leakage.
In this system, a gas sensor such as MQ-2 gas sensor is used to sensing the gas like LPG, Propane, Methane, carbon monoxide, Alcohol & smoke
Supplies
Components & Uses in this Project:
1.ARDIUNO UNO
- Arduino Uno is main microcontroller of the system it control the system and processes the signal received from gas sensor.
2.BUZZER
- Buzzer is to create alarm when gas is detected.
3.GAS SENSOR
- Gas sensor is to detect the gas leakage like methane ,propane, LPG, Alcohol , carbon monoxide.
4.LCD I2c MODEL
- LCD to display the message such as 'Gas is Detected' & 'Gas is not Detected' then the user can know the output.
5.BREADBOARD
- Breadboard for connecting a components without soldering.
6.JUMPER WIRE
- Jumper wire for connecting components together.
7.LED
- To show the gas is Detected or The gas is not detected.
8.RESISTOR(330ohm &4.70kohm)
- Resistor for control the flow of current and protect the components from high supply.
PIN CONNETION EXPLANATION 01
1.LED & BUZZER connection to ARDUINO UNO
- LED pin
A) Green LED
- Anode(+) - 6
- Cathode(-) - Resistor(330ohm) -GND
B)RED LED
- Anode-7
- cathode-Resistor(330ohm)-GND
- BUZZER
- Cathode(-) - GND
- Anode(+) - 8
Downloads
02
2.MQ-2 GAS SENSOR CONNECTION TO ARDUINO UNO
- VCC-3.3v
- GND-GND
- AOUT-AO
Downloads
03
3.LCD I2C MODEL CONNECTION TO ARDIUNO UNO
- GND-GND
- VCC-5V
- SDA-A4
- SCL-A5
CODE
CODE
(CODE FOR MQ-2 GAS SENSOR IN ARDIUNO IDE)
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
int gasSensor = A0;
int greenLED = 6;
int redLED = 7;
int buzzer = 8;
int threshold = 200;
void setup()
{
pinMode(greenLED, OUTPUT);
pinMode(redLED, OUTPUT);
pinMode(buzzer, OUTPUT);
lcd.init();
lcd.backlight();
Serial.begin(9600);
lcd.setCursor(0,0);
lcd.print("Gas Detector");
delay(2000);
lcd.clear();
}
void loop()
{
int gasValue = analogRead(gasSensor);
Serial.println(gasValue);
if(gasValue > threshold)
{
digitalWrite(redLED, HIGH);
digitalWrite(greenLED, LOW);
digitalWrite(buzzer, HIGH);
lcd.setCursor(0,0);
lcd.print("Gas Detected ");
lcd.setCursor(0,1);
lcd.print("Value:");
lcd.print(gasValue);
}
else
{
digitalWrite(redLED, LOW);
digitalWrite(greenLED, HIGH);
digitalWrite(buzzer, LOW);
lcd.setCursor(0,0);
lcd.print("Gas Not Detect");
lcd.setCursor(0,1);
lcd.print("Value:");
lcd.print(gasValue);
}
delay(500);
}
WORKING
WORKING :-
- When the gas value is 200-350 then gas sensor detect the gas.
- LCD show the "Gas Detected"
- Also showing the gas value 200-300 .
- when gas is not detected then Green LED Glow and LCD show "Gas is not Detected" .
- And showing the gas value in the range of 80-200 because in the code set threshold value 200.
- It detected the small gas when Threshold rang is 200-350 .
- when it detect the high concentrated gas then it shows the value 350-700
- And when the gas is detected it show through LCD and also Glow the Blue LED and buzzer
APPLICATIONS
APPLICATION :-
1.Home safety
- It can be detect the Leakage LPG gas and prevent the people to harmful accident.
2.Industrial Safety
- Used in factory and industry to monitor flammable and toxic gases to prevent explosion.
3.Laboratories
- Helps in chemical laboratory to detect harmful gases to ensure the safe working environment.
4.Gas storage area
- used in place where gas cylinder are store to monitor leakage gas continuously
CONCLUSION
CONCLUSION :-
gas detecting alarm system using Arduino Uno is simple and effective safety project that helps detect the harmful gases .MQ-2 gas sensor continuously monitor the gas and send to the Arduino Uno. when the gas level exceeds threshold value then activate the system buzzer and LED alarm and display the warning message on LCD .