SlideShare uma empresa Scribd logo
1 de 66
Detection and Warning System for
Fireworks Warehouse Based On Wireless
Sensor Networks
A Project Report
Submitted in Partial Fulfillment of the Requirement for the Award of the
Degree of
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS & COMMUNICATION ENGINEERING
Submitted By
T.Prasad S.Mohammed Suhail
(11HM1A0482) (11HM1A0473)
M.Nagarjuna P.Sai kumar
(11HM1A0447) (11HM1A0461)
Under the Esteemed guidance of
Mr. K.Mahammad Haneef, M.Tech
Assistant professor,
Dept. of ECE
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING
ANNAMACHARYA INSTITUTE OF TECHNOLOGY AND SCIENCES
Affiliated to J.N.T.U.A, Anantapur, Approved by AICTE, New Delhi
Uttukur (P), C.K.Dinne (M), Kadapa-516003
2014-2015
ANNAMACHARYA INSTITUTE OF TECHNOLOGY AND SCIENCES
Affiliated to J.N.T.U.A, Anantapur, Approved by AICTE, New Delhi
Utukur (P), C.K.Dinne (M), Kadapa-516003
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING
Certificate
This is to certify that the project entitled "Detection and
warning system for fireworks warehouse based on wireless sensor
networks” isabonafidework done by
T. Prasad (11HM1A0482)
S. Mohammed Suhail (11HM1A0473)
M. Nagarjuna (11HM1A0447)
P. Sai Kumar (11HM1A0461)
In the Partial fulfillment of the requirement for the award of the degree
of BACHELOR OF TECHNOLOGY in ELECTRONICS &
COMMUNICATION ENGINEERING in ANNAMACHARYA
INSTITUTE OF TECHNOLOGY AND SCIENCES,KADAPA
during the academic year 2011-2015.The results of this work has not been
submitted to any other university or institutes for the award of any degree.
Signature of Guide Signature of the Head of the Department
Mr.K.Mahammad Haneef M.Tech, Mrs.T. Vijaya Nirmala,M.Tech,M.I.S.T.E
Assistant professor,Dept. of ECE. Assistant professor,Dept. of ECE.
A.I.T.S., Kadapa. A.I.T.S., Kadapa.
Viva-voce exam held on dated:
Signature of External Examiner
Acknowledgments
An endeavor of a long period can be successful only with the advice of many
well wishers. We take this opportunity to express our deep gratitude and appreciation
to all those who encouraged us for successfully completion of the project.
Our heartful thanks to the Guide, Mr. K. MAHAMMAD HANEEF,
Assistant Professor in Department of E.C.E, Annamacharya Institute of Technology
and Sciences, Kadapa for his valuable guidance and suggestions in analyzing and
testing throughout the period, till the end of project.
Our special thanks to Mrs.T.VIJAYA NIRMALA, Head of Electronics &
Communication Engineering, Annamacharya Institute of Technology and Sciences,
Kadapa for her timely suggestions and help in spite of the busy schedule.
We wish to express our sincere gratitude to Dr. A. SUDHAKARA REDDY,
Principal of Annamacharya Institute of Technology and Sciences, Kadapa for his
consistent help and encouragement to complete the project.
We are very much thankful to Sri C.GANGI REDDY, Hon’ Secretary of
Annamacharya Educational Trust, for his help in providing good facilities in our
college.
We wish to convey our gratitude and express sincere thanks to all D.C
(Departmental Committee) and P.R.C (Project Review Committee) members for their
support and co-operation rendered for successful submission of our Project.
Finally, we would like to express our sincere thanks to faculty members of
E.C.E department, lab technicians, and friends, one and all who has helped us to
complete the project work successfully.
PROJECT ASSOCIATES
T.Prasad (11HM1A0482)
S.Mohammed Suhail (11HM1A0473)
M.Nagarjuna (11HM1A0447)
P.Sai Kumar (11HM1A0461)
DECLARATION
We hereby declare that Project Work Status report entitled “Detection and
warning system for firework warehouse based on wireless sensor networks” being
submitted by us for award of degree of Bachelor of Technology in Electronics&
Communication Engineering, to Jawaharlal Nehru Technological University Anantapur,
and is a bonafide record of work done in Annamacharya Institute of Technology &
Sciences and has not been submitted to any other courses or university for award of any
degree.
PROJECT ASSOCIATES
T.Prasad (11HM1A0482)
S.Mohammed Suhail (11HM1A0473)
M.Nagarjuna (11HM1A0447)
P.Sai Kumar (11HM1A0461)
TABLE OF CONTENTS
===========================================================
CHAPETR NO. CONTENTS PAGE NO.
===========================================================
CHAPTER 1 INTRODUCTION 1-8
1.1 Embedded Systems Overview 1
1.2 Application Areas 2
1.3 Embedded System Architecture 5
1.4 Hard ware architecture of an Embedded System 6
CHAPTER 2 HARDWARE REQUIREMENTS 9-35
2.1 Block diagram 9
2.2 Power supply 10
2.2.1 Transformer 10
2.2.2 Rectifier 11
2.2.3 Filter 14
2.2.4 Regulator 14
2.3 Fire Sensor (LM35) 15
2.3.1 Introduction 15
2.3.2 Features 16
2.3.3 Pin Diagram 16
2.3.4 Applications 16
2.4 GSM 17
2.4.1 Introduction 17
2.4.2 GSM Advantages 18
2.4.3 GSM Network 18
2.4.4 GSM Network Areas 20
2.4.5 GSM Specifications 21
2.4.6 GSM Subscriber Services 22
2.5 MAX 232 24
2.5.1 Pin Description 26
2.5.2 Features 26
2.5.3 Applications 26
===========================================================
CHAPETR NO. CONTENTS PAGE NO.
===========================================================
2.6 LIQUID CRYSTAL DISPLAY 28
2.6.1 Introduction 28
2.6.2 Features 28
2.6.3 Shapes and sizes 29
2.6.4 Electrical Block Diagram 30
2.6.5 Power Supply for LCD Driving 30
2.6.6 Pin Description 31
2.6.7 Control Lines 31
2.7 RELAY SWITCH 33
2.7.1 Relay selection 34
CHAPTER 3 MICROCONTROLLER 36-47
3.1 Microcontroller 36
3.1.1 ARM Processor 36
3.1.2 ARM7 LPC 2148 micro controller 39
3.1.3 Pin diagram of LPC2148 40
3.2 Architectural overview 41
3.2.1 On chip memory 41
3.2.2 Vectored interrupt controller 42
3.2.3 Pin connects Block 42
3.2.4 10-Bit ADC 42
3.2.5 Real time clock 42
3.2.6 Fast general purpose parallel I/O (GPIO) 44
CHAPTER 4 SOFTWARE REQUIREMENTS 48-51
4.1 Keil Software 48
4.2 Flash magic 50
CHAPTER 5 RESULTS 52-55
CHAPTER 6 CONCLUSION 56
LIST OF FIGURES
============================================================
============================================================
Figure No. Title Of Figure Page No.
1.3 Embedded system architecture 6
1.4 General diagram of embedded system 7
2.1 Block diagram 9
2.2 Power supply 10
2.2.1 Step down transformer 11
2.2.2 Bridge rectifier 11
2.2.2(a) Positive half cycle of bridge rectifier 12
2.2.2(b) Negative half cycle of bridge rectifier 12
2.2.3 Charging and discharging of a capacitor 14
2.2.4 Voltage regulator 14
2.3.3 Pin diagram of LM35 16
2.4.3 GSM architecture 18
2.4.4 GSM network areas 20
2.5 Block diagram of MAX 232 25
2.5.1 Pin diagram of MAX 232 26
2.6.3 Different LCD screens 29
2.6.4 Electrical block diagram of LCD 30
2.6.5 Power supply of LCD driving 30
2.6.6 Pin diagram of 2*16 lines LCD 31
2.6.7 16X2 LCD Display 33
2.7 Relay switch 34
2.7 (a) Relay circuit 35
3.1.3 pin diagram of ARM7 LPC2148 40
3.2 ARM architecture diagram 41
5.1 Experimental setup of the project 52
5.2 LCD shows the locations of sensor 53
==============================================================
Figure No. Title Of Figure Page No.
==============================================================
5.3 LCD shows the fire is detected 54
5.4 After sending the message 54
5.5 Air pressure motor 54
5.6 Result in registered mobile number 55
LIST OF TABLES
===========================================================
============================================================
Table No. Title Of table Page No.
2.5 MAX232 25
2.5.3 Pin description of MAX232 27
2.6.2 Address locations for 1*16 line LCD 29
2.6.6 Pin description of LCD 31
ABSTRACT
The project title “Detection and warning system for firework warehouse
based on wireless sensor networks” indicates that the system continuously checks for
the presence of fire in industries. This is done with the help of a Fire sensor, which is
designed around a microcontroller. The Micro controller plays a major role in the
project for controlling purpose. Whenever the fire is detected by the sensor the
information will be sent to the microcontroller. Then the microcontroller takes the
control action by switching on or off the water sprinkler. By making use of these
kinds of projects we can provide the security in industries.
A regulated 5V, 500mA power supply, 7805 three terminal voltage regulator
are used here for voltage regulation. Bridge type full wave rectifier is used to
rectify the ac output of secondary of 230/12V step down transformer.
Key words: Fire sensor (LM35), Microcontroller (LPC2148), AC pressure motor, GSM
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 1
CHAPTER 1
INTRODUCTION
1.1 Embedded Systems Overview
An Embedded System is a combination of computer hardware and software,
and perhaps additional mechanical or other parts, designed to perform a specific
function. A good example is the microwave oven. Almost every household has one,
and tens of millions of them are used every day, but very few people realize that a
processor and software are involved in the preparation of their lunch or dinner.
This is in direct contrast to the personal computer in the family room. It is
comprised of computer hardware and software and mechanical components (disk
drives, for example). However, a personal computer is not designed to perform a
specific function rather, it is able to do many different things. Many people use the
term general-purpose computer to make this distinction clear. A general-purpose
computer is a blank slate, the manufacturer does not know what the customer will do
wish it. One customer may use it for a network file server another may use it
exclusively for playing games, and a third may use it to write the next great American
novel.
Frequently, an embedded system is a component within some larger system.
For example, modern cars and trucks contain many embedded systems. One embedded
system controls the anti-lock brakes, other monitors and controls the vehicle's
emissions, and a third displays information on the dashboard. In some cases, these
embedded systems are connected by some sort of a communication network, but that is
certainly not a requirement.
It is important to point out that a general-purpose computer is itself made up of
numerous embedded systems. For example, computer consists of a keyboard, mouse,
video card, modem, hard drive, floppy drive, and sound card-each ofwhich is an
embedded system. Each of these devices contains a processor and software and is
designed to perform a specific function.
If an embedded system is designed well, the existence of the processor and
software could be completely unnoticed by the user of the device. Such is the case for
a microwave oven, VCR, or alarm clock. In some cases, it would even be possible to
build an equivalent device that does not contain the processor and software. This could
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 2
be done by replacing the combination with a custom integrated circuit that performs
the same functions in hardware. However, a lot of flexibility is lost when a design is
hard-cooled in this way. It is much easier, and cheaper, to change a few lines of
software than to redesign a piece of custom hardware.
History
Embedded systems could not possibly have appeared before 1971. That was the
year Intel introduced the world's first microprocessor 4004.It was designed for use in a
line of business calculators produced by the Japanese Company BusiCom. Intel
proposed a general-purpose circuit that could be used throughout the entire line of
calculators. Intel's idea was that the software would give each calculator its unique set
of features.
The microcontroller was an overnight success, and its use increased steadily over
the next decade. Early embedded applications included unmanned space probes,
computerized traffic lights, and aircraft flight control systems. In the 1980s, embedded
systems quietly rode the waves of the microcomputer age and brought microprocessors
into every part of our kitchens (bread machines, food processors, and microwave
ovens), living rooms (televisions, stereos, and remote controls), and workplaces (fax
machines, pagers, laser printers, cash registers, and credit card readers).
It seems inevitable that the number of embedded systems will continue to
increase rapidly. Already there are promising new embedded devices that have
enormous market potential; light switches and thermostats that can be central
computer, intelligent air-bag systems that don't inflate when children or small adults
are present, pal-sized electronic organizers and personal digital assistants (PDAs),
digital cameras, and dashboard navigation systems. Clearly, individuals who possess
the skills and desire to design the next generation of embedded systems will be in
demand for quite some time.
1.2 Application Areas
Nearly 99% 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.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 3
 Consumer appliances
At home we use a number of embedded systems which include digital camera,
digital diary, DVD player, electronic toys, microwave oven, remote controls for TV
and air-conditioner, VCO player, video game consoles, video recorders etc. Today’s
high-tech car has about 20 embedded systems for transmission control, engine spark
control, air-conditioning, navigation etc. Even wristwatches are now becoming
embedded systems. The palmtops are powerful embedded systems using which we can
carry out many general-purpose tasks such as playing games and word processing.
 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.
 Medical electronics
Almost every medical equipment in the hospital is an embedded system. These
equipment’s include diagnostic aids such as ECG, EEG, blood pressure measuring
devices, X-ray scanners; equipment used in blood analysis, radiation, colonoscopy,
endoscopy etc. Developments in medical electronics have paved way for more
accurate diagnosis of diseases.
 computer networking
Computer networking products such as bridges, routers, Integrated Services
Digital Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay
switches are embedded systems which implement the necessary data communication
protocols. For example, a router interconnects two networks. The two networks may be
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 4
running different protocol stacks. The router’s function is to obtain the data packets
from incoming pores, analyse the packets and send them towards the destination after
doing necessary protocol conversion. Most networking equipment’s, other than the end
systems (desktop computers) we use to access the networks, are embedded systems
 Telecommunications
In the field of telecommunications, the embedded systems can be categorized
as subscriber terminals and network equipment. The subscriber terminals such as key
telephones, ISDN phones, terminal adapters, web cameras are embedded systems. The
network equipment includes multiplexers, multiple access systems, Packet Assemblers
Dissemblers (PADs), sate11ite modems etc. IP phone, IP gateway, IP gatekeeper etc.
are the latest embedded systems that provide very low-cost voice communication over
the Internet.
 Wireless technologies
Advances in mobile communications are paving way for many interesting
applications using embedded systems. The mobile phone is one of the marvels of the
last decade of the 20’h century. It is a very powerful embedded system that provides
voice communication while we are on the move. The Personal Digital Assistants and
the palmtops can now be used to access multimedia services over the Internet. Mobile
communication infrastructure such as base station controllers, mobile switching
centres are also powerful embedded systems.
 Insemination
Testing and measurement are the fundamental requirements in all scientific and
engineering activities. The measuring equipment we use in laboratories to measure
parameters such as weight, temperature, pressure, humidity, voltage, current etc. are all
embedded systems. Test equipment such as oscilloscope, spectrum analyser, logic
analyser, protocol analyser, radio communication test set etc. are embedded systems
built around powerful processors. Thank to miniaturization, the test and measuring
equipment are now becoming portable facilitating easy testing and measurement in the
field by field-personnel.
 Security
Security of persons and information has always been a major issue. We need to
protect our homes and offices; and also the information we transmit and store.
Developing embedded systems for security applications is one of the most lucrative
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 5
businesses nowadays. Security devices at homes, offices, airports etc. for
authentication and verification are embedded systems. Encryption devices are nearly
99 per cent of the processors that are manufactured end up in~ embedded systems.
Embedded systems find applications in every industrial segment-consumer electronics,
transportation, avionics, biomedical engineering, manufacturing, process control and
industrial automation, data communication, telecommunication, defence, security etc.,
used to encrypt the data/voice being transmitted on communication links such as
telephone lines. Biometric systems using fingerprint and face recognition are now
being extensively used for user authentication in banking applications as well as for
access control in high security buildings.
 Finance
Financial dealing through cash and cheques are now slowly paving way for
transactions using smart cards and ATM (Automatic Teller Machine) machines. Smart
card, of the size of a credit card, has a small micro-controller and memory; and it
interacts with the smart card reader! ATM machine and acts as an electronic wallet.
Smart card technology has the capability of ushering in a cashless society. Well, the
list goes on. It is no exaggeration to say that eyes wherever you go, you can see, or at
least feel, the work of an embedded system.
1.3 Embedded System Architecture
Every embedded system consists of custom-built hardware built around a
Central Processing Unit (CPU). This hardware also contains memory chips onto which
the software is loaded. The software residing on the memory chip is also called the
‘firmware’. The embedded system architecture can be represented as a layered
architecture as shown in Fig 1.3.
If an embedded system is designed well, the existence of the processor and
software could be completely unnoticed by the user of the device. Such is the case for
a microwave oven, VCR, or alarm clock. In some cases, it would even be possible to
build an equivalent device that does not contain the processor and software.
This could be done by replacing the combination with a custom integrated
circuit that performs the same functions in hardware. However, a lot of flexibility is
lost when a design is hard-cooled in this way. The office automation products using
embedded systems are copying machine, Fax machine, key telephone, modem, printer,
scanner etc.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 6
The operating system runs above the hardware, and the application software
runs above the operating system. The same architecture is applicable to any computer
including a desktop computer. However, there are significant differences. It is not
compulsory to have an operating system in every embedded system.
Fig.1.3 Embedded System Architecture
For small appliances, such as remote control units, air conditioners, toys etc.,
there is no need for an operating system and you can write only the software specific to
that application. For High end applications involving complex processing, it is
advisable to have an operating system. In such a case, need to integrate the application
software with the operating system and then transfer the entire software on to the
memory chip. Once the software is transferred to the memory chip, the software will
continue to run for a long time you don’t need to reload new software.
1.4 Hard ware architecture of an Embedded System
The various building blocks of the hardware architecture of an embedded
system, as shown in Fig 1.4. The building blocks are:
 Central Processing Unit (CPU)
 Memory (Read-only Memory and Random Access Memory)
 Input Devices
 Output devices
 Communication interfaces
 Application-specific circuitry
 A/D converter
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 7
 Electromechanical backup and safety
 External environment
Fig. 1.4 General diagram of embedded system
 Central Processing Unit (CPU)
The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller
is a low-cost processor. Its main attraction is that on the chip itself, there will be many
other components such as memory, serial communication interface, analog-to digital
converter etc. So, for small applications, a micro-controller is the best choice as the
number of external components required will be very less. On the other hand,
microprocessors are more powerful, but you need to use many external components
with them. D5P is used mainly for applications in which signal processing is involved
such as audio and video processing.
 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. When power is switched on, the processor reads the
ROM, the program is executed.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 8
 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; they take inputs from sensors or transducers 1’fnd produce
electrical signals that are in turn fed to other systems.
 Output devices
The output devices of the embedded systems also have very limited capability.
Some embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the
health status of the system modules, or for visual indication of alarms. A small Liquid
Crystal Display (LCD) may also be used to display some important parameters.
 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.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 9
