0% found this document useful (0 votes)
48 views53 pages

Mini Project

The document is a report on a mini-project titled 'Automatic Washing Machine Using Verilog HDL' submitted by students of Visvesvaraya Technological University for their Bachelor of Engineering degree in Electronics & Communication. It outlines the project's objectives, methodology, and the implementation of a control system for an automatic washing machine using Verilog HDL and a Finite State Machine model. The report also includes acknowledgments, a literature survey, and a detailed description of the project's components and functionalities.

Uploaded by

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

Mini Project

The document is a report on a mini-project titled 'Automatic Washing Machine Using Verilog HDL' submitted by students of Visvesvaraya Technological University for their Bachelor of Engineering degree in Electronics & Communication. It outlines the project's objectives, methodology, and the implementation of a control system for an automatic washing machine using Verilog HDL and a Finite State Machine model. The report also includes acknowledgments, a literature survey, and a detailed description of the project's components and functionalities.

Uploaded by

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

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI-590 018

A REPORT ON MINI-PROJECT WORK

AUTOMATIC WASHING MACHINE USING VERILOG HDL


Submitted in the partial fulfillment of the requirements for the award of the degree of

BACHELOR OF ENGINEERING
in
ELECTRONICS & COMMUNICATION
Mini Project Associates

SAI PRATHAM K H 4BD22EC074


SAMARTH P WALI 4BD22EC076
SANGEETHA H K 4BD21EC078
SANKALP KAMATE 4BD21EC080

Mrs. SWETHA B
M.Tech.
Mini Project Guide

Dr. G. S. SUNITHA Dr. H.B. ARAVIND


MTech. (DEAC), Ph.D., MISTE, FIETE, FIE. M.E. (Env. Eng.), Ph.D., FIE, MISTE, FIEE.
Program Coordinator Principal

Bapuji Educational Association®


Bapuji Institute of Engineering and Technology
Davangere-577 004
Department of Electronics & Communication Engineering
2024-2025
Bapuji Educational Association®
BAPUJI INSTITUTE OF ENGINEERING AND
TECHNOLOGY DAVANGERE, KARNATAKA –
577004

DEPARTMENT OF ELECTRONICS & COMMUNICATION


ENGINEERING

Certificate
Certified that the Mini-Project work entitled “AUTOMATIC WASHING MACHINE USING
VERILOG HDL” carried out by, Mr. SAI PRATHAM K H. USN 4BD22EC074, Mr.
SAMARTH P WALI. USN 4BD22EC076, Ms. SANGEETHA H K. USN 4BD22EC078, Mr.
SANKALP KAMATE. USN 4BD22EC080, bonafide students of this institution in partial
fulfillment for the award of degree of Bachelor of Engineering in Electronics &
Communication by Visvesvaraya Technological University, Belagavi during the academic year
2024-25. It is certified that all corrections / suggestions indicated for continuous internal
evaluation have been incorporated in the report.

Mrs. SWETHA B
M.Tech.

Mini-Project Guide

Dr. G.S. Sunitha Dr. H.B. Aravind


MTech. (DEAC), Ph.D., MISTE, FIETE., FIE M.E., (Env. Eng.) Ph.D., FIE., MISTE., FIEE.
Program Coordinator Principal

Internal Evaluation Name Signature with Date

1. Project Guide Mrs. Swetha B ………………………..


2. Faculty Member Mrs. Suma K G .………………………..
3. Program Coordinator Dr. G. S. Sunitha ………………………...
VISION OF THE INSTITUTE
To be a center of excellence recognized nationally and internationally, in distinctive areas of
engineering education and research, based on a culture of innovation and excellence.
MISSION OF THE INSTITUTE
BIET contributes to the growth and development of its students by imparting a broad-based engineering
education and empowering them to be successful in their chosen field by inculcating in them positive
approach, leadership qualities and ethical values.
VISION OF THE DEPARTMENT
To be in the forefront in providing quality technical education and research in Electronics &
Communication Engineering to produce skilled professionals to cater to the challenges of the society.
MISSION OF THE DEPARTMENT
M1. To facilitate the students with profound technical knowledge through effective teaching learning
process for a successful career.
M2. To impart quality education to strengthen students to meet the industry standards and face
confidently the challenges in the program.
M3. To develop the essence of innovation and research among students and faculty by providing
infrastructure and a conducive environment.
M4. To inculcate the student community with ethical values, communication skills, leadership qualities,
entrepreneurial skills and lifelong learning to meet the societal needs.
MINI PROJECT WORK (21ECMP67)

Course Learning Objectives:


This course will enable us to:
 Understand and analyze an engineering problem.
 Acquire technical knowledge and collect the information.
 Enhance communication, technical presentation and report preparation skills.
 Provide an opportunity to exercise the creative and innovative ideas in group.
ABSTRACT

This mini project proposes to demonstrate the capabilities and scope of Verilog HDL by implementing the
control system of an automatic washing machine. This mini project accomplishes the above mentioned
objective by implementing the Control System of an automatic washing using the Finite State Machine
model. The Control System generates the control signals to control the overall operation of the washing
machine.
ACKNOWLEDGEMENTS
We would like to acknowledge the help and encouragement given by various people during the
course of this Mini project.
We are deeply indebted and very grateful to the invaluable guidance given by project guide
Mrs. SWETHA B, Assistant professor during this Mini-Project work.
We would like to thank Mini-Project coordinator Suma K G, Professor for the kind
co-ordination during the course of the work.
We would like to express our sincere gratitude to Dr. G S Sunitha, Professor and Head,
Department of Electronics & Communication Engineering, BIET, Davangere, for her kind support,
guidance and encouragement throughout the course of this work.
We are thankful to our beloved principal Dr. H B Aravind for providing excellent academic
climate.
We would like to thank all the teaching and non-teaching staff of Dept. of E&CE for their kind
co-operation during the course of the work. The support provided by the college and departmental
library is greatly acknowledged.
Finally, we are thankful to our parents and friends, who helped us in one way or the other
throughout our project work.

