Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 75

A Mini-Project report on

GSM BASED LPG WEIGHT AND LPG LEAKAGE


DETECTION SYSTEM

Submitted in partial fulfillment of the


requirements for the award of the degree
of
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
SUBMITTED BY
Manish. D (19P61A04K5)
Pavan Kumar. Y (19P61A04K7)
Shiva Kumar. T (20P65A0441)

Under the Esteemed Guidance of


Mrs. J. Manga
Assistant Professor
Department of Electronics and Communication Engineering

(Affiliated to JNTU Hyderabad, Approved by APSCHE &AICTE)


Aushapur (v), Ghatkesar (m), Medchal Dist, Hyderabad-501301
2022
Department of Electronics and Communication Engineering

CERTIFICATE

This is to certify that the Mini Project report “GSMBASEDLPGWEIGHTANDLPGLEAKAGE


DETECTIONSYSTEM” being submitted by Manish. D(19P61A04K5), Pavan Kumar.
Y(19P61A04K7), Shiva Kumar. T(20P65A0441), in partial fulfillment for the award of the
Degree of Bachelor of Technology in ELECTRONICS & COMMUNICATION
ENGINEERING to Jawaharlal Nehru Technological University is a record of a
bonafide work carried out by them under my guidance and supervision.

The result embodied in this project report has not been submitted to any other
University/Institution for the award of any Degree/Diploma.

Internal Guide Head of the Department


Mrs.J.Manga Dr. U.Poorna laxmi
Assisstant Professor Professor

EXTERNAL EXAMINER
CANDIDATES DECLARATION

We hereby declare that this Mini Project Report titled “GSM BASED LPG WEIGHT
AND LPG LEAKAGE DETECTION SYSTEM” submitted by us to the Department of
Electronics and Communication Engineering, VBIT, Aushapur, Under JNTUH, is a
Bonafide work undertaken by and it is not submitted to any other University or Institution
for the award of any degree or diploma.

By

Manish. D (19P61A04K5)
Pavan Kumar. Y (19P61A04K7)
Shiva Kumar. T (20P65A0441)
ACKNOWLEDGEMENT
At the outset we sincerely thank God for having got my Mini project report completed in time.
Firstly we would thank our parents who have been a motivating factor throughout our lives.
Secondly we sincerely thank our principal Dr. PVS Srinivas and our Head of the department Dr.
U.poorna laxmi for their kind cooperation and Encouragement for the successful completion of
Seminar work and providing the necessary facilities.

We are most obliged and grateful to our project guide Mrs. J. Manga, for giving us guidance in
completing this project successfully.

We express our sincere gratitude to our Project coordinators, Department of ECE and my other
faculty for attending our project seminars and for their insightful comments and constructive
suggestions to improve the quality of this project work.

By

Manish. D (19P61A04K5)
Pavan Kumar. Y (19P61A04K7)
Shiva Kumar. T (20P65A0441)
ABSTRACT

The objective of this work is to monitor the gas cylinder continuously and display the weight of
gas present inside the cylinder and send an alert to the user when the gas weight comes below the
threshold level of 1kg, it sends a message to the user and it also detects any leakage occurring
and if any leakage is detected it will be displayed through the LCD display and sends an SMS
alert through GSM module to the user.

The weight of the LPG gas is calculated by using the below formula:

LPG weight = Actual weight received by the weight sensor – actual weight of the empty gas
cylinder
CERTIFICATES I
I
II
CANDIDATE DECLARATION
I
ACKNOWLEDGMENT
IV
ABSTRACT
V
LIST OF FIGURES
V
LIST OF TABLES I

VI

CHAPTER-1 INTRODUCTION
INTRODUCTION
AIM
ADVANTAGES
DISADVANTAGES
LITERATURE SURVEY
CHAPTER-2 ANALYSIS
HARDWARE REQUIREMENTS
GSM MODULE
ARDUINO UNO BOARD
MQ2 SENSOR
LOADCELL
LCD
POWER SOURCE DESCRIPTION
TRANSFORMER
CHAPTER-3 DESIGN AND IMPLEMENTATION
BLOCK DIAGRAM
CIRCUIT DIAGRAM
HARDWARE IMPLEMENTATION
SOFTWARE IMPLEMENTATION
CHAPTER-4 RESULTS
CHAPTER-5 CONCLUSION AND REFERENCE
NK
LIST OF FIGURES

S.NO TITLE PAGE.NO

2.1 Blocks of hardware embedded system 12


