You are on page 1of 24

LPG GAS AND SMOKE LEAKAGE DETECTOR

BY USING ARDUINO
A Project report submitted in partial fulfilment
of the requirements for the diploma of Digital Electronics Engineering
By

KISHAN LAL RAI (1902071027)


HARSH SAHU (1902071019)
Kishan (1902071026)
NEERAJ KUMAR (1902071040)
RAMASHANKAR SINGH (1902071044)
Under the supervision of

Mr. KUMAR BRAJESH CHANDRA

Department of Digital Electronics Engineering


AMBEDKAR INSTITUTE OF TECHNOLOGY
Near Nirman Vihar Metro Station, Patparganj Rd, Madhuban colony,
Nirman Vihar, Shakarpur, New Delhi, Delhi 110092
ACKNOWLEDGEMENT

It is our great fortune that we have got opportunity to carry out this project work under
the supervision of Mr. Kumar Brajesh in the Department of Digital Electronics Engineering,
Ambedkar Institute of Technology (AIT), Near Nirman Vihar Metro Station, Patparganj Rd,
Madhuban colony, Nirman Vihar, Shakarpur, New Delhi, Delhi 110092.
We express our sincere thanks and deepest sense of gratitude to our guide for his constant
support, unparalleled guidance and limitless encouragement.

We wish to convey our gratitude to Mr. Satish Kumar, HOD, Department of Digital
Electronics Engineering, AIT and to the authority of AIT for providing all kinds of
infrastructural facility towards the research work.

We would also like to convey our gratitude to all the faculty members and staffs of the
Department of Digital Electronics Engineering, AIT for their whole hearted cooperation to
make this work turn into reality.

Full Signature of Students

Place:
Date:
CERTIFICATE
To whom it may concern

This is to certify that the project work entitled LPG GAS AND SMOKE DETECTOR
USING ARDUINO is the bonafide work carried out by Kishan Lal Rai (27),
Harsh Sahu (19), Kishan (26), Neeraj Kumar (40), Ramashankar Singh (44) students in the
Dept. of Digital Electronics Engineering, Ambedkar Institute of Technology (AIT), Near
Nirman Vihar Metro Station, Patparganj Rd., Madhuban Colony, Nirman Vihar, Shakarpur,
New Delhi, Delhi 110092, during the academic year 2021, in partial fulfillment of the
requirements for the diploma in Digital Electronics Engineering and that this project has
not submitted previously for the award of any other degree, diploma and fellowship.

_____________________ ________________________

Signature of the Guide

Name: Mr. Kumar Brajesh Chandra

___________________________ ______________________
Signature of the Co-Guide
Name: SARBOJIT MUKHERJEE
Designation: ASSISTANT PROFESSOR
TABLE OF CONTENTS:

1. Abstract
2. Components Used
3. Arduino Nano
4. 1.
LPGINTRODUCTION
GAS Sensor Module MQ-5 1
2. DC MOTOR 2
5. Buzzer
2.1. INTRODUCTION TO SPEED CONTROL 2
6. Piezo
2.2. Buzzer Characterstics
CLASSIFICATION OF DC MOTORS 2
2.3.
7. Magnetic SPEED
BuzzerCONTROL METHODS
Characterstics 4
2.3.1. FLUX CONTROL METHOD 4
8. Piezoceramic Element
2.3.2. ARMATURE Structure
AND RHEOSTAT CONTROL METHOD 5
9. Working Principle
2.3.3. PWM of Piezo Buzzers
TECHNIQUE 7
10. 3. PWM
Piezo TECHNIQUE
Buzzer Structure 8
4. DC MOTOR SPEED CONTROL USING PWM METHOD 10
11. Piezo Buzzer Feedback
4.1. PRINCIPLE 10
12. 4.2.
16*2 LCD METHODS 12
4.2.1. ANALOGUE METHOD 12
13. Coding
4.2.2. DIGITAL METHOD 13
14. Conclusion
4.2.3. PWM&GENERATOR
Future ScopeCHIP 13
15.5.References
COMPONENTS DESCRIPTION 14
5.1. IC 555 TIMER 14
5.1.1. PIN DIAGRAM OF IC 555 TIMER 15
5.1.2. 555 TIMER WORKING 16
5.2. TRANSISTOR 17
5.2.1. APPLICATION 18
5.3. DC MOTOR 18
5.4. POTENTIOMETER 19
6. COMPONENTS 20
7. CIRCUIT DIAGRAM 21
7.1. WORKING OF THE CIRCUIT 22
8. HARDWARE MODEL 23
9. RESULT AND DISCUSSION 24
10. CONCLUSION 27
11. FUTURE SCOPE 28
REFERENCES 29
ABSTRACT

