0% found this document useful (0 votes)
27 views34 pages

Gas Leakage Project Report (1) - 2

The dissertation report presents an IoT-based Gas Leakage Detection System utilizing an ESP32 microcontroller and MQ-5 gas sensor to monitor and alert users of gas leaks in real-time. The system features local alerts via buzzer and LED, remote notifications through a mobile app, email, and Telegram, along with automatic gas shut-off capabilities. This project aims to enhance safety in residential and industrial environments by providing a reliable, cost-effective, and scalable solution for gas leak detection and prevention.

Uploaded by

neha praveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views34 pages

Gas Leakage Project Report (1) - 2

The dissertation report presents an IoT-based Gas Leakage Detection System utilizing an ESP32 microcontroller and MQ-5 gas sensor to monitor and alert users of gas leaks in real-time. The system features local alerts via buzzer and LED, remote notifications through a mobile app, email, and Telegram, along with automatic gas shut-off capabilities. This project aims to enhance safety in residential and industrial environments by providing a reliable, cost-effective, and scalable solution for gas leak detection and prevention.

Uploaded by

neha praveen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

"Jnana Sangama", Belgavi-590 018, Karnataka, India

A DISSERTATION REPORT
on
IOT Based Gas Leakage Detection Using Arduino
Submitted in Partial Fulfillment of the requirement for the award of the degree of

BACHELOR OF ENGINEERING
IN
COMPUTER SCIENCE AND ENGINEERING

Submitted By
CHANDU S 1MV21CS024
NEELESH KUMAR SINGH 1MV21CS060
NEHA PRAVEEN 1MV21CS061
NIDHI HARISH K 1MV21CS063
Carried out at
Project Lab,
Department of CSE,
SIRMVIT

Under the guidance of


Mr. SURAJ KUMAR B.P.
Assistant Professor
Dept. Of CSE

SIR M VISVESVARAYA INSTITUTE OF TECHNOLOGY


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
BANGALORE-562157
2024-2025
SIR M VISVESVARAYA INSTITUTE OF TECHNOLOGY,
BANGALORE - 562157
Department of Computer Science and Engineering

CERTIFICATE

This is to certify that the project work entitled “Based Gas Leakage Detection Using
Arduino” is a bonafied work carried out by CHANDU S (1MV21CS024), NEELESH
KUMAR SINGH (1MV21CS060), NEHA PRAVEEN (1MV21CS061), NIDHI HARISH
K (1MV21CS063) in partial fulfillment for the award of Bachelor of Engineering in
Computer Science and Engineering of Visvesvaraya Technological University, Belagavi
during the year 2024-2025. It is certified that all corrections/suggestions indicated for internal
assessment have been incorporated in the report. The project report has been approved as it
satisfies the academic requirements with respect to project work prescribed for the Bachelor of
Engineering degree.

................................. ................................... ..................................


Signature of Guide Signature of HOD Signature of Principal
Suraj Kumar B.P. Dr. Anitha T.N. Dr. Rakesh S.G.
Assistant Professor Professor & HOD, Principal, SMVIT,
Dept. of CSE, SMVIT Dept. of CSE, SMVIT Bangalore

External Examiners: Signature with Date

Name of the examiners:

1.

2.
DECLARATION

We CHANDU S (1MV21CS024), NEELESH KUMAR SINGH (1MV21CS060), NEHA


PRAVEEN (1MV21CS061), NIDHI HARISH K (1MV21CS063)students of VIII semester
B.E in Computer Science and Engineering at Sir M Visvesvaraya Institute of Technology,
Bangalore, hereby declare that this dissertation work entitled “IOT Based Gas Leakage
Detection Using Arduino”has been carried out at Project Laboratory, Dept. of CSE, SIRMVIT
under the guidance of guide SURAJ KUMAR BP, Assistant Professor, Dept. of CSE, Sir M
Visvesvaraya Institute of Technology, Bangalore and submitted in the partial fulfilment for
the award of degree Bachelor of Engineering in Computer Science and Engineering of
Visvesvaraya Technological University, Belagavi during the academic year 2024-2025. We
further declare that the report had not been submitted to any other university for the award of
any other degree.

Place: Sir MVIT, Bangalore


Date: CHANDU S 1MV21CS024
NEELESH KUMAR SINGH 1MV21CS060
NEHA PRAVEEN 1MV21CS061
NIDHI HARISH K 1MV21CS063
CHAPTER 1 INTRODUCTION

CHAPTER - 1

INTRODUCTION

