You are on page 1of 13

CHAPTER 3

METHODOLOGY
3.1 INTRODUCTION

The methodology used to design and develop the SMART GAS LEAK DETECTION SYSTEM
will be discussed in this chapter. These methodologies cover every piece of software and
hardware that was employed. Hardware refers to the physical tangible components that are used
according to Kalantari et.al (2019), whilst software refers to the intangible components that are
used in designing the gas leakage detection system. All of the fundamental theoretical
information about every component used in hardware and software will be thoroughly covered in
this chapter. This chapter also covers the SMART GAS LEAK DETECTION SYSTEM's system
architecture, activity diagrams, flow chart diagrams, algorithm design, and circuit design.

This chapter also covers requirement analysis, which is the procedure of gathering, analyzing,
and identifying issues. This chapter also includes the researcher's methods for gathering
information. The final section of this chapter also contains the conclusion, which brings the
chapter to a close.

3.2 Hardware and software components


3.2.1 Hardware

1. LPG SENSOR

The MQ-2 sensor is a gas detector that can pick up butane, iso, and LPG mixtures in the air at
concentrations of 200–1000 ppm. This sensor can be used as an analog or digital sensor and runs
on a +5v voltage. It is used to detect gas leaks and stop their devastating effects because it
responds in less than 10 seconds. The sensor has pins that are 6mm high and measures 18mm in
diameter by 17mm in height. These 4 pins have a working voltage of 5 volts, with 2 of them
being used to fetch signals and the other 2 being used to supply heating current.
The comparator built into the detector is compared with the gas leak detection by this gas sensor
to produce the digital logical output for the Arduino. Due to its quicker response time, this sensor
is used in numerous applications for gas detection systems, fire detection systems, and other
safety detection systems. The sensor is displayed in fig 3.1

Figure 3- 1 GAS SENSOR

In the image above, the VCC pin a 5 volt pin, GND-ground pin, A0 - analog voltage proportional
to detected gas concentration, and D0- digital data of detected combustible gases.

2. ARDIUNO UNO

Single-board controllers like Arduino are frequently used to build different kinds of digital
gadgets. At their most basic, they are utilized in the construction of straightforward robots and
are used to control various devices such as monitors, lighting, and cameras. Among other things,
they are capable of converting readings from inputs like light on a sensor or a finger on a button
into outputs like turning on a motor or an LED. The design of Arduino makes it compatible with
Windows, Linux, and Mac operating systems. By simply clicking a button, these operating
systems make it easy to upload codes and connect the USB cable. The straightforward C
language is used to program the board in the free and open-source ARDUINO IDE (integrated
development environment). The component quickly stores data in the memory thanks to its own
fixed RAM.

When the SMART GAS LEAK DETECTION SYSTEM receives data from the gas sensor, it
notifies the surrounding area by activating a buzzer and indicating on the LCD that a leak has
been found. The Arduino also makes it easier to inform the homeowner of a leak by sending
them an SMS. FIG. 2 below depicts the Arduino.

Figure 3- 2 ARDUINO UNO

To input or output data to or from the 14 digital pins on the board depicted in Fig. 3.2 above, use
the pin Mode(), digital Write (), and digital Read () functions. Each pin has a maximum current
limit of 40 mA and an internal pull-up resistor of 20 to 50 kilohms, which is disconnected by
default. They run on 5 volts. Additionally, some pins perform specialized unique tasks:

 The serial numbers 0 (RX) and 1 (TX) are used for TTL serial data transmission and
reception.
 Pin 2 and 3 are external interruptions. If a low value, a rising or falling edge, a change in
value, or any of these conditions are detected, these pins can be configured to initiate an
interrupt.
 PWM 3, PWM 5, PWM 6, PWM 9, and PWM 10.
• The following pin numbers: 10, 11, 12, and 13 (SCK). These pins enable SPI
communication, which the underlying hardware is capable of but which the Arduino
language does not yet support.

• LED: 13. Digital pin 13 is connected to an internal LED. When the pin is HIGH, the LED is
on, and when it is LOW, the LED is off.

The Arduino has six analog inputs, each with a resolution of 10 bits. The AREF pin and the
analog Reference () function can be used to change the measurement range, which is
typically between 0 and 5 volts. Certain pins are also designed to serve specific purposes:

 I2C - (4) and (5) (SCL). Utilize the Wire library to support I2C (TWI) communication.
Other pins on the board include the following:
 AREF - Analog input reference voltage with analog references ().
 Reset - Bring this line LOW to reset the microcontroller. usually used to describe shields
