SlideShare a Scribd company logo
3
Most read
4
Most read
16
Most read
“GAS LEAKAGE DETECTION
SYSTEM”
By:
Aashiq Ahamed N
INDEX
1. CHAPTER-1
ABSTRACT………………………………………………1
2. CHAPTER-2
HARDWARE REQUIREMENTS AND DESCRIPTION..2
3. CHAPTER-3
PROJECT DESCRIPTION ……………….…...................7
4. CHAPTER-4
SOFTWARE & SOURCE CODE DESCRIPTION ……..8
5. CHAPTER-5
SCREENSHOT………………….………………………14
6. CHAPTER-6
FUTURE ENHANCEMENT………….………………...16
7. CHAPTER-7
CONCLUSION………….………………………………16
8. CHAPTER-8
REFERENCE……………………………………………17
“GAS LEAKAGE DETECTION
SYSTEM”
CHAPTER-1
ABSTRACT
The main aim of this project is to avoid the accident and death in the gas leakage explosion in
house, hotels and industries. Domestically we use natural gas and it is very useful for burning
purpose. If this gas is leaked in our kitchens, hotels or factories and not sensed in time, it may
lead to fatal disaster, and may cause human and material loss. For this purpose we have
developed “GAS LEAKAGE DETECTION SYSTEM”.
This project comprises a gas sensing sensor for detecting the leakage of gas. The sensor will be
activated automatically, when the leakage level increases. When the gas reaches the sensor, it is
first ionized into its constituents and is then absorbed by the sensing elements. This adsorption
creates a potential difference on the elements, which is conveyed to the processor unit in the form
of current then the sensor will automatically send an alert email with the help of NODEMCU
circuit.
Need of the project:
Around 62 people die every day due to fire accidents in India. Out of this 17% deaths are due to
gas cylinder/stove burst. Safety systems helping people from gas burst are not easily available in
the market. The proposed system will help in giving better protection to life and property.
CHAPTER-2
HARDWARE REQUIREMENTS
NODEMCU Circuit
 NODEMCU is circuit and an open source IOT platform. It includes firmware for the
ESP8266 Wi-Fi.
 It is based on LUA scripting language.
 NODEMCU type is single board multi controller.
 Its memory is 128kBytes.
 Its storage is 4Mbytes.
 Since NODEMCU is open source platform, the hardware design is open for
edit/modify/build
 NODEMCU v3 is used.
 Wi-Fi modulo is ESP8266.
MQ2 SENSOR
 The MQ2 is a flammable gas and smoke sensor detects the concentrations of combustible
gas in the air and output its reading analog voltage.
 Supply Input voltage is 5v.
 Sensitive to H2, LPG, CH4, CO, ALCOHOL, SMOKE, PROPANE.
 Analog Input and Digital Output can be received.
 The pins connections are made Vcc, Ground, Digital and Analog values.
 The sensitivity of the sensor can be adjusted by potentiometer.
REGULATOR7805 IC
 7805ic is a family of self contained fixed linear voltage regulator integrated circuits
 The 78xx family is commaly used is electronic circuits requiring a regulated power
supply due to their ease of due and low cost.
 IC7805 is a 5V voltage regulator that resticts the output voltage to 5V output for various
ranges of input voltage.
 The maximum value for input to the voltage regulator is 35V and output is 5V.
.
Jumper wires
 Jumper wires are simply wires that have connector pins at each end, allowing them to be
used to connect two points to each other without soldering
 Jumper wires are typically used with bread broads.
 Variety of color, the colors don’t actually mean anything. This means that a red jumper
wire is technically the same as a black one.
 Three versions are:
 Male to male
 Male to female
 Female to female
Bread board
 A breadboard is a construction base for prototyping of electronics.
 These are great units for making temporary circuits and prototyping, and they require
absolutely no soldering.
 The breadboard has many holes into which circuit components like ICs and resistors can
be inserted.
 It is used to build and test circuits quickly before finalizing any circuit design.
 It has totally 3 sizes available named as full, half, mini and contains no types.