1.1 Overview

Gas leakage is one of the most common and dangerous hazards, particularly in residential,
industrial, and commercial environments. Undetected gas leaks can lead to catastrophic
accidents, including explosions and fires, resulting in loss of life, property damage, and
environmental harm. To mitigate such risks, early detection and prompt alert mechanisms are
crucial. In this project, we developed an IoT-based Gas Leakage Detection and Alert System
that leverages modern wireless technology to ensure real-time monitoring, instant alerts, and
active preventive measures. The system uses an MQ-5 gas sensor, capable of detecting gases
like LPG, methane, and natural gas with high sensitivity. Upon detecting a gas leak, the system
immediately activates a buzzer and LED for local alerts, displays real-time gas readings and
warning messages on an LCD screen, and automatically controls a servo motor to close the gas
valve for safety.
Simultaneously, the system updates the gas status on the Blynk IoT mobile application, sends
an email alert through SMTP integration, and triggers a Telegram Bot notification to the
registered user for multi-channel alerts. The core of the system is built around the ESP32
microcontroller, which provides integrated Wi-Fi capabilities for seamless cloud
communication without the need for external modules. By utilizing the Blynk cloud platform,
users can monitor the system's status remotely from anywhere, while the SMTP and Telegram
integrations ensure that critical alerts are received even if the mobile application is inactive.
This project emphasizes a cost-effective, reliable, and easily deployable solution for gas
leakage detection, offering not only real-time monitoring and instant multi-platform
notifications but also active safety interventions through automatic valve control. Overall, the
system enhances safety standards and offers a scalable foundation for future improvements
such as automatic ventilation, gas shut-off, and advanced analytics to further minimize risks
associated with gas leaks.

Dept of CSE, SMVIT 2024-2025 1


CHAPTER 2 LITERATURE SURVEY

CHAPTER – 2
LITERATURE SURVEY

Journal Title of the paper Methodology used Observations/Remarks


name with
year and
author’s
name
IEEE Xplore Smart Gas Leakage MQ-series gas sensors Achieved accurate early
(2022) Detection System integrated with Arduino and detection; highlighted need
V. Gaur et al. Using IoT and Arduino IoT platform for real-time gas for power optimization for
monitoring and alert continuous long-term
generation. deployment.
IEEE Access IoT-Based Gas Leakage Arduino Uno interfaced with Reliable alert delivery
(2021) Monitoring and MQ-6 gas sensor and GSM through GSM, but SMS
A. Sharma, R. Alerting System Module to send SMS alerts on delay noted in poor network
Kumar leakage detection. conditions.
IEEE Sensors Design and Arduino and MQ-135 gas Effective detection for
Journal (2020) Implementation of Gas sensor-based setup with GSM confined environments;
P. Patel, S. Rao Leak Detection System modem for sending alerts via GSM dependency found to
Using Arduino and text messages. be a minor limitation in
GSM remote areas.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 2 LITERATURE SURVEY

In the past three years, significant advancements have been made in gas leakage detection
systems using Arduino microcontrollers. The 2022 study by V. Gaur et al. introduced a system
utilizing MQ-series sensors with IoT integration via Arduino to enable real-time monitoring
and immediate cloud updates. It emphasized reliable early detection but noted the need for
energy-efficient design for long-term installations.
The 2021 paper by A. Sharma and R. Kumar proposed an Arduino Uno-based system interfaced
with an MQ-6 sensor and GSM Module. It successfully sent SMS alerts when gas leaks were
detected, ensuring real-time user notifications. However, minor delays were observed in SMS
delivery, especially under poor GSM network conditions.
In 2020, P. Patel and S. Rao developed another Arduino-based detection system using the MQ-
135 sensor and GSM modem for alert generation. Their approach proved efficient for confined
indoor spaces, though the system's performance was somewhat affected by GSM network
availability in rural or remote areas.
Overall, these studies collectively demonstrate that Arduino-based gas leakage detection
systems have become more affordable, reliable, and capable of providing timely notifications
through GSM and IoT channels. However, network dependency (either WiFi or GSM) and
power consumption remain challenges that need to be addressed for full-scale, real-world
deployment.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 4 SYSTEM ANALYSIS

CHAPTER – 3
SYSTEM REQUIREMENTS SPECIFICATION

3.1 System Requirements Specification


