Sie sind auf Seite 1von 51

INDUSTRIAL SECURITY SYSTEM USING GSM

A Project Report Submitted in The partial fulfillment of

The requirements for the award of the degree of

BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING

SUBMITTED BY
A.NAYANA VAISHNAVI 138B1A0403
M.TEJASWINI 138B1A0428
A.BHARATHI 138B1A0404

Under the esteemed guidance of


Mr. G.SUBRAMANYAM M.TECH
Associate Professor of ECE Dept.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


RISE GANDHI GROUP OF INSTITUTIONS
(Affiliated to JNTUK, Kakinada)
2013-2017

RISE GANDHI GROUP OF INSTITUTIONS


(INTEGRATED CAMPUS)
(Approved by AICTE, NEW DELHI, Affiliated to J.N.T.U.K, KAKINADA)
Valluru (post), ONGOLE, Prakasam District, Pin-523272
CERTIFICATE
This is to certify that the project work entitled INDUSTRIAL SECURITY SYSTEM
USING GSM is a bonafide work of the following IV B.TECH students in the partial
fulfillment of the requirement for the award of the degree of Bachelor of Technology in
ELECTRONICS AND COMMUNICATION ENGINEERING for the academic year
2013-2017.
A.NAYANA VAISHNAVI 138B1A0403
M.TEJASWINI 138B1A0404
A.BHARATHI 138B1A0404

Internal Guide Head of the Department


Mr.G.SUBRAHMANYAM M.Tech Mr.S.CHANDRASEKHAR M.Tech
Associate Professor of ECE Dept. Professor of ECE Dept.

PRINCIPAL External Examiner


Dr.K.V.SUBRAHMANYAM Ph.D, F.I.E
ACKNOWLEDGEMENT

We are extremely thankful to our beloved chairman, Sri ISKALA


CHINNARANGAMANNAR garu, who took keen interest and encouraged us in every
effort throughout the course.

We are thankful to our beloved Secretary and correspondent, Sri SIDDHA.


HANUMANTHA RAO garu, who took keen interest and encouraged us in every
effort Throughout the course .

We are thankful to our beloved Treasurer, Sri SIDDHA BHARATH garu, who
took keen interest and encouraged us in every effort throughout the course.

We are thankful to our beloved director, Sri THUMMAPUDI VENKATA


SUBBAIAH garu, who took keen interest and encouraged us in every effort throughout the
course.
We owe our gratitude to our principal Sri Dr .K. V.SUBRAHMANYAM garu, for
his kind attention in the valuable guidance to us throughout the course.

We are profoundly thankful to Sri Mr. K. RATNABABU garu, Associate


professor and Head of the Department of Electronics and Communication Engineering
for his cooperation and encouragement.

We sincerely thank our guide Mr. G.SUBRAMANYAM garu, Associate Professor


of ECE Department for his guidance and valuable suggestions and support in the completion
of the project.

Finally, we thank all the faculty members, supporting staff of ECE Department and friends
for their kind co-operation and valuable help for completing the seminar.

SUBMITTED BY

A.NAYANA VAISHNAVI 138B1A0403


M.TEJASWINI 138B1A0428
A.BHARATHI 138B1A0404
ABSTRACT

Security is primary concern for everyone. This project is aimed to


provide the security for the industries by designing a system using GSM
64K technology. But what if the security is assured irrespective of the person
BYTES is inside or outside the industry. This Project describes a design of
EXTERN
effective security alarm system that can monitor the house with
AL
different sensors using GSM modem.
This GSM Modem can accept any GSM network operator
SIM card and act just like a mobile phone with its own unique phone
number. Advantage of using this modem will be that you can use its
RS232 port to communicate and develop embedded applications.
Applications like SMS Control, data transfer, remote control and logging
can be developed easily. The modem can either be connected to PC
serial port directly or to any microcontroller.
Industrial Security System is a security system using wireless
concept that monitors the status of each sensor continuously. Here in
this project IR sensor, Fire sensor and smoke sensor are interfaced to
the microcontroller along with a GSM modem is interfaced to the
microcontroller using serial communication. A buzzer is also interfaced
to the microcontroller for an audio identification. The micro controller
continuously monitors the status the sensors and if any of the sensors
trigger means that if any fire occurs or if any burglar attacks take place,
the controlling unit immediately identifies the change in the output of
the sensor and sends the predefined message to the user mobile
through GSM modem and also alerts the buzzer.
This project uses regulated 5V, 500mA power supply. 7805
three terminal voltage regulator is used for voltage regulation. Bridge
type full wave rectifier is used to rectify the ac output of secondary of
230/12V step down transformer.

A
T
8
9
64k
S
5 Bytes
INTRODUCTION TO EMBEDDED SYSTEMS
60k4k Bytes
DIRECT
Bytes
Internal
2
1.1 Introduction:
ADDRESSING External
External
ONLY RESET Smoke Sensor
FFF

0000 0000

The 128 byte of RAM are divided into 3 segments

a) Register banks 0 3 (00 1FH)

b) Bit addressable area (20H 2FH)

c). Scratch pad area (30H 7FH)

If the SP is initialized to this area enough bytes should be left aside to prevent SP data
destruction.

3.4 SPECIAL FUNCTION REGISTERS:

A & B REGISTERS:

They are used during math and logically operations. The register A is also used for all
data transfers between the micro controller and memory. The B register is used during
multiplication and divided operations. For other instructions it can be treated as another
scratch pad register.

PSW (PROGRAM STATUS WORD):

It contains math flags user flags F0 and register select bits RS1 and RS0 to determine
the working register bank.

STACK AND STACK POINTER:


Stack is used to hold and retrieve data quickly. The 8 bit SP is incremented before data is
stored during PUSH and CALL executions. While the stack may reside anywhere in on-chip
RAM, the SP is initialized to 07H after the stack to begin at manipulated as a 16 bit register
or as two independent 8 bit register

PC (PROGRAM COUNTER):

It addresses the memory locations that program instructions are to be fetched. It is the
only register that does not have any internal address.

FLAGS:

They are 1bit register provided to store the results of certain program instructions. Other
instructions can test the conditions of the flags and make the decisions accordingly. To
conveniently address, they are grouped inside the PSW and PCON. The micro controller has
4 main flags: carry(c), auxiliary carry (AC), over flow (OV), parity (P) and 3 general-purpose
flagsF0, GF0 and GF1.

PORTS:

All ports are bi-directional; each consists of a latch, an output driver and an input
buffer. P0, P1, P2 and P3 are the SFR latches ports 0, 1, 2 and 3 respectively. The main
functions of each port are mentioned below.

Port0: input/output bus port, address output port and data input/output port.
Port1: Quasi-bi-directional input/output port.
Port2: Quasi-bi-directional input/output port and address output port.
Port3: Quasi-bi-directional input/output port and control input/output pin.

SBUF (SERIAL BUFFER):


The microcontroller has serial transmission circuit that uses SBUF register to hold data. It is
actually two separate registers, a transmit buffer and a receive buffer register. When data is
moved to SBUF, it goes to transmit buffer, where it is held for serial transmission and when
it is moved from SBUF, it comes from the receive buffer.

3.5 TIMER REGISTER:


Register pairs (TH0, TL1), (TH1, TL1) are the 16-bit counter registers for timer/counters
0 and 1.
3.5.1 CONTROL REGISTERS:

SFRs, IP, TMOD, SCON, and PCON contain control and status bits for the interrupt system,
Timers/counters and the serial port.

3.5.2 OSCILLATOR AND CLOCK CIRCUIT: This circuit generates the clock pulses by
which all internal operations are synchronized. For the microcontroller to yield standard baud
rates, the crystal frequency is chosen as 11.059MHz.
RESET:
The Reset switch is the RST pin of the microcontroller, which is the input to a Schmitt
trigger. It is accomplished by holding the RST pin HIGH for at least two machine cycles
while the oscillator frequency is running the CPU responds by generating an internal reset.

3.5.3 TIMERS/COUNTER:
Micro controller has two 16- bit Timer/Counter register T0 and T1 configured to operate
either as timers or event counters. There are no restrictions on the duty cycle of the external
input signal, but it should be for at least one full machine to ensure that a given level is
sampled at least once before it changes. Timers 0 and 1 have four operating modes: 13-bit
mode, 16 bit mode, 8 bit auto-reload mode. Control bits C/t in TMOD SFR select the
timer or counter function.
MODE 0:
Both timers in MODE0 are counters with a divide by 32 pre-scalar. The timer
register is configured as a 13 bit register with all 8 bits of TH1 and the lower 5-bit of
TL1.The upper 3 bits of TL1 are in determinate and should be ignored. Setting the run flags
(TR1) doesnt clear the register or the registers.
MODE1:
Mode 1 is same as mode 0, except that the timer register is run with all 16 bits. The clock is
applied to the combined high and low timer registers. An overflow occurs on the overflow
flag. The timer continues to count.
MODE 2:

This mode configures the timer register as an 8 bit counter (TL1/0) with automatic reload.
Overflow from TL1/0 not only sets TF1/0, but also reloads TL1/0 with the contents of TH1/0,
which is preset by software. The reload leaves unchanged.
MODE3:

Mode 3 is used for application that requires an extra 8 bit timer or counter. Timer 1 in mode
3 simply holds its count. The effect is same as setting TR0. Timer 0 its mode 3 establishes
TL0 and TL1 as two separate counters. TL0 uses the timer0 control bits C/T, GATE, TR0,
INT0 and TF0. TH0 is locked into a timer function and over the use of TR1 and TR2 from
timer 1. Thus TH0 controls the timer 1 interrupts.

3.6 INTERRUPTS:
The micro controller provides 6 interrupt sources, 2 external interrupts, 2 timer interrupts
and a serial port interrupt and a reset. The external interrupts (INT0 & INT1) can each be
either level activated or transition activated depending on bits IT0 and IT1 in register TCON.
The flags that actually generate these interrupts are IE0 & IE1 bits in TCON.

TF0 and TF1 generate the timer 0 & 1 interrupts, which are set by a roll over in their
respective timer/counter registers. When a timer interrupt is generated the on-chip hardware
clears the flag that generated it when the service routine is vectored to the serial port interrupt
is generated by logical OR of R1 & T1. Neither of these flags is cleared by hardware when
service routine is vectored to. In fact, the service routine itself determines whether R1 & T1
generated the interrupt, and the bit is cleared in the software.
Upon reset, all interrupts are disabled, meaning that none will be responded to by the micro
controller if they are activated. The interrupts must be enabled by software in order for the
micro controller to respond to them.

3.7SERIALINTERFACE:
The serial port is full duplex, i.e. it can transmit and receive simultaneously. It is also receive
buffered which implies it can begin receiving a second byte before a previously byte has been
read from the receive register. The serial port receives and transmits register and reading
SBUF accesses a physically separate receive register.
This serial interface had four modes of operation:
MODE 0: this mode of operation the serial data enters and exists through RXD.TXD outputs
the shift clock. Eight data bits are transmitted/ received, with the LSB first, the baud rate is
fixed at 1/12 of the oscillator frequency. Reception is initialized by the condition RI-0 and
REN=1.
MODE 1:
This mode 10 bits (a start bit 0, 8 data bits with LSB first and a stop bit are transmitted
through TXD port received through RXD. At the receiving end the stop bits goes into RB8 in
the SFR SCON. The baud rate is variable.
MODE 2:
Here 2, 16 bits (a start bit 0, 8 data bits (LSDB first), a programmable 9th data bit and a stop
bit) are transmitted through TXD or received through RXD. The baud rate is programmable
to either 1/32 or 1/64 of the oscillator frequency

MODE3:
The function of mode 3 is same as mode 2 except that the baud rate is variable. Reception is
initialized by the incoming start bit if REN=1.

3.8 BAUDRATE CALCULATIONS:


Baud rate in mode 0 is fixed.
Mode 0 baud rate=oscillator frequency/12
(1 machine cycle=12 clock. cycles)
The baud rate in mode 2 depends on the value of SMOD bit in PCON
Register.
SMOD=0, baud rate= (1/64) x oscillator frequency.
SMOD=1baud rate= (1/32) oscillator frequency.
I.e. mode 2 baud rate= [2(POW) SMOD/64)] x oscillator frequency.
In the modes 1 and 3, timer 1 over flow rate and the value of SMOD determines the
baud rate. Baud rate of mode 1 and 3 = [(2(POW) SMOD/32)] x timer 1 over flow
rate.
The timer 1 interrupt should be disabled in this application.

3.9 PROGRAM MEMORY LOCK BITS: On the chip are three lock bits, which can be left
un-programmed (u) or can be programmed (p) to obtain the additional features listed in the
table below.
When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during
reset.
Table 1.1

If the device is powered up without a reset, the latch initializes to a random value, and holds
that value until reset is activated. It is necessary state the latched value of EA be in agreement
with the current logic level at that pin in order for the device to function properly.

CHAPTER-4

GSM TECHNOLOGY

4.1 Introduction:
4.1.1Definition of GSM:
GSM (Global System for Mobile communications) is an open, digital cellular
technology used for transmitting mobile voice and data services.

GSM (Global System for Mobile communication) is a digital mobile telephone


system that is widely used in Europe and other parts of the world. GSM uses a variation of
Time Division Multiple Access (TDMA) and is the most widely used of the three digital
wireless telephone technologies (TD MA, GSM, and CDMA). GSM digitizes and compresses
data, then sends it down a channel with two other streams of user data, each in its own time
slot. It operates at either the 900 MHz or 1,800 MHz frequency band. It supports voice calls
and data transfer speeds of up to 9.6 Kbit/s, together with the transmission of SMS (Short
Message Service).

4.1.2 History
In 1982, the European Conference of Postal and Telecommunications Administrations
(CEPT) created the Group Special Mobile (GSM) to develop a standard for a mobile
telephone system that could be used across Europe. In 1987, a memorandum of
understanding was signed by 13 countries to develop a common cellular telephone system
across Europe. Finally the system created by SINTEF lead by Torleiv Maseng was selected.

In 1989, GSM responsibility was transferred to the European Telecommunications Standards


Institute (ETSI) and phase I of the GSM specifications were published in 1990. The first
GSM network was launched in 1991 by Radiolinja in Finland with joint technical
infrastructure maintenance from Ericsson.
By the end of 1993, over a million subscribers were using GSM phone networks being
operated by 70 carriers across 48 countries. As of the end of 1997, GSM service was
available in more than 100 countries and has become the de facto standard in Europe and
Asia.