Project Associates:
Sai Pratham K H
Samarth P Wali
Sangeetha H K
Sankalp Kamate
TABLE OF CONTENTS
Acknowledgements
Abstract
Table of contents
List of Figures
1. CHAPTER 1: INTRODUCTION
2. CHAPTER 2: LITERATURE SURVEY
3. CHAPTER 3: OBJECTIVES
4. CHAPTER 4: METHODOLOGY
4.1. BLOCK DIAGRAM
5. CHAPTER 5: HARDWARE DESCRIPTION
5.1. CPLD KIT
6. CHAPTER 6: SOFTWARE DESCRIPTION
6.1. XILINX ISE(CHECK ITS VERSION)
7. CHAPTER 7: RESULT AND DESCRIPTION
8. CHAPTER 8: APPLICATIONS
9. CHAPTER 9: ADVANTAGES
LIMITATIONS
CONCLUSIONS
FUTURE SCOPE
REFERENCE
APPENDIX-A: CODE
COURSE OUTCOMES
CONTACT DETAILS
LIST OF FIGURES
Fig 4.1.1: Block Diagram…...................................................................................6

Fig 5.1.1: ESP32.....................................................................................................9

Fig 5.2.1: MQ-2 gas sensor….................................................................................11

Fig 5.3.1: Buzzer .....................................................................................................12

Fig 5.4.1: LED…..................................................................................................13

Fig 5.5.1: Servo Motor…......................................................................................14

Fig 5.6.1Exhaust Fan............................................................................................14

Fig 5.7.1: Relay Module…....................................................................................15

Fig 5.8.1:Battery...................................................................................................16

Fig 5.9.1: Schematic Diagram…..........................................................................17

Fig 6.1.1 Arduino IDE….......................................................................................18


Automatic Washing Machine Using Verilog HDL

CHAPTER 1
INTRODUCTION
A washing machine automates the cleaning of clothes through stages like filling, washing, rinsing,
and spinning.
Using Verilog HDL (Hardware Description Language), we can design a digital control unit for this
process, implementing it as a Finite State Machine (FSM).
Verilog allows us to create timers and counters to control the duration of each stage, as well as
interface with sensors and actuators to manage water levels, spin cycles, and other operations.

Dept. of E&CE, BIET, Davangere Page 1


Automatic Washing Machine Using Verilog HDL

CHAPTER 2
LITERATURE SURVEY
Paper 1: Gas leakage detector using Arduino
Author: Chetan B V, Gururaj E Yadav

Year of Publication:2023
Technology used: “Gas Leakage Detector with SMS Alert using ARDUNIO and GSM module”,
will be a great help in terms of preventing any danger caused by gas leakage. The purpose of this
project is to detect the presence of Gas leakage in the homes and working places. Apart from sound
alarm and SMS alert it will call the owner. which is used in case of the nobody is present when the
leakage occurs and to prevent accidents and property damage. In this gas detector system it senses
the gas leakage. If the gas in air is normal then the LED on the circuit will glow green giving a safe
sign and whenever sensor senses the gas then the red led glow i.e., green goes off, sends a message
and make a phone call to the owner and power goes off.
Keywords: Arduino UNO, MQ2 Gas Sensor, GSM
Citations:10

Paper 2: Gas Detection Using ESP32 and Fire Alarm


Author:M Abdullah Khan
Year of Publication: 2023
Technology used: The project scope encompasses the design, development, and implementation of
a gas detection and fire alarm system. The system employs ESP32 microcontroller along with MQ-
2, MQ 3, and MQ-135 gas sensors, as well as a fire sensor and a buzzer for alarm notification.
The gas detection and fire alarm system consist of sensor modules, an ESP32 microcontroller, and
an alarm mechanism. Gas sensors monitor the air for various harmful gases, while the fire sensor
detects temperature changes associated with fire. The ESP32 processes data from the sensors and
triggers the alarm if dangerous levels are detected.
Keywords: ESP 32, MQ sensors, alarm
Citations:3

Dept. of E&CE, BIET, Davangere Page 2


Automatic Washing Machine Using Verilog HDL

Paper 3: LPG gas leakage detection using ESP32


Author: OM Ghodke, Swapnil Kadam, Chaitanya Jhoshi, Shrinivas Shitole, Pandhare N.V.
Year of Publication:2024
Technology used: Existing methods for LPG gas detection encompass a range of technologies.
Commercially available gas detectors utilize electrochemical sensors that trigger audible alarms
upon detecting LPG leaks. These systems are readily available and offer a basic level of safety.
However, their limitations include fixed locations, potential for false alarms due to sensitivity to
other gases, and the requirement for manual intervention upon alarm activation. Microcontroller-
based systems can be developed to interface with these sensors, acquire data, and trigger alarms or
notifications based on pre-defined thresholds.
Keywords: Electrochemical sensors, Detecting, Microcontroller.
Citations:6

Dept. of E&CE, BIET, Davangere Page 3


Automatic Washing Machine Using Verilog HDL

SUMMARY OF LITERATURE SURVEY

Paper Authors Title of Paper Remarks Technology Used

1) S. Lakshmi Gas leakage Arduino detects the gas Arduino,


Lavanya , M. detector using leakages with an alert and a GSM module,
Devi vara Arduino. make a phone call to the owner SMS alert,
prasad ,A. incase nobody is present. MQ-2.
Sravya,
Manjunatha R.
2) M Abdullah Gas Detection The integration of ESP32, gas ESP32microcontroller
Khan. Using ESP32 sensors, and a fire sensor forms MQ-2, MQ 3, and
and Fire Alarm. a cohesive system which MQ-135 gas sensors,
enhances safety measures and Fire sensor,Email
environmental awareness. notification.

3)OM LPG gas This research presents a Electrochemical


Ghodke, leakage approach to LPG gas detection sensors, ESP 32
Swapnil detection using using the ESP32 microcontroller,
Kadam, ESP32. microcontroller with email Email notification
Chaitanya notification capabilities functionalities.
Jhoshi,
Shrinivas
Shitole
Pandhare
N.V.

