Jashore University of Science and Technology Department of Electrical & Electronic Engineering A Project Report On Development of Automatic LPG Leakage Detection & Hazard Prevention for Home Security Course title: Project Design & Seminar Course code: EEE3200 Submitted to Submitted by Md. Amzad Hossain, Dr. Eng. Associate Professor Department of Electrical & Electronic Engineering Jashore University of Science and Technology Name: Tashdidul Islam Fahim Roll: 161115 Department of Electrical & Electronic Engineering Jashore University of Science and Technology Project Name: “Development of Automatic LPG Leakage Detection & Hazard Prevention for Home Security”. Introduction: Most of LPG explosions are caused by undetected gas leakage in the pre-detection condition. So that, LPG detection system is needed. The purpose of this system is to detect gas leakage, neutralize it, and prevent the explosion. Objectives of the Project: Detect Gas Leakage like (LPG, Natural gas, Coal gas) or any such petroleum based gaseous substance that can be detected using MQ5 Sensor. 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. Background Theory: The project is aimed at developing the security of home against the unexpected incident of gas leakage. In this project, a device is designed where if any gas leakage occurs than the device sends SMS through GSM module to the emergency numbers provided to it and alert by alarming. In particular, gas sensor has been used which has high sensitivity to nine gases that used in our premises. The system works perfectly as the title suggests. Block Diagram: Circuit Diagram: Application: Gas leakage detector (Domestic); Combustible gas detector (Industrial); Gas detector (Portable); Homes; Factories; LPG storage; Gas cars and many more. Working Principle: The goal of the project is to develop a smart automatic gas leakage detection system. The system is designed for homes, offices, industries etc. In this system, there will be an alert system for every individual floor. It is designed to detect sudden gas leakage. It will contain necessary sensors for detecting gas leakage. When the system will detect gas leakage for a room it will take following steps. Scan Gas & Display in LCD: After activation, the device will continuously scan gas and show the result in the LCD display. If there is no gas, then the display will show ‘No Gas Leakage’. If there is any gas found, the display will show - ‘Gas leakage’. Detection of Gas: If there is presence of any gas the display shows ‘Gas Leakage’. Start Alarm; Stop Alarm & Reset: If the gas sensor cannot find any gas leakage, then it shows that there is no gas leaking and keeps on scanning for gas. Working Progress: Component Details: Arduino Uno: Introduction to Arduino Uno: Arduino UNO is one of the famous microcontroller boards of Arduino family and is developed by Arduino.cc. Basically Arduino.cc is an open-source platform and is mainly based upon AVR microcontroller Atmega328. It is one of the most economical boards of Arduino family and is widely used because of its small number of input output pins and reduced size as compared to Arduino mega which is the big brother of Arduino UNO. In this article we are going to briefly discuss about Arduino UNO. We will discuss about its specifications, pin configuration, dimensions, shields compatibility, software for coding, applications and projects in which this board is used. Pins of Arduino Uno and their use: Digital pins: 14 (These pins have only 2 states i.e., high or low or in simple words either 5 V or 0 V no in between values. These pins are mostly used to sense the voltage presence when switch is open or close) Analog pins: 6 (A0 to A5 and they come up with a resolution of 10 bits and they provide flexibility of connecting any external device via these pins. These pins are configured from 0 V to 5 V but they can be configured to high range by using AREF pin or analog Reference () function. ADC (analog to digital convertor) is used to sample these pins. These pins take analog signal and by using ADC convertor they convert this analog signal to number between 0 – 1023) 16 MHz crystal oscillator Out of 14 digital pins, 6 can be used for PWM (pulse width modulation) USB port TX and RX pins (for serial communication) SPI (serial peripheral interface) External adaptor to deliver power to this board by external power supply up to 12 volts (board will make use of its voltage regulator and will make this voltage up to 5 V or 3.3 V as per our requirements) Reset Pin: Used to reset our whole board and takes it to initial stage of running program. For instance, our board gets hang in the middle of our running program then we can make use of this pin and this pin will clear everything up and starts program from beginning ICSP connector (Used to bypass USB port and interfacing our board directly as serial device. This port is essential to reboot load our chip if it gets corrupted and we are not able to talk to our computer) Memory of Arduino Uno: Flash Memory: 13KB (used to store number of instructions in code form) SRAM of 2 KB 1 KB EPROM Key Features of Arduino Uno: Operating voltage is 5 V and it can be achieved by using USB port or by using external adaptor. External micro-SD card is supported This board comes with built-in feature of voltage regulation i.e. when device is connected to other external device it keeps voltage under control thus preventing board from damage. Easy USB interface i.e. simply plug your external device with this port and your device is ready to use. This interface is also used to register your board as virtual serial port on your computer and advantage is that this type of serial communication setup is extremely easy and convenient. 16 MHz clock makes it fast enough for most of the applications. On board LED for easy and fast debugging of our code Micro SD card can be used if functionality or nature of our project goes complex to make our board store more information. Programming of Arduino Uno: Like other development boards of Arduino family this also uses Arduino IDE software to make sketches (Arduino programs are called sketches) Sketches that are developed on IDE can be transferred directly by connecting our computer via USB port. IDE is compatible with Linux, MAC or Windows operating system Programming languages C and C++ are used Thousands of preloaded sketches are easily available which we can use in order to get Arduino to do something according to our requirements. Gas Sensor (MQ-5): Features: High sensitivity to LPG, natural gas, town gas; Fast response; Stable and long life; Simple drive circuit. Application: They are used in gas leakage detecting equipment’s in family and industry, are suitable for detecting of LPG, natural gas, town gas, avoid the noise of alcohol and cooking fumes and cigarette smoke. Specification: Liquid Cristal Display (16x2): Brief Description on LCD modules LCD modules are very commonly used in most embedded projects, the reason being its cheap price, availability and programmer friendly. Most of us would have come across these displays in our day-to-day life, either at PCO’s or calculators. The appearance and the pinouts have already been visualized above now let us get a bit technical. 16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of combinations available like, 8×1, 8×2, 10×2, 16×1, etc. but the most used one is the 16×2 LCD. So, it will have (16×2=32) 32 characters in total and each character will be made of 5×8 Pixel Dots. Now, we know that each character has (5×8=40) 40 Pixels and for 32 Characters we will have (32×40) 1280 Pixels. Further, the LCD should also be instructed about the Position of the Pixels. Hence it will be a hectic task to handle everything with the help of MCU, hence an Interface IC like HD44780is used, which is mounted on the backside of the LCD Module itself. The function of this IC is to get the Commands and Data from the MCU and process them to display meaningful information onto our LCD Screen. Features of 16×2 LCD module Operating Voltage is 4.7V to 5.3V Current consumption is 1mA without backlight Alphanumeric LCD display module, meaning can display alphabets and numbers Consists of two rows and each row can print 16 characters. Each character is built by a 5×8-pixel box Can work on both 8-bit and 4-bit mode It can also display any custom generated characters Available in Green and Blue Backlight Buzzer: A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric (piezo for short). Typical uses of buzzers and beepers include alarm device, timers, and confirmation of user input such as a mouse click or keystroke. Buzzers are typically used for identification and alarm purposes across many major industries. The major application categories that utilize buzzers for indication or alert purposes include: home appliances, automotive electronics, medical, safety and security, industrial, and office automation. Advantages of this project: This project is easy to use. And this project is fully automated so no human attention is required. This project avoids the accident or the fire which is caused due to leakage of LPG gas Low power consumption and reliable. The system enables monitoring of gas leakage in remote locations and thereby leads to a faster response time in the events of a leakage condition. Limitation: Small sensitivity to alcohol and smoke; Could no detect natural gas. Future Development of this Project: Voice feedback system can be included in GSM based LPG leakage detection system. User will get intimation through prerecorded voice messages. we can add other gas sensors like Smoke sensor, Alcohol sensor along with the LPG detector circuit. Or even we can add temperature, light sensors depending upon the application of the project. Arduino Code: #include <LiquidCrystal.h> #include <SoftwareSerial.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); SoftwareSerial mySerial(9, 10); int buzzerPin=8; int lpg_sensor=7; int gas_value; void setup(){ pinMode(buzzerPin,OUTPUT); pinMode(lpg_sensor,INPUT); Serial.begin(9600); lcd.begin(16,2); } void loop() { gas_value=digitalRead(lpg_sensor); if(gas_value==0) { digitalWrite(buzzerPin,HIGH); lcd.print (" Gas Leakage "); delay(1000); mySerial.println((char)26);// ASCII code of CTRL+Z,the stopping character delay(200); lcd.clear(); delay(500); } else { digitalWrite(buzzerPin,LOW); lcd.print ("No Gas Leakage "); delay(6000); lcd.clear(); delay(500); } } Conclusion: Gas leakage detection system is not used much in Bangladesh. But day by day, its necessity is increasing. Gas leakage detection system is commonly use in home, commercial and industrial sectors and high raised buildings also. In this system, we have described a new approach for gas leakage detection system at a low concentration. The leakage is detected with the help of gas sensors. It also sends notification SMS to the users which can alert the users that there is gas leakage in the floor. In the other view of point, a gas leakage detection system with SMS and alarm is costly device. Some people imported this kind of device from abroad which is much costly. But the designed project is an Arduino Based Gas Leakage Detector with Short Message Service and Sound Alarm which is very cost effective and can be made easily. Reference: https://www.researchgate.net/publication/331482824_Intelligent_system_of_LPG_gas_le akage_detection_for_web-based_living_house_security https://www.circuitstoday.com/gas-leakage-detector-using-arduino-with-sms-alert https://www.ripublication.com/ijeer17/ijeerv9n7_15.pdf https://www.youtube.com/watch?v=g-9nlLmaUKo