4.2 GSM Frequencies


GSM networks operate in a number of different frequency ranges (separated into
GSM frequency ranges for 2G and UMTS frequency bands for 3G). Most 2G GSM networks
operate in the 900 MHz or 1800 MHz bands. Some countries in the Americas (including
Canada and the United States) use the 850 MHz and 1900 MHz bands because the 900 and
1800 MHz frequency bands were already allocated. Most 3G GSM networks in Europe
operate in the 2100 MHz frequency band. 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 890915 MHz to send information from the mobile station to the base
station (uplink) and 935960 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 880915 MHz (uplink) and 925960 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 for all 8 channels is 270.833 Kbit/s, and the frame
duration is 4.615 ms.
The transmission power in the handset is limited to a maximum of 2 watts in
GSM850/900 and 1 watt in GSM1800/1900. GSM operates in the 900MHz and 1.8GHz
bands in Europe and the 1.9GHz and 850MHz bands in the US. The 850MHz band is also
used for GSM and 3G in Australia, Canada and many South American countries. By having
harmonized spectrum across most of the globe, GSMs international roaming capability
allows users to access the same services when travelling abroad as at home. This gives
consumers seamless and same number connectivity in more than 218 countries.

Terrestrial GSM networks now cover more than 80% of the worlds population. GSM
satellite roaming has also extended service access to areas where terrestrial coverage is not
available.

Mobile Telephony Standards

Table4.1: Mobile Telephony Standards

4.2.1 1G TECHNOLOGY:
The first generation of mobile telephony (written 1G) operated using analogue
communications and portable devices that were relatively large. It used primarily the
following standards:
AMPS (Advanced Mobile Phone System), which appeared in 1976 in the United
States, was the first cellular network standard. It was used primarily in the Americas,
Russia and Asia. This first-generation analogue network had weak security
mechanisms which allowed hacking of telephones lines.
TACS (Total Access Communication System) is the European version of the AMPS
model. Using the 900 MHz frequency band, this system was largely used in England
and then in Asia (Hong-Kong and Japan).
ETACS (Extended Total Access Communication System) is an improved version of
the TACS standard developed in the United Kingdom that uses a larger number of
communication channels.

The first-generation cellular networks were made obsolete by the appearance of an entirely
digital second generation.

4.2.2 Second Generation of Mobile Networks (2G)


The second generation of mobile networks marked a break with the first generation of
cellular telephones by switching from analogue to digital. The main 2G mobile telephony
standards are:

GSM (Global System for Mobile communications) is the most commonly used
standard in Europe at the end of the 20th century and supported in the United States.
This standard uses the 900 MHz and 1800 MHz frequency bands in Europe. In the
United States, however, the frequency band used is the 1900 MHz band. Portable
telephones that are able to operate in Europe and the United States are therefore
called tri-band.
CDMA (Code Division Multiple Access) uses a spread spectrum technique that
allows a radio signal to be broadcast over a large frequency range.
TDMA (Time Division Multiple Access) uses a technique of time division of
communication channels to increase the volume of data transmitted simultaneously.
TDMA technology is primarily used on the American continent, in New Zealand and
in the Asia-Pacific region.

With the 2G networks, it is possible to transmit voice and low volume digital data, for
example text messages (SMS, for Short Message Service) or multimedia messages (MMS,
for Multimedia Message Service). The GSM standard allows a maximum data rate of 9.6
kbps.
Extensions have been made to the GSM standard to improve throughput. One of these is
the GPRS (General Packet Radio System) service which allows theoretical data rates on the
order of 114 Kbit/s but with throughput closer to 40 Kbit/s in practice. As this technology
does not fit within the "3G" category, it is often referred to as 2.5G

The EDGE (Enhanced Data Rates for Global Evolution) standard, billed as 2.75G,
quadruples the throughput improvements of GPRS with its theoretical data rate of 384 Kbps,
thereby allowing the access for multimedia applications. In reality, the EDGE standard allows
maximum theoretical data rates of 473 Kbit/s, but it has been limited in order to comply with
the IMT-2000 (International Mobile Telecommunications-2000) specifications from the ITU
(International Telecommuni1cations Union).

4.2.3 3G Technology:
The IMT-2000 (International Mobile Telecommunications for the year 2000) specifications
from the International Telecommunications Union (ITU) defined the characteristics
of 3G (third generation of mobile telephony). The most important of these characteristics are:
1. High transmission data rate.
2. 144 Kbps with total coverage for mobile use.
3. 384 Kbps with medium coverage for pedestrian use.
4. 2 Mbps with reduced coverage area for stationary use.
5. World compatibility.
6. Compatibility of 3rd generation mobile services with second generation networks.

3G offers data rates of more than 144 Kbit/s, thereby allowing the access to multimedia uses
such as video transmission, video-conferencing or high-speed internet access. 3G networks
use different frequency bands than the previous networks: 1885-2025 MHz and 2110-2200
MHz
The main 3G standard used in Europe is called UMTS (Universal Mobile
Telecommunications System) and uses WCDMA (Wideband Code Division Multiple
Access) encoding. UMTS technology uses 5 MHz bands for transferring voice and data, with
data rates that can range from 384 Kbps to 2 Mbps. HSDPA (High Speed Downlink Packet
Access) is a third generation mobile telephony protocol, (considered as "3.5G"), which is able
to reach data rates on the order of 8 to 10 Mbps. HSDPA technology uses the 5 GHz
frequency band and uses WCDMA encoding.
Introduction to the GSM Standard
The GSM (Global System for Mobile communications) network is at the start of the
21st century, the most commonly used mobile telephony standard in Europe. It is called as
Second Generation (2G) standard because communications occur in an entirely digital mode,
unlike the first generation of portable telephones.

When it was first standardized in 1982, it was called as Group Special Mobile and later, it
became an international standard called "Global System for Mobile communications" in
1991.
In Europe, the GSM standard uses the 900 MHz and 1800 MHz frequency bands. In
the United States, however, the frequency band used is the 1900 MHz band. For this reason,
portable telephones that are able to operate in both Europe and the United States are
called tri-band while those that operate only in Europe are called bi-band.
The GSM standard allows a maximum throughput of 9.6 kbps which allows transmission of
voice and low-volume digital data like text messages (SMS, for Short Message Service) or
multimedia messages (MMS, for Multimedia Message Service).

4.4 GSM Standards:


GSM uses narrowband TDMA, which allows eight simultaneous calls on the same
radio frequency.

There are three basic principles in multiple access, FDMA (Frequency Division
Multiple Access), TDMA (Time Division Multiple Access), and CDMA (Code Division
Multiple Access). All three principles allow multiple users to share the same physical
channel. But the two competing technologies differ in the way user sharing the common
resource.

TDMA allows the users to share the same frequency channel by dividing the signal
into different time slots. Each user takes turn in a round robin fashion for transmitting and
receiving over the channel. Here, users can only transmit in their respective time slot.
CDMA uses a spread spectrum technology that is it spreads the information contained
in a particular signal of interest over a much greater bandwidth than the original signal.
Unlike TDMA, in CDMA several users can transmit over the channel at the same time.