Dept. of E&CE, BIET, Davangere Page 4


Automatic Washing Machine Using Verilog HDL

CHAPTER 3
OBJECTIVES

 To Create an efficient, fully automated sequence of operations (fill, wash, rinse, and spin) for the washing
machine, minimizing user intervention.

 To Implement a robust FSM to handle transitions between different stages of the wash cycle based on

sensor inputs and control logic.

 To Use timers in Verilog to precisely control the duration of each stage, ensuring optimal cleaning and
energy efficiency.

 Allow for digital simulation and testing in Verilog, enabling verification and debugging of the washing
machine’s behavior before physical implementation.

Dept. of E&CE, BIET, Davangere Page 5


Automatic Washing Machine Using Verilog HDL

CHAPTER 4
METHODOLOGY

4.1 BLOCK DIAGRAM

Figure 4.1.1 Block Diagram

4.1.1 BLOCK DIAGRAM DESCRIPTION:


This block diagram represents the state machine for a washing machine process. Each state is
denoted by a blue circle, with transitions between states described based on conditions or actions
 CHECK DOOR (Initial State)
 Condition: If the machine has not started or the door is not closed, it remains in this state.
 Transition:
o When the machine starts and the door is closed → Transition to FILL WATER.

 MQ-2 GAS SENSOR: The MQ-2 is a smoke and combustible gas sensor from Winsen. It can
detect flammable gas in a range of 300 - 10000ppm. It's most common use is domestic gas leakage
alarms and detectors with a high sensitivity to propane and smoke.
 LED: The LED blinks as a visual indicator of the leak.
 BUZZER: A buzzer or beeper is an audio signaling device. It beeps when there is leak.
 SERVO MOTOR: A servo motor is an electrical device which can push or rotate an object with
great precision. If you want to rotate and object at some specific angles or distance, then you use
servo motor. It is just made up of simple motor which run through servo mechanism. The servo

Dept. of E&CE, BIET, Davangere Page 6


Automatic Washing Machine Using Verilog HDL

motor rotates by 90 degree, simulating the turning off of the gas cylinder valve to prevent further
leakage. After this, the system remains in a “safe” mode until the gas level drops below the
threshold.
 EXHAUST FAN: The exhaust fan is given a power supply of 12 volts which turns on when the gas
is detected.
 BATTERY: This would be the primary supply for the system which will provide power to the
exhaust fan for its operation. The source supply is limited to 12V max as the system doesn’t require
much power during its operation.

Dept. of E&CE, BIET, Davangere Page 7


LPG gas leakage detection using ESP32

4.2 FLOW CHART

ESP32 ESP32

Turns off red


led,fan &
buzzer

Figure 4.2.1 Flow chart

Dept. of E&CE, BIET, Davangere Page 8


LPG gas leakage detection using ESP32

CHAPTER 5
HARDWARE DESCRIPTION

5.1 ESP32:

Figure 5.1.1 ESP32

 ESP32 is a powerful, generic Wi-Fi module that targets a wide variety of applications, ranging from
low-power sensor networks to the most demanding tasks, such as voice encoding, music streaming
and MP3 decoding.
 The integration of Bluetooth, Bluetooth LE and Wi-Fi ensures that a wide range of applications can
be targeted, and that the module is all-around: using Wi-Fi allows a large physical range and direct
connection to the Internet through a Wi-Fi router, while using Bluetooth allows the user to
conveniently connect to the phone or broadcast low energy beacons for its detection.

Core Functionality:

 Microcontroller Unit (MCU): It incorporates a dual-core Xtensa® 32-bit LX6 microprocessor.


These cores can be individually controlled or powered off for optimized performance depending on
the application's needs. The clock frequency is adjustable from 80 MHz to 240 MHz, allowing for
flexibility in processing power.
Dept. of E&CE, BIET, Davangere Page 9
LPG gas leakage detection using ESP32

 Wireless Connectivity:

Wi-Fi: Supports Wi-Fi protocols like 802.11 b/g/n, enabling connection to local Wi-Fi networks for
internet access or data transfer.

o Bluetooth: Offers classic Bluetooth capabilities for legacy device connections, supporting profiles
like L2CAP, SDP, GAP, SMP, and more.
o Bluetooth Low Energy (BLE): Supports BLE for connecting to low-power devices like
smartphones and wearables. This technology is ideal for battery-powered applications as it
consumes less energy compared to classic Bluetooth.

Additional Features:

 Integrated Onboard Memory: The ESP32 WROOM module typically includes built-in flash
memory, allowing for program and data storage.
 Rich Peripheral Set: It offers a variety of peripherals like GPIO pins, ADC (Analog-to-Digital
Converter), SPI (Serial Peripheral Interface), I2C (Inter-Integrated Circuit), and more. These
features enable interaction with various sensors, displays, and other external components.
 Low Power Consumption: Designed with power efficiency in mind, the ESP32 WROOM module
can operate in different power modes, allowing developers to optimize battery life for specific
applications.
 Compact Size: The module is relatively small and lightweight, making it suitable for integration
into space-constrained projects.

Applications:

The ESP32 WROOM module's versatility makes it ideal for various IoT (Internet of Things)
applications, including:

 Wearable electronics: Smartwatches, fitness trackers, health monitoring devices.


 Smart home devices: Thermostats, light switches, security systems.
 Industrial automation: Sensor data collection, control systems, monitoring equipment.
 Robotics: Wireless control, data transmission.

Dept. of E&CE, BIET, Davangere Page


10
LPG gas leakage detection using ESP32

 Wireless communication projects: Data logging, remote control systems.

5.2 MQ-2 GAS SENSOR

Figure 5.2.1 MQ-2 GAS SENSOR

The MQ2 sensor is one of the most widely used in the MQ sensor series. It is a MOS (Metal Oxide
Semiconductor) sensor. Metal oxide sensors are also known as Chemiresistors because sensing is
based on the change in resistance of the sensing material when exposed to gasses. The MQ2 is a
heater-driven sensor. It is therefore covered with two layers of fine stainless steel mesh known as an
“anti-explosion network”. It ensures that the heater element inside the sensor does not cause an
explosion because we are sensing flammable gasses.