3.1 Arduino uno 14
3.2 Ultrasonic sensor 19
3.3 Timing diagram 20
3.4 16*2 Lcd display 21
3.5 pin diagram of lcd display 22
3.6 Servo motor 24
3.7 Internet of things 26
3.8 key enabling technologies of Iot 29
3.9 Iot Architecture 32
4.1 Block diagram 33
4.2 Circuit diagram 35
4.3 Usb cable 38
5.1 Connecting the wifi module 48
5.2 Entering ip address and telnet port 48
5.3 Click on the connect the server has connected 49
5.4 Command for changing the maximum count 49
5.5 Customer entering into the shop 50
5.6 maximum count is reached 50
LIST OF TABLES
S.NO TITLE PAGE .NO
3.1 Technical specifications of Arduino uno 15
3.2 Electrical parameters 20
CHAPTER-1
INTRODUCTION
INTRODUCTION
GSM based LPG weight and LPG leakage detection System has application in Home, Hotels,
restaurants & Industries. This work is used to monitor the weight of LPG gas cylinder. Whenever
LPG Gas cylinder is empty, we give request for new cylinder at the office of Gas cylinder
provider. several times it happens that because of the Rush or due to the shortage of cylinder,
there is a delay in providing the gas cylinder. Main reason is, we inform the gas provider at the
last moment when the gas is empty. To avoid all such situations, we have implemented a project
called SMS based LPG gas weight detection using GSM technology. In this project we have used
a load cell as weight sensor. This sensor will be placed below the LPG gas cylinder. Output of
weight sensor is given to microcontroller. Microcontroller will continuously monitor the weight
of LPG gas. When this LPG gas becomes 20% of weight, this system sends low warning
message to the owner and owner will get SMS. The SMS will be “Weight of LPG gas is below
20%”.

AIM
The main aim of the project is to provide information about the weightage of the cylinder when it
is about only 10%, But also helps in providing the leakage of the gas using GSM module by
Arduino UNO Board when gas is leaked.

ADVANATGES
 Low cost
 Easy to implement and portable
 Detects the weight of the cylinder and intimates when there is 10% of gas remaining present in
the cylinder.
 It avoids the problematic situation or the trouble caused due to unavailability of gas cylinder.
Generally unavailability is caused by late intimation or late booking of gas cylinder.
 It also detects the gas leakage and intimates.
 Buzzer gets turned on when weight of the cylinder is 10% and when gas leakage found.

DISADVANTAGES
 The circuit requires power supply
 GSM module provides limited data rate capability, for higher data rate GSM advanced version
devices are used.
LITERATURE SURVEY
 In 1983, work began to develop a European standard for digital cellular voice telecommunications when
the European Conference of Postal and Telecommunications Administrations (CEPT) set up the Groupe
Spécial Mobile (GSM) committee and later provided a permanent technical-support group based in Paris.
Five years later, in 1987, 15 representatives from 13 European countries signed a memorandum of
understanding in Copenhagen to develop and deploy a common cellular telephone system across Europe,
and EU rules were passed to make GSM a mandatory standard. The decision to develop a continental
standard eventually resulted in a unified, open, standard-based network which was larger than that in the
United States.
 In February 1987 Europe produced the first agreed GSM Technical Specification. Ministers from the four
big EU countries cemented their political support for GSM with the Bonn Declaration on Global
Information Networks in May and the GSM MoU was tabled for signature in September. The MoU drew in
mobile operators from across Europe to pledge to invest in new GSM networks to an ambitious common
date.
 In this short 38-week period the whole of Europe (countries and industries) had been brought behind GSM
in a rare unity and speed guided by four public officials: Armin Silberhorn (Germany), Stephen Temple
(UK), Philippe Dupuis (France), and Renzo Failli (Italy). In 1989 the Groupe Spécial Mobile committee
was transferred from CEPT to the European Telecommunications Standards Institute (ETSI). The
IEEE/RSE awarded to Thomas Haug and Philippe Dupuis the 2018 James Clerk Maxwell medal for their
"leadership in the development of the first international mobile communications standard with subsequent
evolution into worldwide smartphone data communication". The GSM (2G) has evolved into 3G, 4G and
5G.

.
CHAPTER-2
HARDWARE REQUIREMENTS
GSM MODULE(SIM800L)

FIG: GSM SIM800L


 The SIM800L is a GSM module from Simcom that gives any microcontroller GSM
functionality, meaning it can connect to the mobile network to receive calls and send and
receive text messages, and also connect to the internet using GPRS, TCP, or IP. Another
advantage is that the board makes use of existing mobile frequencies, which means it can be
used anywhere in the world.
 On the top surface of the GSM module, we can see a chip is mounted on the module board. This
is a Quad-band SIM800L GSM/GPRS cellular chip from SimCom in SMT type. SIM800L
supports Quad-band frequency its works on frequencies 850MHz, 900MHz, 1800MHz, and
1900MHz, it can transmit and receive voice, SMS, and data information with low power
consumption. The operating voltage of this chip is from 3.4V to 4.4V which makes it ideal to
operate by a LiPo battery supply. This chip supports a baud rate from 1200bps to 115200bps
with Auto-Baud detection. It has a tiny size of 17.6*15.7*2.3mm which makes it a good choice
for embedding into projects without a lot of space.
LED Status Indicators
 On the topmost right corner side of the SIM800L Module, we can see an LED that indicates the