Heading 1
➢ While LPG is an essential need of every household, its
leakage could lead to a disaster. To alert on LPG leakage and
prevent any mishappening there are various products to detect
the leakage. Here we have developed an Arduino based LPG
gas detector alarm. If gas leakage occurs, this system detects
it and makes an alert by buzing the buzzer attached with the
circuit. This system is easy to build and anyone who have
some knowledge of electronics and programing, can build it..

➢ We have used a LPG gas sensor module to detect LPG Gas.


When LPG gas leakage occurs, it gives a HIGH pulse on its
DO pin and arduino continuously reads its DO pin. When
Arduino gets a HIGH pulse from LPG Gas module it shows
“LPG Gas Leakage Alert” message on 16x2 LCD and
activates buzzer which beeps again and again until the gas
detector module doesn’t sense the gas in environment. When
LPG gas detector module gives LOW pulse to arduino, then
LCD shows “No LPG Gas Leakage” message.
Components Used

_________________________________________

1. Arduino Mini
2. LPG Gas sensor Module
3. Buzzer
4. BC 547 Transistor
5. 16x2 LCD
6. 1K resistor
7. Bread board
8. 9 volt battery
9. Connecting wires

Arduino Nano
_______________________________________________

2
Arduino Nano is a small, compatible, flexible and breadboard
friendly Microcontroller
board, developed by Arduino.cc in Italy, based on ATmega328p (
Arduino Nano V3.x) / Atmega168 ( Arduino Nano V3.x).
Arduino Nano is simply a smaller version of Arduino UNO, thus
both has almost same functionalities.
It comes with an operating voltage of 5V, however, the input
voltage can vary from 7 to 12V.
Arduino Nano Pinout contains 14 digital pins, 8 analog Pins, 2
Reset Pins & 6 Power Pins.
3
Each of these Digital & Analog Pins are assigned with multiple
functions but their main function is to be configured as input or
output.
They are acted as input pins when they are interfaced with sensors,
but if you are driving some load then use them as output.
Functions like pinMode() and digitalWrite() are used to control the
operations of digital pins while analogRead() is used to control
analog pins.
The analog pins come with a total resolution of 10bits which
measure the value from zero to 5V.
Arduino Nano comes with a crystal oscillator of frequency 16 MHz.
It is used to produce a clock of precise frequency using constant
voltage.
There is one limitation using Arduino Nano i.e. it doesn’t come with
DC power jack, means you can not supply external power source
through a battery.
This board doesn’t use standard USB for connection with a
computer, instead, it comes with Mini USB support.
Tiny size and breadboard friendly nature make this device an ideal
choice for most of the applications where a size of the electronic
components are of great concern.
Flash memory is 16KB or 32KB that all depends on the At mega
board i.e Atmega168 comes with 16KB of flash memory while
Atmega328 comes with a flash memory of 32KB. Flash memory is
used for storing code. The 2KB of memory out of total flash
memory is used for a bootloader.

The Nano device comes with an ability to set up a communication


with other controllers and computers. The serial communication is
carried out by the digital pins like pin 0 (Rx) and pin 1 (Tx) where