Specifications

1.Operating voltage 5V

2.Load resistance 20 KΩ

3.Heater resistance 33Ω ± 5%

4.Heating consumption <800mw

5.Sensing Resistance 10 KΩ – 60 KΩ

6.Concentration Range 200 – 10000ppm

Dept. of E&CE, BIET, Davangere Page


11
LPG gas leakage detection using ESP32

7.Preheat Time Over 24 hour

5.3 BUZZER

Figure 5.3.1 BUZZER

An audio signaling device like a beeper or buzzer may be electromechanical or piezoelectric or mechanical type.
The main function of this is to convert the signal from audio to sound. Generally, it is powered through DC
voltage and used in timers, alarm devices, printers, alarms, computers, etc. Based on the various designs, it can
generate different sounds like alarm, music, bell & siren. A buzzer is an efficient component to include the
features of sound in our system or project. It is an extremely small & solid two-pin device thus it can be simply
utilized on breadboard or PCB. So in most applications, this component is widely used. t includes two pins
namely positive and negative. The positive terminal of this is represented with the ‘+’ symbol or a longer
terminal. This terminal is powered through 6Volts whereas the negative terminal is represented with the
‘-‘symbol or short terminal and it is connected to the GND terminal.

Specifications

 Colour is black

 The frequency range is 3,300Hz

 Operating Temperature ranges from – 20° C to +60°C

 Operating voltage ranges from 3V to 24V DC


Dept. of E&CE, BIET, Davangere Page
12
LPG gas leakage detection using ESP32

 The sound pressure level is 85dBA or 10cm

 The supply current is below 15mA

5.4 LED

Figure 5.4.1 LED

Light-emitting diodes are heavily doped p-n junctions. Based on the semiconductor material used and the
amount of doping, an LED will emit colored light at a particular spectral wavelength when forward biased. As
shown in the figure, an LED is encapsulated with a transparent cover so that emitted light can come out. The
colour of an LED is determined by the material used in the semiconducting element. The two primary materials
used in LEDs are aluminium gallium indium phosphide alloys and indium gallium nitride alloys. Aluminium
alloys are used to obtain red, orange and yellow light, and indium alloys are used to get green, blue and white
light. Slight changes in the composition of these alloys change the colour of the emitted light.

5.5 SERVO MOTOR

Figure 5.5.1 SERVO MOTOR(SG-90)

Dept. of E&CE, BIET, Davangere Page


13
LPG gas leakage detection using ESP32

The servo motor is specialized for high-response, high-precision positioning, As a motor capable of accurate
rotation angle and speed control it can be used for a variety of equipment.
A rotation detector (encoder) is mounted on the motor and feeds the rotation position/speed of the motor shaft
back to the driver. The driver calculates the error of the pulse signal or analog voltage (position commands/speed
command) from the controller and the feedback signal (current position/speed) and controls the motor rotation so
the error becomes zero. The closed loop control method is achieved with a driver motor and encoder, so the
motor can carry out highly accurate positioning operations. An END signal is obtained that communicates the
completion of the positioning operation. An alarm can be output if there is an abnormality such as an overload,
making it possible to communicate equipment abnormalities.
SPECIFICATIONS
1. Power: 4.8V-6V DC max (5V works well)

2. Average speed: 60 degrees in 0.20 sec (4.8V),60 degrees in 0.16 sec (6.0V)

3. Operating speed is 60°/0.1s


4. Gear Type: Plastic
5. Rotation: 0°-180°
6. Weight of motor: 9gm
7. Package includes gear horns and screws.

5.6 EXHAUST FAN

Figure 5.6.1 EXHAUST FAN

Its working voltage is 12V DC. It can work with a simple 12V battery without any difficulty. This fan has the
ability to run at a speed of 6800 rpm. The body of the fan is built from a combination of resin and plastic
material. The combination provides strength and insulation to the fan. Due to its manufacturing, It is light in
Dept. of E&CE, BIET, Davangere Page
14
LPG gas leakage detection using ESP32

weight and strong enough to bear some falls on the ground. So if you are looking for a perfect combination of
strength and insulation in a single fan, then you are in the right place.

Specification:-

1. Model name: 12038

2. Working voltage: 12V DC

3. Power rating: 0.25A

4. Lightweight

5. Durable

6. Hard resin and plastic body

7. Dimensions of the fan : 120mm x 120mm x 38mm

8. It Comes with two red and black wires of 22cm attach

5.7 RELAY MODULE

Figure 5.7.1 RELAY MODULE

A relay module is an electrical device that acts as a switch controlled by an external electrical signal. It is widely
used in electronic and electrical applications to control high-power circuits using low-power signals. Key
Components

Dept. of E&CE, BIET, Davangere Page


15
LPG gas leakage detection using ESP32

1. Relay: An electromagnetic switch that toggles between states when a control signal is applied. It typically
includes:

o Coil: Generates a magnetic field when energized.

o Armature: Moves under the influence of the magnetic field.

o Contacts: Change position (open or close) depending on the armature's movement.

2. Driver Circuit: Often includes a transistor or MOSFET to amplify the control signal.

3. Protection Components:

o Diode (Flyback Diode): Protects the circuit from voltage spikes generated when the relay coil is
turned off.

o Optoisolator (in some modules): Provides electrical isolation between the control circuit and the
relay.

Key Features

1. Control Voltage: The voltage required to activate the relay (commonly 3.3V, 5V, or 12V).

2. Contact Ratings: Defines the maximum voltage and current the relay can handle (e.g., 10A at 250V AC
or 30V DC).

3. Number of Channels: Single-channel, dual-channel, or multi-channel modules are available to control


multiple devices.

4. Isolation: Provides electrical isolation between the low-power control circuit and the high-power circuit.

5. LED Indicators: Many modules have an LED to show relay activation.