status of your cellular network. After applying the power supply to the module the LED will
blink at three different ratios, which shows three different statuses of your cellular network.
Blink every 1s:
 When the LED Blinking with a delay of 1s, then it indicates that the GSM module is running but it hasn’t
made the connection to the cellular network yet.
Blink every 2s:
 When the LED Blinking with a delay of 2s, then it indicates that The GPRS data connection you requested
is active.
Blink every 3s:
 When the LED Blinking with a delay of 2s, then it indicates that the module has made contact with the
cellular network and it is ready to transmit/receive voice and SMS.
Antennas
 An antenna is a vital part of the module, it is used for voice or data communications as well as some SIM
commands. SIM800l GSM/GPRS module provides two ways to connect Antennas. There are two types of
antennas that can connect to the module one is a Helical GSM antenna and another one is PCB Antenna.
Helical GSM Antenna
 The Helical GSM antenna is made of wire, which usually comes with the module. It can be soldered
directly to the NET pin on PCB. This type of antenna is very useful in narrow space projects.
PCB Antenna
 We can see a U.FL male connector present at the top-left corner of the module, which is used to connect
the PCB antenna. This antenna has better performance and allows you to put your module inside a metal
case – as long the antenna is outside.
Micro-SIM socket
 On the backside of the module, a SIM socket is available, where we can insert an activated 2G micro-SIM
card that would work perfectly. When we insert a SIM card into the socket we must ensure that the notch
 point will upwards. Normally the symbol of the SIM card is engraved on the surface of the SIM socket that
helps us to identify the correct direction of SIM inserting.

Specifications
IC Chip SIM800L GSM cellular chip
Operating Voltage range 3.4V ~ 4.4V
Recommended supply voltage 4V
Peak Current 2A
Power consumption  Sleep mode < 2.0mA
 Idle mode < 7.0mA
 GSM transmission (avg): 350 mA
 GSM transmission (peek): 2000mA

Supported frequencies 2G Quad Band (850 / 950 / 1800 /1900 MHz)


Transmit Power  Class 4 (2W) for GSM850
 Class 1 (1W) for DCS1800

Interface UART (max. 2.8V) and AT commands


SIM card socket Micro SIM card socket
Network Status Indicator LED
Antenna connector U.FL connector and Header Pin
Working temperature range -40 to + 85 ° C
Module size 25 x 23 mm

SIM800L Pinout Configuration


Pin Number Pin Name Description
1 NET External antenna attachment pin
2 VCC Power supply pin, 3.4V to 4.4V
input
3 RST Reset pin, pull low for 100ms to
perform hard reset
4 RXD Serial data input
5 TXD Serial data output
6 GND Module ground reference
7,8 SPK Speaker differential output
9,10 MIC Microphone differential input
11 DTR Serial data terminal ready pin,
pull high to enable sleep mode
12 RING Interrupt output, active low
Features:
 Receive and make calls using the external speaker and electret microphone
 Receive and send SMS/ Text messages
 Send and receive GPRS data (TCP/IP, HTTP, etc.)
 Scan and receive FM radio broadcasts
 GPRS multi-slot class12 connectivity: max. 85.6kbps(download/upload)
 GPRS mobile station class B
 Controlled by AT Command (3GPP TS 27.007, 27.005 and SIMCOM enhanced AT Commands)
 Supports Real-Time Clock
 Supports A-GPS
 Low power consumption, 1mA in sleep mode
Power Supply
 One of the biggest issues with the SIM800L GSM module is the power supply to the module. If the power
supply can’t fulfill the required current well, then the module can’t make the connection to the cellular
network or it will shut down/reset in the middle of the action.
 The operating voltage range of the module is 3.4- to 4.4-V. But another problem is the SIM800L module
doesn’t have an integrated voltage regulator. So, we need an external power supply between 3.4V to 4.4V
(Ideal 4.1V). Also, remember that this module is a bit power-hungry and the current consumption can be up
to 2 A in peaks. So, the power supply should be able to source 2A.
ARDUINO UNO BOARD(ATMEGA328)