TDMA in brief:
In late1980s, as a search to convert the existing analog network to digital as a means
to improve capacity, the cellular telecommunications industry association chose TDMA over
FDMA.

Time Division Multiplex Access is a type of multiplexing where two or more channels of
information are transmitted over the same link by allocating a different time interval for the
transmission of each channel. The most complex implementation using TDMA principle is of
GSMs (Global System for Mobile communication). To reduce the effect of co-channel
interference, fading and multipath, the GSM technology can use frequency hoping, where a
call jumps from one channel to another channel in a short interval.

Fig4.1: Time Division Multiple-access

TDMA systems still rely on switch to determine when to perform a handoff. Handoff
occurs when a call is switched from one cell site to another while travelling. The TDMA
handset constantly monitors the signals coming from other sites and reports it to the switch
without callers awareness. The switch then uses this information for making better choices
for handoff at appropriate times. TDMA handset performs hard handoff, i.e., whenever the
user moves from one site to another, it breaks the connection and then provides a new
connection with the new site.

Advantages of TDMA:
There are lots of advantages of TDMA in cellular technologies.
1. It can easily adapt to transmission of data as well as voice communication.
2. It has an ability to carry 64 kbps to 120 Mbps of data rates. This allows the operator to
do services like fax, voice band data and SMS as well as bandwidth intensive
application such as multimedia and video conferencing.
3. Since TDMA technology separates users according to time, it ensures that there will
be no interference from simultaneous transmissions.
4. It provides users with an extended battery life, since it transmits only portion of the
time during conversations. Since the cell size grows smaller, it proves to save base
station equipment, space and maintenance.
TDMA is the most cost effective technology to convert an analog system to digital.

Disadvantages of TDMA:
One major disadvantage using TDMA technology is that the users has a predefined time slot.
When moving from one cell site to other, if all the time slots in this cell are full the user
might be disconnected. Likewise, if all the time slots in the cell in which the user is currently
in are already occupied, the user will not receive a dial tone.

The second problem in TDMA is that it is subjected to multipath distortion. To overcome this
distortion, a time limit can be used on the system. Once the time limit is expired, the signal is
ignored.

The concept of cellular network


Mobile telephone networks are based on the concept of cells, circular zones that overlap to
cover a geographical area.
Fig4.2: cellular network
Cellular networks are based on the use of a central transmitter-receiver in each cell,
called a "base station" (or Base Transceiver Station, written BTS). The smaller the radius of
a cell, the higher is the available bandwidth. So, in highly populated urban areas, there are
cells with a radius of a few hundred meters, while huge cells of up to 30 kilometers provide
coverage in rural areas.

In a cellular network, each cell is surrounded by 6 neighboring cells (thus a cell is


generally drawn as a hexagon). To avoid interference, adjacent cells cannot use the same
frequency. In practice, two cells using the same frequency range must be separated by a
distance of two to three times the diameter of the cell.

4.5 Architecture of the GSM Network


In a GSM network, the user terminal is called a mobile station. A mobile station is
made up of a SIM (Subscriber Identity Module) card allowing the user to be uniquely
identified and a mobile terminal.

The terminals (devices) are identified by a unique 15-digit identification number


called IMEI (International Mobile Equipment Identity). Each SIM card also has a unique
(and secret) identification number called IMSI (International Mobile Subscriber Identity).
This code can be protected using a 4-digit key called a PIN code.
The SIM card therefore allows each user to be identified independently of the
terminal used during communication with a base station. Communications occur through a
radio link (air interface) between a mobile station and a base station.
Fig 4.3: Architecture of the GSM Network
All the base stations of a cellular network are connected to a base station
controller (BSC) which is responsible for managing distribution of the resources. The system
consisting of the base station controller and its connected base stations is called the Base
Station Subsystem (BSS).

Finally, the base station controllers are themselves physically connected to the Mobile
Switching Centre (MSC), managed by the telephone network operator, which connects them
to the public telephone network and the Internet. The MSC belongs to a Network Station
Subsystem (NSS), which is responsible for managing user identities, their location and
establishment of communications with other subscribers. The MSC is generally connected to
databases that provide additional functions:

1. The Home Location Register (HLR) is a database containing information


(geographic position, administrative information etc.) of the subscribers registered in
the area of the switch (MSC).
2. The Visitor Location Register (VLR) is a database containing information of users
other than the local subscribers. The VLR retrieves the data of a new user from the
HLR of the user's subscriber zone. The data is maintained as long as the user is in the
zone and is deleted when the user leaves or after a long period of inactivity (terminal
off).
3. The Equipment Identify Register (EIR) is a database listing the mobile terminals.
4. The Authentication Centre (AUC) is responsible for verifying user identities.
5. The cellular network formed in this way is designed to support mobility via
management of handovers (movements from one cell to another).

Finally, GSM networks support the concept of roaming i.e., movement from one operator
network to another.

Introduction to Modem:

Fig4.4: Modem
Modem stands for modulator-demodulator.
A modem is a device or program that enables a computer to transmit data over
telephone or cable lines. Computer information is stored digitally, whereas information
transmitted over telephone lines is transmitted in the form of analog waves. A modem
converts between these two forms.

Fortunately, there is one standard interface for connecting external modems to


computers called RS-232. Consequently, any external modem can be attached to any
computer that has an RS-232 port, which almost all personal computers have. There are also
modems that come as an expansion board that can be inserted into a vacant expansion slot.
These are sometimes called onboard or internal modems.

While the modem interfaces are standardized, a number of different protocols for
formatting data to be transmitted over telephone lines exist. Some, like CCITT V.34 are
official standards, while others have been developed by private companies. Most modems
have built-in support for the more common protocols at slow data transmission speeds at
least, most modems can communicate with each other. At high transmission speeds, however,
the protocols are less standardized.

Apart from the transmission protocols that they support, the following characteristics
distinguish one modem from another:
Bps: How fast the modem can transmit and receive data. At slow rates, modems are
measured in terms of baud rates. The slowest rate is 300 baud (about 25 cps). At
higher speeds, modems are measured in terms of bits per second (bps). The fastest
modems run at 57,600 bps, although they can achieve even higher data transfer rates
by compressing the data. Obviously, the faster the transmission rate, the faster the data
can be sent and received. It should be noted that the data cannot be received at a faster
rate than it is being sent.
Voice/data: Many modems support a switch to change between voice and data
modes. In data mode, the modem acts like a regular modem. In voice mode, the
modem acts like a regular telephone. Modems that support a voice/data switch have a
built-in loudspeaker and microphone for voice communication.
Auto-answer: An auto-answer modem enables the computer to receive calls in the
absence of the operator.
Data compression: Some modems perform data compression, which enables them to
send data at faster rates. However, the modem at the receiving end must be able to
decompress the data using the same compression technique.
Flash memory: Some modems come with flash memory rather than conventional
ROM which means that the communications protocols can be easily updated if
necessary.
Fax capability: Most modern modems are fax modems, which mean that they can
send and receive faxes.

4.6 GSM Modem:


A GSM modem is a wireless modem that works with a GSM wireless network. A wireless
modem behaves like a dial-up modem. The main difference between them is that a dial-up
modem sends and receives data through a fixed telephone line while a wireless modem sends
and receives data through radio waves.
Fig4.5: Gsm Sim300 Modem