5.8 BATTERY

Dept. of E&CE, BIET, Davangere Page


16
LPG gas leakage detection using ESP32

Figure 5.8.1 BATTERY

The battery provides the necessary power for the robot's motors and electronics. Separate power supplies may be
used for the motors and control circuitry to ensure stable operation.

Specifications:

1. Voltage: Typically, 9V or 12V for motors, 5V for control circuitry.

2. Capacity: Depending on the usage time required (e.g., 1000mAh to 2000mAh).

5.9 SCHEMATIC DIAGRAM

Dept. of E&CE, BIET, Davangere Page


17
LPG gas leakage detection using ESP32

Figure 5.9.1 SCHEMATIC DIAGRAM

Dept. of E&CE, BIET, Davangere Page


18
LPG gas leakage detection using ESP32

CHAPTER 6
SOFTWARE REQUIREMENT

6.1 Arduino IDE

Figure 6.1.1 Arduino IDE

Arduino uno for programming Arduino microcontroller. Arduino uno can be implemented within
Windows, Mac and Linux operating systems. Most of its components are written in c language for
easy editing and compiling. Users can modify internal layouts and schematics when required.

Integrated Development Environment “IDE” For Arduino


Arduino IDE is an open-source software that is mainly used for writing and compiling the code into
the Arduino Module.

It is an official Arduino software, making code compilation too easy that even a common person
with no prior technical knowledge can get their feet wet with the learning process. It is easily
available for operating systems like MAC, Windows, Linux and runs on the Java Platform that
comes with inbuilt functions and commands that play a vital role for debugging, editing and
compiling the code in the environment.

Tools
Auto Format This formats your code nicely: i.e., indents it so that opening and closing curly braces
line up, and that the statements inside curly braces are indented more. Archive Sketch Archives a
copy of the current sketch in .zip format. The archive is placed in the same directory as the sketch.
Fix Encoding & Reload Fixes possible discrepancies between the editor char map encoding and
other operating systems char maps. Serial Monitor Opens the serial monitor window and initiates
Dept. of E&CE, BIET, Davangere Page 19
LPG gas leakage detection using ESP32
the exchange of data with any

Dept. of E&CE, BIET, Davangere Page 20


LPG gas leakage detection using ESP32

connected board on the currently selected Port. This usually resets the board, if the board supports
Reset over serial port opening.
Board Select the board that you're using. See below for descriptions of the various boards. Port This
menu contains all the serial devices (real or virtual) on your machine. It should automatically
refresh every time you open the top-level tools menu. Programmer For selecting a hardware
programmer when programming a board or chip and not using the onboard USB serial connection.
Normally you won't need this, but if you're burning a bootloader to a new microcontroller, you will
use this. Burn Bootloader The items in this menu allow you to burn a bootloader onto the
microcontroller on an Arduino board. This is not required for normal use of an Arduino board but is
useful if you purchase a new ATmega microcontroller (which normally come without a bootloader).
Ensure that you've selected the correct board from the Boards menu before burning the bootloader
on the target board. This command also set the right fuses.

Writing Sketches
Programs written using Arduino Software (IDE) are called sketches. These sketches are written in
the text editor and are saved with the file extension. ino. The editor has features for cutting/pasting
and for searching/replacing text. The message area gives feedback while saving and exporting and
also displays errors. The console displays text output by the Arduino Software (IDE), including
complete error messages and other information. The bottom righthand corner of the window
displays the configured board and serial port. The toolbar buttons allow you to verify and upload
programs, create, open, and save sketches, and open the serial monitor. Arduino IDE is used to
control all the input and output devices that are connected to the Arduino uno with programming.
For code, the following libraries are installed:
WiFi.h: Handles Wi-Fi connectivity on the ESP32.
WiFiClient.h: Used for creating a Wi-Fi client connection.
BlynkSimpleEsp32.h: Enables communication with the Blynk IoT platform on the ESP32.
Adafruit_MPU6050.h: Provides support for the MPU6050 sensor, allowing reading of the data
from the sensor.
Adafruit_Sensor.h: Includes sensor event data types and helper functions used with the Adafruit
sensor libraries.
Wire.h: For I2C communication, used for connecting and communicating with the MPU6050
sensor.

Dept. of E&CE, BIET, Davangere Page 21


LPG gas leakage detection using ESP32

6.2 Zapier

Figure 6.2.1 Zapier Icon

Zapier is a cloud-based automation tool that enables users to connect apps and services without requiring
technical expertise. It uses triggers (events in one app) to initiate actions in other apps, helping users
automate repetitive tasks. For example, when a new lead is added in Google Sheets, Zapier can
automatically create a contact in Salesforce or send a notification in Slack.

Key Features of Zapier:

1. Multi-Step Zaps: Create workflows that involve multiple steps, such as collecting data, processing
it, and sending it to different apps.
2. Conditional Logic (Paths): Execute different actions based on conditions, such as splitting
workflows depending on whether a lead is from one region or another.
3. Filters: Set specific conditions for Zaps to execute only when certain criteria are met.
4. Data Formatting: Use built-in tools to format dates, numbers, or text, and prepare data for other
apps.
5. Webhooks: Advanced users can trigger Zaps or send data to apps that support webhooks.
6. App Extensions: Integrations cover various domains, including project management, email
marketing, CRM, social media, and more.

Benefits in Detail:

1. Increased Productivity:

Automates repetitive tasks like data entry, email notifications, and syncing information across apps, saving
time for higher-value activities.

Dept. of E&CE, BIET, Davangere Page 22


LPG gas leakage detection using ESP32

2. No Coding Required:

Zapier’s intuitive interface enables anyone to set up workflows, making automation accessible even for
non-technical users.

3. Scalable Automations:

From single-trigger workflows to complex multi-step Zaps with filters and logic, it accommodates
businesses of all sizes.

4. Improved Accuracy:

Eliminates manual errors by automating routine tasks.

5. Integration with a Wide Range of Tools:

Zapier supports over 5,000 apps, including popular tools like Gmail, Slack, Trello, HubSpot, and Shopify.

6. Custom Workflows:

Build workflows tailored to unique business processes without needing custom software development.

Limitations in Detail:

1. Pricing and Task Limits:

 Free plans have limited Zaps and monthly tasks (100 tasks per month).
 Paid plans can be expensive for businesses requiring a high volume of tasks or advanced features
like multi-step Zaps and webhooks.

2. Dependency on Triggers:

Workflows are reactive, meaning they only activate when a trigger event occurs. This can limit proactive
automation.

3. Limited Offline Capabilities:

Requires a stable internet connection, and offline workflows are not supported
Dept. of E&CE, BIET, Davangere Page 23
LPG gas leakage detection using ESP32

4. Latency in Execution:

 On free and lower-tier plans, Zaps might take several minutes to execute, which could be an issue
for time-sensitive workflows.
 Real-time execution is available only in higher-tier plans.

5. Limited Functionality of Some App Integrations:

Some app integrations do not support all features available in the app itself. For example, Zapier might
allow creating new entries but not retrieving or modifying existing ones.

6. Learning Curve for Advanced Users:

While simple tasks are easy to set up, complex workflows involving conditions, multi-step actions, or
API/webhooks may require technical knowledge.

7. Data Security Concerns:

 As a cloud-based tool, data is transferred through Zapier, which could raise concerns about privacy
and compliance with regulations like GDPR or HIPAA.

8. Limited Offline Capabilities:

Requires a stable internet connection, and offline workflows are not supported.

Dept. of E&CE, BIET, Davangere Page 24


LPG gas leakage detection using ESP32

CHAPTER 7
RESULT AND DISCUSSION

The results of this project LPG gas leakage detection using ESP32 are discussed in the following
cases in detailed manner as explained in the methodology.

After uploading the code, open the monitor. The Monitor will display the initialization message.

Figure 7.1.1 Arduino IDE software with Embedded C code and Initialization

When gas is detected by MQ-2 gas sensor ,the following events take place:
 the servo motor turns off the LPG regulator.
 LED blinks as a visual indicator of the leak.
 Buzzer or beeper beeps when there is leak.
 Exhaust Fan turns on
 Triggers email notification. Below figure 7.1.2 Shows the circuit connections and mobile
app notification.

Dept. of E&CE, BIET, Davangere Page 25


LPG gas leakage detection using ESP32

Figure 7.1.2 Interfacing of ESP32

Dept. of E&CE, BIET, Davangere Page 26


LPG gas leakage detection using ESP32

Figure 7.1.2.1 email notification when high gas Figure 7.1.2.1 email notification when all
level is detected. conditions are good

Figure 7.1.2 email notification on mobile

Dept. of E&CE, BIET, Davangere Page 27


LPG gas leakage detection using ESP32

CHAPTER 8
APPLICATIONS
1. Gas Storage Areas
 Homes: Protects households by detecting LPG leaks in kitchens and storage rooms, minimizing the risk of
fire and explosion.
 Factories and Industries: Useful in industrial facilities where gases like propane, butane, or other volatile
compounds are stored or used in processes.
 Hotels: Ensures the safety of staff and guests by monitoring gas usage in kitchens and maintenance areas.
2. Fire Hazard Prevention
 Effective in early detection of gas leaks that could lead to explosions or fires, enabling swift action to
prevent large-scale property damage and loss of life.
3. Harmful Gas Detection
 Detects not just flammable gases but also toxic gases (e.g., methane, carbon monoxide) in various
environments, improving safety standards in workplaces and living spaces.
4. Domestic Gas Leakage Detection
 Aims to reduce the increasing number of kitchen-related accidents caused by LPG leaks. The system
alerts residents via alarms, SMS, and phone calls.
5. Portable Gas Detector
 Compact and lightweight, the device is easy to transport and deploy in various locations, such as:
o Construction sites
o Temporary storage units
o Outdoor environments where gases are used or stored.
6. Industrial Combustible Gas Detection
 Provides safety in industries like:
o Chemical manufacturing: Ensures processes involving volatile chemicals are monitored for leaks.
o Petrochemical refineries: Detects gas leaks in high-risk areas.
o Automotive: Monitors compressed natural gas (CNG) systems in vehicles.

Dept. of E&CE, BIET, Davangere Page 28


LPG gas leakage detection using ESP32
CHA
PTER 9
ADVANTAGES
Main advantages of our project are:
1. High Sensitivity and Accuracy
The system uses advanced gas sensors like the MQ2 for precise detection of even small gas leaks,
ensuring no harmful gas presence goes unnoticed. This high sensitivity is crucial for early detection
in both domestic and industrial settings.
2. Rapid Response Mechanism
Equipped with real-time alert systems such as:
o Audible alarms (buzzers) for on-site alerts.
o Email notifications to notify the owner, even when they are off-site.
3. Improved Safety and Risk Mitigation
Helps prevent life-threatening accidents caused by gas leaks, including explosions, fire outbreaks,
and suffocation hazards. It significantly reduces material loss and human injuries.
4. Lightweight and Portable
The system is compact and portable, allowing flexible use in various locations, such as homes,
workplaces, hotels, and vehicles.
5. Cost-Effective Solution
Designed with affordability in mind, it provides advanced safety features at a low cost, making it
accessible for both individual households and large-scale industries.
6. Ease of Use and Installation
The system is easy to install and operate, requiring minimal technical expertise. It can integrate with
existing infrastructure, like smart home systems, to enhance automation.
7. Versatility Across Applications
Can be deployed in:
o Residential areas: For kitchens and storage areas.
o Industries: In chemical plants, refineries, and manufacturing units.

Dept. of E&CE, BIET, Davangere Page 29


LPG gas leakage detection using ESP32