that block the reset button on the board.
 VIN - is used to access previously supplied voltage from the power jack or supply
voltage to the power jack.
 5v - The regulated power supply supplies power to the board's microcontroller and other
components.
 3V3 is an on-board regulator-generated 3.3V3 supply with a 50mA maximum current
draw.
 GND - Earth pins

3. Liquid Crystal Display (LCD)

Liquid crystal display, a flat panel display that uses polarizers and the light-modulating
capabilities of liquid crystals (LCD). The 16*2 liquid crystal display will be used to output
text and communicate with the Arduino Uno board. If there is a leak, the LCD will display
and be controlled by Arduino. If not, gas is leaking. When

there isn't a leak, it doesn't exist. The LCD is displayed in Figure 3.3 below.
Figure 3-3 LCD DISPLAY 16*02

4. Node MCU ESP8266 Wi-Fi module

This phrase designates a Node Microcontroller Unit. The development of products for the
Internet of Things is made possible by open-source firmware. The ESP8266, a low-cost Wi-Fi
module with a complete TCP/IP stack and MCU functioning in soft access point mode, makes it
feasible to connect over the internet. an MCU node. There are only two available input-output
pins. For storing programs and data, it has 4 MB of memory and 128 kb of RAM. Because of its
powerful processing capabilities, the Node MCU is the best option for IoT projects. It can be
used by connecting it to an Arduino board or powered by connecting a micro-USB cable directly
to the computer.

In this this project it is used to send an SMS alert message to the user of any leaks that may be
detected and will be connected to the Arduino Uno. The node is shown below in fig 3.4

Figure 3-4 ESP 32

5. Jumper wires

The components on a breadboard are connected by means of these electrical wires, which have
connectors or pins at either end. The breadboard's slots are connected to each jump wire's end
connectors, and the header connectors are connected to the components. They are used in our
system to connect various Arduino Uno components. Jumper wires are displayed in Fig. 3.5
below.

Figure 3- 5 JUMPER WIRES

6. Piezoelectric Buzzer
A piezoelectric buzzer is an audio signaling device that makes a buzzing noise. When harm is
being done, it can serve as a warning system. It functions as an output method. Buzzers are
frequently used for alarms, timers, and user input confirmation, such as a mouse click or
keystroke. A piezoelectric component, the electronic buzzer used in the project is powered by
micro-controller signals. A phenomenon occurs when certain materials produce electricity when
mechanical pressure is applied to them and vice versa. Piezoelectric materials fall under this
category. Depending on the frequency of the signal, a material exposed to an alternating electric
field either stretches or compresses, creating sound. The Buzzer is depicted in Fig. 3.6 below.

Figure 3- 6 PIEZZO ELECTRIC BUZZER

7. 5V FAN

A 5V fan is a type of cooling fan that operates at 5 volts DC, it is commonly used in computers,
electronics, and other devices that generate heat. These fans are designed to remove heat from
electronic components, thus helping to keep them cool and functioning properly. In the system,
the fan will be used to drive away the leaked gas away in the atmosphere. The fan is shown
below in figure 3.7
Figure 3-7 5VOLTS FAN

3.2.2 SOFTWARE

Scripts, applications and a set of instructions are frequently used to describe software, software
is used to describe all functional aspects of a computer that do not refer to hardware. The
software tools employed by the SMART GAS LEAK DETECTION SYSTEM are listed below.

1. ARDUINO IDE

The cross-platform Arduino Integrated Development Environment is supported by Linux,


macOS, and Microsoft Windows (IDE). It was made using Java, a programming language. It
comes with an editor that includes tools for text replacement, auto-indenting, brace matching,
syntax highlighting, and text copy and paste. Moreover, it offers more user-friendly facilities for
compiling and uploading programs to the board. There is also a toolbar with buttons for often
used features including a message box, a text terminal, a hierarchy of operation menus, and
more.

The GNU General Public License, version 2 applies to the source code for the Arduino IDE. To
support the languages C and C++, the IDE provides special code organization guidelines. The
Arduino IDE additionally provides a software library from the wiring project that covers a wide
range of common input and output techniques. Just two core functions must be implemented to
start writing user-written code. An executable cyclic executive program is produced by
combining these functions with a program stub main and linking it using the GNU toolchain,
which is also provided with the IDE.
Arduino IDE comes with a library from the original wiring project called "Wiring" that greatly
simplifies a number of common input/output operations. Users only need to define two functions
in order to create an executable cyclic executive program:

 setup(), which can initialize settings, is a function called once at the start of a program.
 loop(): is a function that is used until the board turns off repeatedly.