4
Rx is used for receiving data and Tx is used for the transmission of
data. The serial monitor is added on the Arduino Software which is
used to transmit textual data to or from the board. FTDI drivers are
also included in the software which behave as a virtual com port to
the software.
The Tx and Rx pins come with an LED which blinks as the data is
transmitted between FTDI and USB connection to the computer.
Arduino Software Serial Library is used for carrying out a serial
communication between the board and the computer.
Apart from serial communication the Nano board also support I2C
and SPI communication. The Wire Library inside the Arduino
Software is accessed to use the I2C bus.
The Arduino Nano is programmed by Arduino Software called IDE
which is a common software used for almost all types of board
available. Simply download the software and select the board you
are using. There are two options to program the controller i.e either
by the bootloader that is added in the software which sets you free
from the use of external burner to compile and burn the program
into the controller and another option is by using ICSP (In-circuit
serial programming header).
Arduino board software is equally compatible with Windows, Linux
or MAC, however, Windows are preferred to use.

LPG Gas sensor Module MQ-5


_______________________________________________

5
The working principle behind the MQ-5 gas sensor is as follows:
The sensor has a sensitive filament made of SnO2. In the presence
of clean air, this filament tends to have lower electrical
conductivity. When a combustible gas such as LPG is introduced,
the filament’s conductivity rises, and the amount of change in it’s
conductance/resistance can be used to indicate the equivalent gas
concentration. This effect tends to be particularly pronounced at
higher temperatures, and resisitive heating element is present as
well. SnO2 is particularly sensitive to Methane, Butane and
Propane, but is also sensitive to other combustible gases as well.
The Technical specifications for the MQ-5 sensor are tabulated
here:

6
The working of the MQ-5 sensor can be explained using Pic 1. The
heating coil H is in contact with the SnO2 filament. In the
presence of clean air, the resistance across the heating coil does
not vary, but when a combustible gas is present, the resistance of
the SnO2 filament drops, which results in a corresponding rise
in Output Voltage (Vout), and this output voltage can
be measured to indicate the concentration of any combustible gas
that is present.

Pic 1 – Structure of the MQ-5 Gas-leakage sensor.


The MQ-5 has an analog (voltage) output. We connected the MQ-
5 sensor to a WSN1101L. Data from the MQ-5 sensor could
now be transmitted to a WSN1101C gateway and used to monitor
a given space for gas leaks etc.

We tested the circuit using a partly-opened Cigarette lighter to


introduce combustible gas near the gas sensor. See the rise and
fall of O/P voltage on Pic 4. (Note: The MQ-5 sensor requires a
48-hour initial heating period as part of it’s calibration process).

7
Pic 4 – Sample Output from the Wireless Gas-leakage sensor
module.
This was part of a complete home-automation system that we
built.The other modules we built included a wireless system to
remotely monitor Load-cell output, a wireless system to remotely
monitor temperature and humidity, and a wireless system
to remotely monitor soil humidity.

8
Buzzer

CUI Devices’ buzzer line utilizes two main technologies. Each


technology has specific advantages and tradeoffs that must be
taken into consideration depending on the application
requirements.

9
Piezo Buzzer Characteristics

Wide operating voltage: 3~250 V

Lower current consumption: less than 30 mA higher rated


frequency

Larger footprint

Higher sound pressure level

Magnetic Buzzer Characteristics

Narrow operating voltage: 1~16 V

Higher current consumption: 30~100 mA

Lower rated frequency

Smaller footprint

Lower sound pressure level

Piezoceramic Element Structure

10
At the heart of all piezo-type buzzers is the piezoelectric element.
The piezoelectric element is composed of a piezoelectric ceramic
and a metal plate held together with adhesive. Both sides of the
piezoelectric ceramic plate contain an electrode for electrical
conduction. Piezo materials exhibit a specific phenomenon known
as the piezoelectric effect and the reverse piezoelectric effect.
Exposure to mechanical strain will cause the material to develop
an electric field, and vice versa.

Working Principle of Piezo Buzzers