CHAPTER 2
HARDWARE REQUIREMENTS
2.1 Block Diagram:
Fig 2.1 Block Diagram
The hardware components required for the system are
1. Power supply
2. Fire sensor LM35
3. GSM
4. MAX232
5. LCD
6. Relay switch
7. Ac pressure motor
LCD DISPLAY
ARM7 LPC2148
MICRO
CONTROLLE
R
POWER
SUPPL
Y
MAX232 GSMFIRE
SENSOR 1
FIRE
SENSOR 2
RELAY
AC
PRESSUR
E MOTOR
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 10
2.2 Power Supply
Usually, DC voltages are required to operate various electronic equipment and
these voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus
the a.c input available at the mains supply i.e., 230V is to be brought down to the
required voltage level.
Fig 2.2. Power supply block diagram
2.2.1 Transformer
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 voltage, step-down transformers
reduce voltage.
A step down power transformer is used to step down the AC voltage from the line
voltage of 110 VAC or 220 VAC i.e., it converts higher voltage at the input side to a
lower voltage at the output.
Step Down Transformer
In step down transformer secondary voltage is less than its primary voltage. It
is designed to reduce the voltage from the primary winding to the secondary winding.
As a step-down unit, the transformer converts high-voltage, low-current power into
low-voltage, high-current power. The larger-gauge wire used in the secondary winding
is necessary due to the increase in current.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 11
One of the most important considerations to increase transformer efficiency and reduce
heat is choosing the metal type of the windings. Copper windings are much more
efficient than aluminum and many other winding metal choices, but it also costs more.
Fig 2.2.1 Step down transformer
2.2.2 Rectifier
The main advantage of this bridge circuit is that it does not require a special
centre tapped transformer, thereby reducing its size and cost. The single secondary
winding is connected to one side of the diode bridge network and the load to the other
side as shown below.
The Diode Bridge Rectifier
The four diodes labelled D1 to D4 are arranged in "series pairs" with only two
diodes conducting current during each half cycle. During the positive half cycle of the
supply, diodes D1 and D2 conduct in series while diodes D3 and D4 are reverse biased
and the current flows through the load as shown below.
Fig 2.2.2 Bridge Rectifier
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 12
The Positive Half-cycle
Fig 2.2.2(a) Positive half cycle of Bridge rectifier
During the positive half cycle of the supply, diodes D1 and D2 conduct in
series, but diodes D3 and D4switch "OFF" as they are now reverse biased. The current
flowing through the load is the same direction as before.
The Negative Half-cycle
Fig 2.2.2(b) negative half cycle of Bridge rectifier
As the current flowing through the load is unidirectional, so the voltage
developed across the load is also unidirectional the same as for the previous two diode
full-wave rectifier, therefore the average DC voltage across the lot is 0.637Vmax.
However in reality, during each half cycle the current flows through two diodes instead
of just one so the amplitude of the output voltage is two voltage drops (2 x 0.7 = 1.4V)
less than the input VMAX amplitude. The ripple frequency is now twice the supply
frequency (e.g. 100Hz for a 50Hz supply)
Typical Bridge Rectifier
Although we can use four individual power diodes to make a full wave bridge
rectifier, pre-made bridge rectifier components are available "off-the-shelf" in a range
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 13
of different voltage and current sizes that can be soldered directly into a PCB circuit
board or be connected by spade connectors.
The image to the right shows a typical single phase bridge rectifier with one
corner cut off. This cut-off corner indicates that the terminal nearest to the corner is the
positive or +ve output terminal or lead with the opposite (diagonal) lead being the
negative or -ve output lead..
Bridge Rectifier Ripple Voltage
Where: I is the DC load current in amps, ƒ is the frequency of the ripple or
twice the input frequency in Hertz, and C is the capacitance in Farads.
The main advantages of a full-wave bridge rectifier is that it has a smaller AC
ripple value for a given load and a smaller reservoir or smoothing capacitor than an
equivalent half-wave rectifier. Therefore, the fundamental frequency of the ripple
voltage is twice that of the AC supply frequency (100Hz) where for the half-wave
rectifier it is exactly equal to the supply frequency (50Hz).
The amount of ripple voltage that is superimposed on top of the DC supply
voltage by the diodes can be virtually eliminated by adding a much improved π-
filter (pi-filter) to the output terminals of the bridge rectifier. This type of low-pass
filter consists of two smoothing capacitors, usually of the same value and a choke or
inductance across them to introduce a high impedance path to the alternating ripple
component.
Another more practical and cheaper alternative is to use an off the shelf 3-
terminal voltage regulator IC, such as a LM78xx (where "xx" stands for the output
voltage rating) for a positive output voltage or its inverse equivalent the LM79xx for a
negative output voltage which can reduce the ripple by more than 70dB (Datasheet)
while delivering a constant output current of over 1 amp.
In the next tutorial about diodes, we will look at the ZENER DIODE which
takes advantage of its reverse breakdown voltage characteristic to produce a constant
and fixed output voltage across itself.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 14
2.2.3 Filter
Filtering is performed by a large value electrolytic capacitor connected across
the DC supply to act as a reservoir, supplying current to the output when the varying
DC voltage from the rectifier is falling. The diagram shows the unfiltered varying DC
(dotted line) and the filtered DC (solid line). The capacitor charges quickly near the
peak of the varying DC, and then discharges as it supplies current to theoutput.
Fig 2.2.3 Charging and discharging of a capacitor
2.2.4 Regulator
A voltage regulator is an electrical regulator designed to automatically maintain
a constant voltage level. It may use an electromechanical mechanism, or passive or
active electronic components. Depending on the design, it may be used to regulate one
or more AC or DC voltages.
This is a simple DC regulated supply project using 7805 voltage regulator to
obtain a variable DC voltage range from 5V to 15V.
Fig 2.2.4 Voltage regulator
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 15
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. The L78xx series of three-terminal positive regulators is
available in TO-220, TO-220FP, TO-3, D2PAK and DPAK packages and several fixed
output voltages, making it useful in a wide range of applications.
The regulators can provide local on-card regulation, eliminating the distribution
problems associated with single point regulation. Each type employs internal current
limiting, thermal shut-down and safe area protection, making it essentially
indestructible. If adequate heat sinking is provided, they can deliver over 1 A output
current. Although designed primarily as fixed voltage regulators, these devices can be
used with external components to obtain adjustable voltage and currents.
2.3 Fire Sensor(LM35)
2.3.1 Introduction
The LM35 series are precision integrated-circuit temperature sensors, whose
output voltage is linearly proportional to the Celsius (Centigrade) temperature. The
LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin, as
the user is not required to subtract a large constant voltage from its output to obtain
convenient centigrade scaling. The LM35 does not require any external calibration or
trimming to provide typical accuracies of ±1/4°C at room temperature and ±3/4°C over
a full -55 to +150°C temperature range. Low cost is assured by trimming and
calibration at the wafer level. The LM35’s low output impedance, linear output, and
precise inherent calibration make interfacing to readout or control circuitry especially
easy. It can be used with single power supplies, or with plus and minus supplies. As it
draws only 60 µA from its supply, it has very low self-heating, less than 0.1°C in still
air. The LM35 is rated to operate over a -55° to +150°C temperature range, while the
LM35C is rated for a -40° to +110°C range (-10° with improved accuracy). The LM35
series is available packaged plastic TO-92 transistor package. The LM35D is also
available in an 8-lead surface mount small outline package and a plastic TO-220
package.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 16
2.3.2 Features
1. Calibrated directly in ° Celsius (Centigrade)
2. Linear + 10.0 mV/°C scale factor
3. 0.5°C accuracy guarantee able (at +25°C)
4. Rated for full -55° to +150°C range
5. Suitable for remote applications
6. Low cost due to wafer-level trimming
7. Operates from 4 to 30 volts
8. Less than 60 µA current drain
9. Low self-heating, 0.08°C in still air
10. Nonlinearity only ±1/4°C typical
11. Low impedance output, 0.1 for 1 mA load
2.3.3 Pin diagram
Fig 2.3.3 Pin diagram of LM 35
2.3.4 Applications
The LM35 can be applied easily in the same way as other integrated-circuit
temperature sensors. It can be glued or cemented to a surface and its temperature will
be within about 0.01°C of the surface temperature. This presumes that the ambient air
temperature is almost the same as the surface temperature; if the air temperature were
much higher or lower than the surface temperature, the actual temperature of the LM35
die would be at an intermediate temperature between the surface temperature and the
air temperature. This is especially true for the TO-92 plastic package, where the copper
leads are the principal thermal path to carry heat into the device, so its temperature
might be closer to the air temperature than to the surface temperature. To minimize this
problem, be sure that the wiring to the LM35, as it leaves the device, is held at the
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 17
same temperature as the surface of interest. The easiest way to do this is to cover up
these wires with a bead of epoxy which will insure that the leads and wires are all at
the same temperature as the surface, and that the LM35 die’s temperature will not be
affected by the air temperature. The TO-46 metal package can also be soldered to a
metal surface or pipe without damage. Of course, in that case the V- terminal of the
circuit will be grounded to that metal. Alternatively, the LM35 can be mounted inside
a sealed-end metal tube, and can then be dipped into a bath or screwed into a threaded
hole in a tank. As with any IC, the LM35 and accompanying wiring and circuits must
be kept insulated and dry, to avoid leakage and corrosion. This is especially true if the
circuit may operate at cold temperatures where condensation can occur. Insure that
moisture cannot corrode the LM35 or its connections.
2.4 GSM (Global System for Mobile communications)
2.4.1 Introduction
GSM (Global System for Mobile communications) is a cellular network, which
means that mobile phones connect to it by searching for cells in the immediate vicinity.
GSM networks operate in four different frequency ranges. Most GSM networks
operate in the 900 MHz or 1800 MHz bands. Some countries in the Americas use the
850 MHz and 1900 MHz bands because the 900 and 1800 MHz frequency bands were
already allocated. The rarer 400 and 450 MHz frequency bands are assigned in some
countries, where these frequencies were previously used for first-generation
systems.GSM-900 uses 890–915 MHz to send information from the mobile station to
the base station (uplink) and 935–960 MHz for the other direction (downlink),
providing 124 RF channels (channel numbers 1 to 124) spaced at 200 kHz.
Duplex spacing of 45 MHz is used. In some countries the GSM-900 band has
been extended to cover a larger frequency range. This 'extended GSM', E-GSM, uses
880–915 MHz (uplink) and 925–960 MHz (downlink), adding 50 channels (channel
numbers 975 to 1023 and 0) to the original GSM-900 band. Time division
multiplexing is used to allow eight full-rate or sixteen half-rate speech channels per
radio frequency channel. There are eight radio timeslots (giving eight burst periods)
grouped into what is called a TDMA frame. Half rate channels use alternate frames in
the same timeslot. The channel data rate is 270.833 Kbit/s, and the frame duration is
4.615 ms.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 18
2.4.2 GSM Advantages
GSM also pioneered a low-cost, to the network carrier, alternative to voice
calls, the Short t message service (SMS, also called "text messaging"), which is now
supported on other mobile standards as well. Another advantage is that the standard
includes one worldwide Emergency telephone number, 112. This makes it easier for
international travelers to connect to emergency services without knowing the local
emergency number.
2.4.3 The GSM Network
GSM provides recommendations, not requirements. The GSM specifications
define the functions and interface requirements in detail but do not address the
hardware. The GSM network is divided into three major systems: the switching system
(SS), the base station system (BSS), and the operation and support system (OSS).
Fig 2.4.3GSM Architecture
The Switching System:
The switching system (SS) is responsible for performing call processing and
subscriber-related functions. The switching system includes the following functional
units.
 Home location register (HLR): The HLR is a database used for storage and
management of subscriptions. The HLR is considered the most important
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 19
database, as it stores permanent data about subscribers, including a subscriber's
service profile, location information, and activity status. When an individual
buys a subscription from one of the PCS operators, he or she is registered in the
HLR of that operator.
 Mobile services switching centre (MSC): The MSC performs the telephony
switching functions of the system. It controls calls to and from other telephone
and data systems. It also performs such functions as toll ticketing, network
interfacing, common channel signalling, and others.
 Visitor location register (VLR): The VLR is a database that contains
temporary information about subscribers that is needed by the MSC in order to
service visiting subscribers. The VLR is always integrated with the MSC.
When a mobile station roams into a new MSC area, the VLR connected to that
MSC will request data about the mobile station from the HLR. Later, if the
mobile station makes a call, the VLR will have the information needed for call
setup without having to interrogate the HLR each time.
 Authentication centre (AUC): A unit called the AUC provides authentication
and encryption parameters that verify the user's identity and ensure the
confidentiality of each call. The AUC protects network operators from different
types of fraud found in today's cellular world.
 Equipment identity register (EIR): The EIR is a database that contains
information about the identity of mobile equipment that prevents calls from
stolen, unauthorized, or defective mobile stations. The AUC and EIR are
implemented as stand-alone nodes or as a combined AUC/EIR node.
The Base Station System(BSS)
All radio-related functions are performed in the BSS, which consists of base station
controllers (BSCs) and the base transceiver stations (BTSs).
 BSC: The BSC provides all the control functions and physical links between
the MSC and BTS. It is a high-capacity switch that provides functions such as
handover, cell configuration data, and control of radio frequency (RF) power
levels in base transceiver stations. A number of BSCs are served by an MSC.
 BTS: The BTS handles the radio interface to the mobile station. The BTS is
the radio equipment (transceivers and antennas) needed to service each cell in
the network. A group of BTSs are controlled by a BSC.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 20
The Operation and Support System
The operations and maintenance center (OMC) is connected to all equipment in
the switching system and to the BSC. The implementation of OMC is called the
operation and support system (OSS). The OSS is the functional entity from which the
network operator monitors and controls the system. The purpose of OSS is to offer the
customer cost-effective support for centralized, regional and local operational and
maintenance activities that are required for a GSM network. An important function of
OSS is to provide a network overview and support the maintenance activities of
different operation and maintenance organizations.
Additional Functional Elements
 Message canter (MXE): The MXE is a node that provides integrated voice,
fax, and data messaging. Specifically, the MXE handles short message service,
cell broadcast, voice mail, fax mail, e-mail, and notification.
 Mobile service node (MSN): The MSN is the node that handles the mobile
intelligent network (IN) services.
 Gateway mobile services switching canter (GMSC): A gateway is a node
used to interconnect two networks. The gateway is often implemented in an
MSC. The MSC is then referred to as the GMSC.
2.4.4 GSM Network Areas
The GSM network is made up of geographic areas. As shown in bellow figure,
these areas include cells, location areas (LAs), MSC/VLR service areas, and public
land mobile network (PLMN) areas.
Fig 2.4.4 GSM network areas
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 21
Location Areas
The cell is the area given radio coverage by one base transceiver station. The
GSM network identifies each cell via the cell global identity (CGI) number assigned to
each cell. The location area is a group of cells. It is the area in which the subscriber is
paged. Each LA is served by one or more base station controllers, yet only by a single
MSC Each LA is assigned a location area identity (LAI) number.
MSC/VLR service areas:
An MSC/VLR service area represents the part of the GSM network that is
covered by one MSC and which is reachable, as it is registered in the VLR of the
MSC.
PLMN service areas:
The PLMN service area is an area served by one network operator.
2.4.5 GSM Specifications
Specifications for different personal communication services (PCS) systems
vary among the different PCS networks. Listed below is a description of the
specifications and characteristics for GSM.
 Frequency band: The frequency range specified for GSM is 1,850 to 1,990
MHz (mobile station to base station).
 Duplex distance: The duplex distance is 80 MHz. Duplex distance is the
distance between the uplink and downlink frequencies. A channel has two
frequencies, 80 MHz apart.
 Channel separation: The separation between adjacent carrier frequencies. In
GSM, this is 200 kHz.
 Modulation: Modulation is the process of sending a signal by changing the
characteristics of a carrier frequency. This is done in GSM via Gaussian
minimum shift keying (GMSK).
 Transmission rate: GSM is a digital system with an over-the-air bit rate of
270 kbps.
 Access method: GSM utilizes the time division multiple access (TDMA)
concept. TDMA is a technique in which several different calls may share the
same carrier. Each call is assigned a particular time slot.
 Speech coder: GSM uses linear predictive coding (LPC). The purpose of LPC
is to reduce the bit rate. The LPC provides parameters for a filter that mimics
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 22
the vocal tract. The signal passes through this filter, leaving behind a residual
signal. Speech is encoded at 13 kbps.
2.4.6 GSM Subscriber Services
Dual-tone multi frequency (DTMF): DTMF is a tone signalling scheme
often used for various control purposes via the telephone network, such as remote
control of an answering machine. GSM supports full-originating DTMF.
Facsimile group III—GSM supports CCITT Group 3 facsimile. As standard
fax machines are designed to be connected to a telephone using analog signals, a
special fax converter connected to the exchange is used in the GSM system. This
enables a GSM–connected fax to communicate with any analog fax in the network.
Short message services: A convenient facility of the GSM network is the
short message service. A message consisting of a maximum of 160 alphanumeric
characters can be sent to or from a mobile station. This service can be viewed as an
advanced form of alphanumeric paging with a number of advantages. If the
subscriber's mobile unit is powered off or has left the coverage area, the message is
stored and offered back to the subscriber when the mobile is powered on or has re-
entered the coverage area of the network. This function ensures that the message will
be received.
Cell broadcast: A variation of the short message service is the cell broadcast
facility. A message of a maximum of 93 characters can be broadcast to all mobile
subscribers in a certain geographic area. Typical applications include traffic congestion
warnings and reports on accidents.
Voice mail: This service is actually an answering machine within the network,
which is controlled by the subscriber. Calls can be forwarded to the subscriber's voice-
mail box and the subscriber checks for messages via a personal security code.
Fax mail: With this service, the subscriber can receive fax messages at any fax
machine. The messages are stored in a service centre from which they can be retrieved
by the subscriber via a personal security code to the desired fax number
Supplementary Services: GSM supports set of supplementary services that
can complement and support both telephony and data services.
Call forwarding: This service gives the subscriber the ability to forward
incoming calls to another number if the called mobile unit is not reachable, if it is
busy, if there is no reply, or if call forwarding is allowed unconditionally.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 23
Barring of outgoing calls: This service makes it possible for a mobile
subscriber to prevent all outgoing calls.
Barring of incoming calls: This function allows the subscriber to prevent
incoming calls. The following two conditions for incoming call barring exists: barring
of all incoming calls and barring of incoming calls when roaming outside the home
PLMN.
Advice of charge (AOC): The AOC service provides the mobile subscriber
with an estimate of the call charges. There are two types of AOC information: one that
provides the subscriber with an estimate of the bill and one that can be used for
immediate charging purposes. AOC for data calls is provided on the basis of time
measurements.
Call hold: This service enables the subscriber to interrupt an ongoing call and
then subsequently re-establish the call. The call hold service is only applicable to
normal telephony.
Call waiting: This service enables the mobile subscriber to be notified of an
incoming call during a conversation. The subscriber can answer, reject, or ignore the
incoming call. Call waiting is applicable to all GSM telecommunications services
using a circuit-switched connection.
Multiparty service: The multiparty service enables a mobile subscriber to
establish a multiparty conversation—that is, a simultaneous conversation between
three and six subscribers. This service is only applicable to normal telephony.
Calling line identification presentation/restriction: These services supply
the called party with the integrated services digital network (ISDN) number of the
calling party. The restriction service enables the calling party to restrict the
presentation. The restriction overrides the presentation.
Closed user groups (CUGs): CUGs are generally comparable to a PBX. They
are a group of subscribers who are capable of only calling themselves and certain
numbers
Main AT commands
"AT command set for GSM Mobile Equipment” describes the Main AT
commands to communicate via a serial interface with the GSM subsystem of the
phone. AT commands are instructions used to control a modem. AT is the abbreviation
of Attention. Every command line starts with "AT" or "at". That's why modem
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 24
commands are called AT commands. Many of the commands that are used to control
wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and
ATO (Return to online data state), are also supported by GSM/GPRS modems and
mobile phones. Besides this common AT command set, GSM/GPRS modems and
mobile phones support an AT command set that is specific to the GSM technology,
which includes SMS-related commands like AT+CMGS (Send SMS message),
AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and
AT+CMGR (Read SMS messages).
Note that the starting "AT" is the prefix that informs the modem about the start
of a command line. It is not part of the AT command name. For example, D is the
actual AT command name in ATD and +CMGS is the actual AT command name in
AT+CMGS. Here are some of the tasks that can be done using AT commands with a
GSM/GPRS modem or mobile phone:
 Get basic information about the mobile phone or GSM/GPRS modem. For