The Gas Leakage Detection and Alert System is designed to continuously monitor the
presence of combustible gases and promptly alert users through both local and remote
mechanisms. The system requires a microcontroller for sensor interfacing, local control,
and cloud communication. It uses a WiFi-enabled ESP32 module for real-time IoT
communication, a mobile application for monitoring, and SMTP and Telegram Bot
integrations for critical remote notifications. The system must be reliable, responsive, user-
friendly, and suitable for residential, commercial, and industrial settings.

3.2 Specific Requirement

3.2.1. Hardware Specification


• ESP32 Microcontroller (for sensor interfacing, control, and WiFi communication)
• MQ-5 Gas Sensor (for detecting combustible gases like LPG, methane, etc.)
• Buzzer (for local audible alerts)
• LED (for local visual alerts)
• Servo Motor (for automatic gas valve control)
• I2C LCD Display (for displaying real-time gas concentration and system status)
• Power Supply (suitable for stable ESP32 operation)
• Connecting Wires, Breadboard, or Custom PCB

Fig 3.1: Arduino Uno Microcontroller


Fig 3.2: ESP32

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 4 SYSTEM ANALYSIS

3.2.2. Software Specification


• Arduino IDE (for programming ESP32)
• Blynk IoT Platform (for mobile-based monitoring and control)
• C/C++ Language (for embedded system programming)
• Blynk Mobile Application (installed on Android/iOS devices)
• SMTP Mail Module (for sending automated email alerts)
• Telegram Bot API (for sending real-time Telegram notifications)
• Libraries:
o BlynkSimpleEsp32.h
o Wire.h
o LiquidCrystal_I2C.h
o WiFi.h
o ESP32Servo.h
o ESP_Mail_Client.h (for SMTP email sending)
o HTTPClient.h (for Telegram Bot API requests)

3.3 Functional Requirements


• The system must continuously monitor gas concentration levels.

• If gas levels exceed the safety threshold:

o A buzzer must sound an immediate audible alert.

o An LED must blink to visually indicate danger.

o The servo motor must actuate to perform a safety measure (e.g., close the gas
valve).

o Real-time gas readings must be displayed on the LCD.

o The ESP32 must send real-time gas level data to the Blynk app via WiFi.

o Users must receive instant alerts through the Blynk app.

o Users must automatically receive an email notification using the SMTP module.

o Users must automatically receive a Telegram message alert via a Telegram Bot.

o Users must have manual control through the Blynk app to reset alarms or operate
the valve manually.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 4 SYSTEM ANALYSIS

3.4 Non-Functional Requirements


• The system should operate reliably 24×7 with minimal downtime.

• It must have low latency for gas detection and alert generation (response time < 2
seconds).
The Blynk dashboard must be user-friendly and intuitive.

• Email and Telegram alerts must be delivered within 2–5 seconds after leak detection.

• The system should operate within typical indoor temperature and humidity ranges.

• The system should be energy-efficient, ensuring extended operation during limited


power supply scenarios.

3.5 Performance Requirement

• The gas sensor must detect gas concentrations as low as 200 ppm.
• The system must respond to gas detection within 1–2 seconds.
• WiFi communication reliability must be above 95%.
• The Blynk app must update gas readings at least once every 2–3 seconds.
• The servo motor must actuate within 2 seconds after detection trigger.
• System uptime should achieve 99% availability under normal operating conditions.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 4 SYSTEM ANALYSIS

CHAPTER – 4
SYSTEM ANALYSIS

4.1 Existing System

Traditional gas leakage detection systems are predominantly based on standalone circuits
involving gas sensors, buzzers, and indicator LEDs. These systems detect the presence of
combustible gases like LPG, methane, or natural gas and trigger a local alarm when
concentrations exceed a set threshold. Some advanced models integrate GSM modules to
send SMS alerts; however, they are expensive, energy-intensive, and offer limited
scalability for integration into smart homes or industrial IoT frameworks.
In most residential and industrial environments today, gas leakage detection remains a
reactive process, heavily dependent on manual checks and localized alarms. There is
minimal provision for remote monitoring, cloud connectivity, or automated safety
measures, making these systems less effective in mitigating fast-evolving hazards.

4.1.1 Limitations

• Local-Only Alerts: Warnings are confined to buzzers or LEDs, requiring physical


proximity for awareness.
• Lack of Remote Monitoring: No provision for users to check gas levels remotely.
• Limited Scalability: Difficult to expand monitoring to multiple locations or
integrate with modern IoT ecosystems.
• Higher Costs for GSM Modules: GSM-based SMS alert systems are costly, prone
to delays, and dependent on mobile network availability.
• No Automation: No mechanism for automatic safety actions like closing valves or
activating ventilation systems.
• Delayed Responses: Human intervention is necessary for system resets and
responses, increasing hazard risks.
• Inflexible User Interface: No smartphone app or web dashboard for user-friendly
interaction.
• High Maintenance Overheads: Regular manual maintenance and testing are
necessary to ensure functionality.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 4 SYSTEM ANALYSIS