The microcontroller used in our project is Arduino UNO. The Uno is a microcontroller board
based on the ATmega328P. It has 14 digital input/output pins (of which 6 can be used as PWM
outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP
header and a reset button. It contains everything needed to support the microcontroller; simply
connect it to a computer with a USB cable or power it with a AC- to-DC adapter or battery to
get started.You can tinker with your UNO without worrying too much about doing something
wrong, worst case scenario you can replace the chip for a few dollars and start over again. "Uno"
means one in Italian and was chosen to mark the release of Arduino Software (IDE) 1.0. The Uno
board and version 1.0 of Arduino Software (IDE) were the reference versions of Arduino, now
evolved to newer releases. The Uno board is the first in a series of USB Arduino boards, and the
reference model for the Arduino platform; for an extensive list of current, past or outdated boards
see the Arduino index of boards.
(a) Programming: The Uno can be programmed with the Arduino Software (IDE). Select
"Arduino/Genuino Uno" from the Tools > Board menu (according to the microcontroller on your
board). The ATmega328 on the Uno comes preprogrammed with a boot loader that allows one to
upload new code to it without the use of an external hardware programmer. It communicates
using the original STK500 protocol (reference, C header files).
(b) Power: The Uno board can be powered via the USB connection or with an external power
supply. The power source is selected automatically. External (non-USB) power can come either
from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a
2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in
the GND and Vin pin headers of the POWER connector. 14 The board can operate on an external
supply from 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less
than five volts and the board may become unstable. If using more than 12V, the voltage regulator
may overheat and damage the board. The recommended range is 7 to 12 volts.

Microcontroller ATmega328P
Operating Voltage 5V

Input 7-12V
Voltage
(recommende
d)
Input Voltage (limit) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20mA
DC Current for 3.3V Pin 50mA
Flash Memory 32 KB (ATmega328P) of which 0.5
KB used
by boot loader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
Length 68.6 mm
Width 53.4mm

Weight 25g

The power pins are as follows:


 Vin: The input voltage to the Uno board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it
through this pin.
 5V: This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or
the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage your board. We don't advise it.
 3.3V: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
 GND: Ground pins.
 IOREF: This pin on the Uno board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage
and select the appropriate power source or enable voltage translators on the outputs to
work with the 5V or 3.3V.
(c) Memory
 The ATmega328 has 32 KB (with 0.5 KB occupied by the boot loader). It also has 2 KB
of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM
library).
(d) Input and Output
 Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. 15 Each pin can provide or
receive 20 mA as recommended operating condition and has an internal pull-up resistor
(disconnected by default) of 20-50k ohm. A maximum of 40mA is the value that must not be
exceeded on any I/O pin to avoid permanent damage to the microcontroller.
In addition, some pins have specialized functions:
 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These
pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
 External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachInterrupt() function for
details.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
using the SPI library.
 LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire
library. The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits
of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts,
though is it possible to change the upper end of their range using the AREF pin and the
analogReference() function. There are a couple of other pins on the board:
 AREF: Reference voltage for the analog inputs. Used with analogReference().
 Reset: Bring this line LOW to reset the microcontroller. Typically used to add a reset button
to shields which block the one on the board.
(e) Communication
The Uno has a number of facilities for communicating with a computer, another Uno b oard, or other
microcontrollers. The ATmega328 provides UART TTL (5V) serial 16 communication, which is
available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial
communication over USB and appears as a virtual com port to software on the computer. The 16U2
firmware uses the standard USB COM drivers, and no external driver is needed. However, on
Windows, a .inf file is required. The Arduino Software (IDE) includes a serial monitor which allows
simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash
when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but
not for serial communication on pin 0 and 1).

Features
 High performance, low power AVR 8 bit micro controller.
 Advanced RISC architecture.
• 331 power full instructions –most single clock cycle execution.
• 32×8 general purpose working registers.
• Fully static operation.
• Up to 20 MIPS throughput at 20MHz.
• On-chip 2-cycle multiplier.
 Special micro controller features.
• Power- on reset and programmable brown-out detection.
• Internal calibrated oscillator.

External and internal interrupt sources


• sleep modes: Idle ,ADC noise reduction, power save , power down.
 I/O and packages.
• 23 programmable I/O Lines.
• 28- pin PDIP, 32-lead TQFP , 28-pad QFN/MLF and 32-pad QFN/MLF.
 Operating voltages
• 1.8 - 5.5V.
 Temperature Range:
• 40°C to 105°C.

 Speed Grade:
 0 - 4MHz @ 1.8 - 5.5V.
 0 - 10MHz @ 2.7 -5.5V.
 0 - 20MHz @ 4.5 -5.5V.
 Power Consumption at 1MHz, 1.8V, 25°C.
• Active Mode: 0.2mA.
• Power-down Mode: 0.1μA.
• Power-save Mode: 0.75μA (Including 32 kHz RTC).
 MQ2 gas sensor is an electronic sensor used for sensing the concentration of gases in the air such as LPG,
propane, methane, hydrogen, alcohol, smoke and carbon monoxide.
 MQ2 gas sensor is also known as chemiresistor. It contains a sensing material whose resistance changes
when it comes in contact with the gas. This change in the value of resistance is used for the detection of
gas. MQ2 is a metal oxide semiconductor type gas sensor. Concentrations of gas in the gas is measured
using a voltage divider network present in the sensor. This sensor works on 5V DC voltage. It can detect
gases in the concentration of range 200 to 10000ppm.

Working Principle
 This sensor contains a sensing element, mainly aluminium-oxide based ceramic, coated with Tin dioxide,
enclosed in a stainless steel mesh. Sensing element has six connecting legs attached to it. Two leads are
responsible for heating the sensing element, the other four are used for output signals.
 Oxygen gets adsorbed on the surface of sensing material when it is heated in air at high temperature. Then
