• No results found

GSM Based Home Security System REPORT

N/A
N/A
Protected

Academic year: 2021

Share "GSM Based Home Security System REPORT"

Copied!
51
0
0

Loading.... (view fulltext now)

Full text

(1)

GSM BASED HOME SECURITY SYSTEM

GSM BASED HOME SECURITY SYSTEM

A PROJECT REPORT

A PROJECT REPORT

Submitted by

Submitted by

PRACHI NANDA (A1607107098)

PRACHI NANDA (A1607107098)

BHAVUK PUJARA

BHAVUK PUJARA (A1607107049)

(A1607107049)

 In pa

 In partial

rtial fulf

fulfillm

illment fo

ent for th

r the awar

e award of t

d of the de

he degree

gree

Of 

Of 

BACHELOR OF TECHNOLOGY

BACHELOR OF TECHNOLOGY

In In

ELECTRONICS AND

ELECTRONICS AND TELECOMMUNICATIO

TELECOMMUNICATION

N

AMITY INSTITUTE OF TELECOM TECHNOLOGY &

AMITY INSTITUTE OF TELECOM TECHNOLOGY &

MANAGEMENT

MANAGEMENT

AMITY UNIVERSITY UTTAR PRADESH

(2)

BONAFIDE CERTIFICATE

BONAFIDE CERTIFICATE

Certified that this project report

Certified that this project report GSM BASED HOME SECURITY

GSM BASED HOME SECURITY

SYSTEM

SYSTEM is the Bonafide work of PRACHI NANDA and BHAVUK 

is the Bonafide work of PRACHI NANDA and BHAVUK 

PUJARA - who carried

PUJARA - who carried out the project work under my

out the project work under my guidance.

guidance.

S

SIIGGNNAATTUURRE E SSIIGGNNAATTUURREE

HEAD

HEAD OF OF THE THE DEPARTMENT DEPARTMENT PROJECT PROJECT GUIDEGUIDE