4.2 Proposed System

The proposed IoT-based Gas Leakage Detection and Alert System addresses the
drawbacks of traditional methods by introducing real-time monitoring, multi-channel
alerting, and partial automation. Using the powerful ESP32 module with built-in WiFi
capabilities, the system integrates an MQ-5 gas sensor, a buzzer, LED indicators, an I2C
LCD display, and a servo motor for automatic gas valve control.
Upon detecting dangerous gas concentrations, the system initiates multiple layers of
response:
• It triggers immediate local alerts using a buzzer and LED.
• It updates real-time gas readings on the Blynk IoT platform accessible via
smartphones.
• It sends automated email alerts via SMTP servers, ensuring users are informed even
if they miss mobile notifications.
• It delivers instant Telegram bot notifications, ensuring redundancy and faster
awareness.
• It actuates a servo motor to perform automatic gas shut-off, adding a layer of
preventive safety.
This design ensures the system can be monitored and controlled remotely, provides
immediate warnings via multiple platforms, and automates critical safety actions, making
it suitable for homes, offices, factories, and commercial buildings.

4.2.1 Advantages
• Comprehensive Multi-Channel Notifications: Buzzer + LED + Mobile App (Blynk) +
Email (SMTP) + Telegram bot ensure no alert is missed.
• Automatic Preventive Actions: Servo motor acts to close gas valves automatically upon
gas leakage detection.
• Real-Time Cloud Monitoring: Users can track gas levels from anywhere via the Blynk
IoT app on Android or iOS devices.
• Cost-Effective and Scalable: Utilizes affordable ESP32 modules and free cloud services
like Blynk and Telegram, making it accessible and expandable.
• Low Latency Response: Alerts and automated actions occur within 2–5 seconds of leak
detection, critical for minimizing damage.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 4 SYSTEM ANALYSIS

• User Control and Flexibility: Remote reset and servo control through the app provide
users with full control even when not physically present.
• Energy Efficient: Optimized for low power consumption, allowing for continuous 24×7
operation even during power fluctuations.
• Compact and Portable: The system design is lightweight, compact, and easily
deployable across different sites.
• Highly Reliable Communication: WiFi and cloud platforms ensure high message
delivery success (>95%) with minimal downtime.
• Future Scalability: The system can be extended to include features like automatic
exhaust fan activation, gas meter logging, or AI-based leak prediction models.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 5 SYSTEM DESIGN

CHAPTER – 5
SYSTEM DESIGN

5.1 Project Modules

The project can be divided into the following key modules:


1. Gas Detection Module
• Uses the MQ5 gas sensor to continuously monitor gas concentration.
• Reads analog values and compares them to a predefined threshold.
• Core logic for determining a gas leak condition.
2. Alert & Notification Module
• Local Alerts:
o Activates a buzzer and LED when a gas leak is detected.
o Shows messages like “Safe” or “Gas Leak Detected” on the I2C LCD.
• Remote Alerts:
o Sends an email to a predefined recipient using ESP_Mail_Client.
o Sends a Telegram message using HTTP API.
o Prevents spamming by sending notifications only once per leak event.
3. Servo Control Module (Valve Automation)
• Controls a servo motor simulating a gas valve.
• Automatically closes the valve during a leak.
• Manually controlled via the Blynk IoT app toggle (V0).
4. IoT Communication Module (Blynk)
• Uses WiFi (ESP32) to connect to the Blynk cloud.
• Allows remote monitoring and manual valve control from a smartphone app.
• Can be extended to include graphs, alerts, and history.
5. Display Module (LCD)
• 16x2 I2C LCD displays real-time gas values.
• Shows status messages such as:
o “Gas: 432”
o “Safe” / “GAS LEAK DETECT”

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 5 SYSTEM DESIGN

5.2 System Architecture

The system architecture integrates sensors, actuators, and communication interfaces as follows:

Fig 5.1: System Architecture

System Workflow

