Final Report
Final Report
TABLE OF CONTENT
Chapter No. Contents Page No.
1 Introduction 4
2 Literature Survey 7
3 Objectives 8
4 Methodology 9
5 Algorithm 12
6 Components 15
6.1 ESP8266
6.2 DHT11
6.2.1 Communication process
6.3 MQ-6 Gas Sensor
6.4 Servo motor
6.4.1 Servo mechanism
6.4.2 Working principle of servo motor
6.5 Relay
6.6 Exhaust Fan
6.7 Buzzer
6.8 Jumpire wire
7 Circuit Diagram 26
8 Code 27
9 Result 30
10 Applications 32
11 Future Scope 35
12 Conclusion 37
13 References 38
1
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
LIST OF FIGURES
2
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
LIST OF ABBREVIATIONS
3
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-1
1.) INTRODUCTION
A gas leak refers to a leak of natural gas or another gaseous product from a pipeline or
other containment into any area where the gas should not be present. Gas leaks can be
hazardous to health as well as the environment. Even a small leak into a building or other
confined space may gradually build up an explosive or lethal gas concentration. Natural gas
leaks and the escape of refrigerant gas into the atmosphere are especially harmful, because of
their global warming potential and ozone depletion potential.
Leaks of gases associated with industrial operations and equipment are also generally
known as fugitive emissions. Natural gas leaks from fossil fuel extraction and use are known
as fugitive gas emissions. Such unintended leaks should not be confused with similar
intentional types of gas release, such as:
• gas venting emissions which are controlled releases, and often practiced as a part of
routine operations, or
• "Emergency pressure releases" prevent equipment damage and safeguard life.
Gas leaks should also not be confused with "gas seepage" from the earth or oceans - either
natural or due to human activity.
The Bhopal disaster or Bhopal gas tragedy was a chemical accident on the night of 2–3
December 1984 at the Union Carbide India Limited (UCIL) pesticide plant in Bhopal, Madhya
Pradesh, India. In what is considered the world's worst industrial disaster, over 500,000 people
in the small towns around the plant were exposed to the highly toxic gas methyl
isocyanate (MIC). Estimates vary on the death toll, with the official number of immediate
deaths being 2,259. In 2008, the Government of Madhya Pradesh paid compensation to the
family members of 3,787 victims killed in the gas release, and to 574,366 injured victims. A
government affidavit in 2006 stated that the leak caused 558,125 injuries, including 38,478
temporary partial injuries and approximately 3,900 severely and permanently disabling
injuries. Others estimate that 8,000 died within two weeks, and another 8,000 or more have
since died from gas-related diseases.
4
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
5
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
6
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-2
LITERATURE SURVEY
The device which is used to detect the gas is already present the market which is widely
used in many places like industries where there is plenty of chances of the explosion which
may lead to massive destruction and the loss of man power; in homes, where the LPG gas used
most widely in our daily necessity where it can detect the leakage of LPG gas; in cars, where
most of the vehicles contains the cylinder and many more places.
7
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-3
OBJECTIVES
The primary objective of the LPG gas detection system using the listed
components is to enhance safety in environments where LPG (Liquefied Petroleum
Gas) is used. The specific objectives of the system are as follows:
1. Real-time LPG Gas Detection: To detect the presence of LPG gas in the
environment using the MQ-6 gas sensor. The system shouldbe able to identify even
low concentrations of gas, providing early detection to prevent accidents.
5. IoT-Based Monitoring and Control: Enable remote monitoring of the gas levels,
temperature, and system status through IoT integration. The ESP8266 Wi-Fi
module transmits real-time data to a cloud-based platform, whichcan be accessed
via mobile or web [Link] provide instant notifications (SMS, email, or app
alerts) to the user when the gas concentration exceeds a safe threshold, ensuring
prompt action can be taken even if the user is not physicallypresent.
8. Cost -Effective and Scalable Solution: To provide a low-cost, efficient solution for
domestic and industrial gas leak safety. The use ofArduino and affordable
components ensures the system is accessible, and the IoT implementation adds.
8
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-4
METHODOLOGY
The methodology of the Smart LPG Gas Level Monitoring and Leakage
Detection System using IoT involves the following steps:
9
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
Alert and notification : The system can send alerts and notifications to the user in
case of any gas leakage detected or when the gas level false below a certain
threshold. This insure timely action can be taken to avoid any mishaps.
Overall, the Smart LPG Gas Level Monitoring and Leakage Detection System using
IoT is a combination of hardware, software and cloud based technology that work.
11
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-5
ALGORITHM
GAS Level
Exhaust
Fan
Servo motor
Cut-off regulator
switch
12
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
This flowchart illustrates the process of a smart LPG gas level monitoring and leakage
detectionsystem using IoT.
1. Start
2. Initialization:
Declare variables, constants, and functions needed
for the [Link] the input/output pins for the
microcontroller.
Set up the timer and analog-to-digital converter (ADC) for the load cell.
Initialize the buzzer, LCD display, and establish a connection to the Blynk cloud
platform.
3. Read Voltage :
Measure the voltage from the load cell pins, which represents the weight of the gas
cylinder.
4. Gas level :
In an LPG gas detector project, "gas level" refers to the concentration of LPG
(Liquefied Petroleum Gas) in the air, typically measured in parts per million
(PPM) or percentage of the Lower Explosive Limit (LEL). The sensor detects
the gas level and triggers alerts or actions if the concentration reaches
dangerous levels.
13
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
7. Notification:
If a gas leak is detected or the gas level reaches a critical point (e.g., Level 1), a
notification is sent to the Blynk app and the service provider.
8. Exhaust fan :
An exhaust fan expels gas from a room and allows fresh air to enter when a gas
leak is detected.
9. Servo motor:
The system also includes a servo motor that turns on and assists the regulator
to disconnect, so thatit cuts off the gas supply when a gas leakage is detected.
14
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-6
6.) COMPONENTS:-
6.1) ESP8266
The ESP8266 is a low-cost Wi-Fi microcontroller, with built-in TCP/IP networking
software, and microcontroller capability.
The chip was popularized in the English-speaking maker community in August 2014
via the ESP-01 module, made by a third-party manufacturer Ai-Thinker. This small module
allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections
using Hayes-style commands. However, at first, there was almost no English-language
documentation on the chip and the commands it accepted. The very low price and the fact that
there were very few external components on the module, which suggested that it could
eventually be very inexpensive in volume, attracted many hackers to explore the module, the
chip, and the software on it, as well as to translate the Chinese documentation.
The ESP8285 is a similar chip with a built-in 1 MiB flash memory, allowing the design
of single-chip devices capable of connecting via Wi-Fi.
These microcontroller chips have been succeeded by the ESP32 family of devices.
Fig.4 ESP8266
15
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
6.2) DHT11
DHT11 Temperature & Humidity Sensor features a temperature & humidity sensor
complex with a calibrated digital signal output. By using the exclusive digital-signal-
acquisition technique and temperature & humidity sensing technology, it ensures high
reliability and excellent long-term stability. This sensor includes a resistive-type humidity
measurement component and an NTC temperature measurement component, and connects to
a high performance 8-bit microcontroller, offering excellent quality, fast response, anti-
interference ability and cost-effectiveness.
Each DHT11 element is strictly calibrated in the laboratory that is extremely accurate
on humidity calibration. The calibration coefficients are stored as programmes in the OTP
memory, which are used by the sensor’s internal signal detecting process. The single-wire serial
interface makes system integration quick and easy. Its small size, low power consumption and
up-to-20-meter signal transmission making it the best choice for various applications, including
those most demanding ones. The component is 4-pin single row pin package. It is convenient
to connect and special packages can be provided according to users’ request.
Fig.5 DHT11
TECHNICAL SPECIFICATION
16
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
COMMUNICATION PROCESS
When ESP8266 sends a start signal, DHT11 changes from the low-power-consumption
mode to the running-mode, waiting for ESP8266 completing the start signal. Once it is
completed, DHT11 sends a response signal of 40-bit data that include the relative humidity and
temperature information to ESP8266. Users can choose to collect (read) some data. Without
the start signal from ESP8266, DHT11 will not give the response signal to ESP8266. Once data
is collected, DHT11 will change to the low power-consumption mode until it receives a start
signal from ESP8266 again.
Data Single-bus free status is at high voltage level. When the communication between
ESP8266 and DHT11 begins, the program of ESP8266 will set Data Single-bus voltage level
from high to low and this process must take at least 18ms to ensure DHT’s detection of
ESP8266 signal, then ESP8266 will pull up voltage and wait 20-40us for DHT’s response.
Once DHT detects the start signal, it will send out a low-voltage-level response signal, which
lasts 80us. Then the programme of DHT sets Data Single-bus voltage level from low to high
and keeps it for 80us for DHT’s preparation for sending data. When DATA Single-Bus is at the
low voltage level, this means that DHT is sending the response signal.
Once DHT sent out the response signal, it pulls up voltage and keeps it for 80us and
prepares for data transmission. When DHT is sending data to ESP8266, every bit of data begins
with the 50us low-voltage-level and the length of the following high-voltage-level signal
determines whether data bit is "0" or "1".
Each MQ-6 sensor has a heating element and a sensing resistance. Depending on the
concentration of the gas, the sensing resistance gets changed and by detecting the changing
resistance, the gas concentration can be measured. To measure the gas concentration in PPM
all MQ-6 sensors provide a logarithmic graph which is very important.
19
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
system that regulates a device using a feedback signal. This signal is generated from the
differences between the output and a reference input.
When reference input signal or command signal is applied to the system, it is compared
with output reference signal of the system produced by output sensor, and a third signal
produced by a feedback system. This third signal acts as an input signal of controlled device.
The input signal continues to adjust the device as long as there is a discrepancy between the
reference input and the system’s output signal. After the device achieves its desired output,
there will be no longer the logical difference between reference input signal and reference
output signal of the system. Then, the third signal produced by comparing theses above said
signals will not remain enough to operate the device further and to produce a further output of
the system until the next reference input signal or command signal is applied to the system.
Hence, the primary task of a servomechanism is to maintain the output of a system at the desired
value in the presence of disturbances.
This is where the gear system inside a servomechanism comes into the picture. The gear
mechanism will take high input speed of the motor (fast) and at the output, we will get an output
speed which is slower than original input speed but more practical and widely applicable.
Initially, the servo motor shaft is positioned so that the potentiometer knob generates
no signal. This output from the potentiometer and an external signal are fed into an error
detector amplifier. The amplifier then boosts the difference between these signals to control the
motor.
This amplified error signal acts as the input power of the DC motor and the motor starts
rotating in desired direction. As the motor shaft progresses the potentiometer knob also rotates
as it is coupled with motor shaft with help of gear arrangement.
As the potentiometer knob turns, it generates a signal that increases with its rotation.
Once it reaches the desired position, this signal matches the external signal provided to the
amplifier, causing the motor to stop.
At this condition, there will be no output signal from the amplifier to the motor input
as there is no difference between external applied signal and the signal generated at
potentiometer. As the input signal to the motor is nil at that position, the motor stops rotating.
This is how a simple conceptual servo motor works.
21
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
6.5) RELAY
A Relay is a simple electromechanical switch. While we use normal switches to close
or open a circuit manually, a Relay is also a switch that connects or disconnects two circuits.
But instead of a manual operation, a relay uses an electrical signal to control an electromagnet,
which in turn connects or disconnects another circuit.
Fig.11 Relay
The fans use electricity to operate. Some exhaust fans are installed with sensors that
detect steam or humidity and automatically turn on. At the same time, others are fitted with a
thermostat that senses the temperature changes and then operates accordingly.
Exhaust fans operate by utilizing a power source to activate the motor. As the motor
starts, it initiates the rotation of the fan blades, which then creates airflow in a specific direction.
This airflow effectively creates a negative pressure within the area, drawing out stale air and
unpleasant odors.
The expelled air is typically guided through ductwork or vented directly outside.
Exhaust fans are commonly used in various settings such as bathrooms, kitchens, and industrial
spaces, where proper ventilation is essential to maintain air quality. By removing excess
moisture and odors, exhaust fans help in preventing the growth of mold, improving indoor air
circulation, and cooling down hot areas without relying solely on air conditioning systems.
23
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
6.7) BUZZER
A buzzer, also known as an audio alarm, is an electronic device that produces sound. In
the context of the LPG gas leakage detector, it is used as an alarm, to alert the user of the
presence of LPG gas leaks. The buzzer used in this project is a small round 2 pin buzzer, which
is an electronic device that produces sound. It is connected to the ESP8266 to receive a signal
from the MQ6 gas sensor. When the gas sensor detects an LPG gas leak, it sends a signal to the
ESP8266 which then triggers the buzzer to produce a loud sound as an alarm. The loud sound
produced by the buzzer ensures that the user is alerted even in noisy environments.
Additionally, small round 2 pin buzzers are also resistant to vibration, shock and humidity,
making them a durable and reliable sound producing option for gas leakage detection systems.
CHAPTER-7
CIRCUIT DIAGRAM
26
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-8
8.) CODE
This LPG gas detection system using the ESP8266 microcontroller is designed to monitor
environmental conditions by detecting the presence of LPG gas and measuring temperature
and humidity. The system utilizes an MQ-6 gas sensor, a DHT11 temperature and humidity
sensor, a buzzer for alerts, and an exhaust fan that can be activated to ventilate the area when
dangerous gas levels are detected. Additionally, the system uses WiFi connectivity to connect
to the Blynk platform, allowing users to remotely monitor these conditions and receive real-
time updates and [Link], this gas detection system combines multiple layers of safety
through real-time monitoring, local and remote alerts, and automated exhaust control. It is a
simple yet effective setup for protecting indoor environments from the risks of LPG leaks and
provides users with peace of mind through continuous monitoring and instant notifications.
27
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
28
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
o This function requires the Arduino to be connected to the internet and the Blynk
cloud. Once triggered, the Blynk cloud forwards the notification to the
associated mobile device running the Blynk app.
2. Notification Mechanism:
o The Blynk app is connected to the Blynk cloud and listens for incoming
notifications. When the Arduino sends a notification, the Blynk cloud forwards
it to the app.
o The Blynk app will then push this notification to the user’s phone, even if the
app is not actively open, provided the phone has an internet connection and push
notifications are enabled.
3. Phone Number for Notifications:
o Blynk does not directly use a phone number for notifications. Instead, it uses
the push notification service provided by the mobile operating system (iOS or
Android).
o The phone receives notifications as app alerts through the notification center,
based on the phone’s settings for the Blynk app (if the app is allowed to send
push notifications).
o If you want to receive a notification directly on your phone without using the
Blynk app, you would need to use a service like Twilio or IFTTT, which can
send SMS alerts to a specific phone number. This would require additional
integration.
29
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-9
RESULT
Results of LPG Gas Detection Using ESP8266, MQ-6 Gas Sensor, Exhaust Fan, Servo
Motor, DHT11 Temperature Sensor, and IoT Implementation
The LPG gas detection system built using the mentioned components produces the following
results:
1. Gas Detection Response:
The MQ-6 gas sensor successfully detects the presence of LPG gas. When LPG gas
concentrations exceed the predefined threshold, the sensor triggers the detection system.
The system responds by activating the exhaust fan and servo motor (if applicable), helping to
mitigate the risk by venting the gas or closing the gas valve.
2. Tempreature Monitoring:
The DHT11 temperature sensor monitors the environmental temperature. It helps in ensuring
that excessive heat buildup is detected, which can be indicative of a fire or other hazardous
condition related to the gas leak.
3. Real-Time Notifications:
The ESP8266 Wi-Fi module ensures that the data from the gas sensor, temperature sensor,
and system status are transmitted to a cloud platform (IoT-based).
When gas levels exceed the safety threshold, an alert (such as email, SMS, or mobile app
notification) is sent to the user, notifying them of the potential hazard.
This provides remote monitoring capabilities, enabling users to stay informed regardless of
their location.
4. Actutator Response:
The exhaust fan is activated upon detection of gas leaks to ventilate the area and reduce the
risks associated with gas accumulation.
The servo motor can be programmed to perform tasks such as closing the gas valve to stop
further leakage or other safety mechanisms in place.
30
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
5. System Performance:
The system was tested under different environmental conditions to ensure its robustness. The
gas sensor showed consistent results when exposed to various concentrations of LPG gas, with
accurate triggering of alerts and actuator responses.
The temperature sensor (DHT11) successfully detected temperature fluctuations in the
environment, providing additional context to the gas levels.
31
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-10
APPLICATION
The LPG gas detection system with the mentioned components offers several
practical applications across various domains, particularly in enhancing safety and
monitoring in environments where LPG is used. Below are the key applications of
this system:
1. Home Safety:
Domestic Kitchens: This system can be used in homes, especially in kitchens,
where LPG is commonly used for cooking. It can detect gas leaks, activate an
exhaust fan to ventilate the area, and send alerts to homeowners' smartphones or
other devices in case of an emergency.
Gas Leak Detection: In the event of a gas leak, the system can trigger automatic
safety responses(such as turning off the gas supply via a servo motor) to prevent
accidents, including fires orexplosions.
owners of large facilities who may not be present on-site atall times.
Smart Home Integration: In a smart home ecosystem, this system can be integrated
with other IoT devices (e.g., smart locks, security cameras) to enhance overall
safety and automation. The user can receive real-time notifications about gas leaks
or abnormal temperature conditions.
5. Hospitality Sector:
Restaurants and Hotels: In restaurants or hotels where LPG is commonly
used for cooking, thesystem can ensure a safe working environment by detecting
gas leaks and triggering automatic safety measures, including fan activation and
gas shutoff. This reduces the risk of fire or poisoning.
6. Agricultural Use:
Greenhouses: In some agricultural applications, LPG may be used for heating
greenhouses or other agricultural environments. The detection system can help
ensure safety in these settings by monitoring for gas leaks and environmental
conditions.
33
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
8. Energy Conservation:
Energy Efficiency in Ventilation: By automatically turning on the exhaust fan only
when necessary (when gas concentration reaches a critical level), the system ensures
that energy is used efficiently, preventing unnecessary power consumption.
34
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-12
FUTURE SCOPE
The future scope of an LPG (Liquefied Petroleum Gas) gas detection project using
components like Arduino Uno, ESP8266 Wi-Fi module, MQ-6 gas sensor, DHT11
temperature sensor, exhaust fan, servo motor, and IoT implementation has several
promising possibilities. As technology continues to evolve, such projects can be
enhanced and applied in various industries and homes for safety and automation
purposes. Here are some potential directions for this project:
35
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
36
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-13
CONCLUSION
The LPG gas detection system built with components such as ESP8266,
MQ-6 gas sensor, exhaust fan, servo motor, and DHT11 temperature sensor
effectivelymonitors and manages the presence of gas leaks in real-time. The
system functions as follows:
1. Gas Leak Detection:
The MQ-6 gas sensor detects the presence of LPG gas. When a gas leak is
detected, the system is designed to send alerts via the ESP8266 to a remote
monitoring platform,ensuring quick response actions.
2. Safety Response:
In response to a detected gas leak, the exhaust fan is activated to ventilate
the area and minimize the risks associated with gas accumulation.
Additionally, a servo motor can be usedto close a gas valve or take other
safety measures.
4. IoT Integration:
The IoT implementation via the ESP8266 Wi-Fi module allows for
remote monitoring. Thedata from the gas sensor and temperature readings
can be accessed via a mobile or web app, ensuring the user is always
informed about the status of the system.
5. Real-Time Alerts:
The system can send notifications (such as emails or SMS) in case of high
gas levels or any system malfunction. This ensures that the system can
trigger immediate action even when the user is not on-site.
5. Overall Conclusion:
The integration of various sensors, actuators, and IoT capabilities in
this LPG gas detection system enhances safety by providing real-time.
37
DEPT. OF ELECTRONICS AND COMM. REC,REWA
LPG GAS DETECTION SYSTEM SESSION 2024-2025
CHAPTER-14
REFERENCES
38
DEPT. OF ELECTRONICS AND COMM. REC,REWA