When an alternating voltage is applied to the piezoceramic


element, the element extends and shrinks diametrically. This
characteristic of piezoelectric material is utilized to make the
ceramic plate vibrate rapidly to generate sound waves.

Piezo Buzzer Structure

There are two types of piezo buzzers – transducers and indicators.


Transducers consist of a casing, a piezoceramic element and a
terminal. In order to operate a transducer, the user must send a
square wave signal to the buzzer. Indicators consist of a casing, a

11
piezoceramic element, a circuit board and a terminal. In order to
operate an indicator, the user must send the buzzer a specified dc
voltage.

Piezo Buzzer Feedback

Some CUI Devices piezo buzzers include a feedback line. Driving


circuits for buzzers with feedback tend to be simpler than those
circuits without. Feedback is accomplished by dividing the piezo
element into two, electrically isolated pieces. When the main piezo
element is actuated it squeezes the feedback portion, creating a
voltage on the feedback line. A simple way to use feedback is to
have the feedback line connected to the base of a transistor. As
the piezo element oscillates, the feedback signal will oscillate and
the transistor will alternately block or allow current to flow.

The feedback line provides a voltage that is proportional to the


strain on the main piezo element

This voltage can be used to create a simple, self-oscillating circui

12
16x2 LCD
________________________________________________
The term LCD stands for liquid crystal display. It is one kind of
electronic display module used in an extensive range of
applications like various circuits & devices like mobile phones,
calculators, computers, TV sets, etc. These displays are mainly
preferred for multi-segment light-emitting diodes and seven
segments. The main benefits of using this module are inexpensive;
simply programmable, animations, and there are no limitations for
displaying custom characters, special and even animations, etc.

13
LCD 16×2 Pin Diagram
The 16×2 LCD pinout is shown below.

Pin1 (Ground/Source Pin): This is a GND pin of display, used to


connect the GND terminal of the microcontroller unit or power
source.
Pin2 (VCC/Source Pin): This is the voltage supply pin of the display,
used to connect the supply pin of the power source.
Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the
display, used to connect a changeable POT that can supply 0 to 5V.
Pin4 (Register Select/Control Pin): This pin toggles among
command or data register, used to connect a microcontroller unit

14
pin and obtains either 0 or 1(0 = data mode, and 1 = command
mode).
Pin5 (Read/Write/Control Pin): This pin toggles the display among
the read or writes operation, and it is connected to a
microcontroller unit pin to get either 0 or 1 (0 = Write Operation,
and 1 = Read Operation).
Pin 6 (Enable/Control Pin): This pin should be held high to execute
Read/Write process, and it is connected to the microcontroller unit
& constantly held high.
Pins 7-14 (Data Pins): These pins are used to send data to the
display. These pins are connected in two-wire modes like 4-wire
mode and 8-wire mode. In 4-wire mode, only four pins are
connected to the microcontroller unit like 0 to 3, whereas in 8-wire
mode, 8-pins are connected to microcontroller unit like 0 to 7.
Pin15 (+ve pin of the LED): This pin is connected to +5V
Pin 16 (-ve pin of the LED): This pin is connected to GND.
Lcd-16x2-pin-diagram
LCD-16×2-pin-diagram
Features of LCD16x2
The features of this LCD mainly include the following.

The operating voltage of this LCD is 4.7V-5.3V


It includes two rows where each row can produce 16-characters.
The utilization of current is 1mA with no backlight
Every character can be built with a 5×8 pixel box
The alphanumeric LCDs alphabets & numbers
Is display can work on two modes like 4-bit & 8-bit
These are obtainable in Blue & Green Backlight
It displays a few custom generated characters
Registers of LCD

15
A 16×2 LCD has two registers like data register and command
register. The RS (register select) is mainly used to change from one
register to another. When the register set is ‘0’, then it is known as
command register. Similarly, when the register set is ‘1’, then it is
known as data register.

Command Register

The main function of the command register is to store the