1. Startup:
o ESP32 connects to WiFi
o Initializes LCD and Blynk
2. Monitoring:
o Constantly reads MQ5 gas sensor
o Displays gas levels on LCD
3. Leak Detected:
o If gas value > threshold:
▪ Buzzer and LED activate
▪ Servo closes gas valve (unless overridden)
▪ Email and Telegram alert sent (once)
4. Remote Control:
o User can open/close valve manually using Blynk app toggle
o Status updates shown live on LCD and Blynk

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 5 SYSTEM DESIGN

5.3 Control flow Diagram

Fig 5.2: Control flow diagram

System Workflow

1. Startup:
o ESP32 connects to WiFi
o Initializes LCD and Blynk
2. Monitoring:
o Constantly reads MQ5 gas sensor
o Displays gas levels on LCD
3. Leak Detected:
o If gas value > threshold:
▪ Buzzer and LED activate
▪ Servo closes gas valve (unless overridden)
▪ Email and Telegram alert sent (once)

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 5 SYSTEM DESIGN

4. Remote Control:
o User can open/close valve manually using Blynk app toggle
o Status updates shown live on LCD and Blynk

5.4 Data flow Diagram

Fig 5.3: Data flow diagram

5.4.1 Level 1: Context Level

At this top-level abstraction, the system is viewed as a single process block.

• Input: Gas concentration from the environment.


• Output: Audible alerts (buzzer), visual alerts (LED & LCD), and remote notifications
(Email/Telegram).
• The system monitors gas levels and triggers safety measures in case of leakage, alerting
users both locally and remotely.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 5 SYSTEM DESIGN

5.4.2 Level 2: Major Subsystems

This level identifies major hardware components and their interactions:

• MQ5 Gas Sensor measures gas concentration and sends analog signals to Arduino.
• Arduino:
o Processes sensor data.
o Activates Buzzer/LED when the threshold is crossed.
o Controls the Servo Motor to shut off the valve.
o Sends data to ESP32 for remote communication and display.
• ESP32:
o Receives gas data from Arduino.
o Displays the gas level on an I2C LCD.
o Sends alerts via Email/Telegram using internet connectivity.

5.4.3 Level 3: Component Functionality

Each hardware component has a specific function:

• MQ5 Sensor: Continuously reads gas levels.


• Arduino:
o Interprets gas levels.
o Takes actions like sounding the buzzer, lighting the LED, and triggering the
servo.
o Forwards readings to the ESP32.
• ESP32:
o Publishes alerts.
o Receives commands (e.g., from Blynk for valve control).
o Displays values on the LCD.
• Outputs:
o LCD: Shows "Safe" or "Gas Leak Detected" with gas value.
o Buzzer/LED: Indicate immediate danger.
o Email/Telegram: Provide remote notification to the user.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 5 SYSTEM DESIGN

5.4.4 Level 4: Data Flow Details

Detailed breakdown of data movement between components:

• Sensor → Arduino: Gas concentration (analog signal).


• Arduino → Buzzer/LED: HIGH/LOW signal based on threshold.
• Arduino → Servo: Control signal (open/close valve).
• Arduino → ESP32: Gas reading over serial.
• ESP32 → LCD: Formatted display data.
• ESP32 → Cloud:
o Email alert using SMTP when gas level is high.
o Telegram message using Bot API.
• ESP32 ← Blynk (V0): Remote servo toggle.

5.4.5 Level 5: Complete System Flow Summary

1. MQ5 detects a gas leak.


2. Arduino:
o Activates buzzer and LED.
o Closes the valve via servo.
o Sends gas reading to ESP32.
3. ESP32:
o Displays the gas level on the I2C LCD.
o Sends email and Telegram alerts.
o Receives remote servo control if Blynk app is used.
4. System loops continuously, monitoring and responding in real time.

5.5 Sequence Diagram

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 5 SYSTEM DESIGN

GAS
ARDUINO ESP32

Fig 5.4: Sequence diagram

• MQ5 Gas Sensor detects the level of gas concentration in the air.

• Arduino reads this value and compares it to a threshold.

• If gas level is above threshold, it:


o Activates the Buzzer and LED.
o Triggers the Servo Motor to close a valve.

• Arduino sends the gas level reading to the ESP32 via serial.

• ESP32:

• Displays the current gas level on the I2C LCD.


• If the level is high, sends alerts via Email and Telegram.

• The entire system loops to continuously monitor and act in real time.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 6 IMPLEMENTATION

CHAPTER – 6
IMPLEMENTATION

6.1 Concept