A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an


external GSM modem is connected to a computer through a serial cable or a USB cable. A
GSM modem in the form of a PC Card / PCMCIA Card is designed for use with a laptop
computer. It should be inserted into one of the PC Card / PCMCIA Card slots of a laptop
computer. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless
carrier in order to operate.

A SIM card contains the following information:


Subscriber telephone number (MSISDN)
International subscriber number (IMSI, International Mobile Subscriber Identity)
State of the SIM card
Service code (operator)
Authentication key
PIN (Personal Identification Code)
PUK (Personal Unlock Code)
Computers use AT commands to control modems. Both GSM modems and dial-up
modems support a common set of standard AT commands. In addition to the standard AT
commands, GSM modems support an extended set of AT commands. These extended AT
commands are defined in the GSM standards. With the extended AT commands, the following
operations can be performed:
Reading, writing and deleting SMS messages.
Sending SMS messages.
Monitoring the signal strength.
Monitoring the charging status and charge level of the battery.
Reading, writing and searching phone book entries.

Fig 4.6: Connection between GSM and PC


The number of SMS messages that can be processed by a GSM modem per minute is very
low i.e., about 6 to 10 SMS messages per minute.

4.7Introduction to AT Commands
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 the reason, modem
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 modems and mobile phones.

Besides this common AT command set, GSM 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).
It should be noted 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.

Some of the tasks that can be done using AT commands with a GSM modem or mobile phone
are listed below:

Get basic information about the mobile phone or GSM 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).
Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).
Send and receive fax (ATD, ATA, AT+F*).
Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW)
or delete (AT+CMGD) SMS messages and obtain notifications of newly received
SMS messages (AT+CNMI).
Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.
Perform security-related tasks, such as opening or closing facility locks (AT+CLCK),
checking whether a facility is locked (AT+CLCK) and changing
passwords(AT+CPWD).
(Facility lock examples: SIM lock [a password must be given to the SIM card every
time the mobile phone is switched on] and PH-SIM lock [a certain SIM card is
associated with the mobile phone. To use other SIM cards with the mobile phone, a
password must be entered.])
Control the presentation of result codes / error messages of AT commands. For
example, the user can control whether to enable certain error messages (AT+CMEE)
and whether error messages should be displayed in numeric format or verbose format
(AT+CMEE=1 or AT+CMEE=2).
Get or change the configurations of the mobile phone or GSM/GPRS modem. For
example, change the GSM network (AT+COPS), bearer service type (AT+CBST),
radio link protocol parameters (AT+CRLP), SMS center address (AT+CSCA) and
storage of SMS messages (AT+CPMS).
Save and restore configurations of the mobile phone or GSM/GPRS modem. For
example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS
messaging such as the SMS center address.

It should be noted that the mobile phone manufacturers usually do not implement all AT
commands, command parameters and parameter values in their mobile phones. Also, the
behavior of the implemented AT commands may be different from that defined in the
standard. In general, GSM modems, designed for wireless applications, have better support of
AT commands than ordinary mobile phones.

4.7.1 Basic concepts of SMS technology


1. Validity Period of an SMS Message
An SMS message is stored temporarily in the SMS center if the recipient mobile phone is
offline. It is possible to specify the period after which the SMS message will be deleted from
the SMS center so that the SMS message will not be forwarded to the recipient mobile phone
when it becomes online. This period is called the validity period.
A mobile phone should have a menu option that can be used to set the validity period. After
setting it, the mobile phone will include the validity period in the outbound SMS messages
automatically.

2. Message Status Reports


Sometimes the user may want to know whether an SMS message has reached the recipient
mobile phone successfully. To get this information, you need to set a flag in the SMS
message to notify the SMS center that a status report is required about the delivery of this
SMS message. The status report is sent to the user mobile in the form of an SMS message.
A mobile phone should have a menu option that can be used to set whether the status report
feature is on or off. After setting it, the mobile phone will set the corresponding flag in the
outbound SMS messages for you automatically. The status report feature is turned off by
default on most mobile phones and GSM modems.
3. Message Submission Reports
After leaving the mobile phone, an SMS message goes to the SMS center. When it reaches
the SMS center, the SMS center will send back a message submission report to the mobile
phone to inform whether there are any errors or failures (e.g. incorrect SMS message format,
busy SMS center, etc.). If there is no error or failure, the SMS center sends back a positive
submission report to the mobile phone. Otherwise it sends back a negative submission report
to the mobile phone. The mobile phone may then notify the user that the message submission
was failed and what caused the failure.
If the mobile phone does not receive the message submission report after a period of
time, it concludes that the message submission report has been lost. The mobile phone may
then send the SMS message again to the SMS center. A flag will be set in the new SMS
message to inform the SMS center that this SMS message has been sent before. If the
previous message submission was successful, the SMS center will ignore the new SMS
message but send back a message submission report to the mobile phone. This mechanism
prevents the sending of the same SMS message to the recipient multiple times.
Sometimes the message submission report mechanism is not used and the acknowledgement
of message submission is done in a lower layer.
4. Message Delivery Reports
After receiving an SMS message, the recipient mobile phone will send back a
message delivery report to the SMS center to inform whether there are any errors or failures
(example causes: unsupported SMS message format, not enough storage space, etc). This
process is transparent to the mobile user. If there is no error or failure, the recipient mobile
phone sends back a positive delivery report to the SMS center. Otherwise it sends back a
negative delivery report to the SMS center.
If the sender requested a status report earlier, the SMS center sends a status report to
the sender when it receives the message delivery report from the recipient. If the SMS center
does not receive the message delivery report after a period of time, it concludes that the
message delivery report has been lost. The SMS center then ends the SMS message to the
recipient for the second time.
Sometimes the message delivery report mechanism is not used and the acknowledgement of
message delivery is done in a lower layer.
CHAPTER-5
HARDWARE IMPLEMENTATION

5.1 LCD:

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In
this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers,
namely, Command and Data.

The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing it, clearing
its screen, setting the cursor position, controlling display etc. The data register stores the data
to be displayed on the LCD. The data is the ASCII value of the character to be displayed on
the LCD.

A liquid crystal display (LCD) is a thin, flat electronic visual display that uses the
light modulating properties of liquid crystals (LCs). LCs does not emit light directly.

They are used in a wide range of applications including: computer monitors,


television, instrument panels, aircraft cockpit displays, signal, etc. They are common in
consumer devices such as video players, gaming devices, clocks, watches, calculators, and
telephones. LCDs have displaced cathode ray tube (CRT) displays in most applications. They
are usually more compact, lightweight, portable, less expensive, more reliable, and easier on
the eyes. They are available in a wider range of screen sizes than CRT and plasma displays,
and since they do not use phosphors, they cannot suffer image burn-in.

Each pixel of an LCD typically consists of a layer of molecules aligned between two
transparent electrodes, and two polarizing filters the axes of transmission of which are (in
most of the cases) perpendicular to each other. With no actual liquid crystal between the
polarizing filters, light passing through the first filter would be blocked by the second
(crossed) polarizer. In most of the cases the liquid crystal has double refraction