Figure 3-8 ARDUINO IDE

1. ThingSpeak Cloud Services

The IoT analytics platform service ThingSpeak enables online collection, visualization, and
analysis of real-time data streams. You can send data to ThingSpeak from your devices, see real-
time data visualizations, and send alerts. We can create IoT applications and store data in the
cloud thanks to the internet of things (IoT) platform ThingSpeak. After connecting our ESP32 to
our Wi-Fi network, we'll create a channel on ThingSpeak and send the data to the channel's API
key and IP address.

2. C++
A development of the C programming language is the all-purpose, high-level language C++. As
the language evolves over time, it now has minimal memory manipulation tools in addition to
object-oriented, generic, and functional capabilities. C++ is frequently used as a compiled
language, and there are several companies who provide C++ compilers.
Performance, efficiency, and adaptability were the guiding principles in the design of C++,
which was created with systems programming, embedded, resource-constrained applications, and
big systems in mind. The software infrastructure and resource-constrained applications, like
desktop apps, video games, servers, and performance-critical programs, have both been found to
benefit greatly from the use of C++. The C++ programming language will be utilized in the
system because it is one of those supported by the ARDUINO IDE.

3.3 PROPOSED SYSTEM ARCHITECTURE


A conceptual model known as a system architecture outlines the structure, behavior, and views
of a system. According to Nejad and Bobby (2023), an architecture is a formal representation of
a system that is set up to support reasoning regarding the structures and behaviors of the system.
The various components of the system are shown in Figure 3.9 below. MQ2 sensors in the
system detect the presence of gas and transmit analog data to an Arduino Uno microcontroller. A
buzzer sounds an alarm when the amount of gas detected exceeds the required level, and the
message "GAS IS LEAKING" is displayed on the LCD to warn of danger.

The system will then send an SMS to the appropriate persons notifying them about the leakage
so that they can take necessary precautions to control the gas leakage. The architecture is shown
below in Fig 3.9.
Figure 3-9 SYSTEM ARCHITECTURE

3.4 PROCESS ANALYSIS


Process analysis, according to Santos-Lang and Christopher (2014), is a continuous improvement
process where organizations look at how they do things to find more efficient ways to complete a
particular task. This analysis' three main building blocks are inputs, processes, and outputs.
Analyzing processes looks at how an input is modified to produce a specific outcome. Figure
3.10 below displays the system's process analysis.
Figure 3- 10 PROCESS ANALYSIS

In the above process analysis diagram the input is the gas sensor which feeds information to the
Arduino Uno Micro-controller which then processes data from the sensor to information and
then produces output using a buzzer in the form of sound, the exhaust fan to neutralize the and
drive away the leaked gas. When the gas sensor sends data to the Micro-controller the Micro-
controller then checks if the threshold value in the room is greater than the normal if greater then
the controller will then it will activate all other components thus the buzzer, LCD display and
then the fan also. This will also enable the WIFI MODULE to send a message notifying the
users.

3.5 ALGORITHM DESIGN (FLOW CHART)


Algorithm design is the art of creating efficient and correct procedures for solving problems with
computers as defined by Bleakley and Chris (2020). Algorithm design for Smart Gas Leak
Detection system is shown below in Fig 3.11
Figure 3-11 ALOGORITHM DESIGN

In the design of the algorithm mentioned above, when the Arduino turns on, all other
components will also light up. The LPG sensor will then be checked to see if the threshold value
is greater than the normal value by the Arduino Microcontroller if everything is in order. The
buzzer, LCD display, and exhaust fan will all turn on if the threshold value exceeds the norm. It
will also display this information. Additionally, this will cause the ESP 32 WIFI module to turn
on and send the user a notification message.
3.6 CIRCUIT DESIGN
Circuit designing, according to Kalantari et al. (2019), is the methodical selection of electrical
and electronic components that, when connected as shown in the designed schematic, serve some
useful, specific purpose based on a predetermined set of output and input devices. The design
will aim to operate efficiently, reliably, and steadily under a specified set of environmental
conditions while utilizing the fewest parts possible at an affordable price. The Circuit design is
depicted in the diagram below in Fig. 3.12.

Figure 3-12 CIRCUIT DESIGN

3.7 CONCLUSION

No table of figures entries found.

You might also like