example, name of manufacturer (AT+CGMI), model number (AT+CGMM),
IMEI number (International Mobile Equipment Identity) (AT+CGSN) and
software version (AT+CGMR).
 Get basic information about the subscriber. For example, MSISDN
(AT+CNUM) and IMSI number (International Mobile Subscriber Identity)
(AT+CIMI).
 Get the current status of the mobile phone or GSM/GPRS modem. For
example, mobile phone activity status (AT+CPAS), mobile network
registration status (AT+CREG), radio signal strength (AT+CSQ), battery
charge level and battery charging status (AT+CBC).
2.5 MAX232
MAX232 is used to convert TTL logic into 0/1 logic and vice versa. So it is
placed between Microcontroller and Serial Port for conversion. The MAX232 IC is
used to convert the TTL/CMOS logic levels to RS232 logic levels during serial
communication of microcontrollers with PC. The controller operates at TTL logic level
(0-5V) whereas the serial communication in PC works on RS232 standards (-25 V to +
25V). This makes it difficult to establish a direct link between them to communicate
with each other. The intermediate link is provided through MAX232. It is a dual
driver/receiver that includes a capacitive voltage generator to supply RS232 voltage
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 25
levels from a single 5V supply. Each receiver converts RS232 inputs to 5V
TTL/CMOS levels. These receivers (R1 & R2) can accept ±30V inputs. The drivers
(T1 & T2), also called transmitters, convert the TTL/CMOS input level into RS232
level.
The transmitters take input from controller’s serial transmission pin and send
the output to RS232’s receiver. The receivers, on the other hand, take input from
transmission pin of RS232 serial port and give serial output to microcontroller’s
receiver pin. MAX232 needs four external capacitors whose value ranges from 1µF to
22µF.
Microcontroller MAX232 RS232
Tx T1/2 In T1/2 Out Rx
Rx R1/2 Out R1/2 In Tx
Table 2.5 MAX232
MAX232 is compatible with RS-232 standard, and consists of dual transceiver.
Each receiver converts TIA/EIA-232-E levels into 5V TTL/CMOS levels. Each driver
converts TTL/COMS levels into TIA/EIA-232-E levels.
Fig 2.5 Block diagram of MAX 232
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 26
2.5.1 Pin description
Fig 2.5.1 pin diagram of MAX 232
2.5.2 Features
 Input voltage levels are compatible with standard СMOS levels
 Output voltage levels are compatible with EIA/TIA-232-E levels
 Single Supply voltage: 5V
 Low input current: 0.1μA at ТA= 25 °С
 Output current: 24mA
 Latching current not less than 450mA at ТA= 25°С
 The transmitter outputs and receiver inputs are protected to +/-15kV Air ESD
2.5.3 Applications
 Battery-Powered RS232 Systems
 Terminals
 Modems
 Computers
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 27
Pin
No
Function Name
1
Capacitor connection pins
Capacitor 1 +
2 Capacitor 3 +
3 Capacitor 1 -
4 Capacitor 2 +
5 Capacitor 2 -
6 Capacitor 4 -
7 Output pin; outputs the serially transmitted data at RS232
logic level; connected to receiver pin of PC serial port
T2 Out
8 Input pin; receives serially transmitted data at RS 232 logic
level; connected to transmitter pin of PC serial port
R2 In
9 Output pin; outputs the serially transmitted data at TTL
logic level; connected to receiver pin of controller.
R2 Out
10 Input pins; receive the serial data at TTL logic level;
connected to serial transmitter pin of controller.
T2 In
11 T1 In
12 Output pin; outputs the serially transmitted data at TTL
logic level; connected to receiver pin of controller.
R1 Out
13 Input pin; receives serially transmitted data at RS 232 logic
level; connected to transmitter pin of PC serial port
R1 In
14 Output pin; outputs the serially transmitted data at RS232
logic level; connected to receiver pin of PC serial port
T1 Out
15 Ground (0V) Ground
16 Supply voltage; 5V (4.5V – 5.5V) Vcc
Table 2.5.3 Pin description for MAX 232
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 28
2.6 LCD (Liquid Cristal Display):
2.6.1 Introduction
A liquid crystal display (LCD) is a thin, flat display device made up of any
number of colour or monochrome pixels arrayed in front of a light source or reflector.
Each pixel consists of a column of liquid crystal molecules suspended between two
transparent electrodes, and two polarizing filters, the axes of polarity of which are
perpendicular to each other. Without the liquid crystals between them, light passing
through one would be blocked by the other. The liquid crystal twists the polarization of
light entering one filter to allow it to pass through the other.
A program must interact with the outside world using input and output devices
that communicate directly with a human being. One of the most common devices
attached to a controller is an LCD display. Some of the most common LCDs connected
to the controllers are 16X1, 16x2 and 20x2 displays. This means 16 characters per line
by 1 line 16 characters per line by 2 lines and 20 characters per line by 2 lines,
respectively.
Many microcontroller devices use 'smart LCD' displays to output visual
information. LCD displays designed around LCD NT-C1611 module, are inexpensive,
easy to use, and it is even possible to produce a readout using the 5X7 dots plus cursor
of the display. They have a standard ASCII set of characters and mathematical
symbols. For an 8-bit data bus, the display requires a +5V supply plus 10 I/O lines
(RS RW D7 D6 D5 D4 D3 D2 D1 D0). For a 4-bit data bus it only requires the
supply lines plus 6 extra lines (RS RW D7 D6 D5 D4). When the LCD display is not
enabled, data lines are tri-state and they do not interfere with the operation of the
microcontroller.
2.6.2 Features
o Interface with either 4-bit or 8-bit microprocessor.
o Display data RAM.
o 80x8 bits (80 characters).
o Character generator ROM.
o 160 different 5*7 dot-matrix character patterns.
o Character generator RAM
o 8 different user programmed 5*7 dot-matrix patterns.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 29
o Display data RAM and character generator RAM may be
accessed by the microprocessor.
o Numerous instructions
o Clear display, cursor home, and display on/off, cursor on/off, blink
character, cursor shift, and display shift.
o Built-in reset circuit is triggered at power ON.
o Built-in oscillator.
Data can be placed at any location on the LCD. For 16×1 LCD, the address
locations are:
Table 2.6.2 Address locations for a 1x16 line LCD
2.6.3 Shapes and sizes
Fig 2.6.3 Different Size of LCD Display’s
Even limited to character based modules, there is still a wide variety of shapes
and sizes available. Line lengths of 8, 16,20,24,32 and 40 characters are all standard, in
one, two and four line versions.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 30
Several different LC technologies exist. “Supertwist” types, for example, offer
improved contrast and viewing angle over the older “twisted neumatic” types. Some
modules are available with back lighting, so that they can be viewed in dimly-lit
conditions. The back lighting may be either “electro-luminescent”, requiring a high
voltage inverter circuit, or simple LED illumination.
2.6.4 Electrical block diagram
Fig 2.6.4 Electrical block diagram of LCD
2.6.5 Power supply for LCD driving
Fig 2.6.5 power supply for LCD driving
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 31
2.6.6 Pin Description
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16
Pins (two pins are extra in both for back-light LED connections).
Fig 2.6.6 pin diagram of 2x16 lines LCD
2.6.7 Control Lines
EN
Table 2.6.6 pin description of LCD
Line is called "Enable." This control line is used to tell the LCD that you are
sending it data. To send data to the LCD, your program should make sure this line is
low (0) and then set the other two control lines and/or put data on the data bus. When
the other lines are completely ready, bring EN high (1) and wait for the minimum
amount of time required by the LCD datasheet (this varies from LCD to LCD), and
end by bringing it low (0) again.
RS
Line is the "Register Select" line. When RS is low (0), the data is to be treated
as a command or special instruction (such as clear screen, position cursor, etc.). When
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 32
RS is high (1), the data being sent is text data which should be displayed on the screen.
For example, to display the letter "T" on the screen you would set RS high.
RW
Line is the "Read/Write" control line. When RW is low (0), the information on
the data bus is being written to the LCD. When RW is high (1), the program is
effectively querying (or reading) the LCD. Only one instruction ("Get LCD status") is
a read command. All others are write commands, so RW will almost always be low.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of
operation selected by the user). In the case of an 8-bit data bus, the lines are referred to
as DB0, DB1, DB2, DB3, DB4, DB5, DB6, and DB7.
Logic status on control lines
• E - 0 Access to LCD disabled
- 1 Access to LCD enabled
• R/W - 0 Writing data to LCD
- 1 Reading data from LCD
• RS - 0 Instructions
-1 Character
Writing data to the LCD
1) Set R/W bit to low
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
Read data from data lines (if it is reading)on LCD
1) Set R/W bit to high
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
Entering Text
First, a little tip: it is manually a lot easier to enter characters and commands in
hexadecimal rather than binary (although, of course, you will need to translate
commands from binary couple of sub-miniature hexadecimal rotary switches is a simple
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 33
matter, although a little bit into hex so that you know which bits you are setting).
Replacing the d.i.l. switch pack with a of re-wiring is necessary.
The switches must be the type where On = 0, so that when they are turned to the zero
position, all four outputs are shorted to the common pin, and in position “F”, all four
outputs are opencircuit.
Most of the characters conform to the ASCII standard, although the Japanese
and Greek characters (and a few other things) are obvious exceptions. Since these
intelligent modules were designed in the “Land of the Rising Sun,” it seems only fair
that their Katakana phonetic symbols should also be incorporated. The more extensive
Kanji character set, which the Japanese share with the Chinese, consisting of several
thousand different characters, is not included.
Fig: 2.6.7 16X2 LCD Display.
Using the switches, of whatever type, and referring to Table 3, enter a few
characters onto the display, both letters and numbers. The RS switch (S10) must be
“up” (logic 1) when sending the characters, and switch E (S9) must be pressed for each
of them. Thus the operational order is: set RS high, enter character, and trigger E, leave
RS high, enter another character, trigger E, and so on.
2.7 RELAY SWITCH
A relay is an electrically operated switch. Many relays use
an electromagnetic to mechanically operate a switch, but other operating principles are
also used, such as solid state relay. Relays are used where it is necessary to control a
circuit by a low-power signal (with complete electrical isolation between control and
controlled circuits), or where several circuits must be controlled by one signal. The
first relays were used in long distance telegraph circuits as amplifiers they repeated the
signal coming in from one circuit and re-transmitted it on another circuit. Relays were
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 34
used extensively in telephone exchanges and early computers to perform logical
operations.
A type of relay that can handle the high power required to directly control an electric
motor or other loads is called a contactor. Solid state devices control power circuits
with no moving part, instead using a semiconductor device to perform switching.
Relays with calibrated operating characteristics and sometimes multiple operating coils
are used to protect electrical circuits from overload or faults; in modern electric power
systems these functions are performed by digital instruments still called “protective
relays”.
Fig.2.7 Relay Switch
A relay is an electrical switch that uses an electromagnet to move the switch from the
off to on position instead of a person moving the switch. It takes a relatively small
amount of power to turn on a relay but the relay can control something that draws
much more power.
This is the schematic representation of a relay. The contacts at the top are normally
open (i.e. not connected). When current is passed through the coil it creates a
magnetic field that pulls the switch closed (i.e. connects the top contacts). Usually a
spring will pull the switch open again once the power is removed from the coil.
2.7.1 Relay Selection
Relays (and switches) come in different configurations. T most common are
shown to the right. Single Pole Single Throw (SPST) is the simplest with only two
contacts. Single Pole Double Throw (SPDT) has three contacts. The contacts are
usually labeled Common (COM), Normally Open (NO), and Normally Closed (NC).
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 35
The Normally Closed contact will be connected to the Common contact when
no power is applied to the coil. The Normally Open contact will be open (i.e. not
connected) when no power is applied to the coil.
Fig.2.7(a) Relay Circuit
When the coil is energized the Common is connected to the Normally Open
contact and the Normally Closed contact is left floating. The Double Pole versions are
the same as the Single Pole version except there are two switches that open and close
together. Select a relay with contacts that can handle the voltage and current
requirements of the load. Keep in mind that some loads (such as motors) draw much
more current when first turned on than they do at steady state.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 36
CHAPTER 3
MICROCONTROLLER
3.1 Microcontroller:
Micro controller is a semiconductor device which is fabricated using LSI or
VLSI technology which consists of a processor, memory, I/O ports, ADC etc., It is
nothing but system on chip. As we know that there so many types of micro controller
families that are available in the market. Those are
 8051 Family
 AVR microcontroller Family
 PIC microcontroller Family
 ARM Family
 MSP microcontroller family
We are using ARM family micro controller in this project because we
have to get accurate data while receiving the pulses (OR) readings from the system
that’s why we selected LPC2148 microcontroller which is the family of the ARM7
controller.
There are minimum six requirements for proper operation of microcontroller.
Those are:
 power supply section
 pull-ups for ports (it is must for PORT0)
 Reset circuit
 Crystal circuit
 ISP circuit (for program dumping)
 EA/VPP pin is connected to Vcc.
3.1.1 ARM PROCESSOR
 ARM Processor was developed at Acorn computer limited of
Cambridge, England between 1983 and 1985.
 This was after RISC concept came out at Stanford and Berkeley
universities in 1980.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 37
 ARM uses Enhanced RISC Architecture.
 ARM (Acorn RISC machine) limited was found in 1990.
 ARM designed basic core structure and licensed it to many partners
who develop and fabricate new Micro Controllers and different chips.
 ARM processor is mainly intended in the development of embedded
applications which involve complex computations (High-end
applications).
ARM Architecture
 ARM architecture is based on Enhanced RISC architecture (deviates
from classic RISC architecture).
 Embedded applications need to have :
High code density
Low power consumption rate
Small silicon foot print
 A large uniform register file (bank).
 Load-Store architecture, where data processing operations involve only
registers but not memory locations.
 Uniform and Fixed length instructions.
 Good speed/power consumption ratio.
 High code density.
 Control over ALU and Shifter (Barrel Shifter) which helps maximum
usage of hardware on the chip.
 Auto increment and Auto decrement of addressing modes to optimize
program loops.
 Load and Store multiple data elements through a single instruction,
which increases data throughput.
 A lot of branch instructions which can be used in conjunction with a
number of instructions, which maximizes execution throughput.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 38
ARM7 TDMI-S PROCESSOR:
The ARM7TDMI core is a member of the ARM family of general-purpose 32-
bit microprocessors. The ARM architecture is based on Reduced Instruction Set
Computer (RISC).The RISC instruction set, and related decode mechanism are much
simpler than those of Complex Instruction Set Computer (CISC) designs. This
simplicity gives:
 A high instruction throughput.
 An excellent real-time interrupt response.
 A small, cost-effective, processor macro cell.
THE INSTRUCTION PIPELINE
The ARM7TDMI core uses a pipeline to increase the speed of the flow of
instructions to the processor. This allows several operations to take place
simultaneously, and the processing and memory systems to operate continuously.
A three-stage pipeline is used, so instructions are executed in three stages:
 Fetch
 Decode
 Execute.
During normal operation, while one instruction is being executed, its successor
is being decoded, and a third instruction is being fetched from memory.
The program counter points to the instruction being fetched rather than to the
instruction being executed. This is important because it means that the Program
Counter (PC) value used in an executing instruction is always two instructions ahead
of the address.
MEMORY ACCESS
The ARM7TDMI core has Von Neumann architecture, with a single 32-bit data
bus carrying both instructions and data. Only load, store, and swap instructions can
access data from memory.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 39
Data can be:
 8-bit (bytes)
 16-bit (half words)
 32-bit (words).
Words must be aligned to 4-byte boundaries. Half words must be aligned to 2-
byte boundaries.
3.1.2 ARM7 LPC2148 Micro Controller
ARM LPC2148 is a 64 pin Micro Controller which comes under ARM 7
version of ARM processors. It comes under the processor core architecture
ARM7TDMI-S.It is a 32 bit Micro Controller .This is intended for high end
applications involving complex computations. It follows the enhanced RISC
architecture. It has high performance and very low power consumption. It has serial
communications interfaces ranging from a USB 2.0 Full Speed device, multiple
UARTS, SPI, and I2Cs. Various 32-bit timers, dual 10-bit ADC(s), single 10-bit DAC,
PWM channels and 45 fast GPIO lines with 9 interrupt pins.
FEATURES OF LPC2148
 16/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.
 32 + 8 KB of on-chip static RAM and 512 KB of on-chip flash program
memory.
 In-System/In-Application Programming (ISP/IAP) via on-chip boot-
loader software.
 Embedded ICE RT and Embedded Trace interfaces offer real-time
debugging with the on-chip Real Monitor software and high speed
tracing of instruction execution.
 USB 2.0 Full Speed compliant Device Controller with 2 kB of endpoint
RAM. In addition, the LPC2148 provide 8 kB of on-chip RAM
accessible to USB by DMA.
 Two 10-bit A/D converters provide a total of 14 analog inputs, with
conversion times as low as 2.44 µs per channel.
 Single 10-bit D/A converter provide variable analog output.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 40
 Two 32-bit timers/external event counters (with four capture and four
compare channels each), PWM unit (six outputs) and watchdog.
 Low power real-time clock with independent power and dedicated 32
kHz clock input
 Multiple serial interfaces including two UARTs (16C550), two Fast
I2C-bus (400 Kbps), SPI and SSP with buffering and variable data
length capabilities.
 Up to nine edge or level sensitive external interrupt pins available.
3.1.3 PIN DIAGRAM OF LPC2148
The pin diagram of low power consumption controller i.e. LPC2148 is shown below:
 It is a 64 pin IC
 It is Quadrature Flat Package(QFP) type IC
 It has 2 ports and each port has 32 pins
Fig 3.1.3 Pin diagram of ARM7 LPC-2148 microcontroller
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 41
3.2 ARCHITECTURAL OVERVIEW:
Fig 3.2 ARM architecture diagram
3.2.1 On Chip Memories
 It has a flash memory of 512KB which can be used for both code and data
storage.
 12KB is intended for boot loader i.e., user code flash memory is 500KB.
 Programming flash memory can be done via system serial port.
 This memory can be erased or programmed while running the application.
 It provides minimum of 1, 00,000 erase/write cycles with 20 years data
retention capability.
 It has on chip static RAM of 32 KB and 8KB is intended for USB usage.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 42