LIMITATIONS
The limitations of LPG gas leakage detection using ESP32 are:
1. Limited Detection Range
The gas sensor, such as the MQ2, has a specific sensitivity range and may fail to detect leaks in
larger or open areas where the gas may dissipate quickly before reaching the sensor.
2. False Positives
The system may generate false alarms due to:
o Detection of non-hazardous gases or fumes similar to the targeted gases (e.g., cooking odors
or smoke).
o Environmental factors like high humidity, dust, or temperature fluctuations, which can affect
sensor accuracy.
3. Dependency on Power Supply
The system relies on an uninterrupted power source to function. In case of power outages, the gas
detector and its alert mechanisms may fail unless equipped with a backup power supply (e.g.,
battery or UPS).
4. Maintenance Requirements
Sensors require regular calibration and maintenance to maintain accuracy. Over time, the sensor's
sensitivity may degrade, leading to reduced performance or false readings.
5. Lack of Advanced Data Integration
The current system may not integrate well with advanced analytics or cloud-based systems for real-
time monitoring and trend analysis, which are critical for industrial applications.
6. Initial Installation and Costs
While cost-effective in the long run, the initial installation, including purchasing multiple sensors
and integrating them into existing infrastructure, may be expensive for larger setups.

Dept. of E&CE, BIET, Davangere Page 30


LPG gas leakage detection using ESP32

CONCLUSION

The LPG gas leakage detection system using the ESP32 microcontroller represents a significant
advancement in safety technology for both residential and industrial environments. It addresses the
growing need for effective gas leak detection and prevention, which is crucial given the potential
hazards posed by LPG, such as fires, explosions, and poisoning. The system utilizes a highly
sensitive MQ-series sensor that detects LPG concentrations in the air. This data is processed by the
ESP32 microcontroller, which triggers real-time email notifications when gas levels exceed a
predefined threshold, alerting users immediately and allowing for prompt intervention. This email
notification system provides a key advantage, as it enables remote monitoring of gas levels,
reducing the need for physical presence and enhancing safety.

In conclusion, this research highlights the potential of a safety systems to improve public safety and
reduce the risks associated with LPG usage. By leveraging affordable, accessible technology, this
system offers a practical solution to a widespread problem. The system’s ability to detect gas leaks
early and provide real-time alerts is a vital step toward creating safer living and working
environments. As technology advances, further improvements and integrations will likely expand
the system’s capabilities, offering even greater safety and convenience for users across different
industries.

Dept. of E&CE, BIET, Davangere Page 31


LPG gas leakage detection using ESP32

FUTURE SCOPE

The future of LPG gas leakage detection using ESP 32 holds exciting possibilities for enhancing
safety and promoting well-being. Here are some key areas of exploration:
1.Multi-Gas Detection :
The system currently focuses on LPG detection. However, integrating additional sensors for other
hazardous gases such as carbon monoxide (CO), methane (CH4), and hydrogen sulfide (H2S) could
provide more comprehensive safety coverage, especially in industrial environments where multiple
gases may be present. This would enhance the system’s ability to detect a wider range of risks.
2.Improved Sensor Technology:
The performance of the gas sensors could be enhanced with the development of more sensitive and
durable sensors that can detect lower concentrations of gases. Future sensor technology may offer
higher accuracy, faster response times, and better resistance to environmental factors such as
humidity, dust, or temperature fluctuations.
3. Energy-Efficient and Solar-Powered Options:
For remote or off-grid locations, the system could be upgraded with solar-powered solutions or
energy-efficient sensors, reducing dependence on the electrical grid. This would make the system
suitable for rural areas, outdoor applications, or locations with limited access to power.

Dept. of E&CE, BIET, Davangere Page 32


LPG gas leakage detection using ESP32

REFRENCES
1. OM Ghodke, S. Kadam, C. Jhoshi, S. Shitole, and N. V. Pandhare, "LPG gas leakage detection
using ESP32," International Scientific Journal of Engineering and Management, vol. 3, no. 4, pp. 1–
3, Apr. 2024, doi: 10.55041/ISJEM01434.
2. S. Lakshmi Lavanya, M. D. V. Prasad, A. Sravya, C. D. Prasad, A. Seshadri, and R. K. S. Kumar,
"Gas Leakage Detector Using Arduino," International Research Journal of Engineering and
Technology (IRJET), vol. 10, Special Issue, pp. 350–353, Apr. 2023.
3. M. Abdullah Khan, "Gas Detection Using ESP32 and Fire Alarm," Department of Electrical and
Electronic Engineering, United International University, Project Report, Sept. 2023, doi:
10.13140/RG.2.2.18846.31041.

Dept. of E&CE, BIET, Davangere Page 33


IoT based Fall Detection and Alert System

APPENDIX A
DATASHEET

DATA SHEET OF ESP32 WROOM 32

Category Items Specification


Microcontroller Cores Xtensa LX6 (dual-
core)
Clock Frequency 80 MHz to 240 MHz
Memory Flash 32 Mbits SPI flash
Wireless Wi-Fi 802.11 b/g/n, up to
150 Mbps
Bluetooth v4.2 BR/EDR, BLE
Interfaces UART Yes
SPI Yes
I2C Yes
SD Card Yes
Other Capacitive touch
sensor, ADC, DAC,
GPIO, and more
Power Supply Voltage 3.3V
Power Sleep Current < 5 µA
Consumption
Dimensions (L x W x H) 18 mm x 25.5 mm x
3.1 m

Dept. of E&CE, BIET, Davangere Page 34


IoT based Fall Detection and Alert System

Figure 7.1.3: ESP32 Pin Configuration

Dept. of E&CE, BIET, Davangere Page 35


IoT based Fall Detection and Alert System

DATA SHEET OF MQ-2 GAS SENSOR

Parameter Specifications
Sensor Type Semiconductor Gas Sensor
Sensing Material SnO2 (Tin Dioxide)
Target Gases LPG, Methane, Butane, Hydrogen, Smoke,
Alcohol, Propane, Carbon Monoxide
Output Type Analog and Digital (via onboard comparator)
Heater Voltage (VH) 5V ± 0.1V
Circuit Voltage (VC) 5V ± 0.1V
Load Resistance (RL) Adjustable (2kΩ–20kΩ, typical)

