Professional Documents
Culture Documents
CHAPTER-1
INTRODUCTION
In India the supply of LPG through pipelines is not possible due to shortage of
LPG.As technology being improved many gas agencies or distributors have implemented
IVRS these days although due to daily busy schedules, customer finds very difficult to
book new cylinder, and also it is very dangerous when a LPG gas leakage occurs in any
domestic usage, chemical industry or in any other applications. This paper provides
automatic booking of LPG cylinder and to overcome the problem of LPG leakage. IVRS
system was borne from general complaints of consumers that landline phones of their
distributors were either busy or no one answered the call promptly. With this system, a
consumer can approach the gas agency by dialing a toll-free number and later will have
to follow the interactive directions. Finally, the system will announce the customer
number and confirms the customer number and also confirms the refill of cylinder.
So our proposal is to completely automate the process of refill booking without
human intervention that accordingly will help consumer against foul play. Our system is
also intended to help consumers to upgrade their safety standards, act in accordance with
statutory requirements on environmental commitments and most importantly the basic
function being prevented by accidents and protect life and property from disasters. The
primary objective of our paper is to measure the gas present in the cylinder when weight
of the cylinder reached below the fixed load, using the pervasive sensors.
The gas retailer gets the order for a new cylinder and the house owner receives the
message about the same and the details about the booking proceedings. And the
secondary objective is to provide any malfunction in gas system in order to prevent
damage or explosion of LPG.
Page 1
BLOCKDIAGRAM:
Page 2
CHAPTER-2
LITERATURE REVIEW
Automatic LPG leakage detection and hazard prevention for home security using
an alarm and exhaust fan. Gas leakage is a major concern with residential, commercial
premises and gas powered transportation vehicles. One of the preventive measures to
avoid the danger associated with gas leakage is to install a gas leakage detector at
vulnerable locations.
EXISTING SYSTEM
No automatic LPG cylinder empty detection
The consumers have the task of booking for replacement.
Many a time, the users are unaware of the level of gas in the cylinder so they fail
to book in time, resulting in inconvenience.
No automated leak control
GSM Module
Gas sensor detects the presence of gas, weight sensor gives the gas level in
cylinder, and microcontroller will take corrective or necessary actions. The status of all
these happening has to be conveyed to the owner of system or housemates. The
technology making it very easy to send and receive messages using GSM module works
on simple AT commands which can be implemented by interfacing it to the
microcontroller Rx and Tx pins. The GSM module used is SIMCOM 300 which uses
SIM memory to store the number of system owner or housemates and distributor or to
whoever the messages have to be forwarded. It requires very less memory to send and
receive text messages and operates on simple 12 Volt adapter.
Page 3
Application Areas:
Nearly 99 percent of the processors manufactured end up in embedded systems.
The embedded system market is one of the highest growth areas as these systems are
used in very market segment- consumer electronics, office automation, industrial
automation, biomedical engineering, wireless communication, data communication,
telecommunications, transportation, military and so on.
Page 4
Office automation: The office automation products using embedded systems are copying
machine, fax machine, key telephone, modem, printer, scanner etc.
Industrial automation: Today a lot of industries use embedded systems for process
control. These include pharmaceutical, cement, sugar, oil exploration, nuclear energy,
electricity generation and transmission. The embedded systems for industrial use are
designed to carry out specific tasks such as monitoring the temperature, pressure,
humidity, voltage, current etc., and then take appropriate action based on the monitored
levels to control other devices or to send information to a centralized monitoring station.
In hazardous industrial environment, where human presence has to be avoided, robots are
used, which are programmed to do specific jobs. The robots are now becoming very
powerful and carry out many interesting and complicated tasks such as hardware
assembly.
Page 5
Page 6
Page 7
Memory:
The memory is categorized as Random Access Memory (RAM) and Read Only
Memory (ROM). The contents of the RAM will be erased if power is switched off to the
chip, whereas ROM retains the contents even if the power is switched off. So, the
firmware is stored in the ROM.
Input devices:
Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the
embedded system is no easy task. Many embedded systems will have a small keypad-you
press one key to give a specific command. A keypad may be used to input only the digits.
Many embedded systems used in process control do not have any input device for user
interaction.
Output devices:
Dept of ECE, SREC, NANDYAL
Page 8
Communication interfaces:
The embedded systems may need to, interact with other embedded systems at
they may have to transmit data to a desktop. To facilitate this, the embedded systems are
provided with one or a few communication interfaces such as RS232, RS422, RS485,
Universal Serial Bus (USB), IEEE 1394, Ethernet etc.
Application-specific circuitry:
Sensors, transducers, special processing and control circuitry may be required fat
an embedded system, depending on its application. This circuitry interacts with the
processor to carry out the necessary work. The entire hardware has to be given power
supply either through the 230 volts main supply or through a battery. The hardware has to
design in such a way that the power consumption is minimized.
3.2 POWER SUPPLY:
The input to the circuit is applied from the regulated power supply. The a.c. input
i.e., 230V from the mains supply is step down by the transformer to 12V and is fed to a
rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to
get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to remove any
a.c components present even after rectification. Now, this voltage is given to a voltage
regulator to obtain a pure constant dc voltage
Page 9
230V
AC
D.C
Output
50Hz
Step
down
transfor
Bridge
Rectif
er
Filter
voltag
e
Filter:
Page 10
mains voltage and load is maintained constant. However, if either of the two is varied,
D.C. voltage received at this point changes. Therefore a regulator is applied at the output
stage.
Voltage regulator:
As the name itself implies, it regulates the input applied to it. A voltage regulator
is an electrical regulator designed to automatically maintain a constant voltage level. In
this project, power supply of 5V and 12V are required. In order to obtain these voltage
levels, 7805 and 7812 voltage regulators are to be used. The first number 78 represents
positive supply and the numbers 05, 12 represent the required output voltage levels.
CHAPTER-4
Dept of ECE, SREC, NANDYAL
Page 11
Fig:4.1 GSm
GSM-History
Developed by Group Special Mobile (founded 1982) which was an
CEPT (Conference of European Post and Telecommunication)
Aim : to replace the incompatible analog system
Page 12
initiative of
Today many providers all over the world use GSM (more than 135
Countries in Asia, Africa, Europe, Australia, America)
More than 1300 million subscribers in world and 45 million subscribers in India.
GSM IN WORLD
Fig:GSM in World
GSM SERVICES
Dept of ECE, SREC, NANDYAL
Page 13
Tele-services
Supplementary services
Call related services :
Call Forwarding- Calls can be sent to various numbers defined by the user
Page 14
Mobile Equipment
Page 15
Page 16
Page 17
Made up of three sub-classes: The White List, The Black List and
the Gray List
Page 18
OPERATION GSM:
Call Routing:
Call Originating from MS
Call termination to MS
Page 19
2.
3.
4.
5.
6.
7.
Incoming Calls:
Dept of ECE, SREC, NANDYAL
Page 20
Incoming a call
1. Calling a GSM subscribers
2. Forwarding call to GSMC
3. Signal Setup to HLR
4. Request MSRN from VLR
5. Forward responsible MSC to GMSC
6. Forward Call to current MSC.
7.
8. Paging of MS
9.
MS answers
Page 21
Page 22
GSM Applications
Mobile telephony
GSM-R
Dept of ECE, SREC, NANDYAL
Page 23
Page 24
Page 25
Power-off Flag
DESCRIPTION:
The AT89S8252 is a low-power, high-performance CMOS 8-bit microcontroller
with 8K bytes of downloadable Flash programmable and erasable read-only memory
and 2K bytes of EEPROM. The device is manufactured using Atmels high-density
nonvolatile memory technology and is compatible with the industry-standard 80C51
instruction set and pinout.
Page 26
Pin Description
VCC
Page 27
ALE/PROG
Address Latch Enable is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG)
during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6
the oscillator frequency and may be used for external timing or clocking purposes. If
desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit
set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is
weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in
external execution mode.
PSEN (Program Store Enable)
Page 28
Page 29
Page 30
Page 31
R
P2.0
Page 32
Page 33
Dept of ECE,SREC,NANDYAL.
Page 34
Vcc
P1.0
Light-emitting diodes are elements for light signalization in electronics. They are
manufactured in different shapes, colors and sizes. For their low price, low consumption and
simple use, they have almost completely pushed aside other light sources- bulbs at first place.
They perform similar to common diodes with the difference that they emit light when current
flows through them.
Fig:4.9 LED
Page 35
(MSB)
(LSB)
GATE
M0
C/T
M1
M0
GATE
C/T
M1
GATE
Every timer has a means of starting and stopping. The timers in the 8052 have both.
The start and stop of the timer are controlled by the way of software by the TR (timer start)
bits TR0 and TR1. The hardware way of starting and stopping the timer by an external source
is achieved by making GATE=1 in the TMOD register.
C/T
Dept of ECE,SREC,NANDYAL.
Page 36
M0
Mode
Operating Mode
Dept of ECE,SREC,NANDYAL.
Page 37
Page 38
Page 39
SM0
SM1
SM2
REN
TB8
RB8
TI
SM0
SCON.7
SM1
SCON.6
SM2
SCON.5
REN
SCON.4
TB8
SCON.3
RB8
SCON.2
TI
SCON.1
RI
SCON.0
Dept of ECE,SREC,NANDYAL.
Page 40
A model described here is for its low price and great possibilities most frequently used
in practice. It is based on the HD44780 . It displays all the alphabets, Greek letters,
punctuation marks, mathematical symbols etc. In addition, it is possible to display symbols
that user makes up on its own. Automatic shifting message on display (shift left and right),
appearance of the pointer, backlight etc. are considered as useful characteristics.
Pins Functions
There are pins along one side of the small printed board used for connection to the
microcontroller. There are total of 14 pins marked with numbers (16 in case the background
light is built in). Their function is described in the table below:
Function
Pin
Number
Name
Logic
State
Description
Ground
Vss
0V
Power supply
Vdd
+5V
Contrast
Vee
0 - Vdd
Control of
operating
Dept of ECE,SREC,NANDYAL.
RS
R/W
0
1
D0 D7 are interpreted as
commands
D0 D7 are interpreted as data
LCD)
Page 41
1
From 1 to 0
Data / commands
D0
0/1
Bit 0 LSB
D1
0/1
Bit 1
D2
0/1
Bit 2
10
D3
0/1
Bit 3
11
D4
0/1
Bit 4
12
D5
0/1
Bit 5
13
D6
0/1
Bit 6
14
D7
0/1
Bit 7 MSB
LCD screen:
LCD screen consists of two lines with 16 characters each. Each character consists of
5x7 dot matrix. Contrast on display depends on the power supply voltage and whether
messages are displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied
on pin marked as Vee. Trimmer potentiometer is usually used for that purpose. Some versions
of displays have built in backlight (blue or green diodes). When used during operating, a
resistor for current limitation should be used (like with any LE diode).
Dept of ECE,SREC,NANDYAL.
Page 42
R RW D7 D6 D5 D4 D3 D2 D1 D0
Dept of ECE,SREC,NANDYAL.
Page 43
Execution
Time
Clear display
0 0 0
1.64mS
Cursor home
0 0 0
1.64mS
0 0 0
40uS
0 0 0
U B
40uS
Cursor/Display Shift
0 0 0
1 D/C R/L x
Function set
0 0 1
0 1
B
F
D
L
40uS
40uS
CGRAM address
40uS
DDRAM address
0 D7 D6 D5 D4 D3 D2 D1 D0
40uS
1 D7 D6 D5 D4 D3 D2 D1 D0
40uS
D 1 = Display on
0 = Display off
U 1 = Cursor on
0 = Cursor off
Dept of ECE,SREC,NANDYAL.
40uS
DDRAM address
0 = Decrement (by 1)
S 1 = Display shift on
I/
Page 44
LCD Initialization
Once the power supply is turned on, LCD is automatically cleared. This process lasts
for approximately 15mS. After that, display is ready to operate. The mode of operating is set
by default. This means that:
1. Display is cleared
2. Mode
DL = 1 Communication through 8-bit interface
N = 0 Messages are displayed in one line
F = 0 Character font 5 x 8 dots
3. Display/Cursor on/off
D = 0 Display off
U = 0 Cursor off
B = 0 Cursor blink off
Dept of ECE,SREC,NANDYAL.
Page 45
At the lowest level, keyboards are organized in a matrix of rows and columns. The
CPU accesses both rows and columns through ports. Therefore, with two 8-bit ports, an 8*8
matrix of keys can be connected to a microprocessor. When a key is pressed, a row and a
column make a contact, otherwise there is no connection between rows and columns. A single
microcontroller (consisting of a microprocessor, RAM, EPROM and several ports all on a
Dept of ECE,SREC,NANDYAL.
Page 46
Dept of ECE,SREC,NANDYAL.
Page 47
EEPROM:
In the design of all microprocessors-based systems, semiconductor memories are used
as primary storage for code and data. Semiconductor memories are connected directly to the
CPU and they are the memory that the CPU first asks for information (code and data). For
this reason, semiconductor memories are sometimes referred to as primary memory.
Important Terminology common to all Semiconductor Memories:
Memory capacity:
The number of bits that a semiconductor memory chip can store is called chip
capacity. It can be in units of Kilobits, Megabits and so on. This must be distinguished from
the storage capacity of computer system. While the memory capacity of a memory IC chip is
always given in bits, the memory capacity of a computer system is given in bytes.
Memory organization:
Memory chips are organized into a number of locations within the IC. Each location
can hold 1 bit, 4 bits, 8 bits or even 16 bits, depending on how it is designed internally. The
number of bits that each location within the memory chip can hold is always equal to the
number of data pins on the chip. i.e., the total number of bits that a memory chip can store is
equal to the number of locations times the number of data bits per location.
Speed:
One of the most important characteristics of a memory chip is the speed at which its
data can be accessed. The speed of the memory chip is commonly referred to as its access
time. The access time of memory chip varies from a few nanoseconds to hundreds of
nanoseconds, depending on the IC technology used in the design and fabrication process.The
Dept of ECE,SREC,NANDYAL.
Page 48
Dept of ECE,SREC,NANDYAL.
Page 49
These buzzers feature low power consumption, a safe, spark-free and non-contact
structure, and a small size and light weight for an easy mounting to printed circuit boards. As
a result, an increasing number of piezoceramic buzzers are now used to generate an artificial
voice in combination with voice synthesizing ICs. To produce high-quality piezoceramic
buzzers, FDK has capitalized on many years of piezoceramics production and outstanding
ceramic processing technologies and thin film forming techniques. By adding a sophisticated
audio know-how to this manufacturing expertise, FDK offers a large array of electronic tone
generating products, such as piezoceramic diaphragms, sounders and buzzers, to meet loud
sound outputs, wide frequency ranges, and many other requirements.
Page 50
Dept of ECE,SREC,NANDYAL.
Page 51
Fig:4.16 Zigbee
4.12Relay:
The main operation of a relay comes in places where only a low-power signal
can be used to control a circuit. It is also used in places where only one signal can be
used to control a lot of circuits. The application of relays started during the invention
of telephones. They played an important role in switching calls in telephone
exchanges.They were also used in long distance telegraphy. They were used to
switch the signal coming from one source to another destination.
Fig:4.17 Relay
CHAPTER-5
HARDWARE DESCRIPTION
Dept of ECE,SREC,NANDYAL.
Page 52
In this prototype, gas leakage detection has been given a highest priority. MQ6 placed
in the vicinity of the gas cylinder. In the advent of leakage, the resistance of the sensor
decreases increasing its conductivity. Corresponding pulse is fed to microcontroller and
simultaneously switches on the buzzer and exhaust fan which we can reset by a manual reset
Dept of ECE,SREC,NANDYAL.
Page 53
SOFTWARE DESCRIPTION
Keil development tools, designed for ARM processor-based microcontroller devices,
support every level of developer from the professional application engineer to the student just
learning about embedded software development. The industry-standard Keil C/C++
Compilers, Macro Assemblers, Debuggers, Real-Time Kernels, and Single-board Computers
support ALL ARMcompatible derivatives and help you in getting your projects completed on
schedule. Embedded C is a set of language extensions for the C Programming language by
the C Standards committee to address commonality issues that exist between C extensions for
different embedded systems. Embedded C programming requires nonstandard extensions to
the C language in order to support exotic features such as fixed-point arithmetic, multiple
distinct memory banks, and basic I/O operations. In 2008, the C Standards Committee
extended the C language to address these issues by providing a common standard for all.
CHAPTER-6
ADVANTAGES AND APPLICATIONS
Dept of ECE,SREC,NANDYAL.
Page 54
CHAPTER-7
CONCLUSION
Dept of ECE,SREC,NANDYAL.
Page 55
CONCLUSION:
The gas leakage detection system was proposed, designed and successfully
implemented in this paper for home safety and industrial applications. This system detects the
leakage of the LPG and alerts the consumer about the leak by SMS and as an emergency
measure the system will turn off the power supply, while activating the alarm. Along with gas
leakage detection, this system gives a fully automated approach towards the gas booking.
Real time weight measurement of the gas and its display on LCD makes it an efficient home
security system and also can be used in industries and other places to detect gas leaks. This
project is implemented using the 8051 processor and simulated using the Keil software. The
cost involved in developing the system is significantly low and is much less than the cost of
gas detectors commercially available in the market.
REFERENCES
Dept of ECE,SREC,NANDYAL.
Page 56
KEIL COMPILER
Keil Software is the leading vendor for 8/16-bit development tools (ranked at first
position in the 2004 Embedded Market Study of the Embedded Systems and EE Times
magazine). Keil Software is represented world-wide in more than 40 countries. Since the
Dept of ECE,SREC,NANDYAL.
Page 57
Vision3 :
The Vision3 IDE is a Windows-based software development platform that combines
a robust editor, project manager, and makes facility. Vision3 integrates all tools including
the C compiler, macro assembler, linker/locator, and HEX file generator. Vision3 helps
expedite the development process of your embedded applications by providing the following:
Dept of ECE,SREC,NANDYAL.
Page 58
Integrated make facility for assembling, compiling, and linking your embedded
applications,
Dialogs for all development tool settings,
True integrated source-level Debugger with high-speed CPU and peripheral simulator,
Advanced GDI interface for software debugging in the target hardware and for
successfully develop embedded applications. They are easy to use and are guaranteed to help
you achieve your design goals.
The Vision3 IDE and Debugger is the central part of the Keil development tool
chain. Vision3 offers a Build Mode and a Debug Mode.
In the Vision3 Build Mode you maintain the project files and generate the
application.
Dept of ECE,SREC,NANDYAL.
Page 59