This project implements a real-time gas leakage detection system that uses an MQ5 gas sensor
to monitor the presence of gases like LPG. The sensor data is read by an Arduino, which
triggers alerts such as a buzzer and LED, and sends the gas values to an ESP32. The ESP32
then controls the servo motor (gas valve), updates an LCD display, and sends email and
Telegram alerts to users remotely via WiFi.

6.2 Algorithm
1. Start
2. Initialize all devices (MQ5 sensor, buzzer, LED, LCD, servo, WiFi)
3. Read gas sensor value
4. Check threshold:
o If value > threshold:
▪ Trigger buzzer and LED
▪ Turn servo to close valve
▪ Display “Gas Leak Detected”
▪ Send email & Telegram alerts (if not already sent)
o Else:
▪ Display “Safe”
▪ Keep alerts off
5. Allow manual override using Blynk toggle
6. Repeat loop every 500ms

6.3 Functional Modules

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 6 IMPLEMENTATION

6.3.1 Gas Sensing Module

• MQ5 sensor detects flammable gases and sends analog values to Arduino for
processing.

6.3.2 Alert Module

• Buzzer and LED give local audible and visual indication of danger.

6.3.3 Communication Module

• ESP32 handles WiFi communication and integrates with Blynk, email (SMTP), and
Telegram APIs for remote alerts.

6.3.4 Display Module

• I2C LCD shows current gas concentration and system status (Safe/Leak Detected).

6.3.5 Valve Control Module

• Servo motor controlled automatically or manually via Blynk app to open/close gas
valve.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 7 TESTING

CHAPTER – 7
TESTING

7.1 Methods of Testing

Several types of testing were performed to ensure the system functions correctly and reliably
in real-world scenarios.

7.1.1 Unit Testing

Each component was tested independently to confirm proper operation. The MQ5 sensor was
tested to output correct analog values, the buzzer and LED were tested for triggering, and the
servo was tested for movement.

7.1.2 System Testing

The entire system was tested in an integrated environment. Simulated gas leaks were used to
test sensor responses, alert triggering, LCD output, and remote communications.

7.1.3 Functional Testing

Each functionality, such as gas detection, buzzer activation, LED alert, servo valve closure,
LCD updates, and Telegram/email alerts, was individually tested under various gas levels to
verify expected responses.

7.1.4 Integration Testing

Testing was done to ensure seamless integration between the Arduino and ESP32.
Communication between local alert systems and cloud-based services was verified for
consistency and real-time performance.

7.1.5 User Acceptance Testing

End users (testers) interacted with the system using the Blynk app and observed its behavior in
simulated leak scenarios. Their feedback confirmed that the system was intuitive, reliable, and
acceptable for real deployment.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 7 TESTING

7.2 Test Cases

Normal Condition (No Leak)

• Input: Clean air or gas concentration below the threshold.


• Expected Output:
o LCD displays “Safe”.
o Buzzer and LED remain off.
o Servo motor remains in the open position.
o No email or Telegram alerts are sent.
o Blynk app shows normal status.
• Result: Confirms the system correctly identifies a non-hazardous condition and avoids
false alarms.

Leak Detected (Above Threshold)

• Input: Simulated gas leak or high concentration near the MQ5 sensor.
• Expected Output:
o LCD displays “Gas Leak Detected”.
o Buzzer and LED are activated for visual and audible alerts.
o Servo motor rotates to close the gas valve.
o ESP32 sends real-time email and Telegram notifications.
o Blynk app displays an active warning or alert status.
• Result: Ensures full functionality of the gas detection and safety response system.

Manual Override via Blynk App

• Input: User presses the toggle button in the Blynk app.


• Expected Output:
o Servo motor moves according to user input (e.g., open or close the valve).
o LCD updates accordingly (e.g., “Valve Closed Manually”).
o System continues to monitor gas levels and can still auto-respond to new leaks.
• Result: Confirms remote manual control is working and does not interfere with
automatic leak detection.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 7 TESTING

Internet Disconnection

• Input: Wi-Fi is turned off or ESP32 loses connection.


• Expected Output:
o ESP32 fails to send alerts via email or Telegram.
o LCD, buzzer, LED, and servo motor continue to function as expected.
o Blynk app becomes unresponsive.
• Result: Validates that the system maintains core safety operations even without internet
connectivity.

Servo Motor Failure or Disconnection

• Input: Servo is physically unplugged or not functioning.


• Expected Output:
o System detects leak and triggers buzzer/LED and sends alerts.
o LCD displays leak warning.
o Servo does not respond; valve remains in last position.
o A notification or log indicates valve action failed.
• Result: Confirms that the system detects and continues to respond to leaks even if some
hardware components fail.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 8 PERFORMANCE ANALYSIS