Figure 7.1.4: Pin Configuration of MQ-2 gas sensor

Dept. of E&CE, BIET, Davangere Page 36


LPG gas leakage detection using ESP32
sSP32

B: SOURCE CODE
#include <WiFi.h>

#include <ESP32Servo.h>

#include <HTTPClient.h> // HTTP client for making requests

// Pin configuration

const int gasAnalogPin = 34; // GPIO34 for gas sensor AO

const int relayPin = 4; // GPIO4 for relay module

const int servoPin = 13; // GPIO13 for servo motor PWM control

const int buzzerPin = 27; // GPIO27 for buzzer

const int ledPin = 2; // GPIO2 for LED

// Wi-Fi credentials

const char* ssid = "IQOO Z7 PRO 5G";

const char* password = "12345678";

// API endpoint URLs

const char* highAlertURL = "https://hooks.zapier.com/hooks/catch/20921963/2i0rprj/"; // Replace


with your server's URL

const char* normalAlertURL = "https://hooks.zapier.com/hooks/catch/20921963/2i0rd2y/"; //


Replace with your server's URL

// Threshold value

const int thresholdValue = 1000;

Dept. of E&CE, BIET, Davangere Page 37


LPG gas leakage detection using ESP32
sSP32
// Servo motor object

Servo gasValveServo;

// State tracking for HTTP notifications

bool gasAlertSent = false;

bool gasNormalSent = false;

void setup() {

Serial.begin(115200);

// Initialize pins

pinMode(relayPin, OUTPUT);

pinMode(buzzerPin, OUTPUT);

pinMode(ledPin, OUTPUT);

digitalWrite(relayPin, LOW);

digitalWrite(buzzerPin, LOW);

digitalWrite(ledPin, LOW);

gasValveServo.attach(servoPin, 500, 2500);

gasValveServo.write(0); // Start servo in open position (0 degrees)

connectToWiFi();

Dept. of E&CE, BIET, Davangere Page 38


LPG gas leakage detection using ESP32
sSP32
void connectToWiFi() {

Serial.print("Connecting to Wi-Fi...");

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {

delay(1000);

Serial.print(".");

Serial.println("\nConnected to Wi-Fi");

void sendHttpAlert(const char* url, const String& message) {

if (WiFi.status() == WL_CONNECTED) {

HTTPClient http;

http.begin(url); // Specify the endpoint

http.addHeader("Content-Type", "application/json"); // Set content type to JSON

int httpResponseCode = http.POST(message);

if (httpResponseCode > 0) {

Serial.print("HTTP Response code: ");

Serial.println(httpResponseCode);

} else {

Serial.print("Error in sending request: ");

Serial.println(http.errorToString(httpResponseCode).c_str());

}
Dept. of E&CE, BIET, Davangere Page 39
LPG gas leakage detection using ESP32
sSP32
http.end();

} else {

Serial.println("Wi-Fi not connected. Cannot send HTTP request.");

void loop() {

int gasValue = analogRead(gasAnalogPin);

Serial.print("Gas Sensor Value: ");

Serial.println(gasValue);

if (gasValue > thresholdValue) {

// Gas detected - Take actions

digitalWrite(relayPin, HIGH); // Turn on relay

digitalWrite(buzzerPin, HIGH); // Activate buzzer

digitalWrite(ledPin, HIGH); // Turn on LED

gasValveServo.write(90); // Close gas valve

Serial.println("Gas detected! Fan ON, Buzzer ON, LED ON, Gas valve CLOSED.");

// Create high gas alert message

String highGasMessage = "{\"value1\":\"Gas level high! Immediate action


required.\",\"value2\":\"Gas Sensor Reading: " + String(gasValue) + "\"}";

Dept. of E&CE, BIET, Davangere Page 40


LPG gas leakage detection using ESP32
sSP32
// Send high gas alert only once

if (!gasAlertSent) {

sendHttpAlert(highAlertURL, highGasMessage);

gasAlertSent = true;

gasNormalSent = false; // Reset normal alert state

} else {

// No gas detected - Reset actions

digitalWrite(relayPin, LOW); // Turn off relay

digitalWrite(buzzerPin, LOW); // Deactivate buzzer

digitalWrite(ledPin, LOW); // Turn off LED

gasValveServo.write(0); // Open gas valve

Serial.println("No gas detected. Fan OFF, Buzzer OFF, LED OFF, Gas valve OPEN.");

// Create normal gas alert message

String lowGasMessage = "{\"value1\":\"All conditions are good.\",\"value2\":\"Gas Sensor


Reading: " + String(gasValue) + "\"}";

// Send normal gas alert only once

if (!gasNormalSent) {

sendHttpAlert(normalAlertURL, lowGasMessage);

gasNormalSent = true;

gasAlertSent = false; // Reset alert state

Dept. of E&CE, BIET, Davangere Page 41


LPG gas leakage detection using ESP32
sSP32
}

delay(1000); // Check every second

Dept. of E&CE, BIET, Davangere Page 42


LPG gas leakage detection using ESP32
sSP32
Course Outcomes
On completion of this course, we are able to

 Solve the identified problems.


 Analyze the available resources and their utilization.
 Present the work carried out and prepare the report.
 Work in a team to find the solutions for societal and technical problems.

Dept. of E&CE, BIET, Davangere Page 43


LPG gas leakage detection using ESP32
sSP32

CONTACT DETAILS

SL. Name USN Contact Email Id Permanent Photo


No Number Address
1. Shreya 4BD22EC0 9019323451 bhandageshreya Sidalinga
Bhandage 90 @gmail.com nagar ,Hudco
colony,
Gadag.

2. Sindhu M S 4BD22EC 8088986693


092

3. Sneha L 4BD22EC0 8088196021 Snehahanchin84 Bariker area


94 @gmail.com Suraleshwar,
Hanchin
Hangal,
Haveri

4. Somashekar 4BD22EC 8971941346 @gmail.com


Javooru 096

Dept. of E&CE, BIET, Davangere Page 44

You might also like