(

(3)

ABSTRACT

ABSTRACT

The final year project aims at exposing the students undergoing higher 

The final year project aims at exposing the students undergoing higher 

technical studies to the thoughts and logic that must be developed to

technical studies to the thoughts and logic that must be developed to

ensure that one is able to

ensure that one is able to integrate his/her ideas into something concrete.

integrate his/her ideas into something concrete.

This generally is initiated by the

This generally is initiated by the inception of an idea or

inception of an idea or a concept, which

a concept, which

not only aims at developing a product (Hardware or Software), but also

not only aims at developing a product (Hardware or Software), but also

the in-depth study of the earlier existing products in the same category

the in-depth study of the earlier existing products in the same category

and their deficiencies. Accordingly an approach is taken to propose a

and their deficiencies. Accordingly an approach is taken to propose a

solution, which is better from the previous ones in one respect or the

solution, which is better from the previous ones in one respect or the

other.

other.

With the same approach in mind, we, the final year students of Bachelor 

With the same approach in mind, we, the final year students of Bachelor 

of Technology (Electronics and Telecommunication), have taken up the

of Technology (Electronics and Telecommunication), have taken up the

ADVANCE GSM BASED HOME SECURITY SYSTEM

ADVANCE GSM BASED HOME SECURITY SYSTEM as our final

as our final

year project.

year project.

Automated security systems are a useful addition to today’s home where

Automated security systems are a useful addition to today’s home where

saf

safety

ety is

is an

an im

impor

portan

tant

t iss

issue.

ue. Vi

Visio

sion-b

n-base

ased

d sec

securi

urity

ty sys

system

tems

s hav

have

e th

thee

advantage of being easy to set up, inexpensive and non-obtrusive. Home

advantage of being easy to set up, inexpensive and non-obtrusive. Home

security system for detecting an intrusion into a monitored area by an

security system for detecting an intrusion into a monitored area by an

in

infr

frare

ared

d de

dete

tect

ctor

or.

. A

A se

secu

curi

rity

ty sy

syst

stem

em ha

has

s a

a fl

flee

ee-st

-stan

andi

ding

ng in

intr

trus

usio

ion

n

detector. The free standing intrusion detector has a transmitter coupled

detector. The free standing intrusion detector has a transmitter coupled

with a portable receiver to alert a homeowner that an intrusion has taken

with a portable receiver to alert a homeowner that an intrusion has taken

(4)

ACKNOWLEGDEMENTS

ACKNOWLEGDEMENTS

It is our proud privilege to have Mr. Pardeep Kumar as our mentor for 

It is our proud privilege to have Mr. Pardeep Kumar as our mentor for 

this project, GSM based home security system. He has been an immense

this project, GSM based home security system. He has been an immense

help to us since the beginning of the

help to us since the beginning of the project. He guided us at tough times

project. He guided us at tough times

and helped us achieve this goal. We are very thankful to him for his help

and helped us achieve this goal. We are very thankful to him for his help

and support.

and support.

We would also like to extend our thanks to our H.O.D, Col. R.K. Kapur 

We would also like to extend our thanks to our H.O.D, Col. R.K. Kapur 

for his undying faith in us and making us believe in ourselves. His

for his undying faith in us and making us believe in ourselves. His

guidance has been the reason we could complete this

(5)

TABLE OF CONTENTS

TABLE OF CONTENTS

TITLE

TITLE

PAGE

PAGE NO.

NO.

1.

1.

INTRODUCTION………….………07

INTRODUCTION………….………07

2.

2.

GENERAL DESCRIPTION……….09

GENERAL DESCRIPTION……….09

3.

3.

INTEGRATION ARCHITECTURE………11

INTEGRATION ARCHITECTURE………11

4.

4.

COMPONENTS USED………12

COMPONENTS USED………12

5.

5.

BRIEF ABOUT THE COMPONENTS………13

BRIEF ABOUT THE COMPONENTS………13

5.1 Printed Circuit Board………..……..13

5.1 Printed Circuit Board………..……..13

5.2

5.2 8051

8051 Microcontroller………..……..14

Microcontroller………..……..14

5.2.a

5.2.a Pin

Pin Diagram…………...1

Diagram…………...15

5

5.2.b

5.2.b I/O

I/O Ports……….19

Ports……….19

5.2.c

5.2.c Internal

Internal Block

Block Diagram………..21

Diagram………..21

5.2.d

5.2.d Memory

Memory Architecture……….22

Architecture……….22

5.3

5.3 Transformer……….………..

Transformer……….……….. 27

27

5.4

(6)

5.6

5.6

Liquid Crystal Display.…..……….29

Liquid Crystal Display.…..……….29

5.7

5.7

Light Emitting Diode.……..………31

Light Emitting Diode.……..………31

5.8

5.8

Sensors……….…….………...32

Sensors……….…….………...32

5.8.a

5.8.a

Fire Alarms………..……....32

Fire Alarms………..……....32

5.8.b

5.8.b

Burglar Alarms………..…………..33

Burglar Alarms………..…………..33

5.8.c

5.8.c

Gas Sensing Electrode.………34

Gas Sensing Electrode.………34

5.9 5.9

PVC Wires……….………….…………34

PVC Wires……….………….…………34

5.10 5.10

Relays……….. 35

Relays……….. 35

5.11 5.11

GSM Antenna…………..………37

GSM Antenna…………..………37

6. 6.

8051 PROGRAMMING ………...38

8051 PROGRAMMING ………...38

7.

7.

C

CH

HA

AR

RA

AC

CT

TE

ER

RIIS

ST

TIIC

CS

S

&

&

S

ST

TR

RE

EN

NG

GT

TH

HS

S

OF

O

F

T

TH

HE

E

PROJECT……….………...…45

PROJECT……….………...…45

8.

8.

APPLICATIONS………46

APPLICATIONS………46

9.

9.

CONCLUSION AND FUTURE WORK……….…….48

CONCLUSION AND FUTURE WORK……….…….48

10.

(7)
(8)

1. INTRODUCTION

1. INTRODUCTION

In today’s age of digital technology and intelligent systems, home automation has In today’s age of digital technology and intelligent systems, home automation has  become one of the fast

 become one of the fastest developiest developing applicang application-bastion-based technologed technologies in the world. Theies in the world. The idea of comfortable living in home has since changed for the past decade as digital, idea of comfortable living in home has since changed for the past decade as digital, vision and wireless technologies are integrated into it. Intelligent homes, in simple vision and wireless technologies are integrated into it. Intelligent homes, in simple terms, can be described as homes that are fully automated in terms of carrying out a terms, can be described as homes that are fully automated in terms of carrying out a  predet

 predetermined ermined task, task, providproviding ing feedbafeedback ck to to the the usersusers, , and and resporesponding nding accordingaccordingly ly toto situations. In other words, it simply allows many aspects of the home system such as situations. In other words, it simply allows many aspects of the home system such as temperature and lighting control, network and communications, entertainment system, temperature and lighting control, network and communications, entertainment system, emerg

emergency ency resporesponse and nse and securisecurity ty monitomonitoring systems to ring systems to be automated and be automated and controlcontrolled,led,  both near

 both near and at a diand at a distance.stance.

Automated security systems play an important role of providing an extra layer of  Automated security systems play an important role of providing an extra layer of  security through user authentication to prevent break-ins at entry points and also to security through user authentication to prevent break-ins at entry points and also to track illegal intrusions or unsolicited activities within the vicinity of the home (indoors track illegal intrusions or unsolicited activities within the vicinity of the home (indoors and outdoors). There has been much research done in the design of various types of  and outdoors). There has been much research done in the design of various types of  automated security systems. Sensor-based systems that rely on contact or movement automated security systems. Sensor-based systems that rely on contact or movement sensors or contact-based systems such as fingerprint and palm print scan or keypad sensors or contact-based systems such as fingerprint and palm print scan or keypad activation that require substantial amount of contact with an input device.

activation that require substantial amount of contact with an input device.

Many security systems are based on only a single system. In an event of system failure Many security systems are based on only a single system. In an event of system failure or intrusion of the

or intrusion of the user authenticauser authentication, there is tion, there is no backup system to no backup system to monitomonitor the r the homehome continually. This shortcoming can be dealt with using multiple security systems (or  continually. This shortcoming can be dealt with using multiple security systems (or  mul

multi-lti-layerayered ed secsecuriurity ty syssystemtems). s). HowHoweverever, , mulmulti-ti-syssystem tem impimplemlemententatiations ons wilwilll definitely be more demanding in terms of computational cost and organization. This definitely be more demanding in terms of computational cost and organization. This

(9)

requires careful integration and sharing of resources. Thus, a feasible system should be requires careful integration and sharing of resources. Thus, a feasible system should be effective, practical and reasonable in cost.

effective, practical and reasonable in cost.

In this paper, we proposed an integrated dual-level sensor based home security system, In this paper, we proposed an integrated dual-level sensor based home security system, consisting of two subsystems – a IR sensors, burglar alarm module and fire alarm consisting of two subsystems – a IR sensors, burglar alarm module and fire alarm mod

moduleule. . BotBoth h subssubsystystems ems worwork k indeindependpendentently ly but but are are incoincorporporatrated ed intinto o a a singsinglele automated system for practical implementation.

automated system for practical implementation.

The organization of this paper is as follows. In section II, the integrated architecture of  The organization of this paper is as follows. In section II, the integrated architecture of  the system is further elaborated. Finally, section --- will give the conclusion and the system is further elaborated. Finally, section --- will give the conclusion and future directions.

(10)

2.

2. GENERAL

GENERAL DESCRIPTION

DESCRIPTION

The project here is all about a Home security system, In this project we have planned The project here is all about a Home security system, In this project we have planned to develop a Home security system.

to develop a Home security system.

Home security system for detecting an intrusion into a monitored area by an infrared Home security system for detecting an intrusion into a monitored area by an infrared detector. A security system has a flee-standing intrusion detector. The free standing detector. A security system has a flee-standing intrusion detector. The free standing int

intrurusision on detdetectector or has has a a trtransansmimitttter er coucouplpled ed wiwith th a a poportrtablable e rerececeiveiver r to to alalerert t aa homeow

homeowner that ner that an intrusion has taken an intrusion has taken place or occurred within a place or occurred within a pre-spre-set time period.et time period. The area under surveillance is monitored by an infrared detector which activates the The area under surveillance is monitored by an infrared detector which activates the tra

transmnsmittitter er upoupon n the the detdetectection ion of of abruabrupt pt difdiffereferences nces in in infrinfrareared d radradiatiiation on levlevelsels,, associated with the presence of a warm body in an otherwise equilibrated environment. associated with the presence of a warm body in an otherwise equilibrated environment. A radio signal is emitted by the transmitter which is received by the portable hand-held A radio signal is emitted by the transmitter which is received by the portable hand-held remote receiver. A first signal, indicating that an intrusion has been detected less than a remote receiver. A first signal, indicating that an intrusion has been detected less than a  prese

 preselected lected period period of of time time in in the the past past in in the the monitomonitored red areas, areas, is is displdisplayed ayed on on thethe receiver for that preselected period of time. After the preselected period of time has receiver for that preselected period of time. After the preselected period of time has elapse

elapsed, a d, a second signal is generated to indicate that the second signal is generated to indicate that the intrusintrusion took place ion took place at a at a timetime greater than the preselected period of time in the past and that the probability of the greater than the preselected period of time in the past and that the probability of the intruder still being present is less. Once the intrusion detector is activated, the signal is intruder still being present is less. Once the intrusion detector is activated, the signal is continuously transmitted to the portable receiver until the intrusion detector has been continuously transmitted to the portable receiver until the intrusion detector has been reset.

(11)

A security system for a home comprising: A security system for a home comprising:

A free standing intrusion detector to be set in an area of said home to be protected, said A free standing intrusion detector to be set in an area of said home to be protected, said free standing intrusion detector comprising:

free standing intrusion detector comprising:

An intrusion detector to generate an intrusion signal in response to an intrusion into An intrusion detector to generate an intrusion signal in response to an intrusion into said area;

said area;

A radio signaling transmitter responsive to said intrusion signal to transmit a radio A radio signaling transmitter responsive to said intrusion signal to transmit a radio signal means for modulating said radio signal for a predetermined time in response to signal means for modulating said radio signal for a predetermined time in response to said intrusion signal; and time delay means for delaying the actuation of said intrusion said intrusion signal; and time delay means for delaying the actuation of said intrusion detector to allow a person sufficient time to exit said area to be protected after setting detector to allow a person sufficient time to exit said area to be protected after setting said intrusion detect

said intrusion detector; and or; and a portable receiver adapted to be a portable receiver adapted to be hand carried comprishand carried comprising.ing. Means for generating an output

Means for generating an output signal in response to said signal in response to said radio signal. Display meansradio signal. Display means for generating a visual display indicating an intrusion has occurred in response to said for generating a visual display indicating an intrusion has occurred in response to said output signal.

(12)
(13)

3.

3. INTEGRATION

INTEGRATION ARCHITECTURE

ARCHITECTURE

The proposed integration architecture incorporates subsystems – IR sensors, burglar  The proposed integration architecture incorporates subsystems – IR sensors, burglar  ala

alarm modulrm module and e and firfire alarm modue alarm module le , into a , into a sinsingle autogle automatmated archited architectecture for ure for   practi

 practical implementatcal implementation ion in in intellintelligent home igent home environenvironments. The ments. The figure shows a figure shows a block block  dia

diagragram m of of the the proproposposed ed syssystem tem arcarchitehitecturcture e and and its setup its setup and and conneconnectivctivity. Theity. The modules work independently and parallely but share computational resources.

modules work independently and parallely but share computational resources.

 Figure

(14)

4.

4. COMPONENTS

COMPONENTS USED

USED

• •PCBPCB

•8051 MICROCONTROLLER 8051 MICROCONTROLLER 

•TRANSFORMER 12V/500mATRANSFORMER 12V/500mA •

•VOLTAGE REGULATOR LM7805VOLTAGE REGULATOR LM7805 •

•ELECTROLYTIC CAPACITORSELECTROLYTIC CAPACITORS •

•LCD DISPLAYLCD DISPLAY •

•LEDsLEDs

•SENSORS - SENSORS - Fire, Fire, Burglar, Burglar, Gas Gas SensorsSensors

• •PVC WIRESPVC WIRES • •RELAYRELAY • •GSM ANTENNAGSM ANTENNA

(15)

5.

5. A

A BRIEF AB

BRIEF ABOUT THE

OUT THE COMPONENTS

COMPONENTS

5.1

5.1 PRINTED CIRCUIT BOARD (

PRINTED CIRCUIT BOARD ( PCB)

PCB)

IIt t iis s uusseed d tto o mmeecchahaniniccalallly y ssupupppoorrt t aand nd elelececttrriicacalllly y ccoonnnneecct t EElleectctrricicalal compone

components nts using using conductivconductive e pathwapathways, ys, tracks tracks or or signal signal traces traces etched etched from from coppecopper r  sheets

sheets laminatlaminated ed onto onto a a non-condnon-conductiveuctive substra substratete. It is also referred to as. It is also referred to as printedprinted wiring board

wiring board ((PWBPWB) ) or or etchetched ed wiriwiring ng boaboardrd. . A A PCB populPCB populateated d witwith h eleelectroctronicnic components is a

components is a printed circuit assemblyprinted circuit assembly ((PCAPCA), also known as a), also known as aprinted circuitprinted circuit board

board assemblassemblyy ((PCBAPCBA). ). PrPrintinted ed circircuicuit t boaboardrds s arare e usused ed in in vivirtrtualually ly alall l bubut t ththee simplest commercially-produced electronic devices.

simplest commercially-produced electronic devices.

PCBs are inexpensive, and can be highly reliable. They require much more layout PCBs are inexpensive, and can be highly reliable. They require much more layout effort and higher initial cost than either wire wrap or point-to-point construction, but effort and higher initial cost than either wire wrap or point-to-point construction, but are much cheaper and faster for high-volume production; the production and soldering are much cheaper and faster for high-volume production; the production and soldering of

of PCPCBs Bs cacan n be be dondone e by by tototatalllly y autautomomatated ed eqequipuipmement. nt. MuMuch ch of of the the elelectectroronicnicss industry's PCB design, assembly, and quality control needs are set by standards that industry's PCB design, assembly, and quality control needs are set by standards that are published by the IPC organization.

(16)

5.2

5.2 8051

8051 MICROCONTRO

MICROCONTROLLER 

LLER 

Th

The e InIntetel l 808051 51 mimicrcrococonontrtrololleler r is is onone e of of ththe e momost st popopupulalar r gegeneneraral l pupurprpososee microc

microcontrollontrollers in ers in use today. The use today. The Intel 8051 is Intel 8051 is an 8-bit an 8-bit microcmicrocontrollontroller which er which meansmeans that most available operations are limited to 8 bits. There are 3 basic "sizes" of the that most available operations are limited to 8 bits. There are 3 basic "sizes" of the 8051: Short, Standard, and Extended. The Short and Standard chips are often available 8051: Short, Standard, and Extended. The Short and Standard chips are often available in

in DIDIP P (du(dual al in-lin-line packagine package) e) forform, m, but the but the ExteExtended 8051 nded 8051 modmodels often have els often have aa different form factor, and are not "drop-in compatible".

different form factor, and are not "drop-in compatible".

All these things are called 8051 because they can all be programmed using 8051 All these things are called 8051 because they can all be programmed using 8051 assembly language, and they all share certain features (although the different models assembly language, and they all share certain features (although the different models all have their own special features).

all have their own special features).

Some of the features that have made the 8051 popular are: Some of the features that have made the 8051 popular are:

64 KB on chip program memory.64 KB on chip program memory. 

128 bytes on chip data memory (RAM).128 bytes on chip data memory (RAM). 

4 register banks.4 register banks. 

128 user defined software flags.128 user defined software flags. 

8-bit data bus8-bit data bus 

16-bit address bus16-bit address bus 

32 general purpose registers each of 8 bits32 general purpose registers each of 8 bits 

16 bit timers (usually 2, but may have more, or less).16 bit timers (usually 2, but may have more, or less). 

3 internal and 2 external interrupts.3 internal and 2 external interrupts. 

Bit as well as byte addressable RAM area of 16 bytes.Bit as well as byte addressable RAM area of 16 bytes. 

Four 8-bit ports, (short models have two 8-bit ports).Four 8-bit ports, (short models have two 8-bit ports). 

(17)

TYPICAL APPLICATIONS  TYPICAL APPLICATIONS 

8051 chips are used in a wide variety of control systems, telecom applications, and 8051 chips are used in a wide variety of control systems, telecom applications, and robotics as well as in the automotive industry. By some estimation, 8051 family chips robotics as well as in the automotive industry. By some estimation, 8051 family chips make up over 50% of the embedded chip market.

make up over 50% of the embedded chip market.

5.2.a

5.2.a PIN

PIN DIAGRAM

DIAGRAM

The 8051 microcontroller consists of 40 pins. These pins are well represented by the The 8051 microcontroller consists of 40 pins. These pins are well represented by the  pin-di

 pin-diagram below. A further detailed descriptiagram below. A further detailed description of on of these pins and these pins and their functions istheir functions is given in the following sections.

given in the following sections.

 Figure

 Figure 5.2.a.(i) 5.2.a.(i) Pin DiaPin Diagram ogram of 8051 Mf 8051 Microcoicrocontrollentroller r 

Pins 1-8:

(18)

Pin 9

Pin 9:: RST RST A logic one on this pin disables the microcontroller and clears the contentsA logic one on this pin disables the microcontroller and clears the contents of

of momost st reregigiststerers. s. In In ototheher r wowordrds, s, ththe e poposisititive ve vovoltltagage e on on ththis is pipin n reresesets ts ththee microc

microcontrollontroller. By er. By applyapplying logic ing logic zero to zero to this pin, the this pin, the progrprogram starts execution fromam starts execution from the beginning.

the beginning.

Pins10-17:

Pins10-17: Port 3Port 3 Similar to port 1, each of these pins can serve as general input or Similar to port 1, each of these pins can serve as general input or  output. Besides, all of them have alternative functions:

output. Besides, all of them have alternative functions:

Pi

Pin n 1010:: RXD RXD SeSeririal al asasyncynchrohronounous s cocommmmuniunicacatition on inpinput ut or or SeSeririal al sysynchnchroronounouss communication output.

communication output.

Pi

Pin n 1111::TXDTXD SerSerial ial asyasynchrnchronouonous s comcommunmunicatication ion outoutput put or or SerSerial ial syncsynchrohronousnous communication clock output.

communication clock output.

Pin 12:

Pin 12: INT0 INT0 Interrupt 0 inputs.Interrupt 0 inputs.

Pin 13:

Pin 13: INT1 INT1 Interrupt 1 input.Interrupt 1 input.

Pin 14:

Pin 14:T0T0 Counter 0 clock input.Counter 0 clock input.

Pin 15:

Pin 15:T1T1 Counter 1 clock input.Counter 1 clock input.

Pin 16:

Pin 16:WRWR Write to external (additional) RAM.Write to external (additional) RAM.

Pin 17:

Pin 17: RD RD Read from external RAM.Read from external RAM.

Pi

Pin n 1818, , 1919:: X2X2, , X1X1 IntInternaernal l oscioscillallator tor inpuinput t and and outoutputput. . A A quarquartz tz cryscrystal tal whiwhichch sp

(19)

miniature ceramics resonators can also be used for frequency stability. Later versions miniature ceramics resonators can also be used for frequency stability. Later versions of microcontrollers operate at a frequency of 0 Hz up to over 50 Hz.

of microcontrollers operate at a frequency of 0 Hz up to over 50 Hz.

Pin 20:

Pin 20:GNDGND Ground.Ground.

Pin 21-28:

Pin 21-28: Port 2Port 2 If there is no intention to use external memory then these port pinsIf there is no intention to use external memory then these port pins are configured as general inputs/outputs. In case external memory is used, the higher  are configured as general inputs/outputs. In case external memory is used, the higher  address byte, i.e. addresses A8-A15 will appear on this port. Even though memory address byte, i.e. addresses A8-A15 will appear on this port. Even though memory with capacity of 64Kb is not used, which means that not all eight port bits are used for  with capacity of 64Kb is not used, which means that not all eight port bits are used for  its addressing, the rest of them are not available as inputs/outputs.

its addressing, the rest of them are not available as inputs/outputs.

Pin 29:

Pin 29: PSEN  PSEN If external ROM is used for storing program then a logic zero (0)If external ROM is used for storing program then a logic zero (0) appears on it every time the microcontroller reads a byte from memory.

appears on it every time the microcontroller reads a byte from memory.

Pin 30:

Pin 30:ALE ALE Prior to reading from external memory, the microcontroller puts the lower Prior to reading from external memory, the microcontroller puts the lower  address byte (A0-A7) on P0 and activates the ALE output. After receiving signal from address byte (A0-A7) on P0 and activates the ALE output. After receiving signal from the ALE pin, the external register (usually 74HCT373 or 74HCT375 add-on chip) the ALE pin, the external register (usually 74HCT373 or 74HCT375 add-on chip) memorizes the state of P0 and uses it as a memory chip address. Immediately after  memorizes the state of P0 and uses it as a memory chip address. Immediately after  that, the ALU pin is returned its previous logic state and P0 is now used as a Data Bus. that, the ALU pin is returned its previous logic state and P0 is now used as a Data Bus. As seen, port data multiplexing is performed by means of only one additional (and As seen, port data multiplexing is performed by means of only one additional (and cheap) integrated circuit. In other words, this port is used for both data and address cheap) integrated circuit. In other words, this port is used for both data and address transmission.

transmission.

Pin 31:

Pin 31:EAEA By applying logic zero to this pin, P2 and P3 are used for data and addressBy applying logic zero to this pin, P2 and P3 are used for data and address transmission with no regard to whether there is internal memory or not. It means that transmission with no regard to whether there is internal memory or not. It means that even there is a program written to the microcontroller, it will not be executed. Instead, even there is a program written to the microcontroller, it will not be executed. Instead,

(20)

EA pin, the microcontroller will use both memories, first internal then external (if  EA pin, the microcontroller will use both memories, first internal then external (if  exists).

exists).

Pin 32-39:

Pin 32-39:Port 0Port 0 Similar to P2, if external memory is not used, these pins can be usedSimilar to P2, if external memory is not used, these pins can be used as general inputs/outputs. Otherwise, P0 is configured as address output (A0-A7) when as general inputs/outputs. Otherwise, P0 is configured as address output (A0-A7) when the ALE pin is driven high (1) or as data output (Data Bus) when the ALE pin is driven the ALE pin is driven high (1) or as data output (Data Bus) when the ALE pin is driven low (0).

low (0).

Pin 40:

(21)

5.2.b

5.2.b INPUT AND

INPUT AND OTPUT

OTPUT PORTS (I/O

PORTS (I/O PORTS)

PORTS)

All 8051 microcontrollers have 4 I/O ports each comprising 8 bits which can be All 8051 microcontrollers have 4 I/O ports each comprising 8 bits which can be configur

configured as ed as inputs or outputs. Accordinginputs or outputs. Accordingly, in ly, in total of 32 total of 32 inputinput/output pins enabling/output pins enabling the microcontroller to be connected to peripheral devices are available for use.

the microcontroller to be connected to peripheral devices are available for use.

Pin configuration, i.e. whether it is to be configured as an input (1) or an output (0), Pin configuration, i.e. whether it is to be configured as an input (1) or an output (0), depends on its logic state. In order to configure a microcontroller pin as an input, it is depends on its logic state. In order to configure a microcontroller pin as an input, it is necessary to apply a logic zero (0) to appropriate I/O port bit. In this case, voltage level necessary to apply a logic zero (0) to appropriate I/O port bit. In this case, voltage level on appropriate pin will be 0.

on appropriate pin will be 0.

Similarly, in order to configure a microcontroller pin as an input, it is necessary to Similarly, in order to configure a microcontroller pin as an input, it is necessary to apply a logic one

apply a logic one (1) to appropriat(1) to appropriate port. e port. In this case, In this case, voltage level on voltage level on approappropriate pinpriate pin will be 5V (as is the case with any TTL input). This may seem confusing but don't will be 5V (as is the case with any TTL input). This may seem confusing but don't loos

loose e your patienyour patience. ce. It It all all becbecomeomes s cleclear ar afteafter r stustudyindying g simsimple ple eleelectrctronic onic circircuitcuitss connected to an I/O pin.

connected to an I/O pin.

((ii)) PPoorrt 0t 0

The P0 port is characterized by two functions. If external memory is used then the The P0 port is characterized by two functions. If external memory is used then the lower address byte (addresses A0-A7) is applied on it. Otherwise, all bits of this port lower address byte (addresses A0-A7) is applied on it. Otherwise, all bits of this port are configured as inputs/outputs. The other function is expressed when it is configured are configured as inputs/outputs. The other function is expressed when it is configured as

as an an outoutputput. . UnlUnlike ike otheother r porports ts consconsististing ing of of pins with pins with builbuilt-it-in n pulpull-ul-up p resresististor or  connected by its end to 5 V power supply, pins of this port have this resistor left out. connected by its end to 5 V power supply, pins of this port have this resistor left out. Th

This is apappaparerentlntly y smsmalall l didiffeffererence nce has has itits s coconsensequequencences. s. If If anany y pipin n of of ththis is poport rt isis configured as an input then it acts as if it “floats”. Such an input has unlimited input configured as an input then it acts as if it “floats”. Such an input has unlimited input resistance and undetermined potential.

(22)

When the pin is configured as an output, it acts as an “open drain”. By applying logic 0 When the pin is configured as an output, it acts as an “open drain”. By applying logic 0 to a port bit, the appropriate pin will be connected to ground (0V). By applying logic 1, to a port bit, the appropriate pin will be connected to ground (0V). By applying logic 1, the external output will keep on “floating”. In order to apply logic 1 (5V) on this the external output will keep on “floating”. In order to apply logic 1 (5V) on this output pin, it is necessary to built in an external pull-up resistor.

output pin, it is necessary to built in an external pull-up resistor.

((iiii)) PPoorrt 1t 1

P1 is a true I/O port, because it doesn't have any alternative functions as is the case P1 is a true I/O port, because it doesn't have any alternative functions as is the case with P0, but can be configured as general I/O only. It has a pull-up resistor built-in and with P0, but can be configured as general I/O only. It has a pull-up resistor built-in and is completely compatible with TTL circuits.

is completely compatible with TTL circuits.

((iiiiii)) PPoorrt 2t 2

P2 acts similarly to P0 when external memory is used. Pins of this port occupy P2 acts similarly to P0 when external memory is used. Pins of this port occupy addresses intended for external memory chip. This time it is about the higher address addresses intended for external memory chip. This time it is about the higher address  byte

 byte with with addressaddresses es A8-A1A8-A15. 5. When When no no memormemory y is is added, added, this this port port can can be be used used as as aa general input/output port showing features similar to P1.

general input/output port showing features similar to P1.

((iivv)) PPoorrt 3t 3

All port pins can be used as general I/O, but they also have an alternative function. In All port pins can be used as general I/O, but they also have an alternative function. In order to use these alternative functions, a logic one (1) must be applied to appropriate order to use these alternative functions, a logic one (1) must be applied to appropriate  bit

 bit of of the the P3 P3 registregister. er. In In terms terms of of hardwahardware, re, this this port port is is similsimilar ar to to P0, P0, with with thethe difference that its pins have a pull-up resistor built-in.

(23)

5.2.c

5.2.c INTERNAL

INTERNAL BLOCK

BLOCK DIAGRAM

DIAGRAM OF

OF 8051

8051

MICROCONTROLLER 

MICROCONTROLLER 

Figure 5.2.c.(i)

(24)

5.2.d

5.2.d MEMORY

MEMORY ARCHITECTU

ARCHITECTURE

RE

The 8051 has two types of memory and these are Program Memory and Data Memory. The 8051 has two types of memory and these are Program Memory and Data Memory. Program Memory (ROM) is used to permanently save the program being executed, Program Memory (ROM) is used to permanently save the program being executed, while Data Memory (RAM) is used for temporarily storing data and intermediate while Data Memory (RAM) is used for temporarily storing data and intermediate results created and used during the operation of the microcontroller. Depending on the results created and used during the operation of the microcontroller. Depending on the model in use (we are still talking about the 8051 microcontroller family in general) at model in use (we are still talking about the 8051 microcontroller family in general) at most a few Kb of ROM and 128 or 256 bytes of RAM is used.

most a few Kb of ROM and 128 or 256 bytes of RAM is used.

All 8051 microcontrollers have a 16-bit addressing bus and are capable of addressing All 8051 microcontrollers have a 16-bit addressing bus and are capable of addressing 64 kb memory. It is neither a mistake nor a big ambition of engineers who were 64 kb memory. It is neither a mistake nor a big ambition of engineers who were working on basic core development. It is a matter of smart memory organization which working on basic core development. It is a matter of smart memory organization which makes these microcontrollers a real “programmers’ goody“.

makes these microcontrollers a real “programmers’ goody“.

(v

(v)) PrProgograram Mem Memomoryry

The first models of the 8051 microcontroller family did not have internal program The first models of the 8051 microcontroller family did not have internal program memory. It was added as an external separate chip. These models are recognizable by memory. It was added as an external separate chip. These models are recognizable by their label beginning with 803 (for example 8031 or 8032). All later models have a few their label beginning with 803 (for example 8031 or 8032). All later models have a few Kbyte ROM embedded. Even though such an amount of memory is sufficient for  Kbyte ROM embedded. Even though such an amount of memory is sufficient for  writing most of the programs, there are situations when it is necessary to use additional writing most of the programs, there are situations when it is necessary to use additional memory as well. A typical example are so called lookup tables. They are used in cases memory as well. A typical example are so called lookup tables. They are used in cases when equations describing some processes are too complicated or when there is no when equations describing some processes are too complicated or when there is no time for solving them. In such cases all necessary estimates and approximates are time for solving them. In such cases all necessary estimates and approximates are executed in advance and the final results are put in the tables (similar to logarithmic executed in advance and the final results are put in the tables (similar to logarithmic tables).

(25)

(v

(vi)i) DaData ta MeMemomoryry

As

As alalreready ady mementntioionedned, , DaData ta MeMemomory ry is is usused ed fofor r tetempmpororararilily y ststorioring ng dadata ta andand inte

intermermediatdiate e resresultults s crecreated ated and and useused d duriduring ng the the opeoperatration ion of of the the micmicrocrocontrontrolloller.er. Besides, RAM memory built in the 8051 family includes many registers such as Besides, RAM memory built in the 8051 family includes many registers such as hardwar

hardware counters and e counters and timetimers, input/output portsrs, input/output ports, , serial data buffers etc. serial data buffers etc. The previousThe previous mo

modedels ls had had 256 RAM 256 RAM lolocatcatioions, ns, whwhilile e fofor r ththe e lalateter r momodeldels s ththis is numnumbeber r wawass incremented by additional 128 registers. However, the first 256 memory locations incremented by additional 128 registers. However, the first 256 memory locations (addre

(addresses 0-FFh) are the heart sses 0-FFh) are the heart of memory common to all the of memory common to all the models belongmodels belonging to ing to thethe 8051 family. Locations available to the user occupy memory space with addresses 8051 family. Locations available to the user occupy memory space with addresses 0-7Fh, i.e. first 128 registers. This part of RAM is divided in several blocks.

7Fh, i.e. first 128 registers. This part of RAM is divided in several blocks.

The first block consists of 4 banks each including 8 registers denoted by R0-R7. Prior  The first block consists of 4 banks each including 8 registers denoted by R0-R7. Prior  to accessing any of

to accessing any of these registethese registers, it rs, it is necessary to select the is necessary to select the bank containing it. Thebank containing it. The next memory block (address 20h-2Fh) is bit- addressable, which means that each bit next memory block (address 20h-2Fh) is bit- addressable, which means that each bit has its own address (0-7Fh). Since there are 16 such registers, this block contains in has its own address (0-7Fh). Since there are 16 such registers, this block contains in total of 128 bits with separate addresses (address of bit 0 of the 20h byte is 0, while total of 128 bits with separate addresses (address of bit 0 of the 20h byte is 0, while address of bit 7

address of bit 7 of the of the 2Fh byte is 2Fh byte is 7Fh). The third group of registers occupy addres7Fh). The third group of registers occupy addressesses 2Fh-7Fh, i.e. 80 locations, and does not have any special functions or features.

2Fh-7Fh, i.e. 80 locations, and does not have any special functions or features.

(v

(viiii)) AdAddidititiononal RAal RAM M 

In

In orordeder r to to sasatitisfsfy y ththe e prprogograrammmmerers’ s’ coconsnstatant nt huhungnger er fofor r DaData ta MeMemomoryry, , ththee manufa

manufacturers decidecturers decided d to embed an to embed an additioadditional memory block of nal memory block of 128 locations into the128 locations into the latest versions of the 8051 microcontrollers. However, it’s not as simple as it seems to latest versions of the 8051 microcontrollers. However, it’s not as simple as it seems to  be…

 be… The The probleproblem m is is that that electrelectronics onics perforperforming ming addresaddressing sing has has 1 1 byte byte (8 (8 bits) bits) onon disposal and is capable of reaching only the first 256 locations.

(26)

 Figure

(27)

(v

(viiiii)i) AdAddrdresessising ng 

Whi

While le opeoperatratinging, , the the proprocescessor sor proprocescesses ses datdata a as as per per proprogragram m instinstructructionsions. . EachEach instruction consists of two parts. One part describes WHAT should be done, while the instruction consists of two parts. One part describes WHAT should be done, while the other explains HOW to do it. The latter part can be a data (binary number) or the other explains HOW to do it. The latter part can be a data (binary number) or the address at which the data is stored. Two ways of addressing are used for all 8051 address at which the data is stored. Two ways of addressing are used for all 8051 microcontrollers depending on which part of memory should be accessed:

microcontrollers depending on which part of memory should be accessed:

(ix

(ix)) DiDirerect ct AdAddrdressessining g 

On direct addressing, the address of memory location containing data to be read is On direct addressing, the address of memory location containing data to be read is specified in instruction. The address may contain a number being changed during specified in instruction. The address may contain a number being changed during operation (variable). For example:

operation (variable). For example:

Since the address is only one byte in size (the largest number is 255), only the first 255 Since the address is only one byte in size (the largest number is 255), only the first 255 locations of RAM can be accessed this way. The first half of RAM is available for use, locations of RAM can be accessed this way. The first half of RAM is available for use, while another half is reserved for SFRs.

while another half is reserved for SFRs.

MOV A,33h;

MOV A,33h;Means: move a number from address 33 hex. to accumulator Means: move a number from address 33 hex. to accumulator 

(x

(x)) InIndidirecrect At Addddresressinsing g 

On indirect addressing, a register containing the address of another register is specified On indirect addressing, a register containing the address of another register is specified in instruction. Data to be used in the program is stored in the letter register. For  in instruction. Data to be used in the program is stored in the letter register. For  example:

example: Indire

Indirect addressing is ct addressing is only used only used for accessing RAM locations available for use for accessing RAM locations available for use (never (never  for accessing SFRs). This is the only way of accessing all the latest versions of the for accessing SFRs). This is the only way of accessing all the latest versions of the microcontrollers with additional memory block (128 locations of RAM). Simply put, microcontrollers with additional memory block (128 locations of RAM). Simply put, whe

(28)

MOV A,@R0;

MOV A,@R0; Means: Store the value from the register whose address is in theMeans: Store the value from the register whose address is in the

R0 register 

R0 register 

into accumulator 

into accumulator 

On indirect addressing

On indirect addressing, registers R0, R1 , registers R0, R1 or Stack or Stack Pointer are used Pointer are used for specifyifor specifying 8-bitng 8-bit addresses. Since only 8 bits are avilable, it is possible to access only registers of  addresses. Since only 8 bits are avilable, it is possible to access only registers of  internal RAM this way (128 locations when speaking of previous models or 256 internal RAM this way (128 locations when speaking of previous models or 256 locations when speaking of latest models of microcontrollers). If an extra memory chip locations when speaking of latest models of microcontrollers). If an extra memory chip is

is addeadded d thethen n the the 16-16-bit DPTR bit DPTR RegRegisteister r (con(consissisting of ting of the the regregististers ers DPTDPTRL RL andand DPTRH) is used for specifying address. In this way it is possible to access any location DPTRH) is used for specifying address. In this way it is possible to access any location in the range of 64K.

in the range of 64K.

(a)

(a)

Special Function Registers (SFRs)Special Function Registers (SFRs)

Special Function Registers (SFRs) are a sort of control table used for running and Special Function Registers (SFRs) are a sort of control table used for running and monitoring the operation of the microcontroller. Each of these registers as well as each monitoring the operation of the microcontroller. Each of these registers as well as each  bit

 bit they they include, include, has has its its name, name, address address in in the the scope scope of of RAM RAM and and precisprecisely ely defineddefined  purpo

 purpose se such such as as timer timer controlcontrol, , interinterrupt rupt controlcontrol, , serial serial communcommunication ication control control etc.etc. Even though there are 128 memory locations intended to be occupied by them, the Even though there are 128 memory locations intended to be occupied by them, the  basic

 basic core, core, shared shared by by all all types types of of 8051 8051 micromicrocontrollcontrollers, ers, has has only only 21 21 such such regisregisters.ters. Rest of locations are intensionally left unoccupied in order to enable the manufacturers Rest of locations are intensionally left unoccupied in order to enable the manufacturers to

to furfurthether r devedevelop lop micmicrocrocontrontrolleollers rs keepkeeping ing thethem m comcompatpatiblible e witwith h the the prepreviouviouss versions. It also enables programs written a long time ago for microcontrollers which versions. It also enables programs written a long time ago for microcontrollers which are out of production now to be used today.

are out of production now to be used today.

(i)

(i) A RegA Registister (Aer (Accccumumulaulatortor))

A register is a general-purpose register used for storing intermediate results obtained A register is a general-purpose register used for storing intermediate results obtained during operation. Prior to executing an instruction upon any number or operand it is during operation. Prior to executing an instruction upon any number or operand it is necessary to store it in the accumulator first.

(29)

All results obtained from arithmetical operations performed by the ALU are stored in All results obtained from arithmetical operations performed by the ALU are stored in the accumulator. Data to be moved from one register to another must go through the the accumulator. Data to be moved from one register to another must go through the accumulator. In other words, the A register is the most commonly used register and it accumulator. In other words, the A register is the most commonly used register and it is impossible to imagine a microcontroller without it. More than half instructions used is impossible to imagine a microcontroller without it. More than half instructions used  by the 80

 by the 8051 micro51 microcontrolcontroller use ler use somehow somehow the accuthe accumulatomulator.r.

(i

(ii)i) B RB Regegisisteter r 

Multiplication and division can be performed only upon numbers stored in the A and B Multiplication and division can be performed only upon numbers stored in the A and B re

regigistestersrs. . AlAll l otother her insinstrtructuctioions ns in in ththe e prprogograram m cacan n ususe e ththis is reregigistster er as as a a spspareare accumulator (A)

accumulator (A)

..

5.3 TRANSFORMER 

5.3 TRANSFORMER 

A step-down transformer accepts a given voltage on the primary winding (coil), and A step-down transformer accepts a given voltage on the primary winding (coil), and outputs a lower voltage on its secondary winding. A good example is a doorbell outputs a lower voltage on its secondary winding. A good example is a doorbell transformer you might buy for your home. It uses 120 volts from the house electrical transformer you might buy for your home. It uses 120 volts from the house electrical system and steps it down to a safer 18 volts used to ring the doorbell. The voltage system and steps it down to a safer 18 volts used to ring the doorbell. The voltage  produc

 produced ed is is a a functifunction on of of the the 'turns-'turns-ratio' ratio' of of the the transfotransformer. rmer. For For examplexample, e, if if thethe transformer has 500 turns of wire in the primary, and 125 turns of wire in the transformer has 500 turns of wire in the primary, and 125 turns of wire in the secondary, we would say it has a

secondary, we would say it has aturns ratioturns ratio of 4:1 (pronounced "four-to-one").If weof 4:1 (pronounced "four-to-one").If we feed 120 volts into the primary, the secondary would produce 30 volts.120:30 = 4:1 feed 120 volts into the primary, the secondary would produce 30 volts.120:30 = 4:1 A

Atransformertransformer is is a a static static device device that that transftransfers ers electrelectrical ical energy energy from from one one circuit circuit toto ano

anothther er ththrourough gh indinducuctitivevely ly cocouplupled ed cocondunductctorors—s—the the trtransansforformemer's r's coicoilsls. . AA varying current in the first or 

varying current in the first or  primary primary winding creates a varying magnetic flux in thewinding creates a varying magnetic flux in the transformer's core and thus a varying magnetic field through the

(30)

5.4

5.4 VOLTAGE

VOLTAGE REGULATOR 

REGULATOR 

A

AVoltage RegulatoVoltage Regulatorr is an electrical regulator designed to automatically maintain ais an electrical regulator designed to automatically maintain a constant voltage level. A voltage regulator may be a simple "feed-forward" design or  constant voltage level. A voltage regulator may be a simple "feed-forward" design or  m

maay y iinncclluudde e nneeggaattiivve e ffeeeeddbbaacck k ccoonnttrrool l llooooppss. . IIt t mmaay y uusse e aann electromechanical mechanism, or electronic components. Depending on the design, it electromechanical mechanism, or electronic components. Depending on the design, it may be

may be used to used to regularegulate te one or one or more AC or Dmore AC or DC voltagC voltages.Electes.Electronic voltage ronic voltage regulregulatorsators are found in devices such as computer power supplies where they stabilize the DC are found in devices such as computer power supplies where they stabilize the DC voltages used by the processor and other elements.

voltages used by the processor and other elements.

 Figur

 Figure 5.4. e 5.4. A VolA Voltage Retage Regulator gulator 

A basic

A basicvoltage regulatovoltage regulator LM7805 has three legs, converts varying input voltage andr LM7805 has three legs, converts varying input voltage and  produc

 produces es a a constant constant regulatregulated ed output output voltagvoltage. e. The The most most commocommon n part part numbernumbers s startstart with the numbers 78 or 79 and finish with two digits indicating the output voltage. The with the numbers 78 or 79 and finish with two digits indicating the output voltage. The number 78 represents positive voltage and 79 negative one.

(31)

5.5

5.5 ELECTROLYTIC

ELECTROLYTIC CAPACITOR 

CAPACITOR 

An

Anelectrolytic capacitorelectrolytic capacitor is is a a tytype pe of of capcapacacititor or ththat at ususes es an an elelecectrtrololyteyte, , an an ioionicnic conduct

conducting liquid, as ing liquid, as one of one of its plates, to achieve its plates, to achieve a larger capacitanca larger capacitance per unit volumee per unit volume th

than an ototheher r tytypepes. s. ThThey ey arare e ofofteten n rerefeferrrred ed to to in in elelecectrtrononicics s ususagage e sisimpmply ly asas "e

"elelectctrorolylytiticscs". ". ThThey ey arare e usused ed in in rerelalatitivevely ly hihighgh-c-cururrerent nt anand d lolow-w-frfreqequeuencncyy electrical circuits, particularly in power supply filters, where they store charge needed 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 to moderate output voltage and current fluctuations in rectifier output. They are also wi

wideldely y usused ed as as cocouplupling ing cacapacpacititorors s in in circircucuitits s whwherere e AC AC shoshould uld be be conconducductetedd  but DC

 but DC should notshould not. There ar. There are two tye two types of epes of electrollectrolytics; alytics; aluminum auminum and tantalnd tantalum.um.

5.6

5.6 LIQUID CR

LIQUID CRYSTAL D

YSTAL DISPLAY

ISPLAY (LCD)

(LCD)

 Figure

 Figure 5.6 5.6 An LCDAn LCD A

(32)

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

instrtrumumenent t papanenelsls, , airaircrcrafaft t coccockpkpit it didispsplalaysys, , sisignagnagege, , etetc. c. ThThey ey arare e cocommmmon on inin consumer devices such as video players, gaming devices, clocks, watches, calculators, consumer devices such as video players, gaming devices, clocks, watches, calculators, and

and tetelelephophonesnes. . LCLCDs Ds havhave e didispsplalaceced d catcathodhode e raray y tutube be (C(CRTRT) ) didispsplalays ys in in momostst applications. They are usually more compact, lightweight, portable, less expensive, 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 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 sizes than CRT and plasma displays, and since they do not use phosphors, they cannot suffer image burn-in.

suffer image burn-in.

LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical  power

 power consumpconsumption enabtion enables it tles it to be used o be used in battein battery-powery-powered elecred electronic eqtronic equipmentuipment..

32 32

(33)

5.7

5.7 LIGHT LIGHT EMITTING DIODES EMITTING DIODES (LED)(LED)

 Figure

 Figure 5.7 5.7 LEDsLEDs

A

A light-emittinlight-emitting g diodediode ((LEDLED) ) is is a a semsemiconiconductductor or liglight ht sousource. rce. LEDLEDs s are are useused d asas indicat

indicator lamps in or lamps in many devices, and many devices, and are increasingare increasingly used ly used for lighting. Introducefor lighting. Introduced d asas a practical electronic component in 1962,

a practical electronic component in 1962, early LEDs emitted low-intensity red light,early LEDs emitted low-intensity red light,  but

 but modern modern versionversions s are are availablavailable e across across the visithe visible, ultrble, ultraviolet aaviolet and infrarnd infrareded wavelengths, with very high brightness.

wavelengths, with very high brightness.

Whe

When n a a liglight-ht-emiemittitting ng dioddiode e is is forforwarward d biasbiased ed (sw(switcitched hed on), on), eleelectrctrons ons are are ableable to

to recrecombiombine ne witwith h eleelectrctron on holeholes s witwithin hin the the devdevice, ice, relreleaseasing ing eneenergy rgy in in the the forformm of

of phphototonsons. . ThThis is efeffefect ct is is calcalleled d elelecectrtrololumiuminesnescecence nce and and the the colcolor or of of ththe e lilightght (corresponding to the energy of the photon) is determined by the energy gap of the (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. An LED is often small in area (less than 1 mm

semiconductor. An LED is often small in area (less than 1 mm22), and integrated optical), and integrated optical

ccoommppononeentnts s mmaay y be be uusseed d tto o sshahappe e iitts s rraadidiatatiion on ppaatttteerrn.n. LELEDs Ds prpresesentent many advantages over incandescent light sources including lower energy consumption, many advantages over incandescent light sources including lower energy consumption, long

longer er liflifetietime, me, impimprovroved ed roburobuststnessness, , smasmalleller r sizesize, , fasfaster ter swswitchitchinging, , and and gregreater ater  dur

durabilability ity and and relreliabiiabilitlity. y. LEDLEDs s powpowerferful ul enouenough gh for for room room liglightinhting g are are relrelatiativelyvely ex

expepensnsivive e aand nd rreqequiuire re mmorore e prprececisise e cucurrrrenent t aand nd heheat at mamananaggememeent nt ththaann compact fluorescent lamp sources of comparable output.

compact fluorescent lamp sources of comparable output.

33 33

(34)

Light-emitting diodes are used in applications as diverse as replacements for aviation Light-emitting diodes are used in applications as diverse as replacements for aviation lighti

lighting, ng, automotautomotive ive lightilighting (parting (particularlcularly y brake lamps, brake lamps, turn signals turn signals and indicatand indicators) asors) as wel

well l as as in in tratraffic ffic sigsignalsnals. . The The comcompacpact t sizsize, e, the the pospossibsibiliility ty of of narnarrow row bandbandwidtwidth,h, switching speed, and extreme reliability of LEDs has allowed new text and video switching speed, and extreme reliability of LEDs has allowed new text and video displays and sensors to be developed, while their high switching rates are also useful in displays and sensors to be developed, while their high switching rates are also useful in adva

advanced nced comcommunimunicatications ons tectechnolhnologyogy. . InfrInfrareared d LEDLEDs s are are alsalso o useused d in in the the remremoteote control units of many commercial products including televisions, DVD players, and control units of many commercial products including televisions, DVD players, and other domestic appliances.

other domestic appliances.

5.8 SENSORS

5.8 SENSORS

5.8.a

5.8.a FIRE FIRE ALARMS ALARMS 

An automatic fire alarm system is designed to detect the unwanted presence of fire by An automatic fire alarm system is designed to detect the unwanted presence of fire by monitoring environmental changes associated with combustion. In general, a fire alarm monitoring environmental changes associated with combustion. In general, a fire alarm sys

system tem is is claclassissified fied as as eiteither her autautomatomaticalically ly actactuateuated, d, manumanuallally y actactuateuated, d, or or botboth.h. Automatic fire alarm systems are intended to notify the building occupants to evacuate Automatic fire alarm systems are intended to notify the building occupants to evacuate in the event of a fire or other emergency, report the event to an off-premises location in in the event of a fire or other emergency, report the event to an off-premises location in order to summon emergency services, and to prepare the structure and associated order to summon emergency services, and to prepare the structure and associated systems to control the spread of fire and smoke.

systems to control the spread of fire and smoke.

After the fire protection goals are established - usually by referencing the minimum After the fire protection goals are established - usually by referencing the minimum leve

levels ls of of proprotecttection ion manmandatdated ed by by the the appappropropriariate te modmodel el builbuilding code, ding code, insinsuraurancence agencies, and other authorities - the fire alarm designer undertakes to detail specific agencies, and other authorities - the fire alarm designer undertakes to detail specific com

componeponents, nts, arrarrangeangementments, s, and and intinterferfaceaces s necenecessassary ry to to accoaccomplmplish ish thethese se goalgoals.s. Equipment specifically manufactured for these purposes are selected and standardized Equipment specifically manufactured for these purposes are selected and standardized installation methods are anticipated during the design.

(35)

5.8.b

5.8.b

 BURG BURGLAR ALARLAR ALARM M 

Burglar (or intrusion), fire, and safety alarms are electronic alarms designed to alert the Burglar (or intrusion), fire, and safety alarms are electronic alarms designed to alert the user to a specific danger. Sensors are connected to a control unit via low-voltage user to a specific danger. Sensors are connected to a control unit via low-voltage wiring or a narrowband RF signal which is used to interact with a response device. The wiring or a narrowband RF signal which is used to interact with a response device. The most common security sensors are used to indicate the opening of a door or window or  most common security sensors are used to indicate the opening of a door or window or  detect motion via passive infrared (PIR). New construction systems are predominately detect motion via passive infrared (PIR). New construction systems are predominately hardwired for economy.

hardwired for economy.

The trigger signal from each sensor is transmitted to one or more control unit(s) either  The trigger signal from each sensor is transmitted to one or more control unit(s) either  thr

through ough wirwires es or or wirwireleeless ss meameans ns (rad(radio, io, line line carcarrierier, r, infrinfrareared). d). WiWired red syssystemtems s areare convenient when sensors (such as PIRs, smoke detectors etc.) require power to operate convenient when sensors (such as PIRs, smoke detectors etc.) require power to operate corr

correctlectly, y, howehowever, ver, they may they may be be mormore e coscostly tly to to insinstaltall. l. EntrEntry-ly-leveevel l wirwired ed syssystemtemss utilize a Star network topology, where the panel is at the center logically, and all utilize a Star network topology, where the panel is at the center logically, and all devices "home run" its wire back to the panel. More complex panels use a Bus devices "home run" its wire back to the panel. More complex panels use a Bus network topology where the wire basically is a data loop around the perimeter of the network topology where the wire basically is a data loop around the perimeter of the facility, and has "drops" for the sensor devices which must include a unique device facility, and has "drops" for the sensor devices which must include a unique device identifier integrated into the sensor device itself (e.g. iD biscuit). Wired systems also identifier integrated into the sensor device itself (e.g. iD biscuit). Wired systems also have the advantage, if wired properly, of being tamper-evident. Wireless systems, on have the advantage, if wired properly, of being tamper-evident. Wireless systems, on the other hand, often use battery-powered transmitters which are easier to install, but the other hand, often use battery-powered transmitters which are easier to install, but may reduce the reliability of the system if the sensors are not supervised, or if the may reduce the reliability of the system if the sensors are not supervised, or if the  batter

 batteries are not ies are not maintaimaintained.ned.

Depending on distance and construction materials, one or more wireless repeaters may Depending on distance and construction materials, one or more wireless repeaters may  be

 be requirerequired d to to get get the the signal reliably signal reliably back back to to the the alarm panel. alarm panel. Hybrid systems utilizeHybrid systems utilize  both

 both wirewired d and and wirelwireless ess sensorsensors s to to achieve achieve the the benefits benefits of of both. both. TransmTransmittersitters, , or or  sensors can also be connected through the premises electrical circuits to transmit coded sensors can also be connected through the premises electrical circuits to transmit coded signals to the control unit (line carrier).

(36)

5.8.c G 

5.8.c G AA S SEN S SENSING ELESING ELECTROCTRODES DES 

Gas-sensing electrodes respond to dissolved gases in solution. They have a plastic Gas-sensing electrodes respond to dissolved gases in solution. They have a plastic  body

 body that that is is usuallusually y made made of of polytepolytetrafluortrafluorethylene ethylene (PTFE(PTFE). ). With With gas-segas-sensingnsing electrodes, the dissolved gas diffuses across the membrane into a small volume of  electrodes, the dissolved gas diffuses across the membrane into a small volume of   buffer

 buffer. The reaction of . The reaction of the gas with the buffer causes a pH change which is the gas with the buffer causes a pH change which is sensesensed byd by an internal-glass pH electrode. Because the reference element is built-in, a separate an internal-glass pH electrode. Because the reference element is built-in, a separate reference electrode is not necessary. Carbon dioxide and ammonia are among the reference electrode is not necessary. Carbon dioxide and ammonia are among the species measured by gas-sensing electrodes.

species measured by gas-sensing electrodes.

5.9

5.9 PVC

PVC WIRES

WIRES

 Figure

 Figure 5.9.(i) P5.9.(i) PVC WirVC Wireses

Polyvinyl chloride

Polyvinyl chloride, (IUPAC, (IUPAC Poly (chloroethanediyl)Poly (chloroethanediyl)) commonly abbreviated) commonly abbreviatedPVCPVC,, is a thermoplastic polymer.

References

Related documents

The two methods for determining azimuth from the sun are methods for determining azimuth from the sun are the the hour angle method and the altitude method.. hour angle method and

R = Swap rate is the rate for which the present value of level interest payments at the end of each period equals the present value of interest payments at the forward rates at the

A method to combine information from several derived respiration signals is also presented and it is used to combine PWV information with other methods such as pulse

Proof. The security will be analyzed based on the security model of access control system given in 2.3. More specifically, two types of adversaries will be considered here, that

For consumer protection on both personal loans and credit card loans, operators must meet the requirements shown: disclosure of key information; changes of interest rate, fees

Animals at high risk of developing colon cancer were given probiotics and the researchers looked for the appearance of tumours, or early signs of damage to the intestinal

When this bit is set to logic 0, a MOVC instruction in external program memory space will be able to access code only in the external memory, not in the internal memory. A

Circumstances would not, then statement english grammar error message stating that a statement and might instead of hypothetical or past regret about two pluperfect subjunctive is