donor electrons present in tin oxide are attracted towards this oxygen, thus preventing the current flow.
 When reducing gases are present, these oxygen atoms react with the reducing gases thereby decreasing the
surface density of the adsorbed oxygen. Now current can flow through the sensor, which generated analog
voltage values.
 These voltage values are measured to know the concentration of gas. Voltage values are higher when the
concentration of gas is high.

Basic measuring circuit with MQ2 sensor

 The Variation in resistance of the sensors measured indirectly as a Change in voltage appearing across the
load resistor RL.
 In fresh air the current passing through the Sensor and RL in series is steady, but when a combustible gas
such as propane, methane etc. comes in contact with the Sensor surface, the Sensor resistance decreases in
accordance with the gas concentration present. The voltage Change across RL is the same when VC and
VH are supplied from AC or DC sources. One can feel that this circuit is most suitable for evaluating the
MQ2 performance because of the ease in measuring the output signal.
Features

 Operating Voltage is +5V

 Can be used to Measure or detect LPG, Alcohol, Propane, Hydrogen, CO and even methane

 Analog output voltage: 0V to 5V

 Digital Output Voltage: 0V or 5V (TTL Logic)

 Preheat duration 20 seconds

 Can be used as a Digital or analog sensor

 The Sensitivity of Digital pin can be varied using the potentiometer

FOR MODULE
Pin Number Pin Name Description
1 VCC This pin powers the module,
typically the operating voltage
is +5V
2 GND Used to connect the module to
system ground
3 DIGITAL OUT You can also use this sensor to
get digital output from this pin,
by setting a threshold value
using the potentiometer
4 ANALOG OUT This pin outputs 0-5V analog
voltage based on the intensity
of the gas

FOR SENSOR
Pin Number Pin Name Description
1 H-Pin Out of the two H pins, one pin is
connected to supply and the other to
ground
2 A-Pin The A pins and B pins are
interchangeable. These pins will be
tied to the Supply voltage
3 B-Pin The A pins and B pins are
interchangeable. One pin will act as
output while the other will be pulled
to ground
LOADCELL
As per dictionary, a load cell is described as a “weight measurement device necessary for
electronic scales that display weights in digits.” However, load cell is not restricted to weight
measurement in electronic scales. Load cell is a passive transducer or sensor which converts applied
force into electrical signals. They are also referred to as “Load transducers”.

Load cells use different operating principles, viz.,


 Load Cells based on fluid pressure
 Load Cells based on elasticity
 Load Cells based on magnetostriction effect or piezoelectric effect

However, the only load cells which are prevalent are the load cells based on strain gages.
Hence, the term „load cell‟ means „strain gage-based load cells‟. The reason behind the wide adoption
of strain gage-based load cells is their characteristics

 Highly precise and linear measurements


 Little influence due to temperature changes.
 Small size compared with other types of load cells.
 Long operating life due to lack of moving parts or any parts that generate friction.
 Ease in production due to small number of components.
 Excellent fatigue characteristics
Strain-gauge load cells convert the load acting on them into electrical signals. The measuring
is done with very small resistor patterns called strain gauges - effectively small, flexible circuit boards.
The gauges are bonded onto a beam or structural member that deforms when weight is applied, in turn
deforming the strain-gauge. As the strain gauge is deformed, it‟s electrical resistance changes in
proportion to the load. The change to the circuit caused by force is much smaller than the changes
caused by variation in temperature.

Higher quality load cells cancel out the effects of temperature using two techniques. By
matching the expansion rate of the strain gauge to the expansion rate of the metal it‟s mounted on,
undue strain on the gauges can be avoided as the load cell warms up and cools down. The most
important method of temperature compensation involves using multiple strain gauges, which all
respond to the change in temperature with the same change in resistance.
Some load cell designs use gauges which are never subjected to any force, but only serve to
counterbalance the temperature effects on the gauges that measuring force. Most designs use 4 strain
gauges, some in compression, and some under tension, which maximizes the sensitivity of the load
cell, and automatically cancels the effect of temperature. It is often easy to measure the parameters like
length, displacement, weight etc that can be felt easily by some senses.
However, it is very difficult to measure the dimensions like force, stress and strain that cannot
be really sensed directly by any instrument. For such cases special devices called strain gauges are
very useful. There are some materials whose resistance changes when strain is applied to them or
when they are stretched and this change in resistance can be measured easily. For applying the strain
you need force, thus the change in resistance of the material can be calibrated to measure the applied
force. Thus the devices whose resistance changes due to applied strain or applied force are called as
the strain gauges.
Load cell is transducer which transforms force or pressure into electrical output. Magnitude of
this electrical output is directly proportion to the force being applied. Load cells have strain gauge,
which deforms when pressure is applied on it. And then strain gauge generates electrical signal on
deformation as its effective resistance changes on deformation. A load cell usually consists of four
strain gauges in a Wheatstone bridge configuration. Load cell comes in various ranges like 5kg, 10kg,
100kg and more, here we have used Load cell, which can weight upto 40kg.
A load cell is an electronic sensor for measuring weight and force. When a force is applied to
it, a weak electrical signal at the millivoltage level appears on its output wires. In fact, the load cell is a
transducer which converts force into measurable electrical output.
A load cell consists of a metal core and a set of electrical resistances that transform when a
force is applied to it. But after the force is removed, it returns to its original state. The reversibility of
this material determines the quality and accuracy of the load cell. The equivalent electrical circuit of a
load cell is as follows:
Load cells have 4 wires:
 Red for Excitation+
 Black for Excitation-
 White for Output-
 Green for Output+