CHAPTER – 8
PERFORMANCE ANALYSIS

The gas leakage detection and alert system was tested under various environmental conditions
and scenarios to evaluate its performance. The following key aspects were analyzed:

• Response Time: The system exhibited an average response time of less than 2 seconds
from gas detection to alert activation. The MQ5 sensor rapidly sensed gas
concentrations and triggered alerts through the Arduino and ESP32 in near real-time.
• Accuracy: The system accurately differentiated between safe and unsafe gas levels. It
avoided false positives by setting an appropriate threshold value for detection, which
was calibrated based on the sensor's sensitivity.
• System Stability: During prolonged tests, the system showed stable performance
without crashing or overheating. The Wi-Fi reconnection feature in the ESP32 ensured
resilience against temporary internet outages.
• Communication Efficiency: Email and Telegram alerts were delivered within 3–5
seconds of leak detection, confirming that the ESP32’s communication module is
efficient for IoT-based alerts.
• Power Consumption: The system operated efficiently on standard 5V USB power.
Power usage remained within acceptable limits for continuous operation in a home or
industrial environment.
• User Interface: The I2C LCD provided clear visual feedback on system status. The
Blynk IoT app allowed remote control and monitoring, contributing to a user-friendly
experience.

Dept of CSE, SMVIT 2024-2025 2


CHAPTER 9 CONCLUSION

CHAPTER – 9
CONCLUSION AND FUTURE ENHANCEMENT

Conclusion

The implemented gas leakage detection system using an Arduino, MQ5 sensor, ESP32, and
I2C LCD successfully detects harmful gas concentrations and triggers an immediate response.
The integration of Blynk, email, and Telegram ensures prompt notifications to users, enhancing
safety in domestic and industrial environments.

The project fulfills its objective of providing an affordable, real-time, and reliable solution for
detecting gas leaks and minimizing hazards. The use of a servo motor to automatically shut off
a gas valve adds an extra layer of protection. Overall, the system demonstrates effectiveness in
early detection, alerting, and remote control features.

Future Enhancement

While the current system is functional and effective, several enhancements can be incorporated
in future iterations:

1. Battery Backup: Include a rechargeable battery module to maintain system operation


during power failures.
2. Cloud Data Logging: Store gas level readings over time on platforms like Firebase or
ThingSpeak for monitoring trends and generating reports.
3. Mobile App Customization: Develop a dedicated mobile application instead of relying
solely on Blynk, allowing more flexibility and branding.
4. Multi-Gas Detection: Integrate additional sensors (e.g., MQ2, MQ135) for detecting
various gases like CO, smoke, and alcohol.
5. Voice Alert System: Add a speaker module to provide voice alerts for visually
impaired users.
6. AI-Based Leak Prediction: Utilize machine learning models to predict leaks or
abnormal patterns before they reach critical levels.

Dept of CSE, SMVIT 2024-2025 2


APPENDIX

Appendix A: Screen Shots

Arduino IDE

Notifications
Output on serial monitor

Appendix B: Abbreviation

• MQ5 – Metal Oxide Semiconductor Gas Sensor (Model MQ-5)

• LED – Light Emitting Diode

• ESP32 – Espressif Systems Microcontroller with Wi-Fi and Bluetooth

• I2C – Inter-Integrated Circuit

• LCD – Liquid Crystal Display

• Wi-Fi – Wireless Fidelity

• IoT – Internet of Things

• USB – Universal Serial Bus

• SMS – Short Message Service

• Blynk – IoT Platform for Mobile and Web Applications

• VCC – Voltage Common Collector (Power Supply Voltage)

• GND – Ground (Reference Voltage)

• TX – Transmit Pin (for Serial Communication)


• RX – Receive Pin (for Serial Communication)

• API – Application Programming Interface

• URL – Uniform Resource Locator

• EEPROM – Electrically Erasable Programmable Read-Only Memory

• PWM – Pulse Width Modulation

• AI – Artificial Intelligence

• CO – Carbon Monoxide

• ppm – Parts Per Million (concentration unit)

• PCB – Printed Circuit Board

• USB – Universal Serial Bus

• SMTP – Simple Mail Transfer Protocol

• HTTP – HyperText Transfer Protocol


BIBLIOGRAPHY

Research Papers and Online Sources

1. Smart Gas Leakage Detection Using IoT