3.2.2 Vectored Interrupt Controller
This controller accepts all interrupts as input and categorize them under
different interrupt modules. There are 3 types of interrupt modules
Fast Interrupt Request
This got the highest priority. If only one interrupt is available it will directly
run from interrupt vector location. If more than one interrupt is available VIC
combines these signals and places them in a service routine.
3.2.3 Pin Connects Block
This block allows the pins of the Micro Controller to perform multiple
functions. Configuration registers allows the multiplexers to allow connection between
the pin and peripheral. After reset all pins of port0 and port1 are configured as input
with following exceptions. If JTAG debugger mode is active, then the JTAG pins will
have JTAG functionality.
3.2.4 10-bit ADC
This Micro Controller has 2 ADC ports.
 10 bit successive approximation analog to digital converter.
 Measurement range of 0 V to VREF (2.0 V <= VREF <= VDDA).
 Each converter capable of performing more than 400,000 10-bit
samples per second.
 Every analog input has a dedicated result register to reduce interrupts.
3.2.5 Real-time clock
The RTC is designed to provide a set of counters to measure time when normal
or idle operating mode is selected. The RTC has been designed to use little power,
making it suitable for battery powered systems where the CPU is not running
continuously (Idle mode).
Features
 Measures the passage of time to maintain a calendar and clock.
 Ultra-low power design to support battery powered systems.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 43
 Provides Seconds, Minutes, Hours, Day of Month, Month, Year, Day of
Week, and Day of Year.
 Can use either the RTC dedicate 32 kHz oscillator input or clock
derived from the external crystal/oscillator input at XTAL1.
 The ARM7TDMI-S is a general purpose 32-bit microprocessor, which
offers high performance and very low power consumption. The ARM
architecture is based on Reduced Instruction Set Computer (RISC)
principles, and the instruction set and related decode mechanism are
much simpler than those of micro programmed Complex
 Instruction Set Computers (CISC). This simplicity results in a high
instruction throughput and impressive real-time interrupt response from
a small and cost-effective processor core. Pipeline techniques are
employed so that all parts of the processing and memory systems can
operate continuously. Typically, while one instruction is being
executed, its successor is being decoded, and a third instruction is being
fetched from memory.
 The ARM7TDMI-S processor also employs a unique architectural
strategy known as
 Thumb, which makes it ideally suited to high-volume applications with
memory restrictions or applications where code density is an issue.
 The key idea behind Thumb is that of a super-reduced instruction set.
Essentially, the ARM7TDMI-S processor has two instruction sets:
1) The standard 32-bit ARM set.
2) A 16-bit Thumb set.
 The Thumb set’s 16-bit instruction length allows it to approach twice
the density of standard ARM code while retaining most of the ARM’s
performance advantage over a traditional 16-bit processor using 16-bit
registers. This is possible because Thumb code operates on the same
32-bit register set as ARM code.
 Thumb code is able to provide up to 65 % of the code size of ARM, and
160 % of the performance of an equivalent ARM processor connected
to a 16-bit memory system. The particular flash implementation in the
LPC2141/42/44/46/48 allows for full speed execution also in ARM
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 44
mode. It is recommended to program performance critical and short
code sections (such as interrupt service routines and DSP algorithms) in
ARM mode. The impact on the overall code size will be minimal but
the speed can be increased by 30% over Thumb mode.
3.2.6 Fast general purpose parallel I/O (GPIO)
Device pins that are not connected to a specific peripheral function are
controlled by the GPIO registers. Pins may be dynamically configured as inputs or
outputs. Separate registers allow setting or clearing any number of outputs
simultaneously. The value of the output register may be read back, as well as the
current state of the port pins. LPC2141/42/44/46/48 introduces accelerated GPIO
functions over prior LPC2000 devices:
 GPIO registers are relocated to the ARM local bus for the fastest
possible I/O timing.
 Mask registers allow treating sets of port bits as a group, leaving other
bits unchanged.
 All GPIO registers are byte addressable.
 Entire port value can be written in one instruction.
Features
 Bit-level set and clear registers allow a single instruction set or clear of
any number of bits in one port.
 Direction control of individual bits.
 Separate control of output set and clear.
 All I/O default to inputs after reset.
USB 2.0 device controller
 The USB is a 4-wire serial bus that supports communication between a
host and a number (127 max) of peripherals. The host controller
allocates the USB bandwidth to attached devices through a token based
protocol. The bus supports hot plugging, unplugging, and dynamic
configuration of the devices. All transactions are initiated by the host
controller.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 45
 The LPC2141/42/44/46/48 is equipped with a USB device controller
that enables
 12 Mbit/s data exchange with a USB host controller. It consists of a
register interface, serial interface engine, endpoint buffer memory and
DMA controller. The serial interface engine decodes the USB data
stream and writes data to the appropriate end point buffer memory.
The status of a completed USB transfer or error condition is indicated
via status registers.
Features
 Fully compliant with USB 2.0 Full-speed specification.
 Supports 32 physical (16 logical) endpoints.
 Supports control, bulk, interrupt and isochronous endpoints.
 Scalable realization of endpoints at run time.
 Endpoint maximum packet size selection (up to USB maximum
specification) by software at run time.
 RAM message buffer size based on endpoint realization and maximum
packet size.
 Supports Soft Connect and Good Link LED indicator. These two
functions are sharing one pin.
 Supports bus-powered capability with low suspend current.
UART’S
 The LPC2141/42/44/46/48 each contains two UARTs. In addition to
standard transmit and receive data lines, the LPC2144/46/48 UART1
also provide a full modem control handshake interface.
 Compared to previous LPC2000 microcontrollers, UARTs in
LPC2141/42/44/46/48 introduce a fractional baud rate generator for
both UARTs, enabling these microcontrollers to achieve standard
baudrates such as 115200 with any crystal frequency above 2 MHZ.
Features
 16 byte Receive and Transmit FIFOs
 Register locations conform to ‘550 industry standard.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 46
 Receiver FIFO triggers points at 1, 4, 8, and 14 bytes
 Built-in fractional baud rate generator covering wide range of baud
rates without a need for external crystals of particular values.
 Transmission FIFO control enables implementation of software
(XON/XOFF) flow control on both UARTs.
 LPC2144/46/48 UART1 equipped with standard modem interface
signals. This module also provides full support for hardware flow
control (auto-CTS/RTS).
 A 32-bit timer/counter with a programmable 32-bit prescaler.
 External event counter or timer operation.
 Four 32-bit capture channels per timer/counter that can take a snapshot
of the timer value when an input signals transitions. A capture event
may also optionally generate an interrupt.
 Four 32-bit match registers that allow:
Continuous operation with optional interrupt generation on match.
Stop timer on match with optional interrupt generation.
Reset timer on match with optional interrupt generation.
Watchdog timer
The purpose of the watchdog is to reset the microcontroller within a reasonable
amount of time if it enters an erroneous state. When enabled, the watchdog will
generate a system reset if the user program fails to ‘feed’ (or reload) the watchdog
within a predetermined amount of time.
Features
 Internally resets chip if not periodically reloaded.
 Debug mode.
 Enabled by software but requires a hardware reset or a watchdog
reset/interrupt to be disabled.
 Incorrect/Incomplete feed sequence causes reset/interrupt if enabled.
 Flag to indicate watchdog reset.
 Programmable 32-bit timer with internal prescaler.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 47
 Selectable time period from (TPCLK × 256 × 4) to (TPCLK × 232 × 4)
in multiples of TPCLK × 4
Pulse width modulator
 The PWM is based on the standard timer block and inherits all of its
features, although only the PWM function is pinned out on the
LPC2141/42/44/46/48. The timer is designed to count cycles of the
peripheral clock (PCLK) and optionally generate interrupts or perform
other actions when specified timer values occur, based on seven match
registers.
 The PWM function is also based on match register events. The ability to
separately control rising and falling edge locations allows the PWM to
be used for more applications. For instance, multi-phase motor control
typically requires three non-overlapping PWM outputs with individual
control of all three pulse widths and positions.
 Two match registers can be used to provide a single edge controlled
PWM output. One match register (MR0) controls the PWM cycle rate,
by resetting the count upon match. The other match register controls the
PWM edge position. Additional single edge controlled PWM outputs
require only one match register each, since the repetition rate is the
same for all PWM outputs. Multiple single edge controlled PWM
outputs will all have a rising edge at the beginning of each PWM cycle,
when an MR0 match occurs.
 Three match registers can be used to provide a PWM output with both
edges controlled.
 Again, the MR0 match register controls the PWM cycle rate. The other
match registers control the two PWM edge positions. Additional double
edge controlled PWM outputs require only two matched registers.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 48
CHAPTER 4
SOFTWARE REQUIREMENTS
4.1 KEIL software:
Keil compiler is a software used where the machine language code is written
and compiled. After compilation, the machine source code is converted into hex code
which is to be dumped into the microcontroller for further processing. Keil compiler
also supports C language code.
Installing the Keil software on a Windows PC:
• Insert the CD-ROM in your computer’s CD drive.
• On most computers, the CD will “auto run”, and you will see the Keil
installation menu. If the menu does not appear, manually double click on the
Setup icon, in the root directory: you will then see the Keil menu.
• On the Keil menu, please select “Install Evaluation Software”. (You will not
require a license number to install this software).
• Follow the installation instructions as they appear.
Loading the Projects:
The example projects for this book are NOT loaded automatically when you
install the Keil compiler. These files are stored on the CD in a directory “/Pont”. The
files are arranged by chapter: for example, the project discussed in Chapter 3 is in the
directory “/Pont/Ch03_00-Hello”.Rather than using the projects on the CD (where
changes cannot be saved), please copy the files from CD onto an appropriate directory
on your hard disk. Note: you will need to change the file properties after copying: file
transferred from the CD will be ‘read only’.
About Keil:
1. Click on the Keil u Vision Icon on Desktop
2. Click on the Project menu from the title bar
3. Then Click on New Project
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 49
4. Save the Project by typing suitable project name with no extension in u r own
folder sited in either C: or D:
5. Then Click on save button above.
6. Select the component for u r project. i.e. Atmel,ARM……
7. Click on the + Symbol beside of ARM
8. Select LPC2148
9. Then Click on “OK”
10. Then Click either YES or NO………mostly “NO”
11. Now your project is ready to USE
12. Now double click on the Target1, you would get another option “Source group
1”
13. Click on the file option from menu bar and select “new”
14. The next screen will be as shown in next page, and just maximize it by double
clicking on its blue boarder.
15. Now start writing program in either in “C” or “ASM”
16. For a program written in Assembly, then save it with extension “ .asm” and
for “C” based program save it with extension “ .C”
17. Now add this file to the target by giving a right click on the source group and
click on “Add files to Group Source”.
18. Now you will get another window, on which by default “C” files will appear.
19. Now select as per your file extension given while saving the file.
20. Click only one time on option “ADD”.
21. Right click on the target and select the first option “Options for target”. A
window opens with different options like device, target, output etc. First click
on “target”.
22. Since the set frequency of the microcontroller is 12 MHz to interface with the
PC, just enter this frequency value in the Xtal (MHz) text area and put a tick on
the Use on-chip ROM. This is because the program what we write here in the
keil will later be dumped into the microcontroller and will be stored in the
inbuilt ROM in the microcontroller.
23. Now click the option “Output” and give any name to the hex file to be created
in the “Name of executable” text area and put a tick to the “Create HEX file”
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 50
option present in the same window. The hex file can be created in any of the
drives. You can change the folder by clicking on “Select folder for Objects”.
24. Now Press function key F7 to compile. Any error will appear if so happen. If
the file contains no error, then press Control+F5 simultaneously.
25. The new window is as follows
26. Then Click “OK”
27. Now Click on the Peripherals from menu bar, and check your required port
28. Drag the port a side and click in the program file.
29. Now keep Pressing function key “F11” slowly and observe.
30. You are running your program successfully
4.2 Flash magic:
Flash Magic is Windows software from that microcontroller is easily
programmed using In-System Programming technology to all the ISP feature
empowered devices.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 51
After installing the software when we click on the icon of the software the
window will open on the screen as shown in figure. We need to change the device and
have to select the device LPC2148, and then we set to ‘erase all flash’ option on the
flash magic window.
If we need to verify the proper dumping of the program in the microcontroller
then we need to set the ‘verify after program’ option. Loading of hex file: After
selecting device we load the hex file in the given block by using the ‘browse’ option
on the ‘FLASH MAGIC’ window.
Programming of device: after loading the file next step is dumping of code in
microcontroller. For that we first connect the computer’s serial port to your controller
board through serial cable. Then after give the power supply to the controller board.
Now it’s time to dump the code in controller. Press the start option on your flash
magic window. Then your microcontroller will be programmed in few seconds...
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 52
CHAPTER 5
RESULTS
The system majorly consists of three components like Fire sensor circuit, GSM
modem and ARM7 LPC2148. Let us see the brief explanation of circuitry.
Fig.5.1 Hardware shows the Experimental setup of the project.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 53
Fig. 5.2 LCD shows the Locations
This system continuously check for the occurrence of the fire in multiple
locations this can be done with the help of fire sensor LM35. When the kit is switched
on the LCD display will be shown as fire detector in multi locations as shown in the
above figure. So whenever the fire is detected the fire sensor sends information to the
microcontroller then it will display as fire detected in location 1 or 2 and motor on.
Then the relay will be in active state and water sprinklers are switched on
automatically. After that the microcontroller send the information to GSM module to
send message that fire is detected in particular location to the registered mobile
number.
The below 5.3 and 5.4 figures shows the fire detected and message passed to
user indication on the LCD screens. The figure 5.5 shows the ac pressure motors are
turned on and sprinkling the water.
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 54
Fig. 5.3 LCD shows the fire is detected in location 2
Fig. 5.4 after sending the message
Since GSM supports digital data transmission, MAX232 is used to convert the
digital data in the serial form using parallel-in-serial-out shift registers suitable for
wireless communication.
Fig. 5.5 Air pressure motors for water sprinkling
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 55
Finally the message is received by registered mobile number through GSM
module that the fire is detected in particular location and motors are switched on.
Fig. 5.6 Results in registered mobile number
Detection and warning system for firework warehouse based on wireless sensor
networks
Dept. Of ECE, AITS,Kadapa Page 56
CHAPTER 6
CONCLUSION
CONCLUSION:
Hence our system continuously checks for the occurrence of fire in industries.
This is done with the help of a fire sensor which is designed around a microcontroller.
The Micro controller plays a major role in the project for controlling purpose.
Whenever the fire is detected by the sensor is indicated to microcontroller. Then the
microcontroller takes the control action by switching on or off the water sprinkler. By
making use of these kinds of projects we can provide the security in industries.

Mais conteúdo relacionado

Mais procurados

IRJET- Smart Home Automation System using 8051 Micro-Controller
IRJET- Smart Home Automation System using 8051 Micro-ControllerIRJET- Smart Home Automation System using 8051 Micro-Controller
IRJET- Smart Home Automation System using 8051 Micro-ControllerIRJET Journal
 
Implementation of vehicle ventilation system using NodeMCU ESP8266 for remote...
Implementation of vehicle ventilation system using NodeMCU ESP8266 for remote...Implementation of vehicle ventilation system using NodeMCU ESP8266 for remote...
Implementation of vehicle ventilation system using NodeMCU ESP8266 for remote...journalBEEI
 
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORTGSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORTAvinash Kannojia
 
Application of Microcontroller in Transmitter Section of Wireless System
Application of Microcontroller in Transmitter Section of Wireless SystemApplication of Microcontroller in Transmitter Section of Wireless System
Application of Microcontroller in Transmitter Section of Wireless Systemijceronline
 
Project report on gsm based digital notice board
Project report on gsm based digital notice boardProject report on gsm based digital notice board
Project report on gsm based digital notice boardmanish katara
 
11.[106 118]design and implementation of a short message service based remote...
11.[106 118]design and implementation of a short message service based remote...11.[106 118]design and implementation of a short message service based remote...
11.[106 118]design and implementation of a short message service based remote...Alexander Decker
 
Monitoring and Controlling of BLDC motor using IOT
Monitoring and Controlling of BLDC motor using IOTMonitoring and Controlling of BLDC motor using IOT
Monitoring and Controlling of BLDC motor using IOTvivatechijri
 
Embedded Tsunami Warning System
Embedded Tsunami Warning System Embedded Tsunami Warning System
Embedded Tsunami Warning System cscpconf
 
A remote monitoring system for a three phase 10-kva switchable distribution t...
A remote monitoring system for a three phase 10-kva switchable distribution t...A remote monitoring system for a three phase 10-kva switchable distribution t...
A remote monitoring system for a three phase 10-kva switchable distribution t...eSAT Journals
 
A remote monitoring system for a three phase 10-kva switchable distribution t...
A remote monitoring system for a three phase 10-kva switchable distribution t...A remote monitoring system for a three phase 10-kva switchable distribution t...
A remote monitoring system for a three phase 10-kva switchable distribution t...eSAT Publishing House
 
Modeling & Design of Dtmf Technique Based Automatic Mobile Switching & Contro...
Modeling & Design of Dtmf Technique Based Automatic Mobile Switching & Contro...Modeling & Design of Dtmf Technique Based Automatic Mobile Switching & Contro...
Modeling & Design of Dtmf Technique Based Automatic Mobile Switching & Contro...IRJET Journal
 
Major project report
Major project reportMajor project report
Major project reportPraveen Singh
 
2012 UH-HNEI Smart Grid Inverter Project System Architecture
2012 UH-HNEI Smart Grid Inverter Project System Architecture2012 UH-HNEI Smart Grid Inverter Project System Architecture
2012 UH-HNEI Smart Grid Inverter Project System ArchitectureKimberly L. King
 
Auto Metro Train to Shuttle Between Stations
Auto Metro Train to Shuttle Between StationsAuto Metro Train to Shuttle Between Stations
Auto Metro Train to Shuttle Between StationsMadhav Reddy Chintapalli
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Scienceresearchinventy
 
Internet enebled data acquisition and device control
Internet enebled data acquisition and device controlInternet enebled data acquisition and device control
Internet enebled data acquisition and device controleSAT Journals
 
wind based measurement and uncertainity using kalman filtering
wind based measurement and uncertainity using kalman filteringwind based measurement and uncertainity using kalman filtering
wind based measurement and uncertainity using kalman filteringPrasanna Nataraj
 
3-G CUM 2-G OPERATED UNMANNED GROUND VEHICLE
3-G CUM 2-G OPERATED UNMANNED GROUND VEHICLE3-G CUM 2-G OPERATED UNMANNED GROUND VEHICLE
3-G CUM 2-G OPERATED UNMANNED GROUND VEHICLESANDEEP GHOSH
 
Experimental simulation and real world study on wi fi ad-hoc mode for differe...
Experimental simulation and real world study on wi fi ad-hoc mode for differe...Experimental simulation and real world study on wi fi ad-hoc mode for differe...
Experimental simulation and real world study on wi fi ad-hoc mode for differe...Nazmul Hossain Rakib
 

Mais procurados (20)

IRJET- Smart Home Automation System using 8051 Micro-Controller
IRJET- Smart Home Automation System using 8051 Micro-ControllerIRJET- Smart Home Automation System using 8051 Micro-Controller
IRJET- Smart Home Automation System using 8051 Micro-Controller
 