The surfaces of the electrodes that are in contact with the liquid crystal material are
treated so as to align the liquid crystal molecules in a particular direction. This treatment
typically consists of a thin polymer layer that is unidirectional rubbed using, for example, a
cloth. The direction of the liquid crystal alignment is then defined by the direction of rubbing.
Electrodes are made of a transparent conductor called Indium Tin Oxide (ITO).

If the applied voltage is large enough, the liquid crystal molecules in the center of the
layer are almost completely untwisted and the polarization of the incident light is not rotated
as it passes through the liquid crystal layer. This light will then be mainly polarized
perpendicular to the second filter, and thus be blocked and the pixel will appear black.

Fig 5.1: LCD display

LCD with top polarizer removed from device and placed on top, such that the top and
bottom polarizers are parallel.

The optical effect of a twisted nematic device in the voltage-on state is far less
dependent on variations in the device thickness than that in the voltage-off state. Because of
this, these devices are usually operated between crossed polarizer such that they appear bright
with no voltage. These devices can also be operated between parallel polarizer, in which case
the bright and dark states are reversed. The voltage-off dark state in this configuration
appears blotchy, however, because of small variations of thickness across the device.
Both the liquid crystal material and the alignment layer material contain ionic
compounds. If an electric field of one particular polarity is applied for a long period of time,
this ionic material is attracted to the surfaces and degrades the device performance. This is
avoided either by applying an alternating current or by reversing the polarity of the electric
field as the device is addressed.
When a large number of pixels are needed in a display, it is not technically possible to
drive each directly since then each pixel would require independent electrodes. Instead, the
display is multiplexed. In a multiplexed display, electrodes on one side of the display are
grouped and wired together (typically in columns), and each group gets its own voltage
source. On the other side, the electrodes are also grouped (typically in rows), with each group
getting a voltage sink.
5.1.1 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).

Figure 5.2: PIN DIAGRAM OF 1X16 LINES LCD


TABLE 5.1: PIN DESCRIPTION OF LCD

CONTROL LINES
EN:
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 RS is high
(1), the data being sent is text data which would 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.2 POWER SUPPLY:


The power supply is designed to convert high voltage AC mains electricity to a suitable
low voltage supply for electronic circuits and other devices. A power supply can by broken
down into a series of blocks, each of which performs a particular function. A DC power
supply which maintains the output voltage constant irrespective of AC mains fluctuations or
load variations is known as Regulated D.C Power Supply
For example a 5V regulated power supply system as shown below:
Figure 5.3: Block diagram of power supply

5.2.1 TRANSFORMER:
A transformer is an electrical device which is used to convert electrical power from
one electrical circuit to another without change in frequency.

Transformers convert AC electricity from one voltage to another with little loss of
power. Transformers work only with AC and this is one of the reasons why mains electricity
is AC. Step-up transformers increase in output voltage, step-down transformers decrease in
output voltage. Most power supplies use a step-down transformer to reduce the dangerously
high mains voltage to a safer low voltage. The input coil is called the primary and the output
coil is called the secondary. There is no electrical connection between the two coils; instead
they are linked by an alternating magnetic field created in the soft-iron core of the
transformer. The two lines in the middle of the circuit symbol represent the core.
Transformers waste very little power so the power out is (almost) equal to the power in. Note
that as voltage is stepped down current is stepped up. The ratio of the number of turns on
each coil, called the turns ratio, determines the ratio of the voltages. A step-down transformer
has a large number of turns on its primary (input) coil which is connected to the high voltage
mains supply, and a small number of turns on its secondary (output) coil to give a low output
voltage.
Figure 5.4: Electrical Transformer
Turns ratio = Vp/ VS = Np/NS

Power Out= Power In

VS X IS=VP X IP

Vp = primary (input) voltage


Np = number of turns on primary coil
Ip = primary (input) current

5.3 RECTIFIER:
A circuit, which is used to convert ac to dc, is known as RECTIFIER. The process of
conversion ac to dc is called rectification

TYPES OF RECTIFIERS

Half wave Rectifier


Full wave rectifier
1. Center tap full wave rectifier.

2. Bridge type full bridge rectifier

Comparison of rectifier circuits

Type of Rectifier

Parameter Half wave Full wave Bridge

Number of diodes
1 2 4

PIV of diodes

Vm 2Vm Vm

D.C output voltage


Vm/ 2Vm/ 2Vm/

Vdc, at 0.318Vm 0.636Vm 0.636Vm

no-load

Ripple factor 1.21 0.482 0.482

Ripple

Frequency f 2f 2f

Rectification

Efficiency 0.406 0.812 0.812

Transformer

Utilization 0.287 0.693 0.812

Factor(TUF)

RMS voltage Vrms Vm/2 Vm/2 Vm/2

er.

.
Fig 5.2: Comparison of rectifier circuits

Full-wave Rectifier

From the above comparisons we came to know that full wave bridge rectifier as more
advantages than the other two rectifiers. So, in our project we are using full wave bridge
rectifier circuit

Bridge Rectifier
A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave
rectification. This is a widely used configuration, both with individual diodes wired as shown
and with single component bridges where the diode bridge is wired internally. A bridge
rectifier makes use of four diodes in a bridge arrangement as shown in fig (a) to achieve full-
wave rectification. This is a widely used configuration, both with individual diodes wired as
shown and with single component bridges where the diode bridge is wired

Figure 5.5: Full Wave Bridge Rectifier


Operation
During positive half cycle of secondary, the diodes D2 and D3 are in forward biased
while D1 and D4 are in reverse biased as shown in the fig(b). The current flow direction is
shown in the fig (b) with dotted arrows.

Figure 5.6: Operation during Positive Cycle


During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward
biased while D2 and D3 are in reverse biased as shown in the fig(c). The current flow
direction is shown in the fig (c) with dotted arrows.
Figure 5.7: Operation during Negative Cycle
SENSING DEVICES
FIRE SENSOR

A proximity sensor is a sensor able to detect the presence of nearby objects without any
physical contact. A proximity sensor often emits an electromagnetic field or a beam of
electromagnetic radiation (infrared, for instance), and looks for changes in the field or return
signal. The object being sensed is often referred to as the proximity sensor's target. It is the
same principle in ALL Infra-Red proximity sensors. The basic idea is to send infrared light
through IR-LEDs, which is then reflected by any object in front of the sensor. Then all you
have to do is to pick-up the reflected IR light. For detecting the reflected IR light, we are
going to use a very original technique: we are going to use another IR-LED, to detect the IR
light that was emitted from another LED of the exact same type. This is an electrical property
of Light Emitting Diodes (LEDs) which is the fact that a LED produces a voltage difference
across its leads when it is subjected to light. As if it was a photo-cell, but with much lower
output current.

SMOKE SENSOR

A gas detector is a device that detects the presence of gases in an area, often as part of a
safety system. This type of equipment is used to detect a gas leak and interface with a control
system so a process can be automatically shut down. A gas detector can sound an alarm to
operators in the area where the leak is occurring, giving them the opportunity to leave. This
type of device is important because there are many gases that can be harmful to organic life,
such as humans or animals

5.4 FILTER:
A Filter is a device, which removes the ac component of rectifier output but allows the
dc component to reach the load

Capacitor Filter
We have seen that the ripple content in the rectified output of half wave rectifier is
121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages
of ripples is not acceptable for most of the applications. Ripples can be removed by one of the
following methods of filtering:

(a) A capacitor, in parallel to the load, provides an easier bypass for the ripples voltage
though it due to low impedance. At ripple frequency and leave the d.c.to appears the load.

(b) An inductor, in series with the load, prevents the passage of the ripple current (due to high
impedance at ripple frequency) while allowing the dc (due to low resistance to dc)

(c) Various combinations of capacitor and inductor, such as L-section filter section filter,
multiple section filter etc. which make use of both the properties mentioned in (a) and (b)
above. Two cases of capacitor filter, one applied on half wave rectifier and another with full
wave rectifier.

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 capacitor charges quickly near the peak of the varying DC,
and then discharges as it supplies current to the output. Filtering significantly increases the
average DC voltage to almost the peak value (1.4 RMS value).
To calculate the value of capacitor(C),
C = *3*f*r*Rl
Where,
f = supply frequency
r = ripple factor
Rl = load resistance
Note: In our circuit we are using 1000microfarads.

5.5 REGULATOR
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable
output voltages. The maximum current they can pass also rates them. Negative voltage
regulators are available, mainly for use in dual supplies. Most regulators include some
automatic protection from excessive current ('overload protection') and overheating ('thermal
protection'). Many of the fixed voltage regulator ICs have 3 leads and look like power
transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is simple to
use. You simply connect the positive lead of your unregulated DC power supply (anything
from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and
then when you turn on the power, you get a 5 volt supply from the output pin.

Figure 5.8: Voltage Regulator

78XX

The Bay Linear LM78XX is integrated linear positive regulator with three terminals.
The LM78XX offer several fixed output voltages making them useful in wide range of
applications. When used as a zener diode/resistor combination replacement, the LM78XX
usually results in an effective output impedance improvement of two orders of magnitude,
lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-
263packages,

Features

Output Current of 1.5A

Output Voltage Tolerance of 5%

Internal thermal overload protection

Internal Short-Circuit Limit

No External Component

Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V

Offer in plastic TO-252, TO-220 & TO-263

Direct Replacement for LM78XX


5.6 POTENTIOMETER:
A potentiometer (colloquially known as a "pot") is a three-terminal resistor with a sliding
contact that forms an adjustable voltage divider. If only two terminals are used (one side and
the wiper), it acts as a variable resistor or rheostat. Potentiometers are commonly used to
control electrical devices such as volume controls on audio equipment. Potentiometers
operated by a mechanism can be used as position transducers, for example, in a joystick.

Figure5.9:Potentiometer
Potentiometers are rarely used to directly control significant power (more than a watt).
Instead they are used to adjust the level of analog signals (e.g. volume controls on audio
equipment), and as control inputs for electronic circuits.

5.7 RESISTOR:
A resistor is a two-terminal passive electronic component which implements electrical
resistance as a circuit element. When a voltage V is applied across the terminals of a resistor,
a current I will flow through the resistor in direct proportion to that voltage. The reciprocal of
the constant of proportionality is known as the resistance R, since, with a given voltage V, a
larger value of R further "resists" the flow of current I as given by Ohm's law.
Resistors are common elements of electrical networks and electronic circuits and
are ubiquitous in most electronic equipment. Practical resistors can be made of various
compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such
as nickel-chrome). Resistors are also implemented within integrated circuits, particularly
analog devices, and can also be integrated into hybrid and printed circuits. The electrical
functionality of a resistor is specified by its resistance: common commercial resistors are
manufactured over a range of more than 9 orders of magnitude.

5.8 CAPACITOR:
In electronics, a ceramic capacitor is a capacitor constructed of alternating layers
of metal and ceramic, with the ceramic material acting as the dielectric. The coefficient
depends on whether the dielectric is Class 1 or Class 2. A ceramic capacitor (especially the
class 2) often has high dissipation factor, high frequency coefficient of dissipation

A ceramic is a two terminal non polar device. The classical ceramic capacitor is the Disc
Capacitor. This device pre-dates the transistor and was used extensively in vacuum tube
equipment(Ex: Radio receivers).From about 1930 through the 1950s , and discrete transistor
equipment from the 1950s through the 1980s.Asof 2007,ceramic disc capacitors are in
widespread use in electronic equipment ,providing high capacity and small size at low price
compared to other low value capacitor types.

Ceramic capacitors come in various shapes and styles, including:

disc, resin coated, with through-hole leads

multilayer rectangular block, surface mount

bare leadless disc, sits in a slot in the PCB and is soldered in place, used for UHF
applications

tube shape, not popular now

ELECTROLYTIC CAPACITOR

Figure5.10: Electrolytic Capacitor

An electrolytic capacitor is a type of capacitor that uses an electrolyte, an ionic conducting


liquid, as one of its plates, to achieve a larger capacitance per unit volume than other types.
They are often referred to in electronics usage simply as "electrolytics". They are used in
relatively high-current and low-frequency electrical circuits, particularly in power supply
filters, where they store charge needed to moderate output voltage and current fluctuations in
rectifier output. They are also widely used as coupling capacitors in circuits where AC should
be conducted but DC should not. There are two types of electrolytics aluminum and tantalum.

5.9 SWITCHES AND PUSHBUTTONS:


This is the simplest way of controlling appearance of some voltage on microcontrollers input
pin. There is also no need for additional explanation of how these components operate.

Figure5.11: Pushbutton

This is about something commonly unnoticeable when using these components in everyday
life. It is about contact bounce, a common problem with mechanical switches. If contact
switching does not happen so quickly, several consecutive bounces can be noticed prior to
maintain stable state. The reasons for this are: vibrations, slight rough spots and dirt. Anyway,
this whole process does not last long (a few micro- or milliseconds), but long enough to be
registered by the microcontroller. Concerning the pulse counter, error occurs in almost 100%
of cases.
The simplest solution is to connect simple RC circuit which will suppress each quick voltage
change. Since the bouncing time is not defined, the values of elements are not strictly
determined. In the most cases, the values shown on figure are sufficient.
Switch Interfacing with 8051:
In 8051 PORT 1, PORT 2 & PORT 3 have internal 10k Pull-up resistors whereas
this Pull-up resistor is absent in PORT 0. Hence PORT 1, 2 & 3 can be directly used to
interface a switch whereas we have to use an external 10k pull-up resistor for PORT 0 to be
used for switch interfacing or for any other input. Figure 1 shows switch interfacing for
PORT 1, 2 & 3. Figure 2 shows switch interfacing to PORT 0.

For any pin to be used as an input pin, a HIGH (1) should be written to the pin if
the pin will always to be read as LOW. In the above figure, when the switch is not pressed,
the 10k resistor provides the current needed for LOGIC 1 and closure of switch provides
LOGIC 0 to the controller

LED(LIGHT EMITTING DIODE)

Introduction:

A light-emitting diode (LED) is a semiconductor diode that emits light when an electrical
current is applied in the forward direction of the device, as in the simple LED circuit. The
effect is a form of electroluminescence where incoherent and narrow-spectrum light is
emitted from the p-n junction..

Basic principle:
Like a normal diode, the LED consists of a chip of semi conducting material impregnated, or
doped, with impurities to create a p-n junction. As in other diodes, current flows easily from
the p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge-carriers
electrons and holes flow into the junction from electrodes with different voltages. When an
electron meets a hole, it falls into a lower energy level, and releases energy in the form of a
photon.

LED Display types:

Bar graphs
Seven segment
Star Burst
Dot Matrix

Basic LED types:

Miniature LEDs
Different sized LEDs. 8 mm, 5mm and 3 mm

These are mostly single-die LEDs used as indicators, and they come in various-size packages:

surface mount

2 mm

3 mm (T1)

5 mm (T1)

10 mm

Other sizes are also available, but less common.

Common package shapes:

Round, dome top

Round, flat top

Rectangular, flat top (often seen in LED bar-graph displays)

Triangular or square, flat top

The encapsulation may also be clear or semi opaque to improve contrast and viewing angle.

Flashing LEDs

Flashing LEDs are used as attention seeking indicators where it is desired to avoid the
complexity of external electronics. Flashing LEDs resemble standard LEDs but they contain
an integrated multivibrator circuit inside which causes the LED to flash with a typical period
of one second. In diffused lens LEDs this is visible as a small black dot. Most flashing LEDs
emit light of a single color, but more sophisticated devices can flash between multiple colors
and even fade through a color sequence using RGB color mixing.

High power LEDs


High power LEDs from lumileds mounted on a star shaped heat sink High power LEDs
(HPLED) can be driven at more than one ampere of current and give out large amounts of
light. Since overheating destroys any LED the HPLEDs must be highly efficient to minimize
excess heat, furthermore they are often mounted on a heat sink to allow for heat dissipation.
If the heat from a HPLED is not removed the device will burn out in seconds.
A single HPLED can often replace an incandescent bulb in a flashlight or be set in an array to
form a powerful LED lamp. LEDs have been developed that can run directly from mains
power without the need for a DC converter. For each half cycle part of the LED diode emits
light and part is dark, and this is reversed during the next half cycle. Current efficiency is 80
lm/W..

Multi-Color LEDs
A bi-color LED is actually two different LEDs in one case. It consists of two dies
connected to the same two leads but in opposite directions. Current flow in one direction
produces one color, and current in the opposite direction produces the other color. Alternating
the two colors with sufficient frequency causes the appearance of a third color. A tri-color
LED is also two LEDs in one case, but the two LEDs are connected to separate leads so that
the two LEDs can be controlled independently and lit simultaneously.

RGB LEDs contain red, green and blue emitters, generally using a four-wire
connection with one common (anode or cathode). The Taiwanese LED manufacturer Ever
light has introduced a 3 watt RGB package capable of driving each die at 1 watt.
Alphanumeric LEDs

LED displays are available in seven-segment and starburst format. Seven-segment displays
handle all numbers and a limited set of letters. Starburst displays can display all letters.
Seven-segment LED displays were in widespread use in the 1970s and 1980s, but increasing
use of liquid crystal displays, with their lower power consumption and greater display
flexibility, has reduced the popularity of numeric and alphanumeric LED displays.

Applications:

Automotive applications with LEDS

Instrument Panels & Switches, Courtesy Lighting, CHMSL, Rear Stop/Turn/Tai, Retrofits,
New Turn/Tail/Marker Lights.

Consumer electronics & general indication Household appliances, VCR/ DVD/


Stereo/Audio/Video devices, Toys/Games Instrumentation, Security Equipment, Switches.
Illumination with LEDs

Architectural Lighting, Signage (Channel Letters), Machine Vision, Retail Displays,


Emergency Lighting (Exit Signs), Neon and bulb Replacement, Flashlights, Accent Lighting -
Pathways, Marker Lights.

Sign applications with LEDs

Full Color Video, Monochrome Message Boards, Traffic/VMS, Transportation Passenger


Information.

Signal application with LEDs

Traffic, Rail, Aviation, Tower Lights, Runway Lights, Emergency/Police Vehicle Lighting.

Mobile applications with LEDs

Mobile Phone, PDA's, Digital Cameras, Lap Tops, General Backlighting.

Photo sensor applications with LEDs

Medical Instrumentation, Bar Code Readers, Color & Money Sensors, Encoders, Optical
Switches, Fiber Optic Communication.

BUZZER

A buzzer or beeper is a signaling device, usually electronic, typically used in automobiles,


household appliances such as a microwave oven, or game shows.

It most commonly consists of a number of switches or sensors connected to a control unit that
determines if and which button was pushed or a preset time has lapsed, and usually
illuminates a light on the appropriate button or control panel, and sounds a warning in the
form of a continuous or intermittent buzzing or beeping sound. Initially this device was based
on an electromechanical system which was identical to an electric bell without the metal gong
. Often these units were anchored to a wall or ceiling and used the ceiling or wall as a
sounding board. Another implementation with some AC-connected devices was to implement
a circuit to make the AC current into a noise loud enough to drive a loudspeaker and hook
this circuit up to a cheap 8-ohm speaker. Nowadays, it is more popular to use a ceramic-based
piezoelectric sounder like a Son alert which makes a high-pitched tone. Usually these were
hooked up to "driver" circuits which varied the pitch of the sound or pulsed the sound on and
off. The word "buzzer" comes from the rasping noise that buzzers made when they were
electromechanical devices, operated from stepped-down AC line voltage at 50 or 60 cycles.
Other sounds commonly used to indicate that a button has been pressed are a ring or a beep.
CHAPTER-6
SOFTWARE IMPLEMENTATION
This chapter briefly explains about the firmware implementation of the project. The
required software tools are discussed in section 4.2. Section 4.3 shows the flow diagram of
the project design. Section 4.4 presents the firmware implementation of the project design.

6.1Software Tools Required


Keil v3, Proload are the two software tools used to program microcontroller. The
working of each software tool is explained below in detail.
6.1.1Programming Microcontroller
A compiler for a high level language helps to reduce production time. To program the
AT89S52 microcontroller the Keilv3 is used. The programming is done strictly in the
embedded C language. Keilv3 is a suite of executable, open source software development
tools for the microcontrollers hosted on the Windows platform.
The compilation of the C program converts it into machine language file (.hex). This is
the only language the microcontroller will understand, because it contains the original
program code converted into a hexadecimal format. During this step there are some warnings
about eventual errors in the program. This is shown in Fig 4.1. If there are no errors and
warnings then run the program, the system performs all the required tasks and behaves as
expected the software developed. If not, the whole procedure will have to be repeated again.
Fig 4.2 shows expected outputs for given inputs when run compiled program.
One of the difficulties of programming microcontrollers is the limited amount of
Resources the programmer has to deal with. In personal computers resources such as RAM
and processing speed are basically limitless when compared to microcontrollers. In contrast,
the code on microcontrollers should be as low on resources as possible.
6.2 Keil Compiler:
Keil compiler is 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.

FIGURE31: COMPILATION O FSOURCE CODE


Fig 6.1: Run the Compiled Program
.

CHAPTER -7

CONCLUSION AND FUTURE WORK


This paper presents user friendly and low cost industrial automation and security
systems. After a thorough study of literatures of all the topics that include industrial
automation design and wireless networks. A simple system to improve the standards is
developed. It is a real time monitorable system developed with simple hardware which
simplifies the possibility of error free security system. This system can be easily implemented
with maximum reliability and the high security with low cost is a special enhancement from
the existing systems for industrial security.

Das könnte Ihnen auch gefallen