Be careful about the side of the load cell when you’re putting a weigh on it. Usually, there is an arrow on
the module that shows the force direction. With the help of this arrow, you can place the weight and the load cell
correctly.
Interfacing a Load Cell with Arduino
The output signal produced by the load cell is in range of millivolts, so we need an amplifier to convert the
signal into a level that we can later transform it into a digital signal and process it. For this purpose, we use HX711
amplifier sensor. The HX711 amplifier sensor includes a HX711 chip with analog-to-digital conversion capability
in 24-bit accuracy. The HX711 module amplifies the low-voltage output of the load cell and sends it to the
Arduino so that the Arduino eventually calculate weight from this data. HX711 on breakout board - This microchip
is specially made for amplifying the signals from load cells and reporting them to mircocontroller. The load cells
plug into this board, and this board tells the Arduino what the load cells measure.
A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated optical
device that uses the light-modulating properties of liquid crystals combined with polarizer Liquid
crystals do not emit light directly, instead using a backlight or reflector to produce images in color or
monochrome LCDs are available to display arbitrary images (as in a general-purpose computer
display) or fixed images with low information content, which can be displayed or hidden. For
instance: preset words, digits, and seven-segment displays, as in a digital clock, are all good examples
of devices with these displays. They use the same basic technology, except that arbitrary images are
made from a matrix of small pixels, while other displays have larger elements. LCDs can either be
normally on (positive) or off (negative), depending on the polarizer arrangement. For example, a
character positive LCD with a backlight will have black lettering on a background that is the color of
the backlight, and a character negative LCD will have a black background with the letters being of
the same color as the backlight.
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.
 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 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.
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

SENDING COMMANDS TO THE LCD:


Selecting the command register is all that is needed to submit commands. The measures are as
follows:
 select order register
 select write action
 send enable signal
 wait for LCD to process command
 Sending Data to LCD
 To transfer data, transfer data to LCD port
 select data register
 select write activity
Power source description

INTRODUCTION
 The power supplies are designed to convert high voltage AC mains electricity to a suitable low
voltage supply for electronics circuits and other devices. A RPS (Regulated Power Supply) is
the Power Supply with Rectification, Filtering and Regulation being done on the AC mains to
get a Regulated power supply for Microcontroller and for the other devices being interfaced to
it.
For example a 5V regulated power supply system as shown below:

Fig: Block Diagram of the Power Supply

 A power supply unit can by broken down into a series of blocks, each of which performs a
particular function. A d.c power supply which maintains the output voltage constant
irrespective of a.c mains fluctuations or load variations is known as “Regulated D.C Power
Supply”.
TRANSFORMER
 A transformer is an electrical device which is used to convert electrical power from one Electrical circuit to
another without change in frequency. Transformers convert AC electricity from one voltage to another with
little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is
AC. Step-up transformers increase in output voltage, step-down transformers decrease in output voltage.
Most power supplies use a step-down transformer to reduce the dangerously high mains voltage to a safer
low voltage. The input coil is called the primary and the output coil is called the secondary. There is no
electrical connection between the two coils; instead they are linked by an alternating magnetic field created
in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core.
Transformers waste very little power so the power out is (almost) equal to the power in. Note that as
voltage is stepped down current is stepped up. The ratio of the number of turns on each coil, called the
turn’s ratio, determines the ratio of the voltages. A step-down transformer has a large number of turns on
its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns
on its secondary (output) coil to give a low output voltage .

 Turns ratio = Vp/ VS = Np/NS
 Power Out= Power In
 VS x IS=VP x IP
 Vp = primary (input) voltage