Implementation of vehicle ventilation system using NodeMCU ESP8266 for remote...
Implementation of vehicle ventilation system using NodeMCU ESP8266 for remote...Implementation of vehicle ventilation system using NodeMCU ESP8266 for remote...
Implementation of vehicle ventilation system using NodeMCU ESP8266 for remote...
 
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORTGSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
GSM BASED DEVICES CONTROL SYSTEM PROJECT REPORT
 
Application of Microcontroller in Transmitter Section of Wireless System
Application of Microcontroller in Transmitter Section of Wireless SystemApplication of Microcontroller in Transmitter Section of Wireless System
Application of Microcontroller in Transmitter Section of Wireless System
 
Project report on gsm based digital notice board
Project report on gsm based digital notice boardProject report on gsm based digital notice board
Project report on gsm based digital notice board
 
11.[106 118]design and implementation of a short message service based remote...
11.[106 118]design and implementation of a short message service based remote...11.[106 118]design and implementation of a short message service based remote...
11.[106 118]design and implementation of a short message service based remote...
 
Industrial Safety Measurement using Sensors and Voice Announcement
Industrial Safety Measurement using Sensors and Voice AnnouncementIndustrial Safety Measurement using Sensors and Voice Announcement
Industrial Safety Measurement using Sensors and Voice Announcement
 
Monitoring and Controlling of BLDC motor using IOT
Monitoring and Controlling of BLDC motor using IOTMonitoring and Controlling of BLDC motor using IOT
Monitoring and Controlling of BLDC motor using IOT
 
Embedded Tsunami Warning System
Embedded Tsunami Warning System Embedded Tsunami Warning System
Embedded Tsunami Warning System
 
A remote monitoring system for a three phase 10-kva switchable distribution t...
A remote monitoring system for a three phase 10-kva switchable distribution t...A remote monitoring system for a three phase 10-kva switchable distribution t...
A remote monitoring system for a three phase 10-kva switchable distribution t...
 
A remote monitoring system for a three phase 10-kva switchable distribution t...
A remote monitoring system for a three phase 10-kva switchable distribution t...A remote monitoring system for a three phase 10-kva switchable distribution t...
A remote monitoring system for a three phase 10-kva switchable distribution t...
 
Modeling & Design of Dtmf Technique Based Automatic Mobile Switching & Contro...
Modeling & Design of Dtmf Technique Based Automatic Mobile Switching & Contro...Modeling & Design of Dtmf Technique Based Automatic Mobile Switching & Contro...
Modeling & Design of Dtmf Technique Based Automatic Mobile Switching & Contro...
 
Major project report
Major project reportMajor project report
Major project report
 
2012 UH-HNEI Smart Grid Inverter Project System Architecture
2012 UH-HNEI Smart Grid Inverter Project System Architecture2012 UH-HNEI Smart Grid Inverter Project System Architecture
2012 UH-HNEI Smart Grid Inverter Project System Architecture
 
Auto Metro Train to Shuttle Between Stations
Auto Metro Train to Shuttle Between StationsAuto Metro Train to Shuttle Between Stations
Auto Metro Train to Shuttle Between Stations
 
Research Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and ScienceResearch Inventy : International Journal of Engineering and Science
Research Inventy : International Journal of Engineering and Science
 
Internet enebled data acquisition and device control
Internet enebled data acquisition and device controlInternet enebled data acquisition and device control
Internet enebled data acquisition and device control
 
wind based measurement and uncertainity using kalman filtering
wind based measurement and uncertainity using kalman filteringwind based measurement and uncertainity using kalman filtering
wind based measurement and uncertainity using kalman filtering
 
3-G CUM 2-G OPERATED UNMANNED GROUND VEHICLE
3-G CUM 2-G OPERATED UNMANNED GROUND VEHICLE3-G CUM 2-G OPERATED UNMANNED GROUND VEHICLE
3-G CUM 2-G OPERATED UNMANNED GROUND VEHICLE
 
Experimental simulation and real world study on wi fi ad-hoc mode for differe...
Experimental simulation and real world study on wi fi ad-hoc mode for differe...Experimental simulation and real world study on wi fi ad-hoc mode for differe...
Experimental simulation and real world study on wi fi ad-hoc mode for differe...
 

Semelhante a My project

SIMPLIFIED SECURED WIRELESS RAILWAY / AIRWAY FOR RESERVATION
SIMPLIFIED SECURED WIRELESS RAILWAY / AIRWAY FOR RESERVATIONSIMPLIFIED SECURED WIRELESS RAILWAY / AIRWAY FOR RESERVATION
SIMPLIFIED SECURED WIRELESS RAILWAY / AIRWAY FOR RESERVATIONRicky Drk
 
Automatic irrigation and flood controlling system by using GSM
Automatic irrigation and flood controlling system by using GSM Automatic irrigation and flood controlling system by using GSM
Automatic irrigation and flood controlling system by using GSM SANDEEP BASVA
 
AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS Ganesh Gani
 
TRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORINGTRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORINGIRJET Journal
 
final project report_full edit
final project report_full editfinal project report_full edit
final project report_full editSayam Roy
 
"Black Box for a Car" report
"Black Box for a Car" report"Black Box for a Car" report
"Black Box for a Car" reportsubrat manna
 
Smart Home Automation
Smart Home AutomationSmart Home Automation
Smart Home AutomationMitul Lakhani
 
intelligent braking system report
intelligent braking system reportintelligent braking system report
intelligent braking system reportSumit Kumar
 
Wireless robo Report
Wireless robo  ReportWireless robo  Report
Wireless robo ReportSumit Saini
 
Doc a.7-tlc report
Doc a.7-tlc reportDoc a.7-tlc report
Doc a.7-tlc report9951081577
 
Programmable Load Shedding for the utility department
Programmable Load Shedding for the utility departmentProgrammable Load Shedding for the utility department
Programmable Load Shedding for the utility departmentMukund Hundekar
 
Arduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning SystemArduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning SystemMadhav Reddy Chintapalli
 

Semelhante a My project (20)

SIMPLIFIED SECURED WIRELESS RAILWAY / AIRWAY FOR RESERVATION
SIMPLIFIED SECURED WIRELESS RAILWAY / AIRWAY FOR RESERVATIONSIMPLIFIED SECURED WIRELESS RAILWAY / AIRWAY FOR RESERVATION
SIMPLIFIED SECURED WIRELESS RAILWAY / AIRWAY FOR RESERVATION
 
Automatic irrigation and flood controlling system by using GSM
Automatic irrigation and flood controlling system by using GSM Automatic irrigation and flood controlling system by using GSM
Automatic irrigation and flood controlling system by using GSM
 
AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS AIR BAG CRASH USING MEMS
AIR BAG CRASH USING MEMS
 
TRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORINGTRANSFORMER FAULT DETECTION AND MONITORING
TRANSFORMER FAULT DETECTION AND MONITORING
 
final report
final reportfinal report
final report
 
final project report_full edit
final project report_full editfinal project report_full edit
final project report_full edit
 
"Black Box for a Car" report
"Black Box for a Car" report"Black Box for a Car" report
"Black Box for a Car" report
 
Smart Home Automation
Smart Home AutomationSmart Home Automation
Smart Home Automation
 
Home automation system
Home automation systemHome automation system
Home automation system
 
intelligent braking system report
intelligent braking system reportintelligent braking system report
intelligent braking system report
 
20
2020
20
 
Alcohol report
Alcohol reportAlcohol report
Alcohol report
 
Wireless robo Report
Wireless robo  ReportWireless robo  Report
Wireless robo Report
 
Doc a.7-tlc report
Doc a.7-tlc reportDoc a.7-tlc report
Doc a.7-tlc report
 
Programmable Load Shedding for the utility department
Programmable Load Shedding for the utility departmentProgrammable Load Shedding for the utility department
Programmable Load Shedding for the utility department
 
report.pdf
report.pdfreport.pdf
report.pdf
 
Role of tuning techniques in advancing the performance of negative capacitanc...
Role of tuning techniques in advancing the performance of negative capacitanc...Role of tuning techniques in advancing the performance of negative capacitanc...
Role of tuning techniques in advancing the performance of negative capacitanc...
 
Arduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning SystemArduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning System
 
Part 1 master
Part 1 masterPart 1 master
Part 1 master
 
Final Report
Final ReportFinal Report
Final Report
 