https://www.researchgate.net/publication/390161191_Smart_Gas_Leakage_Detection
_Using_IOT – March 2025
2. Gas Leakage Detection System using Arduino
https://www.researchgate.net/publication/389646933_Gas_Leakage_Detection_Syste
m_using_Arduino – March 2025
3. Intelligent Gas Detection and Alerting Using IoT
https://ieeexplore.ieee.org/document/10712453 – Oct 2024
4. IoT Based Intelligent Gas Leakage Detector using Arduino
https://www.researchgate.net/publication/383841994_IoT_Based_Intelligent_Gas_Le
akage_Detector_using_Arduino – Sept 2024
5. Smart Gas Leakage Detector Using Arduino Gas Sensor
https://www.researchgate.net/publication/380903163_Smart_Gas_Leakage_Detector_
Using_Arduino_Gas_Sensor – May 2024
6. IoT-based LPG Detection and Control System
https://ieeexplore.ieee.org/document/10174377 – Jul 2023
7. Smart Home Gas Monitoring System
https://ieeexplore.ieee.org/document/10134191 – Jun 2023
8. Gas Leakage Detection using IoT and AI
https://ieeexplore.ieee.org/document/10112899 – Mar 2023
9. Wireless IoT-Based Gas Monitoring System
https://www.sciencedirect.com/science/article/abs/pii/S2214785322070225 – 2023
10. A Gas Leakage Detector Using IoT
https://www.researchgate.net/publication/381537994_A_Gas_Leakage_Detector_Usi
ng_IoT – Aug 2023
11. IoT Based Intelligent Gas Leakage Detection System
https://www.researchgate.net/publication/360310296_IOT_BASED_INTELLIGENT
_GAS_LEAKAGE_DETECTION_SYSTEM – May 2022
12. A Gas Leakage Detector Using IoT
https://www.researchgate.net/publication/357747964_A_GAS_LEAKAGE_DETECT
OR_USING_IOT – Jan 2022
13. Smart Gas Monitoring System Using ESP32
https://ieeexplore.ieee.org/document/9441201 – Jun 2021
14. Smart Gas Leakage Monitoring with IoT
https://www.mdpi.com/2673-4591/2/1/28 – Nov 2020
15. Home Safety Using IoT for Gas Detection
https://ieeexplore.ieee.org/document/9398384 – Oct 2020
16. Gas Leakage Alert System with IoT Integration
https://ieeexplore.ieee.org/document/9182051 – Sept 2020
17. Low-Cost Gas Leak Detection via Wi-Fi
https://ieeexplore.ieee.org/document/9002433 – Feb 2020
18. Wireless Sensor Network for Gas Monitoring
https://ieeexplore.ieee.org/document/8822055 – Jun 2019
19. Design of Gas Detection System Based on IoT
https://www.researchgate.net/publication/332670370_Design_of_Gas_Detection_Syst
em_Based_on_Internet_of_Thing – Oct 2018
20. Gas Detection for Industrial Application
https://jtec.utem.edu.my/jtec/article/view/4432 – Jul 2018
21. Intelligent Gas Sensor Network Using Arduino
https://iopscience.iop.org/article/10.1088/1757-899X/384/1/012064/meta – 2018
22. PDF Version:
https://iopscience.iop.org/article/10.1088/1757-899X/384/1/012064/pdf – 2018
23. LPG Gas Leakage Monitoring and Alert System
https://www.researchgate.net/profile/Ayesha-Siddika-
12/publication/356580126_Licensed_Under_Creative_Commons_Attribution_CC_B
Y_LPG_Gas_Leakage_Monitoring_and_Alert_System_using_Arduino/links/61a1e1f
907be5f31b7ba88dc/Licensed-Under-Creative-Commons-Attribution-CC-BY-LPG-
Gas-Leakage-Monitoring-and-Alert-System-using-Arduino.pdf
PAPER PUBLICATION DETAILS

• Title of the Paper: IoT Based Gas Leakage Detector Using Arduino
• Authors: Neha Praveen, Chandu S, Nidhi Harish K, Neelesh Kumar Singh, Suraj
Kumar B.P.
• Journal Name: International Journal of Scientific Development and Research (IJSDR)
• ISSN: 2455-2631
• Volume & Issue: Volume 10, Issue 5
• Publication Month & Year: May 2025
• Impact Factor: 9.15 (as per Google Scholar)
• Indexing: Indexed in all major databases (e.g., Google Scholar, Academia.edu,
ResearchGate)
• Review Process: Peer-reviewed and refereed
• Publication Type: Open Access, Multidisciplinary

You might also like