Hii welcome Back Friend I hope all of you will be fine
Here today I will make Gas Leak Detector & Auto Exhaust Fan Using Arduino
- Detect Gas Leakage (like LPG leak, Butane leak, Methane leak) or any such petroleum based gaseous substance that can be detected using MQ5 Sensor.
- Setup an SMS based Alert Mechanism and send 3 SMS (3 alert messages) to 2 specified mobile numbers (input inside the arduino program)
- Produce a sound alarm upon gas leak and stop the alarm once gas leak is under control (gas presence in atmosphere is under normal range)
- Display status in an LCD using a 16×2 LCD module.
A gas sensor is a device which detects the presence or concentration of gases in the atmosphere. Based on the concentration of the gas the sensor produces a corresponding potential difference by changing the resistance of the material inside the sensor, which can be measured as output voltage.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
#include <SoftwareSerial.h>
SoftwareSerial mySerial(9,8);
int gasValue = A0;
int data = 0;
int relay = 6;
int pir_Status;
int buzzerPin = 7;
void setup()
{
randomSeed(analogRead(0));
mySerial.begin(9600);
Serial.begin(9600);
lcd.init();
lcd.backlight();
pinMode(gasValue, INPUT);
pinMode(relay, OUTPUT);
pinMode(buzzerPin, OUTPUT);
lcd.setCursor(2,0);
lcd.print ("WELCOME TO ");
lcd.setCursor(2,1);
lcd.print ("JUSTDOELECTRONICS");
lcd.setCursor(6,2);
lcd.print ("DESIGN By :-");
lcd.setCursor(6,3);
lcd.print ("PRATEEK");
delay(3000);
lcd.clear();
}
void loop(){
data = analogRead(gasValue);
Serial.print("Gas Level: ");
Serial.println(data);
lcd.clear();
lcd.setCursor(1,0);
lcd.print ("Exhaust fan :- OFF");
lcd.setCursor(2,1);
lcd.print("Gas Level: ");
lcd.print(data);
delay(1000);
if ( data > 700)
{
SendMessage();
Serial.print("Gas detect alarm");
lcd.clear();
lcd.setCursor(1,0);
lcd.print ("Exhaust fan :- ON");
lcd.setCursor(2,2);
lcd.print("Gas Level Exceed");
lcd.setCursor(2,3);
lcd.print("SMS Sent");
delay(1000);
digitalWrite(buzzerPin, HIGH);
digitalWrite(relay, HIGH);
}
else
{
Serial.print("Gas Level Low");
lcd.clear();
lcd.setCursor(2,3);
lcd.print("Gas Level Normal");
delay(1000);
digitalWrite(buzzerPin, LOW);
digitalWrite(relay, LOW);
}
//lcd.clear();
}
void SendMessage()
{
delay(1000);
}
NextDFM Software From NextPCB
A PCB Design Problems Detector, An Engineering Solution ProviderImport the Gerber file with one click. No need for complicated file reading steps to review easily and improve efficiency.
Help you quickly familiarize DFM design specifications and production needs to determine whether there are any manufacturing constraints
Features
Make PCB design more standard Prevent the quality flaw
Impedance calculation function and lamination automation
Automatically generate the best puzzle
CAM350 free alternative version
Check Gerber files anytime, anywhere and parse it with one click
Instate Quote and evaluate delivery time Reduce cost and improve benefit
these are advantage comparing to Eagle and Altium
Comments