CHAPTER-3
PROJECT DESCRIPTION:-
OBJECTIVE OF THE PROJECT:-
1) To analyse the natural gas leakage with the help of sensor.
2) To design automatic NODEMCU based device for leakage detection.
3) The device will send an auto alert message through the email.
This project comprises a gas sensing sensor for detecting the leakage of gas. The sensor will be
activated automatically, when the leakage level increases. When the gas reaches the sensor, it is
first ionized into its constituents and is then absorbed by the sensing elements which is then sent
to the NODEMCU circuit in the form of electrical signal and further through
programming/coding fed in NODEMCU, a signal will be sent to the peripheral components and a
specific message will be sent to the email. The whole phenomenon can be easily understood by
observing the following figure
CHAPTER-4
SOFTWARE DESCRIPTION:-
For this project we have used the Arduino software. Arduino is an open-source electronics
platform based on easy-to-use hardware and software.
It consists of both a physical programmable circuit board (often referred to as a microcontroller)
and a software, or IDE (Integrated Development Environment) that runs the computer, used to
write and upload computer code to the physical board the environment is written in Java .
Arduino boards are able to read inputs and turn it into an output. We can instruct the board what
to do by sending a set of instructions to the microcontroller on the board. It is support the
languages like python, C, C++, C#, java script.
MINIMUM HARDWARE / SOFTWARE REQUIREMENTS:-
CPU: Intel Core 2 Quad Q9550
RAM: 2 GB
OS: Windows 7/ Windows 8.1/ Windows 10
FREE DISK SPACE: 3 GB
SOURCE CODE FOR MAILAUTOMATION:-
#include <dummy.h>
#include <Arduino.h> //header file for arduino
#include <ESP8266WiFi.h> //header file for wifi module
WiFiClient client;
String MakerIFTTT_Key ;
String MakerIFTTT_Event;
char *append_str(char *here, String s) {
int i = 0;
while (*here++ = s[i]) {
i++;
};
return here - 1;
}
char *append_ul(char *here, unsigned long u) {
char buf[20];
return append_str(here, ultoa(u, buf, 10));
}
char post_rqst[256]; char *p; char *content_length_here; char *json_start; int compi;
void setup()
{
Serial.begin(115200);
WiFi.disconnect();
delay(5000); // event delay time
Serial.println("start..");
WiFi.begin("sowmi", "teddy276"); //in this wifi user name & password are given
while ((!(WiFi.status() == WL_CONNECTED))) {
delay(600);
}
Serial.println("Connected to WIFI");
if (client.connect("maker.ifttt.com", 80)) { //port number for http
MakerIFTTT_Key = "Z_CVq_k088t08f-4PhI3K"; //key value for IFTTT
MakerIFTTT_Event = "email"; // event triggering name as email
p = post_rqst;
p = append_str(p, "POST /trigger/");
p = append_str(p, MakerIFTTT_Event);
p = append_str(p, "/with/key/");
p = append_str(p, MakerIFTTT_Key);
p = append_str(p, " HTTP/1.1rn");
p = append_str(p, "Host: maker.ifttt.comrn");
p = append_str(p, "Content-Type: application/jsonrn");
p = append_str(p, "Content-Length: ");
content_length_here = p;
p = append_str(p, "NNrn");
p = append_str(p, "rn");
json_start = p;
p = append_str(p, "{"value1":"");
p = append_str(p, "warning");
p = append_str(p, "","value2":"");
p = append_str(p, "Alert");
p = append_str(p, "","value3":"");
p = append_str(p, "Gas leakage in college kitchen");
p = append_str(p, ""}");
compi = strlen(json_start);
content_length_here[0] = '0' + (compi / 10);
content_length_here[1] = '0' + (compi % 10);
client.print(post_rqst);
}
Serial.println("your email has been sent");
}
void loop()
{
int Gas_pin;
int Gas_state = digitalRead(Gas_pin); //gas pin digital values
if (Gas_state == LOW){
if (client.connect("maker.ifttt.com", 80)) { //port number for http
MakerIFTTT_Key = "Z_CVq_k088t08f-4PhI3K"; //key value for IFTTT
MakerIFTTT_Event = "email"; // event triggering name as email
p = post_rqst;
p = append_str(p, "POST /trigger/");
p = append_str(p, MakerIFTTT_Event);
p = append_str(p, "/with/key/");
p = append_str(p, MakerIFTTT_Key);
p = append_str(p, " HTTP/1.1rn");
p = append_str(p, "Host: maker.ifttt.comrn");
p = append_str(p, "Content-Type: application/jsonrn");
p = append_str(p, "Content-Length: ");
content_length_here = p;
p = append_str(p, "NNrn");
p = append_str(p, "rn");
json_start = p;
p = append_str(p, "{"value1":"");
p = append_str(p, "Alert");
p = append_str(p, "","value2":"");
p = append_str(p, "Message from college");
p = append_str(p, "","value3":"");
p = append_str(p, "Gas leakage is detected");
p = append_str(p, ""}");
compi = strlen(json_start);
content_length_here[0] = '0' + (compi / 10);
content_length_here[1] = '0' + (compi % 10);
client.print(post_rqst);
}
Serial.println("Your message send...............");
Serial.println("Gas leakage is detected");
delay(7000); //delay time
}
else{
Serial.println("No gas"); //else condition
}
}
CHAPTER-5
SCREEN SHOT OF THE PROCEDURE:-
Selecting the board type
The board type must be selected from this option for the proper functioning of the NODEMCU
circuit otherwise the circuit will shows a compilation error.
Source coding compiling
During compilation it will show the syntax/logical errors but run time errors cannot be displayed
while compilation.
Source coding uploading
If there is no error in the coding we can upload the coding to the Arduino/NODEMCU board with
help of USB cable.
Source coding testing after uploading
After uploading the coding in to the board we can test the program, whether it is working
properly or not.
CHAPTER-6
FUTURE ENHANCEMENTS
 In the future days we are planning to modify this project by connecting this project to the
main server from which we can send message/notifications to any one in any part of the
world using the cloud computing technology and with IOT. Now we can send only mail
to the chosen persons.
 When LPG cylinder is empty the cylinder booking will done automatically using IOT
technology.
CHAPTER-7
CONCLUSION
This project is microcontroller based. The Gas sensor is used to detect LPG gas leakages in the
kitchen.
The sensor can also sense methane gas leakage in cars or service stations, storage tank
environment.
The sensor has excellent sensitivity combined with a quick response system.
CHAPTER-8
REFERENCES
https://www.arduino.cc/
http://wiki.seeedstudio.com/Grove-Gas_Sensor-MQ2/
https://components101.com/mq2-gas-sensor
https://medium.com/@cilliemalan/installing-nodemcu-drivers-on-windows-d9bffdbad52
https://en.wikipedia.org/wiki/NodeMCU

More Related Content

PPTX
Project presentation on wireless lpg leakage detector
PPTX
Microcontroller Based LPG Detector Using GSM Module
PDF
Gas Leakage Detector using Arduino with SMS Alert - Engineering Project
DOCX
Gas sensor Alarm
PPTX
ARDUINO BASED GAS LEAKAGE DETECTING ROBOT
PPTX
Gas & smoke detector
PPTX
Gas and smoke detection system using arduino
PPTX
LPG gas leekage dectection
Project presentation on wireless lpg leakage detector
Microcontroller Based LPG Detector Using GSM Module
Gas Leakage Detector using Arduino with SMS Alert - Engineering Project
Gas sensor Alarm
ARDUINO BASED GAS LEAKAGE DETECTING ROBOT
Gas & smoke detector
Gas and smoke detection system using arduino
LPG gas leekage dectection

What's hot (20)

PPTX
Home automation using google assistant ppt
PPTX
AUTONOMOUS LPG GAS SENSOR BOT USING ARDUINO ppt
PPTX
IoT Based Home Automation System Presantation
PPTX
wireless E notice board
PPTX
Automatic gas detection system
PPTX
Alcohol detection system with gsm and gps (fiem , ece)
DOCX
Gas Leakage Detection Based on IOT
PDF
Synopsis on vehicle accident and alcohol sensing alert with engine locking sy...
PDF
P 6168--microcontroller based-lpg_gas_detector_using_gsm_module
PPTX
Gas detection robot ppt
PPTX
IOT based air quality and monitoring by using arduino
PDF
GSM BASED GAS LEAKAGE DETECTION SYSTEM
PDF
Project report on home automation using Arduino
PPTX
E- Notice Board Presentation
PPT
Automatic vehicle accident detection and messaging system using gsm and gps m...
PPTX
IoT home automation project
PPTX
Vehicle accident detection and messaging system using GSM and arduino
PDF
8 sem final report print copy (1)
DOCX
Wireless Electronic Notice Board
PPTX
Arduino based electronic notice board and controlling of home appliances by u...
Home automation using google assistant ppt
AUTONOMOUS LPG GAS SENSOR BOT USING ARDUINO ppt
IoT Based Home Automation System Presantation
wireless E notice board
Automatic gas detection system
Alcohol detection system with gsm and gps (fiem , ece)
Gas Leakage Detection Based on IOT
Synopsis on vehicle accident and alcohol sensing alert with engine locking sy...
P 6168--microcontroller based-lpg_gas_detector_using_gsm_module
Gas detection robot ppt
IOT based air quality and monitoring by using arduino
GSM BASED GAS LEAKAGE DETECTION SYSTEM
Project report on home automation using Arduino
E- Notice Board Presentation
Automatic vehicle accident detection and messaging system using gsm and gps m...
IoT home automation project
Vehicle accident detection and messaging system using GSM and arduino
8 sem final report print copy (1)
Wireless Electronic Notice Board
Arduino based electronic notice board and controlling of home appliances by u...
Ad

Similar to Gas leakage detection system (20)

PDF
Integrated Security System With Remot Controlling Of Appliances
PDF
Lab Monitoring and Device Control Using Atmega 328 Based wireless Network Sensor
PDF
IOT: Home Automation using Android Application
DOCX
PPTX
gas cylinder iot.pptx
DOCX
11.arduino android bluetooth home control + app - hc-05 4 - ac light's 2 ...
PDF
IRJET- IoT Based Smart Security System for Prevention of Industrial Hazards
PDF
IRJET- Multi Plug Control using Internet of Things
PPTX
blackbox01 (1).pptx
PDF
Ijsartv6 i336122
PDF
IRJET- Android based Home Automation System with Power Optimization Modes
PDF
IRJET- Intelligent Home Monitoring using IoT for Physically Challenged
PDF
IRJET - Fire and Harmful Gas Detection Notification System
PPTX
Smart home Environment using iot
PDF
Home Automation System using Arduino and Android
PDF
IRJET- IoT based Classroom Automation System
PDF
IRJET- BSIOTR IT SMART LAB using IOT
PDF
IRJET- Voice-Activated Home Automation using NodeMCU
PDF
Smart Home Automation using Wi-Fi
PDF
Design_and_Development_of_Fire_and_Gas_L.pdf
Integrated Security System With Remot Controlling Of Appliances
Lab Monitoring and Device Control Using Atmega 328 Based wireless Network Sensor
IOT: Home Automation using Android Application
gas cylinder iot.pptx
11.arduino android bluetooth home control + app - hc-05 4 - ac light's 2 ...
IRJET- IoT Based Smart Security System for Prevention of Industrial Hazards
IRJET- Multi Plug Control using Internet of Things
blackbox01 (1).pptx
Ijsartv6 i336122
IRJET- Android based Home Automation System with Power Optimization Modes
IRJET- Intelligent Home Monitoring using IoT for Physically Challenged
IRJET - Fire and Harmful Gas Detection Notification System
Smart home Environment using iot
Home Automation System using Arduino and Android
IRJET- IoT based Classroom Automation System
IRJET- BSIOTR IT SMART LAB using IOT
IRJET- Voice-Activated Home Automation using NodeMCU
Smart Home Automation using Wi-Fi
Design_and_Development_of_Fire_and_Gas_L.pdf
Ad

More from Aashiq Ahamed N (7)

PPTX
Zero day exploit
PPTX
PPT
Usb Drive Protector
PPTX
Components of IOT Implementation
PPTX
Steganography
Zero day exploit
Usb Drive Protector
Components of IOT Implementation
Steganography

Recently uploaded (20)

PPTX
OMC Textile Division Presentation 2021.pptx
PDF
August Patch Tuesday
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
Tartificialntelligence_presentation.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
observCloud-Native Containerability and monitoring.pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
STKI Israel Market Study 2025 version august
PPTX
Modernising the Digital Integration Hub
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
1. Introduction to Computer Programming.pptx
PDF
Hybrid model detection and classification of lung cancer
OMC Textile Division Presentation 2021.pptx
August Patch Tuesday
TLE Review Electricity (Electricity).pptx
Getting Started with Data Integration: FME Form 101
A contest of sentiment analysis: k-nearest neighbor versus neural network
Tartificialntelligence_presentation.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Hindi spoken digit analysis for native and non-native speakers
NewMind AI Weekly Chronicles – August ’25 Week III
Univ-Connecticut-ChatGPT-Presentaion.pdf
Final SEM Unit 1 for mit wpu at pune .pptx
Zenith AI: Advanced Artificial Intelligence
gpt5_lecture_notes_comprehensive_20250812015547.pdf
observCloud-Native Containerability and monitoring.pptx
Module 1.ppt Iot fundamentals and Architecture
STKI Israel Market Study 2025 version august
Modernising the Digital Integration Hub
NewMind AI Weekly Chronicles - August'25-Week II
1. Introduction to Computer Programming.pptx
Hybrid model detection and classification of lung cancer

Gas leakage detection system

  • 2. INDEX 1. CHAPTER-1 ABSTRACT………………………………………………1 2. CHAPTER-2 HARDWARE REQUIREMENTS AND DESCRIPTION..2 3. CHAPTER-3 PROJECT DESCRIPTION ……………….…...................7 4. CHAPTER-4 SOFTWARE & SOURCE CODE DESCRIPTION ……..8 5. CHAPTER-5 SCREENSHOT………………….………………………14 6. CHAPTER-6 FUTURE ENHANCEMENT………….………………...16 7. CHAPTER-7 CONCLUSION………….………………………………16 8. CHAPTER-8 REFERENCE……………………………………………17
  • 3. “GAS LEAKAGE DETECTION SYSTEM” CHAPTER-1 ABSTRACT The main aim of this project is to avoid the accident and death in the gas leakage explosion in house, hotels and industries. Domestically we use natural gas and it is very useful for burning purpose. If this gas is leaked in our kitchens, hotels or factories and not sensed in time, it may lead to fatal disaster, and may cause human and material loss. For this purpose we have developed “GAS LEAKAGE DETECTION SYSTEM”. This project comprises a gas sensing sensor for detecting the leakage of gas. The sensor will be activated automatically, when the leakage level increases. When the gas reaches the sensor, it is first ionized into its constituents and is then absorbed by the sensing elements. This adsorption creates a potential difference on the elements, which is conveyed to the processor unit in the form of current then the sensor will automatically send an alert email with the help of NODEMCU circuit. Need of the project: Around 62 people die every day due to fire accidents in India. Out of this 17% deaths are due to gas cylinder/stove burst. Safety systems helping people from gas burst are not easily available in the market. The proposed system will help in giving better protection to life and property.
  • 4. CHAPTER-2 HARDWARE REQUIREMENTS NODEMCU Circuit  NODEMCU is circuit and an open source IOT platform. It includes firmware for the ESP8266 Wi-Fi.  It is based on LUA scripting language.  NODEMCU type is single board multi controller.  Its memory is 128kBytes.  Its storage is 4Mbytes.  Since NODEMCU is open source platform, the hardware design is open for edit/modify/build  NODEMCU v3 is used.  Wi-Fi modulo is ESP8266.
  • 5. MQ2 SENSOR  The MQ2 is a flammable gas and smoke sensor detects the concentrations of combustible gas in the air and output its reading analog voltage.  Supply Input voltage is 5v.  Sensitive to H2, LPG, CH4, CO, ALCOHOL, SMOKE, PROPANE.  Analog Input and Digital Output can be received.  The pins connections are made Vcc, Ground, Digital and Analog values.  The sensitivity of the sensor can be adjusted by potentiometer.
  • 6. REGULATOR7805 IC  7805ic is a family of self contained fixed linear voltage regulator integrated circuits  The 78xx family is commaly used is electronic circuits requiring a regulated power supply due to their ease of due and low cost.  IC7805 is a 5V voltage regulator that resticts the output voltage to 5V output for various ranges of input voltage.  The maximum value for input to the voltage regulator is 35V and output is 5V. .
  • 7. Jumper wires  Jumper wires are simply wires that have connector pins at each end, allowing them to be used to connect two points to each other without soldering  Jumper wires are typically used with bread broads.  Variety of color, the colors don’t actually mean anything. This means that a red jumper wire is technically the same as a black one.  Three versions are:  Male to male  Male to female  Female to female
  • 8. Bread board  A breadboard is a construction base for prototyping of electronics.  These are great units for making temporary circuits and prototyping, and they require absolutely no soldering.  The breadboard has many holes into which circuit components like ICs and resistors can be inserted.  It is used to build and test circuits quickly before finalizing any circuit design.  It has totally 3 sizes available named as full, half, mini and contains no types.
  • 9. CHAPTER-3 PROJECT DESCRIPTION:- OBJECTIVE OF THE PROJECT:- 1) To analyse the natural gas leakage with the help of sensor. 2) To design automatic NODEMCU based device for leakage detection. 3) The device will send an auto alert message through the email. This project comprises a gas sensing sensor for detecting the leakage of gas. The sensor will be activated automatically, when the leakage level increases. When the gas reaches the sensor, it is first ionized into its constituents and is then absorbed by the sensing elements which is then sent to the NODEMCU circuit in the form of electrical signal and further through programming/coding fed in NODEMCU, a signal will be sent to the peripheral components and a specific message will be sent to the email. The whole phenomenon can be easily understood by observing the following figure
  • 10. CHAPTER-4 SOFTWARE DESCRIPTION:- For this project we have used the Arduino software. Arduino is an open-source electronics platform based on easy-to-use hardware and software. It consists of both a physical programmable circuit board (often referred to as a microcontroller) and a software, or IDE (Integrated Development Environment) that runs the computer, used to write and upload computer code to the physical board the environment is written in Java . Arduino boards are able to read inputs and turn it into an output. We can instruct the board what to do by sending a set of instructions to the microcontroller on the board. It is support the languages like python, C, C++, C#, java script. MINIMUM HARDWARE / SOFTWARE REQUIREMENTS:- CPU: Intel Core 2 Quad Q9550 RAM: 2 GB OS: Windows 7/ Windows 8.1/ Windows 10 FREE DISK SPACE: 3 GB
  • 11. SOURCE CODE FOR MAILAUTOMATION:- #include <dummy.h> #include <Arduino.h> //header file for arduino #include <ESP8266WiFi.h> //header file for wifi module WiFiClient client; String MakerIFTTT_Key ; String MakerIFTTT_Event; char *append_str(char *here, String s) { int i = 0; while (*here++ = s[i]) { i++; }; return here - 1; } char *append_ul(char *here, unsigned long u) { char buf[20]; return append_str(here, ultoa(u, buf, 10)); } char post_rqst[256]; char *p; char *content_length_here; char *json_start; int compi; void setup() {
  • 12. Serial.begin(115200); WiFi.disconnect(); delay(5000); // event delay time Serial.println("start.."); WiFi.begin("sowmi", "teddy276"); //in this wifi user name & password are given while ((!(WiFi.status() == WL_CONNECTED))) { delay(600); } Serial.println("Connected to WIFI"); if (client.connect("maker.ifttt.com", 80)) { //port number for http MakerIFTTT_Key = "Z_CVq_k088t08f-4PhI3K"; //key value for IFTTT MakerIFTTT_Event = "email"; // event triggering name as email p = post_rqst; p = append_str(p, "POST /trigger/"); p = append_str(p, MakerIFTTT_Event); p = append_str(p, "/with/key/"); p = append_str(p, MakerIFTTT_Key); p = append_str(p, " HTTP/1.1rn"); p = append_str(p, "Host: maker.ifttt.comrn"); p = append_str(p, "Content-Type: application/jsonrn"); p = append_str(p, "Content-Length: ");
  • 13. content_length_here = p; p = append_str(p, "NNrn"); p = append_str(p, "rn"); json_start = p; p = append_str(p, "{"value1":""); p = append_str(p, "warning"); p = append_str(p, "","value2":""); p = append_str(p, "Alert"); p = append_str(p, "","value3":""); p = append_str(p, "Gas leakage in college kitchen"); p = append_str(p, ""}"); compi = strlen(json_start); content_length_here[0] = '0' + (compi / 10); content_length_here[1] = '0' + (compi % 10); client.print(post_rqst); } Serial.println("your email has been sent"); } void loop() { int Gas_pin;
  • 14. int Gas_state = digitalRead(Gas_pin); //gas pin digital values if (Gas_state == LOW){ if (client.connect("maker.ifttt.com", 80)) { //port number for http MakerIFTTT_Key = "Z_CVq_k088t08f-4PhI3K"; //key value for IFTTT MakerIFTTT_Event = "email"; // event triggering name as email p = post_rqst; p = append_str(p, "POST /trigger/"); p = append_str(p, MakerIFTTT_Event); p = append_str(p, "/with/key/"); p = append_str(p, MakerIFTTT_Key); p = append_str(p, " HTTP/1.1rn"); p = append_str(p, "Host: maker.ifttt.comrn"); p = append_str(p, "Content-Type: application/jsonrn"); p = append_str(p, "Content-Length: "); content_length_here = p; p = append_str(p, "NNrn"); p = append_str(p, "rn"); json_start = p; p = append_str(p, "{"value1":""); p = append_str(p, "Alert"); p = append_str(p, "","value2":"");
  • 15. p = append_str(p, "Message from college"); p = append_str(p, "","value3":""); p = append_str(p, "Gas leakage is detected"); p = append_str(p, ""}"); compi = strlen(json_start); content_length_here[0] = '0' + (compi / 10); content_length_here[1] = '0' + (compi % 10); client.print(post_rqst); } Serial.println("Your message send..............."); Serial.println("Gas leakage is detected"); delay(7000); //delay time } else{ Serial.println("No gas"); //else condition } }
  • 16. CHAPTER-5 SCREEN SHOT OF THE PROCEDURE:- Selecting the board type The board type must be selected from this option for the proper functioning of the NODEMCU circuit otherwise the circuit will shows a compilation error. Source coding compiling During compilation it will show the syntax/logical errors but run time errors cannot be displayed while compilation.
  • 17. Source coding uploading If there is no error in the coding we can upload the coding to the Arduino/NODEMCU board with help of USB cable. Source coding testing after uploading After uploading the coding in to the board we can test the program, whether it is working properly or not.
  • 18. CHAPTER-6 FUTURE ENHANCEMENTS  In the future days we are planning to modify this project by connecting this project to the main server from which we can send message/notifications to any one in any part of the world using the cloud computing technology and with IOT. Now we can send only mail to the chosen persons.  When LPG cylinder is empty the cylinder booking will done automatically using IOT technology. CHAPTER-7 CONCLUSION This project is microcontroller based. The Gas sensor is used to detect LPG gas leakages in the kitchen. The sensor can also sense methane gas leakage in cars or service stations, storage tank environment. The sensor has excellent sensitivity combined with a quick response system.