Np = number of turns on primary coil
Ip  = primary (input) current    
RECTIFIER
A circuit which is used to convert a.c to dc is known as RECTIFIER. The process of conversion a.c
to d.c is called “rectification”.
FILTER
A Filter is a device which removes the a.c component of rectifier output but allows the d.c component to
reach the load
Capacitor Filter
We have seen that the ripple content in the rectified output of half wave rectifier is 121% or that of full-
wave or bridge rectifier or bridge rectifier is 48% such high percentages of ripples is not acceptable for most of the
applications.
REGULATOR
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output voltages. The
maximum current they can pass also rates them. Negative voltage regulators are available, mainly for use in dual
supplies. Most regulators include some automatic protection from excessive current ('overload
protection') and overheating ('thermal protection'). Many of the fixed voltage regulators ICs have 3
leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. The
LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply
(anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and
then when you turn on the power, you get a 5volt supply from the output pin.

Three terminal voltage regulator


Circuit diagram of power supply
CHAPTER
DESIGN AND IMPLEMENTATION
BLOCK DIAGRAM

 Load cell and MQ2 sensor are the two inputs which are interfaced with Arduino. The output of the Arduino will be based on applied inputs. In these we use MQ2 sensor to detect some

of the combustible gases like iso propane and butane, therefore those gases will be detected by MQ2 sensor, In which due to leakage detection we have to protect ourself we use alert

system as GSM and also for status purpose we use display called LCD display. Similarly one more application like LOADCELL(weight sensor) such that when it is below threshold

level than reference level then that user will get SMS through GSM and status will show on display.

 This work proposes an advance and innovative approach for LPG leakage detection, prevention and
automatically sends the alert to the user for refill. In advance, the system provides the automatically
monitors LPG regulator also if leakage is detected the system will automatically sends the SMS alert to the
user. Hence it helps to avoid the explosion and blast. The proposed work consists of a Arduino, Power
supply, LCD Display, GSM modem, MQ2 sensor, Load cell.
 Arduino: In this project Arduino plays important role in interfacing the components to it. Input is given to
the Arduino and output is taken from Arduino by using digital pins for displaying the output.
CIRCUIT DIAGRAM

 The power supply 5V is given to the Arduino through an adapter. When MQ2 sensor detects the gases and
compare with the comparator and which gives digital logic data to Arduino. If the logic is’0’ then the gas
leakage is detected similarly when the logic is ‘1’ then the gas leakage is not detected therefore the Arduino
takes proper action, and SMS alert is sent to user phone in case of gas leakage occurs. The output of the
MQ2 sensor is given Arduino to the digital pin (D10) and the output of the Arduino is given to input as
LCD to display the status of the leakage. Whenever a force/pressure is applied on the load cell it will
converts force in to electrical signal, the output of the load cell is few milli volts. In HX711 it consisting of
ADC which is used to convert from analog to digital data given to Arduino for weight measurement.
Whenever cylinder weight goes below some threshold value. The SMS alert is given to the user for the
registration of new cylinder and displays the weight of the cylinder in LCD.

Arduino
 Arduino/Genuino Uno is a microcontroller board based on the ATMEGA328P. It has 14 digital
input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an
ICSP header and a reset button.
 Arduino uno microcontroller can sense the environment by receiving input from a variety of sensors
and can affect its surroundings by controlling lights, motors, and other actuators. The microcontroller
is programmed using the arduino programming language (based on wiring) and the arduino
development environment (based on processing). This controller can be used as a general purpose
device, which can read data, perform limited calculations depending up on the program prepared for
it, and control the other devices interfaced with this controller. The prime use of a microcontroller is
to control the operation of a machine using a fixed program that is stored in rom and that does not
change over the life time of the system
 Here MQ2 sensors and push buttons are interfaced with micro-controller at its input side, by
activating these devices command signals are generated for the controller; these are called set of
instructions. These instructions are used to move code and data from internal memory to the ALU.
These instructions in the form of above devices are coupled with pins to the IC package; these pins
are programmable, means capable of having several different functions depending up on the program
prepared for it. The microcontroller is concerned with getting data from and to its own pins; the
architecture and instruction set are optimized to handle data in bit, byte, and word size.

GSM MODULE

 The RX pin of the GSm module is connected to the TX pin of the Arduino UNO Board and TX pin
of the GSm is Connected to the RX pin of the Arduino UNO Board

MQ2 sensor
 The both analog pins and digital pins are used as digital pins. The circuit connections are mentioned
in the above figure , according to the pin connections the code is created to perform the task. VCC
pins of MQ2 sensor is connected to the +5v and ground to the ground.

Liquid crystal display

 To wire your LCD screen to your board, connect the following pins: LCD RS pin to digital pin 6. LCD
Enable pin to digital pin 7. LCD D4 pin to digital pin 5. LCD D5 pin to digital pin4. LCD D6 pin to digital pin
3. LCD D7 pin to digital pin 2. LCD R/W pin to GND. LCD VSS pin to GND.

Piezo electric buzzer


 One of the Pin is connected to the 11 th pin of the Arduino UNO Board and other Pin is
connected to the GND Pin of the Arduino UNO Board.
HARDWARE IMPLEMENTATION
 Switch on the kit.
 The LCD display will show empty which means the weight and gas leakage of LPG .
 We should place an object like phones or water bottle having tap. Whenever the phone is taken
which is placed on the loadcell, then the weightage is displayed using LCD in lbs units is converted
to grams which means the LPG weight is nearly equals to 10%. The GSM module starts blinking
slowly indicates that it is under process.
 Then immediately a message will be sent to the registered mobile number displays that the LPG is
going to complete and should take an immediate action.
 When LPG or dhoom stick lighted with fire is placed under the MQ2 sensor then it immediately
starts blinking and LCD displays the LPG gas is leaked, after that GSM module gets on state by
sending a message to the registered mobile number to take an action.

SOFTWARE IMPLEMENTATION
PROGRAMMING ARDUINO

Once Arduino studio IDE is installed on the computer, connect the board with computer using USB
cable. Now open the 46rduino IDE and choose the correct board by selecting
Tools>Boards>Arduino/Genuino Uno, and choose the correct Port by selecting Tools>Port.
Arduino Uno is programmed using Arduino programming language based on Wiring. To get it
started with Arduino Uno board and blink the built-in LED, load the example code by selecting
Files>Examples>Basics>Blink. Once the example code (also shown below) is loaded into your
IDE, click on the ‘upload’ button given on the top bar. Once the upload is finished, you should see
the Arduino’s built-in LED blinking. Below is the example code for blinking:

ARDUINO – INSTALLATION
After learning about the main parts of the Arduino UNO board, we are ready to learn how to set up
the Arduino IDE. Once we learn this, we will be ready to upload our program on the Arduino board.
In this section, we will learn in easy steps, how to set up the Arduino IDE on our computer and
prepare the board to receive the program via USB cable.
Step 1: First you must have your Arduino board (you can choose your favourite board) and a
USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega 2560, or
Diecimila, you will need a standard USB cable (A plug to B plug), the kind you would connect to a
USB printer as shown in the following image. In case you use Arduino Nano, you will need an A to
Mini-B cable instead as shown in the following image
Step 2: Download Arduino IDE Software.
You can get different versions of Arduino IDE from the Download page on the Arduino Official
website. You must select your software, which is compatible with your operating system (Windows,
IOS, or Linux). After your file download is complete, unzip the file.

Step 3: Power up your board.


The Arduino Uno, Mega, Duemilanove and Arduino Nano automatically draw power from either,
the USB connection to the computer or an external power supply. If you are using an Arduino
Diecimila, you have to make sure that the board is configured to draw power from the USB
connection. The power source is selected with a jumper, a small piece of plastic that fits onto two of
the three pins between the USB and power jacks. Check that it is on the two pins closest to the USB
port.
Connect the Arduino board to your computer using the USB cable. The green power LED (labeled
PWR) should glow.

Step 4: Launch Arduino IDE.


After your Arduino IDE software is downloaded, you need to unzip the folder. Inside the folder, you
can find the application icon with an infinity label (application.exe). Doubleclick the icon to start the
IDE
Step 5: Open your first project.
Once the software starts, you have two
options: Create a new project.
Open an existing project example.
To create a new project, select File  New
Here, we have selected Arduino Uno board according to our tutorial, but you must select the name
matching the board that you are using.

Step 7: Select your serial port.


Select the serial device of the Arduino board. Go to Tools -> Serial Port menu. This is likely to be
COM3 or higher (COM1 and COM2 are usually reserved for hardware serial ports). To find out,
you can disconnect your Arduino board and re-open the menu, the entry that disappears should be of
the Arduino board. Reconnect the board and select that serial port.
Step 8: Upload the program to your board.
Before explaining how we can upload our program to the board, we must demonstrate the
function of each symbol appearing in the Arduino IDE toolbar
CHAPTER
RESULTS
CHAPTER 6
CONCLUSION & REFERENCES
CONCLUSION
 The proposed gas weightage and gas leakage detection system is based on the Arduino UNO Board, MQ2
sensor, GSM module, Loadcell(weight sensor), LCD, Piezo elctric buzzer. By using Arduino UNO Board,
MQ2 sensor, GSM module are implemented with low cost and portable. It automatically detects the gas
leakage sensor and intimates us regarding the leakage.

REFERENCES
The following are the references made during the development of this project work.
Text Books:
 Linear Integrated Circuits – By: D. Roy Choudhury, Shail Jain
 Digital Electronics. By JOSEPH J.CARR
 Fundamental of Radio Communication: By A.SHEINGOLD
 Basic Radio and Television: By S.P.SHARMA
 Digital and Analog Communication System By: K. sam Shanmugam
 Relays and their applications - By: M.C.SHARMA
 Op-Amps Hand Book - By: MALVIND
 The concepts and Features of Micro-controllers - By: Raj Kamal
 The 8051 Micro-controller Architecture, programming & Applications - By: Kenneth J. Ayala
 Programming and Customizing the 8051 Micro-controller - By: Myke Predko
 Electronic Circuit guide book – Sensors – By JOSEPH J.CARR

Catalogs:
(1) TEXAS - LINEAR IC’s manual
(2) SIGNETICS - DIGITAL IC’s manual

Journals:
(1) Electronic Design
(2) Electronics for you
(3) Electronics Text
(4) Practical Electronics

You might also like