instructions of command which are given to the display. So that
predefined tasks can be performed such as clearing the display,
initializing, set the cursor place, and display control. Here
commands processing can occur within the register.

Data Register

The main function of the data register is to store the information


which is to be exhibited on the LCD screen. Here, the ASCII value
of the character is the information which is to be exhibited on the
screen of LCD. Whenever we send the information to LCD, it
transmits to the data register, and then the process will be starting
there. When register set =1, then the data register will be selected.

16×2 LCD Commands


The commands of LCD 16X2 include the following.

For Hex Code-01, the LCD command will be the clear LCD screen
For Hex Code-02, the LCD command will be returning home

16
For Hex Code-04, the LCD command will be decrement cursor
For Hex Code-06, the LCD command will be Increment cursor
For Hex Code-05, the LCD command will be Shift display right
For Hex Code-07, the LCD command will be Shift display left
For Hex Code-08, the LCD command will be Display off, cursor off
For Hex Code-0A, the LCD command will be cursor on and display
off
For Hex Code-0C, the LCD command will be cursor off, display on
For Hex Code-0E, the LCD command will be cursor blinking, Display
on
For Hex Code-0F, the LCD command will be cursor blinking, Display
on
For Hex Code-10, the LCD command will be Shift cursor position to
left
For Hex Code-14, the LCD command will be Shift cursor position to
the right
For Hex Code-18, the LCD command will be Shift the entire display
to the left
For Hex Code-1C, the LCD command will be Shift the entire display
to the right
For Hex Code-80, the LCD command will be Force cursor to the
beginning ( 1st line)
For Hex Code-C0, the LCD command will be Force cursor to the
beginning ( 2nd line)
For Hex Code-38, the LCD command will be 2 lines and 5×7 matrix

17
CODING
#include
LiquidCrystal lcd(3, 2, 4, 5, 6, 7);

#define lpg_sensor 18
#define buzzer 13

void setup()
{
pinMode(lpg_sensor, INPUT);
pinMode(buzzer, OUTPUT);
lcd.begin(16, 2);
lcd.print("LPG Gas Detector");
lcd.setCursor(0,1);
lcd.print("Circuit Digest");
delay(2000);
}

void loop()
{
if(digitalRead(lpg_sensor))
{
digitalWrite(buzzer, HIGH);
lcd.clear();
lcd.print("LPG Gas Leakage");
lcd.setCursor(0, 1);
lcd.print(" Alert ");
delay(400);
digitalWrite(buzzer, LOW);
delay(500);
}

else
{
digitalWrite(buzzer, LOW);
lcd.clear();
lcd.print(" No LPG Gas ");
lcd.setCursor(0,1);
lcd.print(" Leakage ");
delay(1000);
}
}
CONCLUSION & FUTURE SCOPE:

Gas escape could result in severe accidents which ends in material losses and human injuries.
Gas escape happens chiefly because of poor maintenance of apparatus and inadequate
awareness of the individuals. Thus LPG escape detection are useful to stop accidents
and to avoid wasting human lives. This paper conferred LPG escape detection and alert
system. This technique triggers buzzer and displays the severity of the escape to alert
individuals once LPG escape is detected. This technique is incredibly straightforward
nevertheless reliable.

It leaves United States with the additional scope of improvement. Battery utilized in this
technique is of 5V that isn't that a lot of tolerable, in future improvement, we are able to
use a much bigger, reversible one, which may sustain the gas detection module for an
extended amount of your time, with alert whenever battery runs out' In additional
modification, additionally to solely escape detection we are able to resolve the
concentration of the gas too. The paper includes a smart viability to be launched in
industrial market, tiny scale industries having multiple cylinders hold on. With additional
improvement in style the system will be created additional handy and price effective for
the users.
REFERENCES
[1]. https://www.electronics-tutorials.ws/

[2]. https://components101.com/

[3]. https://academia.edu/

[4]. https://en.wikipedia.org/

[5]. https://youtube.com/

[6]. https://google.com/

You might also like