My project

  • 1. Detection and Warning System for Fireworks Warehouse Based On Wireless Sensor Networks A Project Report Submitted in Partial Fulfillment of the Requirement for the Award of the Degree of BACHELOR OF TECHNOLOGY IN ELECTRONICS & COMMUNICATION ENGINEERING Submitted By T.Prasad S.Mohammed Suhail (11HM1A0482) (11HM1A0473) M.Nagarjuna P.Sai kumar (11HM1A0447) (11HM1A0461) Under the Esteemed guidance of Mr. K.Mahammad Haneef, M.Tech Assistant professor, Dept. of ECE DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING ANNAMACHARYA INSTITUTE OF TECHNOLOGY AND SCIENCES Affiliated to J.N.T.U.A, Anantapur, Approved by AICTE, New Delhi Uttukur (P), C.K.Dinne (M), Kadapa-516003 2014-2015
  • 2. ANNAMACHARYA INSTITUTE OF TECHNOLOGY AND SCIENCES Affiliated to J.N.T.U.A, Anantapur, Approved by AICTE, New Delhi Utukur (P), C.K.Dinne (M), Kadapa-516003 DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING Certificate This is to certify that the project entitled "Detection and warning system for fireworks warehouse based on wireless sensor networks” isabonafidework done by T. Prasad (11HM1A0482) S. Mohammed Suhail (11HM1A0473) M. Nagarjuna (11HM1A0447) P. Sai Kumar (11HM1A0461) In the Partial fulfillment of the requirement for the award of the degree of BACHELOR OF TECHNOLOGY in ELECTRONICS & COMMUNICATION ENGINEERING in ANNAMACHARYA INSTITUTE OF TECHNOLOGY AND SCIENCES,KADAPA during the academic year 2011-2015.The results of this work has not been submitted to any other university or institutes for the award of any degree. Signature of Guide Signature of the Head of the Department Mr.K.Mahammad Haneef M.Tech, Mrs.T. Vijaya Nirmala,M.Tech,M.I.S.T.E Assistant professor,Dept. of ECE. Assistant professor,Dept. of ECE. A.I.T.S., Kadapa. A.I.T.S., Kadapa. Viva-voce exam held on dated: Signature of External Examiner
  • 3. Acknowledgments An endeavor of a long period can be successful only with the advice of many well wishers. We take this opportunity to express our deep gratitude and appreciation to all those who encouraged us for successfully completion of the project. Our heartful thanks to the Guide, Mr. K. MAHAMMAD HANEEF, Assistant Professor in Department of E.C.E, Annamacharya Institute of Technology and Sciences, Kadapa for his valuable guidance and suggestions in analyzing and testing throughout the period, till the end of project. Our special thanks to Mrs.T.VIJAYA NIRMALA, Head of Electronics & Communication Engineering, Annamacharya Institute of Technology and Sciences, Kadapa for her timely suggestions and help in spite of the busy schedule. We wish to express our sincere gratitude to Dr. A. SUDHAKARA REDDY, Principal of Annamacharya Institute of Technology and Sciences, Kadapa for his consistent help and encouragement to complete the project. We are very much thankful to Sri C.GANGI REDDY, Hon’ Secretary of Annamacharya Educational Trust, for his help in providing good facilities in our college. We wish to convey our gratitude and express sincere thanks to all D.C (Departmental Committee) and P.R.C (Project Review Committee) members for their support and co-operation rendered for successful submission of our Project. Finally, we would like to express our sincere thanks to faculty members of E.C.E department, lab technicians, and friends, one and all who has helped us to complete the project work successfully. PROJECT ASSOCIATES T.Prasad (11HM1A0482) S.Mohammed Suhail (11HM1A0473) M.Nagarjuna (11HM1A0447) P.Sai Kumar (11HM1A0461)
  • 4. DECLARATION We hereby declare that Project Work Status report entitled “Detection and warning system for firework warehouse based on wireless sensor networks” being submitted by us for award of degree of Bachelor of Technology in Electronics& Communication Engineering, to Jawaharlal Nehru Technological University Anantapur, and is a bonafide record of work done in Annamacharya Institute of Technology & Sciences and has not been submitted to any other courses or university for award of any degree. PROJECT ASSOCIATES T.Prasad (11HM1A0482) S.Mohammed Suhail (11HM1A0473) M.Nagarjuna (11HM1A0447) P.Sai Kumar (11HM1A0461)
  • 5. TABLE OF CONTENTS =========================================================== CHAPETR NO. CONTENTS PAGE NO. =========================================================== CHAPTER 1 INTRODUCTION 1-8 1.1 Embedded Systems Overview 1 1.2 Application Areas 2 1.3 Embedded System Architecture 5 1.4 Hard ware architecture of an Embedded System 6 CHAPTER 2 HARDWARE REQUIREMENTS 9-35 2.1 Block diagram 9 2.2 Power supply 10 2.2.1 Transformer 10 2.2.2 Rectifier 11 2.2.3 Filter 14 2.2.4 Regulator 14 2.3 Fire Sensor (LM35) 15 2.3.1 Introduction 15 2.3.2 Features 16 2.3.3 Pin Diagram 16 2.3.4 Applications 16 2.4 GSM 17 2.4.1 Introduction 17 2.4.2 GSM Advantages 18 2.4.3 GSM Network 18 2.4.4 GSM Network Areas 20 2.4.5 GSM Specifications 21 2.4.6 GSM Subscriber Services 22 2.5 MAX 232 24 2.5.1 Pin Description 26 2.5.2 Features 26 2.5.3 Applications 26
  • 6. =========================================================== CHAPETR NO. CONTENTS PAGE NO. =========================================================== 2.6 LIQUID CRYSTAL DISPLAY 28 2.6.1 Introduction 28 2.6.2 Features 28 2.6.3 Shapes and sizes 29 2.6.4 Electrical Block Diagram 30 2.6.5 Power Supply for LCD Driving 30 2.6.6 Pin Description 31 2.6.7 Control Lines 31 2.7 RELAY SWITCH 33 2.7.1 Relay selection 34 CHAPTER 3 MICROCONTROLLER 36-47 3.1 Microcontroller 36 3.1.1 ARM Processor 36 3.1.2 ARM7 LPC 2148 micro controller 39 3.1.3 Pin diagram of LPC2148 40 3.2 Architectural overview 41 3.2.1 On chip memory 41 3.2.2 Vectored interrupt controller 42 3.2.3 Pin connects Block 42 3.2.4 10-Bit ADC 42 3.2.5 Real time clock 42 3.2.6 Fast general purpose parallel I/O (GPIO) 44 CHAPTER 4 SOFTWARE REQUIREMENTS 48-51 4.1 Keil Software 48 4.2 Flash magic 50 CHAPTER 5 RESULTS 52-55 CHAPTER 6 CONCLUSION 56
  • 7. LIST OF FIGURES ============================================================ ============================================================ Figure No. Title Of Figure Page No. 1.3 Embedded system architecture 6 1.4 General diagram of embedded system 7 2.1 Block diagram 9 2.2 Power supply 10 2.2.1 Step down transformer 11 2.2.2 Bridge rectifier 11 2.2.2(a) Positive half cycle of bridge rectifier 12 2.2.2(b) Negative half cycle of bridge rectifier 12 2.2.3 Charging and discharging of a capacitor 14 2.2.4 Voltage regulator 14 2.3.3 Pin diagram of LM35 16 2.4.3 GSM architecture 18 2.4.4 GSM network areas 20 2.5 Block diagram of MAX 232 25 2.5.1 Pin diagram of MAX 232 26 2.6.3 Different LCD screens 29 2.6.4 Electrical block diagram of LCD 30 2.6.5 Power supply of LCD driving 30 2.6.6 Pin diagram of 2*16 lines LCD 31 2.6.7 16X2 LCD Display 33 2.7 Relay switch 34 2.7 (a) Relay circuit 35 3.1.3 pin diagram of ARM7 LPC2148 40 3.2 ARM architecture diagram 41 5.1 Experimental setup of the project 52 5.2 LCD shows the locations of sensor 53
  • 8. ============================================================== Figure No. Title Of Figure Page No. ============================================================== 5.3 LCD shows the fire is detected 54 5.4 After sending the message 54 5.5 Air pressure motor 54 5.6 Result in registered mobile number 55
  • 9. LIST OF TABLES =========================================================== ============================================================ Table No. Title Of table Page No. 2.5 MAX232 25 2.5.3 Pin description of MAX232 27 2.6.2 Address locations for 1*16 line LCD 29 2.6.6 Pin description of LCD 31
  • 10. ABSTRACT The project title “Detection and warning system for firework warehouse based on wireless sensor networks” indicates that the system continuously checks for the presence of fire in industries. This is done with the help of a Fire sensor, which is designed around a microcontroller. The Micro controller plays a major role in the project for controlling purpose. Whenever the fire is detected by the sensor the information will be sent to the microcontroller. Then the microcontroller takes the control action by switching on or off the water sprinkler. By making use of these kinds of projects we can provide the security in industries. A regulated 5V, 500mA power supply, 7805 three terminal voltage regulator are used here for voltage regulation. Bridge type full wave rectifier is used to rectify the ac output of secondary of 230/12V step down transformer. Key words: Fire sensor (LM35), Microcontroller (LPC2148), AC pressure motor, GSM
  • 11. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 1 CHAPTER 1 INTRODUCTION 1.1 Embedded Systems Overview An Embedded System is a combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a specific function. A good example is the microwave oven. Almost every household has one, and tens of millions of them are used every day, but very few people realize that a processor and software are involved in the preparation of their lunch or dinner. This is in direct contrast to the personal computer in the family room. It is comprised of computer hardware and software and mechanical components (disk drives, for example). However, a personal computer is not designed to perform a specific function rather, it is able to do many different things. Many people use the term general-purpose computer to make this distinction clear. A general-purpose computer is a blank slate, the manufacturer does not know what the customer will do wish it. One customer may use it for a network file server another may use it exclusively for playing games, and a third may use it to write the next great American novel. Frequently, an embedded system is a component within some larger system. For example, modern cars and trucks contain many embedded systems. One embedded system controls the anti-lock brakes, other monitors and controls the vehicle's emissions, and a third displays information on the dashboard. In some cases, these embedded systems are connected by some sort of a communication network, but that is certainly not a requirement. It is important to point out that a general-purpose computer is itself made up of numerous embedded systems. For example, computer consists of a keyboard, mouse, video card, modem, hard drive, floppy drive, and sound card-each ofwhich is an embedded system. Each of these devices contains a processor and software and is designed to perform a specific function. If an embedded system is designed well, the existence of the processor and software could be completely unnoticed by the user of the device. Such is the case for a microwave oven, VCR, or alarm clock. In some cases, it would even be possible to build an equivalent device that does not contain the processor and software. This could
  • 12. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 2 be done by replacing the combination with a custom integrated circuit that performs the same functions in hardware. However, a lot of flexibility is lost when a design is hard-cooled in this way. It is much easier, and cheaper, to change a few lines of software than to redesign a piece of custom hardware. History Embedded systems could not possibly have appeared before 1971. That was the year Intel introduced the world's first microprocessor 4004.It was designed for use in a line of business calculators produced by the Japanese Company BusiCom. Intel proposed a general-purpose circuit that could be used throughout the entire line of calculators. Intel's idea was that the software would give each calculator its unique set of features. The microcontroller was an overnight success, and its use increased steadily over the next decade. Early embedded applications included unmanned space probes, computerized traffic lights, and aircraft flight control systems. In the 1980s, embedded systems quietly rode the waves of the microcomputer age and brought microprocessors into every part of our kitchens (bread machines, food processors, and microwave ovens), living rooms (televisions, stereos, and remote controls), and workplaces (fax machines, pagers, laser printers, cash registers, and credit card readers). It seems inevitable that the number of embedded systems will continue to increase rapidly. Already there are promising new embedded devices that have enormous market potential; light switches and thermostats that can be central computer, intelligent air-bag systems that don't inflate when children or small adults are present, pal-sized electronic organizers and personal digital assistants (PDAs), digital cameras, and dashboard navigation systems. Clearly, individuals who possess the skills and desire to design the next generation of embedded systems will be in demand for quite some time. 1.2 Application Areas Nearly 99% 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.
  • 13. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 3  Consumer appliances At home we use a number of embedded systems which include digital camera, digital diary, DVD player, electronic toys, microwave oven, remote controls for TV and air-conditioner, VCO player, video game consoles, video recorders etc. Today’s high-tech car has about 20 embedded systems for transmission control, engine spark control, air-conditioning, navigation etc. Even wristwatches are now becoming embedded systems. The palmtops are powerful embedded systems using which we can carry out many general-purpose tasks such as playing games and word processing.  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.  Medical electronics Almost every medical equipment in the hospital is an embedded system. These equipment’s include diagnostic aids such as ECG, EEG, blood pressure measuring devices, X-ray scanners; equipment used in blood analysis, radiation, colonoscopy, endoscopy etc. Developments in medical electronics have paved way for more accurate diagnosis of diseases.  computer networking Computer networking products such as bridges, routers, Integrated Services Digital Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay switches are embedded systems which implement the necessary data communication protocols. For example, a router interconnects two networks. The two networks may be
  • 14. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 4 running different protocol stacks. The router’s function is to obtain the data packets from incoming pores, analyse the packets and send them towards the destination after doing necessary protocol conversion. Most networking equipment’s, other than the end systems (desktop computers) we use to access the networks, are embedded systems  Telecommunications In the field of telecommunications, the embedded systems can be categorized as subscriber terminals and network equipment. The subscriber terminals such as key telephones, ISDN phones, terminal adapters, web cameras are embedded systems. The network equipment includes multiplexers, multiple access systems, Packet Assemblers Dissemblers (PADs), sate11ite modems etc. IP phone, IP gateway, IP gatekeeper etc. are the latest embedded systems that provide very low-cost voice communication over the Internet.  Wireless technologies Advances in mobile communications are paving way for many interesting applications using embedded systems. The mobile phone is one of the marvels of the last decade of the 20’h century. It is a very powerful embedded system that provides voice communication while we are on the move. The Personal Digital Assistants and the palmtops can now be used to access multimedia services over the Internet. Mobile communication infrastructure such as base station controllers, mobile switching centres are also powerful embedded systems.  Insemination Testing and measurement are the fundamental requirements in all scientific and engineering activities. The measuring equipment we use in laboratories to measure parameters such as weight, temperature, pressure, humidity, voltage, current etc. are all embedded systems. Test equipment such as oscilloscope, spectrum analyser, logic analyser, protocol analyser, radio communication test set etc. are embedded systems built around powerful processors. Thank to miniaturization, the test and measuring equipment are now becoming portable facilitating easy testing and measurement in the field by field-personnel.  Security Security of persons and information has always been a major issue. We need to protect our homes and offices; and also the information we transmit and store. Developing embedded systems for security applications is one of the most lucrative
  • 15. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 5 businesses nowadays. Security devices at homes, offices, airports etc. for authentication and verification are embedded systems. Encryption devices are nearly 99 per cent of the processors that are manufactured end up in~ embedded systems. Embedded systems find applications in every industrial segment-consumer electronics, transportation, avionics, biomedical engineering, manufacturing, process control and industrial automation, data communication, telecommunication, defence, security etc., used to encrypt the data/voice being transmitted on communication links such as telephone lines. Biometric systems using fingerprint and face recognition are now being extensively used for user authentication in banking applications as well as for access control in high security buildings.  Finance Financial dealing through cash and cheques are now slowly paving way for transactions using smart cards and ATM (Automatic Teller Machine) machines. Smart card, of the size of a credit card, has a small micro-controller and memory; and it interacts with the smart card reader! ATM machine and acts as an electronic wallet. Smart card technology has the capability of ushering in a cashless society. Well, the list goes on. It is no exaggeration to say that eyes wherever you go, you can see, or at least feel, the work of an embedded system. 1.3 Embedded System Architecture Every embedded system consists of custom-built hardware built around a Central Processing Unit (CPU). This hardware also contains memory chips onto which the software is loaded. The software residing on the memory chip is also called the ‘firmware’. The embedded system architecture can be represented as a layered architecture as shown in Fig 1.3. If an embedded system is designed well, the existence of the processor and software could be completely unnoticed by the user of the device. Such is the case for a microwave oven, VCR, or alarm clock. In some cases, it would even be possible to build an equivalent device that does not contain the processor and software. This could be done by replacing the combination with a custom integrated circuit that performs the same functions in hardware. However, a lot of flexibility is lost when a design is hard-cooled in this way. The office automation products using embedded systems are copying machine, Fax machine, key telephone, modem, printer, scanner etc.
  • 16. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 6 The operating system runs above the hardware, and the application software runs above the operating system. The same architecture is applicable to any computer including a desktop computer. However, there are significant differences. It is not compulsory to have an operating system in every embedded system. Fig.1.3 Embedded System Architecture For small appliances, such as remote control units, air conditioners, toys etc., there is no need for an operating system and you can write only the software specific to that application. For High end applications involving complex processing, it is advisable to have an operating system. In such a case, need to integrate the application software with the operating system and then transfer the entire software on to the memory chip. Once the software is transferred to the memory chip, the software will continue to run for a long time you don’t need to reload new software. 1.4 Hard ware architecture of an Embedded System The various building blocks of the hardware architecture of an embedded system, as shown in Fig 1.4. The building blocks are:  Central Processing Unit (CPU)  Memory (Read-only Memory and Random Access Memory)  Input Devices  Output devices  Communication interfaces  Application-specific circuitry  A/D converter
  • 17. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 7  Electromechanical backup and safety  External environment Fig. 1.4 General diagram of embedded system  Central Processing Unit (CPU) The Central Processing Unit (processor, in short) can be any of the following: microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is a low-cost processor. Its main attraction is that on the chip itself, there will be many other components such as memory, serial communication interface, analog-to digital converter etc. So, for small applications, a micro-controller is the best choice as the number of external components required will be very less. On the other hand, microprocessors are more powerful, but you need to use many external components with them. D5P is used mainly for applications in which signal processing is involved such as audio and video processing.  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. When power is switched on, the processor reads the ROM, the program is executed.
  • 18. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 8  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; they take inputs from sensors or transducers 1’fnd produce electrical signals that are in turn fed to other systems.  Output devices The output devices of the embedded systems also have very limited capability. Some embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the health status of the system modules, or for visual indication of alarms. A small Liquid Crystal Display (LCD) may also be used to display some important parameters.  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.
  • 19. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 9 CHAPTER 2 HARDWARE REQUIREMENTS 2.1 Block Diagram: Fig 2.1 Block Diagram The hardware components required for the system are 1. Power supply 2. Fire sensor LM35 3. GSM 4. MAX232 5. LCD 6. Relay switch 7. Ac pressure motor LCD DISPLAY ARM7 LPC2148 MICRO CONTROLLE R POWER SUPPL Y MAX232 GSMFIRE SENSOR 1 FIRE SENSOR 2 RELAY AC PRESSUR E MOTOR
  • 20. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 10 2.2 Power Supply Usually, DC voltages are required to operate various electronic equipment and these voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input available at the mains supply i.e., 230V is to be brought down to the required voltage level. Fig 2.2. Power supply block diagram 2.2.1 Transformer 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 voltage, step-down transformers reduce voltage. A step down power transformer is used to step down the AC voltage from the line voltage of 110 VAC or 220 VAC i.e., it converts higher voltage at the input side to a lower voltage at the output. Step Down Transformer In step down transformer secondary voltage is less than its primary voltage. It is designed to reduce the voltage from the primary winding to the secondary winding. As a step-down unit, the transformer converts high-voltage, low-current power into low-voltage, high-current power. The larger-gauge wire used in the secondary winding is necessary due to the increase in current.
  • 21. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 11 One of the most important considerations to increase transformer efficiency and reduce heat is choosing the metal type of the windings. Copper windings are much more efficient than aluminum and many other winding metal choices, but it also costs more. Fig 2.2.1 Step down transformer 2.2.2 Rectifier The main advantage of this bridge circuit is that it does not require a special centre tapped transformer, thereby reducing its size and cost. The single secondary winding is connected to one side of the diode bridge network and the load to the other side as shown below. The Diode Bridge Rectifier The four diodes labelled D1 to D4 are arranged in "series pairs" with only two diodes conducting current during each half cycle. During the positive half cycle of the supply, diodes D1 and D2 conduct in series while diodes D3 and D4 are reverse biased and the current flows through the load as shown below. Fig 2.2.2 Bridge Rectifier
  • 22. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 12 The Positive Half-cycle Fig 2.2.2(a) Positive half cycle of Bridge rectifier During the positive half cycle of the supply, diodes D1 and D2 conduct in series, but diodes D3 and D4switch "OFF" as they are now reverse biased. The current flowing through the load is the same direction as before. The Negative Half-cycle Fig 2.2.2(b) negative half cycle of Bridge rectifier As the current flowing through the load is unidirectional, so the voltage developed across the load is also unidirectional the same as for the previous two diode full-wave rectifier, therefore the average DC voltage across the lot is 0.637Vmax. However in reality, during each half cycle the current flows through two diodes instead of just one so the amplitude of the output voltage is two voltage drops (2 x 0.7 = 1.4V) less than the input VMAX amplitude. The ripple frequency is now twice the supply frequency (e.g. 100Hz for a 50Hz supply) Typical Bridge Rectifier Although we can use four individual power diodes to make a full wave bridge rectifier, pre-made bridge rectifier components are available "off-the-shelf" in a range
  • 23. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 13 of different voltage and current sizes that can be soldered directly into a PCB circuit board or be connected by spade connectors. The image to the right shows a typical single phase bridge rectifier with one corner cut off. This cut-off corner indicates that the terminal nearest to the corner is the positive or +ve output terminal or lead with the opposite (diagonal) lead being the negative or -ve output lead.. Bridge Rectifier Ripple Voltage Where: I is the DC load current in amps, ƒ is the frequency of the ripple or twice the input frequency in Hertz, and C is the capacitance in Farads. The main advantages of a full-wave bridge rectifier is that it has a smaller AC ripple value for a given load and a smaller reservoir or smoothing capacitor than an equivalent half-wave rectifier. Therefore, the fundamental frequency of the ripple voltage is twice that of the AC supply frequency (100Hz) where for the half-wave rectifier it is exactly equal to the supply frequency (50Hz). The amount of ripple voltage that is superimposed on top of the DC supply voltage by the diodes can be virtually eliminated by adding a much improved π- filter (pi-filter) to the output terminals of the bridge rectifier. This type of low-pass filter consists of two smoothing capacitors, usually of the same value and a choke or inductance across them to introduce a high impedance path to the alternating ripple component. Another more practical and cheaper alternative is to use an off the shelf 3- terminal voltage regulator IC, such as a LM78xx (where "xx" stands for the output voltage rating) for a positive output voltage or its inverse equivalent the LM79xx for a negative output voltage which can reduce the ripple by more than 70dB (Datasheet) while delivering a constant output current of over 1 amp. In the next tutorial about diodes, we will look at the ZENER DIODE which takes advantage of its reverse breakdown voltage characteristic to produce a constant and fixed output voltage across itself.
  • 24. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 14 2.2.3 Filter Filtering is performed by a large value electrolytic capacitor connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The diagram shows the unfiltered varying DC (dotted line) and the filtered DC (solid line). The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to theoutput. Fig 2.2.3 Charging and discharging of a capacitor 2.2.4 Regulator A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. It may use an electromechanical mechanism, or passive or active electronic components. Depending on the design, it may be used to regulate one or more AC or DC voltages. This is a simple DC regulated supply project using 7805 voltage regulator to obtain a variable DC voltage range from 5V to 15V. Fig 2.2.4 Voltage regulator
  • 25. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 15 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. The L78xx series of three-terminal positive regulators is available in TO-220, TO-220FP, TO-3, D2PAK and DPAK packages and several fixed output voltages, making it useful in a wide range of applications. The regulators can provide local on-card regulation, eliminating the distribution problems associated with single point regulation. Each type employs internal current limiting, thermal shut-down and safe area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1 A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltage and currents. 2.3 Fire Sensor(LM35) 2.3.1 Introduction The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient centigrade scaling. The LM35 does not require any external calibration or trimming to provide typical accuracies of ±1/4°C at room temperature and ±3/4°C over a full -55 to +150°C temperature range. Low cost is assured by trimming and calibration at the wafer level. The LM35’s low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 µA from its supply, it has very low self-heating, less than 0.1°C in still air. The LM35 is rated to operate over a -55° to +150°C temperature range, while the LM35C is rated for a -40° to +110°C range (-10° with improved accuracy). The LM35 series is available packaged plastic TO-92 transistor package. The LM35D is also available in an 8-lead surface mount small outline package and a plastic TO-220 package.
  • 26. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 16 2.3.2 Features 1. Calibrated directly in ° Celsius (Centigrade) 2. Linear + 10.0 mV/°C scale factor 3. 0.5°C accuracy guarantee able (at +25°C) 4. Rated for full -55° to +150°C range 5. Suitable for remote applications 6. Low cost due to wafer-level trimming 7. Operates from 4 to 30 volts 8. Less than 60 µA current drain 9. Low self-heating, 0.08°C in still air 10. Nonlinearity only ±1/4°C typical 11. Low impedance output, 0.1 for 1 mA load 2.3.3 Pin diagram Fig 2.3.3 Pin diagram of LM 35 2.3.4 Applications The LM35 can be applied easily in the same way as other integrated-circuit temperature sensors. It can be glued or cemented to a surface and its temperature will be within about 0.01°C of the surface temperature. This presumes that the ambient air temperature is almost the same as the surface temperature; if the air temperature were much higher or lower than the surface temperature, the actual temperature of the LM35 die would be at an intermediate temperature between the surface temperature and the air temperature. This is especially true for the TO-92 plastic package, where the copper leads are the principal thermal path to carry heat into the device, so its temperature might be closer to the air temperature than to the surface temperature. To minimize this problem, be sure that the wiring to the LM35, as it leaves the device, is held at the
  • 27. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 17 same temperature as the surface of interest. The easiest way to do this is to cover up these wires with a bead of epoxy which will insure that the leads and wires are all at the same temperature as the surface, and that the LM35 die’s temperature will not be affected by the air temperature. The TO-46 metal package can also be soldered to a metal surface or pipe without damage. Of course, in that case the V- terminal of the circuit will be grounded to that metal. Alternatively, the LM35 can be mounted inside a sealed-end metal tube, and can then be dipped into a bath or screwed into a threaded hole in a tank. As with any IC, the LM35 and accompanying wiring and circuits must be kept insulated and dry, to avoid leakage and corrosion. This is especially true if the circuit may operate at cold temperatures where condensation can occur. Insure that moisture cannot corrode the LM35 or its connections. 2.4 GSM (Global System for Mobile communications) 2.4.1 Introduction GSM (Global System for Mobile communications) is a cellular network, which means that mobile phones connect to it by searching for cells in the immediate vicinity. GSM networks operate in four different frequency ranges. Most GSM networks operate in the 900 MHz or 1800 MHz bands. Some countries in the Americas use the 850 MHz and 1900 MHz bands because the 900 and 1800 MHz frequency bands were already allocated. The rarer 400 and 450 MHz frequency bands are assigned in some countries, where these frequencies were previously used for first-generation systems.GSM-900 uses 890–915 MHz to send information from the mobile station to the base station (uplink) and 935–960 MHz for the other direction (downlink), providing 124 RF channels (channel numbers 1 to 124) spaced at 200 kHz. Duplex spacing of 45 MHz is used. In some countries the GSM-900 band has been extended to cover a larger frequency range. This 'extended GSM', E-GSM, uses 880–915 MHz (uplink) and 925–960 MHz (downlink), adding 50 channels (channel numbers 975 to 1023 and 0) to the original GSM-900 band. Time division multiplexing is used to allow eight full-rate or sixteen half-rate speech channels per radio frequency channel. There are eight radio timeslots (giving eight burst periods) grouped into what is called a TDMA frame. Half rate channels use alternate frames in the same timeslot. The channel data rate is 270.833 Kbit/s, and the frame duration is 4.615 ms.
  • 28. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 18 2.4.2 GSM Advantages GSM also pioneered a low-cost, to the network carrier, alternative to voice calls, the Short t message service (SMS, also called "text messaging"), which is now supported on other mobile standards as well. Another advantage is that the standard includes one worldwide Emergency telephone number, 112. This makes it easier for international travelers to connect to emergency services without knowing the local emergency number. 2.4.3 The GSM Network GSM provides recommendations, not requirements. The GSM specifications define the functions and interface requirements in detail but do not address the hardware. The GSM network is divided into three major systems: the switching system (SS), the base station system (BSS), and the operation and support system (OSS). Fig 2.4.3GSM Architecture The Switching System: The switching system (SS) is responsible for performing call processing and subscriber-related functions. The switching system includes the following functional units.  Home location register (HLR): The HLR is a database used for storage and management of subscriptions. The HLR is considered the most important
  • 29. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 19 database, as it stores permanent data about subscribers, including a subscriber's service profile, location information, and activity status. When an individual buys a subscription from one of the PCS operators, he or she is registered in the HLR of that operator.  Mobile services switching centre (MSC): The MSC performs the telephony switching functions of the system. It controls calls to and from other telephone and data systems. It also performs such functions as toll ticketing, network interfacing, common channel signalling, and others.  Visitor location register (VLR): The VLR is a database that contains temporary information about subscribers that is needed by the MSC in order to service visiting subscribers. The VLR is always integrated with the MSC. When a mobile station roams into a new MSC area, the VLR connected to that MSC will request data about the mobile station from the HLR. Later, if the mobile station makes a call, the VLR will have the information needed for call setup without having to interrogate the HLR each time.  Authentication centre (AUC): A unit called the AUC provides authentication and encryption parameters that verify the user's identity and ensure the confidentiality of each call. The AUC protects network operators from different types of fraud found in today's cellular world.  Equipment identity register (EIR): The EIR is a database that contains information about the identity of mobile equipment that prevents calls from stolen, unauthorized, or defective mobile stations. The AUC and EIR are implemented as stand-alone nodes or as a combined AUC/EIR node. The Base Station System(BSS) All radio-related functions are performed in the BSS, which consists of base station controllers (BSCs) and the base transceiver stations (BTSs).  BSC: The BSC provides all the control functions and physical links between the MSC and BTS. It is a high-capacity switch that provides functions such as handover, cell configuration data, and control of radio frequency (RF) power levels in base transceiver stations. A number of BSCs are served by an MSC.  BTS: The BTS handles the radio interface to the mobile station. The BTS is the radio equipment (transceivers and antennas) needed to service each cell in the network. A group of BTSs are controlled by a BSC.
  • 30. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 20 The Operation and Support System The operations and maintenance center (OMC) is connected to all equipment in the switching system and to the BSC. The implementation of OMC is called the operation and support system (OSS). The OSS is the functional entity from which the network operator monitors and controls the system. The purpose of OSS is to offer the customer cost-effective support for centralized, regional and local operational and maintenance activities that are required for a GSM network. An important function of OSS is to provide a network overview and support the maintenance activities of different operation and maintenance organizations. Additional Functional Elements  Message canter (MXE): The MXE is a node that provides integrated voice, fax, and data messaging. Specifically, the MXE handles short message service, cell broadcast, voice mail, fax mail, e-mail, and notification.  Mobile service node (MSN): The MSN is the node that handles the mobile intelligent network (IN) services.  Gateway mobile services switching canter (GMSC): A gateway is a node used to interconnect two networks. The gateway is often implemented in an MSC. The MSC is then referred to as the GMSC. 2.4.4 GSM Network Areas The GSM network is made up of geographic areas. As shown in bellow figure, these areas include cells, location areas (LAs), MSC/VLR service areas, and public land mobile network (PLMN) areas. Fig 2.4.4 GSM network areas
  • 31. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 21 Location Areas The cell is the area given radio coverage by one base transceiver station. The GSM network identifies each cell via the cell global identity (CGI) number assigned to each cell. The location area is a group of cells. It is the area in which the subscriber is paged. Each LA is served by one or more base station controllers, yet only by a single MSC Each LA is assigned a location area identity (LAI) number. MSC/VLR service areas: An MSC/VLR service area represents the part of the GSM network that is covered by one MSC and which is reachable, as it is registered in the VLR of the MSC. PLMN service areas: The PLMN service area is an area served by one network operator. 2.4.5 GSM Specifications Specifications for different personal communication services (PCS) systems vary among the different PCS networks. Listed below is a description of the specifications and characteristics for GSM.  Frequency band: The frequency range specified for GSM is 1,850 to 1,990 MHz (mobile station to base station).  Duplex distance: The duplex distance is 80 MHz. Duplex distance is the distance between the uplink and downlink frequencies. A channel has two frequencies, 80 MHz apart.  Channel separation: The separation between adjacent carrier frequencies. In GSM, this is 200 kHz.  Modulation: Modulation is the process of sending a signal by changing the characteristics of a carrier frequency. This is done in GSM via Gaussian minimum shift keying (GMSK).  Transmission rate: GSM is a digital system with an over-the-air bit rate of 270 kbps.  Access method: GSM utilizes the time division multiple access (TDMA) concept. TDMA is a technique in which several different calls may share the same carrier. Each call is assigned a particular time slot.  Speech coder: GSM uses linear predictive coding (LPC). The purpose of LPC is to reduce the bit rate. The LPC provides parameters for a filter that mimics
  • 32. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 22 the vocal tract. The signal passes through this filter, leaving behind a residual signal. Speech is encoded at 13 kbps. 2.4.6 GSM Subscriber Services Dual-tone multi frequency (DTMF): DTMF is a tone signalling scheme often used for various control purposes via the telephone network, such as remote control of an answering machine. GSM supports full-originating DTMF. Facsimile group III—GSM supports CCITT Group 3 facsimile. As standard fax machines are designed to be connected to a telephone using analog signals, a special fax converter connected to the exchange is used in the GSM system. This enables a GSM–connected fax to communicate with any analog fax in the network. Short message services: A convenient facility of the GSM network is the short message service. A message consisting of a maximum of 160 alphanumeric characters can be sent to or from a mobile station. This service can be viewed as an advanced form of alphanumeric paging with a number of advantages. If the subscriber's mobile unit is powered off or has left the coverage area, the message is stored and offered back to the subscriber when the mobile is powered on or has re- entered the coverage area of the network. This function ensures that the message will be received. Cell broadcast: A variation of the short message service is the cell broadcast facility. A message of a maximum of 93 characters can be broadcast to all mobile subscribers in a certain geographic area. Typical applications include traffic congestion warnings and reports on accidents. Voice mail: This service is actually an answering machine within the network, which is controlled by the subscriber. Calls can be forwarded to the subscriber's voice- mail box and the subscriber checks for messages via a personal security code. Fax mail: With this service, the subscriber can receive fax messages at any fax machine. The messages are stored in a service centre from which they can be retrieved by the subscriber via a personal security code to the desired fax number Supplementary Services: GSM supports set of supplementary services that can complement and support both telephony and data services. Call forwarding: This service gives the subscriber the ability to forward incoming calls to another number if the called mobile unit is not reachable, if it is busy, if there is no reply, or if call forwarding is allowed unconditionally.
  • 33. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 23 Barring of outgoing calls: This service makes it possible for a mobile subscriber to prevent all outgoing calls. Barring of incoming calls: This function allows the subscriber to prevent incoming calls. The following two conditions for incoming call barring exists: barring of all incoming calls and barring of incoming calls when roaming outside the home PLMN. Advice of charge (AOC): The AOC service provides the mobile subscriber with an estimate of the call charges. There are two types of AOC information: one that provides the subscriber with an estimate of the bill and one that can be used for immediate charging purposes. AOC for data calls is provided on the basis of time measurements. Call hold: This service enables the subscriber to interrupt an ongoing call and then subsequently re-establish the call. The call hold service is only applicable to normal telephony. Call waiting: This service enables the mobile subscriber to be notified of an incoming call during a conversation. The subscriber can answer, reject, or ignore the incoming call. Call waiting is applicable to all GSM telecommunications services using a circuit-switched connection. Multiparty service: The multiparty service enables a mobile subscriber to establish a multiparty conversation—that is, a simultaneous conversation between three and six subscribers. This service is only applicable to normal telephony. Calling line identification presentation/restriction: These services supply the called party with the integrated services digital network (ISDN) number of the calling party. The restriction service enables the calling party to restrict the presentation. The restriction overrides the presentation. Closed user groups (CUGs): CUGs are generally comparable to a PBX. They are a group of subscribers who are capable of only calling themselves and certain numbers Main AT commands "AT command set for GSM Mobile Equipment” describes the Main AT commands to communicate via a serial interface with the GSM subsystem of the phone. AT commands are instructions used to control a modem. AT is the abbreviation of Attention. Every command line starts with "AT" or "at". That's why modem
  • 34. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 24 commands are called AT commands. Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also supported by GSM/GPRS modems and mobile phones. Besides this common AT command set, GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM technology, which includes SMS-related commands like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages). Note that the starting "AT" is the prefix that informs the modem about the start of a command line. It is not part of the AT command name. For example, D is the actual AT command name in ATD and +CMGS is the actual AT command name in AT+CMGS. Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or mobile phone:  Get basic information about the mobile phone or GSM/GPRS modem. For example, name of manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).  Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and IMSI number (International Mobile Subscriber Identity) (AT+CIMI).  Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile phone activity status (AT+CPAS), mobile network registration status (AT+CREG), radio signal strength (AT+CSQ), battery charge level and battery charging status (AT+CBC). 2.5 MAX232 MAX232 is used to convert TTL logic into 0/1 logic and vice versa. So it is placed between Microcontroller and Serial Port for conversion. The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial communication of microcontrollers with PC. The controller operates at TTL logic level (0-5V) whereas the serial communication in PC works on RS232 standards (-25 V to + 25V). This makes it difficult to establish a direct link between them to communicate with each other. The intermediate link is provided through MAX232. It is a dual driver/receiver that includes a capacitive voltage generator to supply RS232 voltage
  • 35. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 25 levels from a single 5V supply. Each receiver converts RS232 inputs to 5V TTL/CMOS levels. These receivers (R1 & R2) can accept ±30V inputs. The drivers (T1 & T2), also called transmitters, convert the TTL/CMOS input level into RS232 level. The transmitters take input from controller’s serial transmission pin and send the output to RS232’s receiver. The receivers, on the other hand, take input from transmission pin of RS232 serial port and give serial output to microcontroller’s receiver pin. MAX232 needs four external capacitors whose value ranges from 1µF to 22µF. Microcontroller MAX232 RS232 Tx T1/2 In T1/2 Out Rx Rx R1/2 Out R1/2 In Tx Table 2.5 MAX232 MAX232 is compatible with RS-232 standard, and consists of dual transceiver. Each receiver converts TIA/EIA-232-E levels into 5V TTL/CMOS levels. Each driver converts TTL/COMS levels into TIA/EIA-232-E levels. Fig 2.5 Block diagram of MAX 232
  • 36. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 26 2.5.1 Pin description Fig 2.5.1 pin diagram of MAX 232 2.5.2 Features  Input voltage levels are compatible with standard СMOS levels  Output voltage levels are compatible with EIA/TIA-232-E levels  Single Supply voltage: 5V  Low input current: 0.1μA at ТA= 25 °С  Output current: 24mA  Latching current not less than 450mA at ТA= 25°С  The transmitter outputs and receiver inputs are protected to +/-15kV Air ESD 2.5.3 Applications  Battery-Powered RS232 Systems  Terminals  Modems  Computers
  • 37. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 27 Pin No Function Name 1 Capacitor connection pins Capacitor 1 + 2 Capacitor 3 + 3 Capacitor 1 - 4 Capacitor 2 + 5 Capacitor 2 - 6 Capacitor 4 - 7 Output pin; outputs the serially transmitted data at RS232 logic level; connected to receiver pin of PC serial port T2 Out 8 Input pin; receives serially transmitted data at RS 232 logic level; connected to transmitter pin of PC serial port R2 In 9 Output pin; outputs the serially transmitted data at TTL logic level; connected to receiver pin of controller. R2 Out 10 Input pins; receive the serial data at TTL logic level; connected to serial transmitter pin of controller. T2 In 11 T1 In 12 Output pin; outputs the serially transmitted data at TTL logic level; connected to receiver pin of controller. R1 Out 13 Input pin; receives serially transmitted data at RS 232 logic level; connected to transmitter pin of PC serial port R1 In 14 Output pin; outputs the serially transmitted data at RS232 logic level; connected to receiver pin of PC serial port T1 Out 15 Ground (0V) Ground 16 Supply voltage; 5V (4.5V – 5.5V) Vcc Table 2.5.3 Pin description for MAX 232
  • 38. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 28 2.6 LCD (Liquid Cristal Display): 2.6.1 Introduction A liquid crystal display (LCD) is a thin, flat display device made up of any number of colour or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists of a column of liquid crystal molecules suspended between two transparent electrodes, and two polarizing filters, the axes of polarity of which are perpendicular to each other. Without the liquid crystals between them, light passing through one would be blocked by the other. The liquid crystal twists the polarization of light entering one filter to allow it to pass through the other. A program must interact with the outside world using input and output devices that communicate directly with a human being. One of the most common devices attached to a controller is an LCD display. Some of the most common LCDs connected to the controllers are 16X1, 16x2 and 20x2 displays. This means 16 characters per line by 1 line 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively. Many microcontroller devices use 'smart LCD' displays to output visual information. LCD displays designed around LCD NT-C1611 module, are inexpensive, easy to use, and it is even possible to produce a readout using the 5X7 dots plus cursor of the display. They have a standard ASCII set of characters and mathematical symbols. For an 8-bit data bus, the display requires a +5V supply plus 10 I/O lines (RS RW D7 D6 D5 D4 D3 D2 D1 D0). For a 4-bit data bus it only requires the supply lines plus 6 extra lines (RS RW D7 D6 D5 D4). When the LCD display is not enabled, data lines are tri-state and they do not interfere with the operation of the microcontroller. 2.6.2 Features o Interface with either 4-bit or 8-bit microprocessor. o Display data RAM. o 80x8 bits (80 characters). o Character generator ROM. o 160 different 5*7 dot-matrix character patterns. o Character generator RAM o 8 different user programmed 5*7 dot-matrix patterns.
  • 39. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 29 o Display data RAM and character generator RAM may be accessed by the microprocessor. o Numerous instructions o Clear display, cursor home, and display on/off, cursor on/off, blink character, cursor shift, and display shift. o Built-in reset circuit is triggered at power ON. o Built-in oscillator. Data can be placed at any location on the LCD. For 16×1 LCD, the address locations are: Table 2.6.2 Address locations for a 1x16 line LCD 2.6.3 Shapes and sizes Fig 2.6.3 Different Size of LCD Display’s Even limited to character based modules, there is still a wide variety of shapes and sizes available. Line lengths of 8, 16,20,24,32 and 40 characters are all standard, in one, two and four line versions.
  • 40. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 30 Several different LC technologies exist. “Supertwist” types, for example, offer improved contrast and viewing angle over the older “twisted neumatic” types. Some modules are available with back lighting, so that they can be viewed in dimly-lit conditions. The back lighting may be either “electro-luminescent”, requiring a high voltage inverter circuit, or simple LED illumination. 2.6.4 Electrical block diagram Fig 2.6.4 Electrical block diagram of LCD 2.6.5 Power supply for LCD driving Fig 2.6.5 power supply for LCD driving
  • 41. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 31 2.6.6 Pin Description Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two pins are extra in both for back-light LED connections). Fig 2.6.6 pin diagram of 2x16 lines LCD 2.6.7 Control Lines EN Table 2.6.6 pin description of LCD Line is called "Enable." This control line is used to tell the LCD that you are sending it data. To send data to the LCD, your program should make sure this line is low (0) and then set the other two control lines and/or put data on the data bus. When the other lines are completely ready, bring EN high (1) and wait for the minimum amount of time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again. RS Line is the "Register Select" line. When RS is low (0), the data is to be treated as a command or special instruction (such as clear screen, position cursor, etc.). When
  • 42. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 32 RS is high (1), the data being sent is text data which should be displayed on the screen. For example, to display the letter "T" on the screen you would set RS high. RW Line is the "Read/Write" control line. When RW is low (0), the information on the data bus is being written to the LCD. When RW is high (1), the program is effectively querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are write commands, so RW will almost always be low. Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4, DB5, DB6, and DB7. Logic status on control lines • E - 0 Access to LCD disabled - 1 Access to LCD enabled • R/W - 0 Writing data to LCD - 1 Reading data from LCD • RS - 0 Instructions -1 Character Writing data to the LCD 1) Set R/W bit to low 2) Set RS bit to logic 0 or 1 (instruction or character) 3) Set data to data lines (if it is writing) 4) Set E line to high 5) Set E line to low Read data from data lines (if it is reading)on LCD 1) Set R/W bit to high 2) Set RS bit to logic 0 or 1 (instruction or character) 3) Set data to data lines (if it is writing) 4) Set E line to high 5) Set E line to low Entering Text First, a little tip: it is manually a lot easier to enter characters and commands in hexadecimal rather than binary (although, of course, you will need to translate commands from binary couple of sub-miniature hexadecimal rotary switches is a simple
  • 43. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 33 matter, although a little bit into hex so that you know which bits you are setting). Replacing the d.i.l. switch pack with a of re-wiring is necessary. The switches must be the type where On = 0, so that when they are turned to the zero position, all four outputs are shorted to the common pin, and in position “F”, all four outputs are opencircuit. Most of the characters conform to the ASCII standard, although the Japanese and Greek characters (and a few other things) are obvious exceptions. Since these intelligent modules were designed in the “Land of the Rising Sun,” it seems only fair that their Katakana phonetic symbols should also be incorporated. The more extensive Kanji character set, which the Japanese share with the Chinese, consisting of several thousand different characters, is not included. Fig: 2.6.7 16X2 LCD Display. Using the switches, of whatever type, and referring to Table 3, enter a few characters onto the display, both letters and numbers. The RS switch (S10) must be “up” (logic 1) when sending the characters, and switch E (S9) must be pressed for each of them. Thus the operational order is: set RS high, enter character, and trigger E, leave RS high, enter another character, trigger E, and so on. 2.7 RELAY SWITCH A relay is an electrically operated switch. Many relays use an electromagnetic to mechanically operate a switch, but other operating principles are also used, such as solid state relay. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. The first relays were used in long distance telegraph circuits as amplifiers they repeated the signal coming in from one circuit and re-transmitted it on another circuit. Relays were
  • 44. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 34 used extensively in telephone exchanges and early computers to perform logical operations. A type of relay that can handle the high power required to directly control an electric motor or other loads is called a contactor. Solid state devices control power circuits with no moving part, instead using a semiconductor device to perform switching. Relays with calibrated operating characteristics and sometimes multiple operating coils are used to protect electrical circuits from overload or faults; in modern electric power systems these functions are performed by digital instruments still called “protective relays”. Fig.2.7 Relay Switch A relay is an electrical switch that uses an electromagnet to move the switch from the off to on position instead of a person moving the switch. It takes a relatively small amount of power to turn on a relay but the relay can control something that draws much more power. This is the schematic representation of a relay. The contacts at the top are normally open (i.e. not connected). When current is passed through the coil it creates a magnetic field that pulls the switch closed (i.e. connects the top contacts). Usually a spring will pull the switch open again once the power is removed from the coil. 2.7.1 Relay Selection Relays (and switches) come in different configurations. T most common are shown to the right. Single Pole Single Throw (SPST) is the simplest with only two contacts. Single Pole Double Throw (SPDT) has three contacts. The contacts are usually labeled Common (COM), Normally Open (NO), and Normally Closed (NC).
  • 45. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 35 The Normally Closed contact will be connected to the Common contact when no power is applied to the coil. The Normally Open contact will be open (i.e. not connected) when no power is applied to the coil. Fig.2.7(a) Relay Circuit When the coil is energized the Common is connected to the Normally Open contact and the Normally Closed contact is left floating. The Double Pole versions are the same as the Single Pole version except there are two switches that open and close together. Select a relay with contacts that can handle the voltage and current requirements of the load. Keep in mind that some loads (such as motors) draw much more current when first turned on than they do at steady state.
  • 46. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 36 CHAPTER 3 MICROCONTROLLER 3.1 Microcontroller: Micro controller is a semiconductor device which is fabricated using LSI or VLSI technology which consists of a processor, memory, I/O ports, ADC etc., It is nothing but system on chip. As we know that there so many types of micro controller families that are available in the market. Those are  8051 Family  AVR microcontroller Family  PIC microcontroller Family  ARM Family  MSP microcontroller family We are using ARM family micro controller in this project because we have to get accurate data while receiving the pulses (OR) readings from the system that’s why we selected LPC2148 microcontroller which is the family of the ARM7 controller. There are minimum six requirements for proper operation of microcontroller. Those are:  power supply section  pull-ups for ports (it is must for PORT0)  Reset circuit  Crystal circuit  ISP circuit (for program dumping)  EA/VPP pin is connected to Vcc. 3.1.1 ARM PROCESSOR  ARM Processor was developed at Acorn computer limited of Cambridge, England between 1983 and 1985.  This was after RISC concept came out at Stanford and Berkeley universities in 1980.
  • 47. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 37  ARM uses Enhanced RISC Architecture.  ARM (Acorn RISC machine) limited was found in 1990.  ARM designed basic core structure and licensed it to many partners who develop and fabricate new Micro Controllers and different chips.  ARM processor is mainly intended in the development of embedded applications which involve complex computations (High-end applications). ARM Architecture  ARM architecture is based on Enhanced RISC architecture (deviates from classic RISC architecture).  Embedded applications need to have : High code density Low power consumption rate Small silicon foot print  A large uniform register file (bank).  Load-Store architecture, where data processing operations involve only registers but not memory locations.  Uniform and Fixed length instructions.  Good speed/power consumption ratio.  High code density.  Control over ALU and Shifter (Barrel Shifter) which helps maximum usage of hardware on the chip.  Auto increment and Auto decrement of addressing modes to optimize program loops.  Load and Store multiple data elements through a single instruction, which increases data throughput.  A lot of branch instructions which can be used in conjunction with a number of instructions, which maximizes execution throughput.
  • 48. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 38 ARM7 TDMI-S PROCESSOR: The ARM7TDMI core is a member of the ARM family of general-purpose 32- bit microprocessors. The ARM architecture is based on Reduced Instruction Set Computer (RISC).The RISC instruction set, and related decode mechanism are much simpler than those of Complex Instruction Set Computer (CISC) designs. This simplicity gives:  A high instruction throughput.  An excellent real-time interrupt response.  A small, cost-effective, processor macro cell. THE INSTRUCTION PIPELINE The ARM7TDMI core uses a pipeline to increase the speed of the flow of instructions to the processor. This allows several operations to take place simultaneously, and the processing and memory systems to operate continuously. A three-stage pipeline is used, so instructions are executed in three stages:  Fetch  Decode  Execute. During normal operation, while one instruction is being executed, its successor is being decoded, and a third instruction is being fetched from memory. The program counter points to the instruction being fetched rather than to the instruction being executed. This is important because it means that the Program Counter (PC) value used in an executing instruction is always two instructions ahead of the address. MEMORY ACCESS The ARM7TDMI core has Von Neumann architecture, with a single 32-bit data bus carrying both instructions and data. Only load, store, and swap instructions can access data from memory.
  • 49. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 39 Data can be:  8-bit (bytes)  16-bit (half words)  32-bit (words). Words must be aligned to 4-byte boundaries. Half words must be aligned to 2- byte boundaries. 3.1.2 ARM7 LPC2148 Micro Controller ARM LPC2148 is a 64 pin Micro Controller which comes under ARM 7 version of ARM processors. It comes under the processor core architecture ARM7TDMI-S.It is a 32 bit Micro Controller .This is intended for high end applications involving complex computations. It follows the enhanced RISC architecture. It has high performance and very low power consumption. It has serial communications interfaces ranging from a USB 2.0 Full Speed device, multiple UARTS, SPI, and I2Cs. Various 32-bit timers, dual 10-bit ADC(s), single 10-bit DAC, PWM channels and 45 fast GPIO lines with 9 interrupt pins. FEATURES OF LPC2148  16/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.  32 + 8 KB of on-chip static RAM and 512 KB of on-chip flash program memory.  In-System/In-Application Programming (ISP/IAP) via on-chip boot- loader software.  Embedded ICE RT and Embedded Trace interfaces offer real-time debugging with the on-chip Real Monitor software and high speed tracing of instruction execution.  USB 2.0 Full Speed compliant Device Controller with 2 kB of endpoint RAM. In addition, the LPC2148 provide 8 kB of on-chip RAM accessible to USB by DMA.  Two 10-bit A/D converters provide a total of 14 analog inputs, with conversion times as low as 2.44 µs per channel.  Single 10-bit D/A converter provide variable analog output.
  • 50. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 40  Two 32-bit timers/external event counters (with four capture and four compare channels each), PWM unit (six outputs) and watchdog.  Low power real-time clock with independent power and dedicated 32 kHz clock input  Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus (400 Kbps), SPI and SSP with buffering and variable data length capabilities.  Up to nine edge or level sensitive external interrupt pins available. 3.1.3 PIN DIAGRAM OF LPC2148 The pin diagram of low power consumption controller i.e. LPC2148 is shown below:  It is a 64 pin IC  It is Quadrature Flat Package(QFP) type IC  It has 2 ports and each port has 32 pins Fig 3.1.3 Pin diagram of ARM7 LPC-2148 microcontroller
  • 51. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 41 3.2 ARCHITECTURAL OVERVIEW: Fig 3.2 ARM architecture diagram 3.2.1 On Chip Memories  It has a flash memory of 512KB which can be used for both code and data storage.  12KB is intended for boot loader i.e., user code flash memory is 500KB.  Programming flash memory can be done via system serial port.  This memory can be erased or programmed while running the application.  It provides minimum of 1, 00,000 erase/write cycles with 20 years data retention capability.  It has on chip static RAM of 32 KB and 8KB is intended for USB usage.
  • 52. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 42 3.2.2 Vectored Interrupt Controller This controller accepts all interrupts as input and categorize them under different interrupt modules. There are 3 types of interrupt modules Fast Interrupt Request This got the highest priority. If only one interrupt is available it will directly run from interrupt vector location. If more than one interrupt is available VIC combines these signals and places them in a service routine. 3.2.3 Pin Connects Block This block allows the pins of the Micro Controller to perform multiple functions. Configuration registers allows the multiplexers to allow connection between the pin and peripheral. After reset all pins of port0 and port1 are configured as input with following exceptions. If JTAG debugger mode is active, then the JTAG pins will have JTAG functionality. 3.2.4 10-bit ADC This Micro Controller has 2 ADC ports.  10 bit successive approximation analog to digital converter.  Measurement range of 0 V to VREF (2.0 V <= VREF <= VDDA).  Each converter capable of performing more than 400,000 10-bit samples per second.  Every analog input has a dedicated result register to reduce interrupts. 3.2.5 Real-time clock The RTC is designed to provide a set of counters to measure time when normal or idle operating mode is selected. The RTC has been designed to use little power, making it suitable for battery powered systems where the CPU is not running continuously (Idle mode). Features  Measures the passage of time to maintain a calendar and clock.  Ultra-low power design to support battery powered systems.
  • 53. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 43  Provides Seconds, Minutes, Hours, Day of Month, Month, Year, Day of Week, and Day of Year.  Can use either the RTC dedicate 32 kHz oscillator input or clock derived from the external crystal/oscillator input at XTAL1.  The ARM7TDMI-S is a general purpose 32-bit microprocessor, which offers high performance and very low power consumption. The ARM architecture is based on Reduced Instruction Set Computer (RISC) principles, and the instruction set and related decode mechanism are much simpler than those of micro programmed Complex  Instruction Set Computers (CISC). This simplicity results in a high instruction throughput and impressive real-time interrupt response from a small and cost-effective processor core. Pipeline techniques are employed so that all parts of the processing and memory systems can operate continuously. Typically, while one instruction is being executed, its successor is being decoded, and a third instruction is being fetched from memory.  The ARM7TDMI-S processor also employs a unique architectural strategy known as  Thumb, which makes it ideally suited to high-volume applications with memory restrictions or applications where code density is an issue.  The key idea behind Thumb is that of a super-reduced instruction set. Essentially, the ARM7TDMI-S processor has two instruction sets: 1) The standard 32-bit ARM set. 2) A 16-bit Thumb set.  The Thumb set’s 16-bit instruction length allows it to approach twice the density of standard ARM code while retaining most of the ARM’s performance advantage over a traditional 16-bit processor using 16-bit registers. This is possible because Thumb code operates on the same 32-bit register set as ARM code.  Thumb code is able to provide up to 65 % of the code size of ARM, and 160 % of the performance of an equivalent ARM processor connected to a 16-bit memory system. The particular flash implementation in the LPC2141/42/44/46/48 allows for full speed execution also in ARM
  • 54. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 44 mode. It is recommended to program performance critical and short code sections (such as interrupt service routines and DSP algorithms) in ARM mode. The impact on the overall code size will be minimal but the speed can be increased by 30% over Thumb mode. 3.2.6 Fast general purpose parallel I/O (GPIO) Device pins that are not connected to a specific peripheral function are controlled by the GPIO registers. Pins may be dynamically configured as inputs or outputs. Separate registers allow setting or clearing any number of outputs simultaneously. The value of the output register may be read back, as well as the current state of the port pins. LPC2141/42/44/46/48 introduces accelerated GPIO functions over prior LPC2000 devices:  GPIO registers are relocated to the ARM local bus for the fastest possible I/O timing.  Mask registers allow treating sets of port bits as a group, leaving other bits unchanged.  All GPIO registers are byte addressable.  Entire port value can be written in one instruction. Features  Bit-level set and clear registers allow a single instruction set or clear of any number of bits in one port.  Direction control of individual bits.  Separate control of output set and clear.  All I/O default to inputs after reset. USB 2.0 device controller  The USB is a 4-wire serial bus that supports communication between a host and a number (127 max) of peripherals. The host controller allocates the USB bandwidth to attached devices through a token based protocol. The bus supports hot plugging, unplugging, and dynamic configuration of the devices. All transactions are initiated by the host controller.
  • 55. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 45  The LPC2141/42/44/46/48 is equipped with a USB device controller that enables  12 Mbit/s data exchange with a USB host controller. It consists of a register interface, serial interface engine, endpoint buffer memory and DMA controller. The serial interface engine decodes the USB data stream and writes data to the appropriate end point buffer memory. The status of a completed USB transfer or error condition is indicated via status registers. Features  Fully compliant with USB 2.0 Full-speed specification.  Supports 32 physical (16 logical) endpoints.  Supports control, bulk, interrupt and isochronous endpoints.  Scalable realization of endpoints at run time.  Endpoint maximum packet size selection (up to USB maximum specification) by software at run time.  RAM message buffer size based on endpoint realization and maximum packet size.  Supports Soft Connect and Good Link LED indicator. These two functions are sharing one pin.  Supports bus-powered capability with low suspend current. UART’S  The LPC2141/42/44/46/48 each contains two UARTs. In addition to standard transmit and receive data lines, the LPC2144/46/48 UART1 also provide a full modem control handshake interface.  Compared to previous LPC2000 microcontrollers, UARTs in LPC2141/42/44/46/48 introduce a fractional baud rate generator for both UARTs, enabling these microcontrollers to achieve standard baudrates such as 115200 with any crystal frequency above 2 MHZ. Features  16 byte Receive and Transmit FIFOs  Register locations conform to ‘550 industry standard.
  • 56. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 46  Receiver FIFO triggers points at 1, 4, 8, and 14 bytes  Built-in fractional baud rate generator covering wide range of baud rates without a need for external crystals of particular values.  Transmission FIFO control enables implementation of software (XON/XOFF) flow control on both UARTs.  LPC2144/46/48 UART1 equipped with standard modem interface signals. This module also provides full support for hardware flow control (auto-CTS/RTS).  A 32-bit timer/counter with a programmable 32-bit prescaler.  External event counter or timer operation.  Four 32-bit capture channels per timer/counter that can take a snapshot of the timer value when an input signals transitions. A capture event may also optionally generate an interrupt.  Four 32-bit match registers that allow: Continuous operation with optional interrupt generation on match. Stop timer on match with optional interrupt generation. Reset timer on match with optional interrupt generation. Watchdog timer The purpose of the watchdog is to reset the microcontroller within a reasonable amount of time if it enters an erroneous state. When enabled, the watchdog will generate a system reset if the user program fails to ‘feed’ (or reload) the watchdog within a predetermined amount of time. Features  Internally resets chip if not periodically reloaded.  Debug mode.  Enabled by software but requires a hardware reset or a watchdog reset/interrupt to be disabled.  Incorrect/Incomplete feed sequence causes reset/interrupt if enabled.  Flag to indicate watchdog reset.  Programmable 32-bit timer with internal prescaler.
  • 57. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 47  Selectable time period from (TPCLK × 256 × 4) to (TPCLK × 232 × 4) in multiples of TPCLK × 4 Pulse width modulator  The PWM is based on the standard timer block and inherits all of its features, although only the PWM function is pinned out on the LPC2141/42/44/46/48. The timer is designed to count cycles of the peripheral clock (PCLK) and optionally generate interrupts or perform other actions when specified timer values occur, based on seven match registers.  The PWM function is also based on match register events. The ability to separately control rising and falling edge locations allows the PWM to be used for more applications. For instance, multi-phase motor control typically requires three non-overlapping PWM outputs with individual control of all three pulse widths and positions.  Two match registers can be used to provide a single edge controlled PWM output. One match register (MR0) controls the PWM cycle rate, by resetting the count upon match. The other match register controls the PWM edge position. Additional single edge controlled PWM outputs require only one match register each, since the repetition rate is the same for all PWM outputs. Multiple single edge controlled PWM outputs will all have a rising edge at the beginning of each PWM cycle, when an MR0 match occurs.  Three match registers can be used to provide a PWM output with both edges controlled.  Again, the MR0 match register controls the PWM cycle rate. The other match registers control the two PWM edge positions. Additional double edge controlled PWM outputs require only two matched registers.
  • 58. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 48 CHAPTER 4 SOFTWARE REQUIREMENTS 4.1 KEIL software: Keil compiler is a software used where the machine language code is written and compiled. After compilation, the machine source code is converted into hex code which is to be dumped into the microcontroller for further processing. Keil compiler also supports C language code. Installing the Keil software on a Windows PC: • Insert the CD-ROM in your computer’s CD drive. • On most computers, the CD will “auto run”, and you will see the Keil installation menu. If the menu does not appear, manually double click on the Setup icon, in the root directory: you will then see the Keil menu. • On the Keil menu, please select “Install Evaluation Software”. (You will not require a license number to install this software). • Follow the installation instructions as they appear. Loading the Projects: The example projects for this book are NOT loaded automatically when you install the Keil compiler. These files are stored on the CD in a directory “/Pont”. The files are arranged by chapter: for example, the project discussed in Chapter 3 is in the directory “/Pont/Ch03_00-Hello”.Rather than using the projects on the CD (where changes cannot be saved), please copy the files from CD onto an appropriate directory on your hard disk. Note: you will need to change the file properties after copying: file transferred from the CD will be ‘read only’. About Keil: 1. Click on the Keil u Vision Icon on Desktop 2. Click on the Project menu from the title bar 3. Then Click on New Project
  • 59. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 49 4. Save the Project by typing suitable project name with no extension in u r own folder sited in either C: or D: 5. Then Click on save button above. 6. Select the component for u r project. i.e. Atmel,ARM…… 7. Click on the + Symbol beside of ARM 8. Select LPC2148 9. Then Click on “OK” 10. Then Click either YES or NO………mostly “NO” 11. Now your project is ready to USE 12. Now double click on the Target1, you would get another option “Source group 1” 13. Click on the file option from menu bar and select “new” 14. The next screen will be as shown in next page, and just maximize it by double clicking on its blue boarder. 15. Now start writing program in either in “C” or “ASM” 16. For a program written in Assembly, then save it with extension “ .asm” and for “C” based program save it with extension “ .C” 17. Now add this file to the target by giving a right click on the source group and click on “Add files to Group Source”. 18. Now you will get another window, on which by default “C” files will appear. 19. Now select as per your file extension given while saving the file. 20. Click only one time on option “ADD”. 21. Right click on the target and select the first option “Options for target”. A window opens with different options like device, target, output etc. First click on “target”. 22. Since the set frequency of the microcontroller is 12 MHz to interface with the PC, just enter this frequency value in the Xtal (MHz) text area and put a tick on the Use on-chip ROM. This is because the program what we write here in the keil will later be dumped into the microcontroller and will be stored in the inbuilt ROM in the microcontroller. 23. Now click the option “Output” and give any name to the hex file to be created in the “Name of executable” text area and put a tick to the “Create HEX file”
  • 60. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 50 option present in the same window. The hex file can be created in any of the drives. You can change the folder by clicking on “Select folder for Objects”. 24. Now Press function key F7 to compile. Any error will appear if so happen. If the file contains no error, then press Control+F5 simultaneously. 25. The new window is as follows 26. Then Click “OK” 27. Now Click on the Peripherals from menu bar, and check your required port 28. Drag the port a side and click in the program file. 29. Now keep Pressing function key “F11” slowly and observe. 30. You are running your program successfully 4.2 Flash magic: Flash Magic is Windows software from that microcontroller is easily programmed using In-System Programming technology to all the ISP feature empowered devices.
  • 61. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 51 After installing the software when we click on the icon of the software the window will open on the screen as shown in figure. We need to change the device and have to select the device LPC2148, and then we set to ‘erase all flash’ option on the flash magic window. If we need to verify the proper dumping of the program in the microcontroller then we need to set the ‘verify after program’ option. Loading of hex file: After selecting device we load the hex file in the given block by using the ‘browse’ option on the ‘FLASH MAGIC’ window. Programming of device: after loading the file next step is dumping of code in microcontroller. For that we first connect the computer’s serial port to your controller board through serial cable. Then after give the power supply to the controller board. Now it’s time to dump the code in controller. Press the start option on your flash magic window. Then your microcontroller will be programmed in few seconds...
  • 62. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 52 CHAPTER 5 RESULTS The system majorly consists of three components like Fire sensor circuit, GSM modem and ARM7 LPC2148. Let us see the brief explanation of circuitry. Fig.5.1 Hardware shows the Experimental setup of the project.
  • 63. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 53 Fig. 5.2 LCD shows the Locations This system continuously check for the occurrence of the fire in multiple locations this can be done with the help of fire sensor LM35. When the kit is switched on the LCD display will be shown as fire detector in multi locations as shown in the above figure. So whenever the fire is detected the fire sensor sends information to the microcontroller then it will display as fire detected in location 1 or 2 and motor on. Then the relay will be in active state and water sprinklers are switched on automatically. After that the microcontroller send the information to GSM module to send message that fire is detected in particular location to the registered mobile number. The below 5.3 and 5.4 figures shows the fire detected and message passed to user indication on the LCD screens. The figure 5.5 shows the ac pressure motors are turned on and sprinkling the water.
  • 64. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 54 Fig. 5.3 LCD shows the fire is detected in location 2 Fig. 5.4 after sending the message Since GSM supports digital data transmission, MAX232 is used to convert the digital data in the serial form using parallel-in-serial-out shift registers suitable for wireless communication. Fig. 5.5 Air pressure motors for water sprinkling
  • 65. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 55 Finally the message is received by registered mobile number through GSM module that the fire is detected in particular location and motors are switched on. Fig. 5.6 Results in registered mobile number
  • 66. Detection and warning system for firework warehouse based on wireless sensor networks Dept. Of ECE, AITS,Kadapa Page 56 CHAPTER 6 CONCLUSION CONCLUSION: Hence our system continuously checks for the occurrence of fire in industries. This is done with the help of a fire sensor which is designed around a microcontroller. The Micro controller plays a major role in the project for controlling purpose. Whenever the fire is detected by the sensor is indicated to microcontroller. Then the microcontroller takes the control action by switching on or off the water sprinkler. By making use of these kinds of projects we can provide the security in industries.