You are on page 1of 56

DECLARATION

I declare that to the best of my knowledge that this project has been done by myself and has not
been copied from anywhere else.
Prepared by:
Abdallah Yahaya Hussein

Supervisor:
PHILLYMON L.T.Y

ABSTRACT
The purpose of this project is to reduce theft incidence by providing an automatic detection of
burglars for the building at Kibamba residential house. The detection will be provided by
infrared sensors to detect the presence of burglars near the building at the required time. The
signal will be sent to initiate the buzzer at the security Control room after the burglar being
detected. Then the Camera will continuously store the video events.

ii

ACKNOWLEDGEMENT
I would like to thank all lectures and colleagues of Electrical Engineering Department of Dar es
salaam Institute of Technology for their assistance, advices and cooperation, which made this job
to be the fulfilled. My special thanks are given to my supervisor Mr. Phillymon .l. Yacobo who
gave me great cooperation from the beginning to the end of this project, also a project
coordinator who gave the time table of the project in the right time from the beginning to the end
of this project.

iii

TABLE OF COTENTS

DECLARATION ............................................................................................................................. i
ABSTRACT .................................................................................................................................... ii
ACKNOWLEDGEMENT ............................................................................................................. iii
TABLE OF COTENTS.................................................................................................................. iv
LIST OF TABLES ....................................................................................................................... viii
LIST OF FIGURES ....................................................................................................................... ix
ABBREVIATIONS ........................................................................................................................ x
CHAPTER ONE ............................................................................................................................. 1
INTRODUCTION .......................................................................................................................... 1
1.0 Background Information ....................................................................................................... 1
1.1 Problem Definition. ............................................................................................................... 2
1.2 Project Objectives. ................................................................................................................ 3
1.2.1 Main Objectives. ............................................................................................................. 3
1.2.2 Specific Objectives ......................................................................................................... 3
1.3 Methodology ......................................................................................................................... 4
CHAPTER TWO ............................................................................................................................ 5
LITERATURE REVIEW ............................................................................................................... 5
2.1 Introduction ........................................................................................................................... 5
2.2 Hardwire Security System..................................................................................................... 5
2.3 Operation of Existing System ............................................................................................... 6
2.3.1 Existing System .............................................................................................................. 7
2.3.2 Photocells........................................................................................................................ 7
2.3.3 Relay ............................................................................................................................... 8
2.3.4 Choosing a relay ............................................................................................................. 9
2.4 Alert Systems ...................................................................................................................... 10
iv

2.4.1The Alarm System Process ............................................................................................ 10


2.4.2 Previous Work Carried Out On Alert Systems ............................................................. 10
2.4.3 Using Telephones for Alert Systems ............................................................................ 11
2.5 Proposed System. ................................................................................................................ 11
2.5.1. Significance of the Proposed System. ......................................................................... 11
2.5.2 Project Design............................................................................................................... 12
2.5.3 Microcontroller ............................................................................................................. 12
2.5.4 Central Processing Unit ................................................................................................ 13
2.5.5. Microcontroller Memories ........................................................................................... 13
2.5.6 Input Lines. ................................................................................................................... 13
2.5.7 Control Unit. ................................................................................................................. 13
2.5.8 Output Lines. ................................................................................................................ 13
2.5.9 Analogue to Digital Converter. ........................................................................................ 14
2.6. Factors to Consider In the Choice of a Microcontroller..................................................... 14
2.7. Current to Voltage Converter and Control System ............................................................ 14
2.8. Closed Circuit Television (CCTV) .................................................................................... 14
2.8.1 Alarm System ............................................................................................................... 16
2.8.2 False Alarm................................................................................................................... 16
2.8.3 Power Supply................................................................................................................ 16
2.9. Sensors. .............................................................................................................................. 16
2.9.1 Passive Infra-Red Sensor .............................................................................................. 17
2.9.2 Pir-Based Motion Detector (PID). ................................................................................ 17
2.9.3 Operating Principles of Pir ........................................................................................... 17
2.9.4 Active Infra-Red Beam ................................................................................................. 18
2.10 Calibration ......................................................................................................................... 19
v

2.11 Sensitivity .......................................................................................................................... 19


CHAPTER THREE ...................................................................................................................... 20
METHODOLOGY ....................................................................................................................... 20
3.1 Introduction: ........................................................................................................................ 20
3.2 Literature review: ................................................................................................................ 20
3.3 Circuit design: ..................................................................................................................... 21
3.4 Simulation: .......................................................................................................................... 21
3.5 Implementation and testing: ................................................................................................ 21
CHARTER FOUR ........................................................................................................................ 22
DATA COLLECTION ................................................................................................................. 22
4. I. Tables of Summary of Collected Data ............................................................................... 22
4.2. Data Specification of PIR sensors ...................................................................................... 23
4.3. Data Specification of Security Camera .............................................................................. 23
4.4. Specifications Data of Alarm ............................................................................................. 23
4.5. Specifications of Microcontroller....................................................................................... 24
CHARTER FIVE .......................................................................................................................... 26
DATA ANALYSIS ....................................................................................................................... 26
5.1 INTRODUCTION:.............................................................................................................. 26
5.2 Basic equations on power supply circuit: ............................................................................ 26
5.3 Power supply ....................................................................................................................... 27
5.4 The area to be protected ...................................................................................................... 28
5.4.1 Sensors coverage area: ................................................................................................ 29
5.4.2 Passive Infrared Detector PIR Data .............................................................................. 29
5.5. Switching circuit ................................................................................................................ 30
5.6 Camera circuit ..................................................................................................................... 31
5.6.1 Relay ............................................................................................................................. 31

vi

5.6.2 Transistor Specifications .............................................................................................. 32


5.6.3 The Value of the Biasing Resistors

.................................................................... 32

5.7 proposed circuit diagram ..................................................................................................... 33


5.8 Circuit operation .................................................................................................................. 34
CHAPTER SIX ............................................................................................................................. 35
RESULTS AND DISCUSSION ................................................................................................... 35
6.1 Introduction ......................................................................................................................... 35
6.2 Simulation results ................................................................................................................ 35
6.3 when the system is activated ............................................................................................... 36
6.4 The sensor on side A ........................................................................................................... 37
6.5 The sensor on side C ........................................................................................................... 38
6.6 The sensor on all side A,B,C and D .................................................................................... 39
6.7 Conclusion........................................................................................................................... 39
Recommendations ..................................................................................................................... 40
6.8 Cost estimation .................................................................................................................... 41
CODE FOR INTELLIGENT SECURITY SYSTEM ............................................................... 42
Project Title:Intelligent Security System .................................................................................. 42
REFERENCES ............................................................................................................................. 46

vii

LIST OF TABLES

Table: 1 Schedule of work


Table: 4.1 Shows dimensions of the face and house
Table: 4.2 Shows the dimension from the house to the fence
Table: 4.3 Specification of PIR sensors
Table: 4.4 Specification of Camera
Table: 4.5 Specification of alarm
Table: 4.6 Specifications for Microcontroller PIC18F4550

viii

LIST OF FIGURES

Figure: 2. Home security system


Figure: 2.1. Block diagram of the existing system
Figure: 2.2 typical construction of a plastic photocell
Figure: 2.3 a simple design of the alarm system
Figure: 2.4 Shows the block diagram of the designed system
Figure: 2.5 Active infrared motion detectors
Figure: 4 Diagram showing circuit for Microcontroller PIC18F4550
Figure: 5 Diagram showing the power supply circuit
Figure: 5.1 Diagram showing coverage area of the sensor to be used
Figure: 5.2 Diagram showing Switching circuit
Figure: 5.3 showing Camera circuit diagram
Figure: 5.4 showing proposed circuit diagram

ix

ABBREVIATIONS

CCTV

Closed Circuit Television

CPU

Central Processing Unit

PIR

Passive Infrared Detector

IDS

Intrusion detection system

RAM

Random Access Memory

EPROM

Electrically Programmable Read only Memory

DAC

Digital-to Analog converter

CHAPTER ONE
INTRODUCTION
1.0 Background Information
Security is the protection of a person, organization or country against threats such as
crime/attacks or is the group of people responsible for protecting a building or is a combination
of measure human and material resource intended to safeguard acts of unlawful interference.
Therefore with well-organized security system people lives comfortable and safely peace minded
the situation which makes them to be able to perform their responsibilities nicely and so raising
their personal developments and then contributing to the country economics Security is a
measure taken to guarantee the safety of a person, property or organization. The types of
protection include prevention, response and pre-emptive attacks. There are three areas that can
be attacked by criminally minded people; these are people, property or organizations, Protection
against an attack and sometimes making a preemptive attack on suspected threats. Prevention
against an attack includes making it difficult for someone to attack and displaying the
willingness to counter-attack. Reasons for such an attack may be for revenge, financial gain,
political or religious motives, for thrills, or to avoid getting caught, security is a protection. A
person, property or organization may be vulnerable to an attack. Motivation to attack includes
revenge, money, a cause or even thrills Security in these days of rising crime rates, more and
more people are becoming security minded. Electronic security devices can be installed to give a
view of areas that are vulnerable to attack. (Brookes, 2001).
Sensor is a virtual part of any alarm system, these is the guardian that responds to any
disturbance caused by an intruder and trigger the main alarm circuit. Having done this, they play
further part in operation as the latching circuit in the control unit take over to keep the alarm
sounding, hence any attack on the sensor or its wiring, after the alarm has sounded is of no avail
in silencing the system, (Vivian 1999)
We live in a much unsecured world, dominated by robbery and crime. Due to the pronounced
differences between the classes of a society, culture conflicts and various other factors,
1

worldwide crime rates have known an exacerbated increase in the last decades, rendering modern
society a very unstable and unsafe environment. Every day we hear about all sorts of crime,
robberies and theft, making us doubts the safety of our homes, possessions and even our lives.
Due to all this security system are needed.
People are feeling and more insecure inside their homes these days and they reinforce their doors
and windows, install extra door locks, and even buy guard dogs to provide them protection.
However, it is very important to note that experienced robbers can easily break through to a wide
range of home defenses, also it seems that most of robberies and burglaries take place while the
owner are at home, exposing the home owner and families to a serious risk. To minimize these
problems, electronic security system is very important. In present, the only effective means to
protect your homes against robbers is to install a reliable home security system. Only after you
have equipped your home with an efficient alarm system you can actually feel more than 80
percent safe inside your home.

1.1 Problem Definition.


Security is a prime concern in our day-today life. Everyone wants to be as much secure as
possible. Knowing your home is protected provides peace of mind both when you are away and
when you are home.
Most houses use poor system of security to protect themselves, property and the whole of the
family against attacks. Nowadays there are some cases where by gangs utilize this chance of
having poor security to do what they want. They use chemicals and sometimes use bush knives
and other equipment to harm people depending on their intention. It might be either a revenge,
misunderstanding between them or political issues. Due to the poor security people lose their
life, properties and money if it happens needed to be treated abroad according to the serious
wound obtained during attacks.
Using the system that cannot detect the presence of an intruder is dangerous to your life and
property. Employ a Masai as a guard to secure your property and your family it is not a real
security to ensure safety at all, though the system is cheaper, it has a lot of weaknesses in their
efficiencies since the system use poor weapons for control operation. The operating system is so
difficult to provide enough security since the security guard can only see on the front without
2

having any information of the remaining parts of the house. Due to human (security guard)
weakness (thus, frustration, physiological or fall asleep), thieves may enter the building without
being identified or even known. As a result the intruder may utilize these chances to steel in
comfortable, causes a lot of damage or sometimes may kill them. Having a photo sensor as a
helping tools in security, also is not a guarantee of total security since it senses the intruder who
is already close to the protected area so if he/she is well equipped can do what he/she desire.

1.2 Project Objectives.


1.2.1 Main Objectives.
The main objective of the project is to have the system that will improve protection of the
building by alerting the security Guard and activating the CCTV system.
1.2.2 Specific Objectives

To design a circuit that will detect the presence of a person during the night

To design a circuit that will sound a buzzer at the security room.

To program microcontroller to control the camera when intruder interring a protected


area.

To build a prototype

To test a prototype.

1.3 Methodology
In order to accomplish this project the following methods will be used

Literature reviews

Data collection

Data analysis

Design the proposed system

Building the prototype

Testing the proposed system

Report writing

Oct

Nov

Dec

Jan

Feb

Mar

Selection of project title


Title defending
Literature review
Data collection
Data analysis
Report writing
Submission of the report

Table: 1. Schedule of work

Apr

May

Jun

CHAPTER TWO
LITERATURE REVIEW
2.1 Introduction
This chapter gives the review on the concept of existing system and the other researchers on
security system.
A lot of study and research has been involved in creating security systems over time including
alert systems, alarms systems, surveillance systems, and GSM tracking systems etc. This chapter
aims to critically review a few of these works.

2.2 Hardwire Security System


A security system starts with a control panel. Usually located in a closet or a basement, the
control panel contains the Brain of the security system, and essentially operates as control
computer. Various sensors connect to the control panel from location throughout your home. If
your security is aimed and the person detects a problem, they send signals to the control panel.
The control panel automatically dials the control monitoring station, where the proper authorities
are notified.
Hardwire security systems are still possibly the most common type of security typically
recommended for new construction. Hardwired systems typically cost less than wireless systems,
but take more time to install. However, if installed during the construction phase the installation
time is very little, making wired systems the preferred choice.
The advancement of home security system and the reduction of price over the years have led to it
becoming almost in common homes in home as Cable TV. Many new home owners realize that
their home is their largest investment, and the best way to protect it is to install a security system
at the time of construction.
Adding Sensors after a construction is a common decision. Some things may be over looked at
the time of the original installation, or possibly something changed. All of our wired security
5

systems can be updated to work with wireless sensors- making it a Hybrid wired/Wireless system
as describe below
There are many hardwired security kits, pre-configured to meet anyones needs a home security
system consists of many different sensors type Each accomplishing a difference in price, overall
security.

Figure: 2 Home security systems.

2.3 Operation of Existing System


This system use light as a security, the photocell which is light dependent is used to switch on
the light during the night, i.e. it closes when sun lights goes off during the evening and open
during the day light. The function of light in security activities is to facilitate the security process
during the night by providing light which enable security Guard to see anything passing a certain
area covered by that light. The lamps with high power are commonly used for security purposes
so as to get adequate illumination. The security Guard stays in a special hut and makes a patrol
for some time around the house. Due to human (security guard) weakness (thus, frustration,
physiological or fall asleep), thieves may enter the building without being identified or even

known. As a result the intruder may utilize these chances to steel in comfortable, causes a lot of
damage or sometimes may kill them.
2.3.1 Existing System

Figure: 2.1. Block diagram of the existing system


2.3.2 Photocells
Photocells are simply resistors that have a light-dependent resistance. Photo-sensitive plates are
mounted on the front of the resistor, and as more or less light hits these plates, the resistance
value of the photocell changes.
Photocells are commonly used in dusk-to-dawn lights. These lights turn on when the surrounding
environment is dark and turn off when it becomes bright again. The photocells in the lights tell
the circuit when to provide more or less current, thus turning the light on or off as needed.

Figure: 2.3.Typical construction of a plastic photocell


2.3.3 Relay
Relays are components which allow a low-power circuit to switch a relatively high current on
and off, or to control signals that must be electrically isolated from the controlling circuit itself.
Newcomers to electronics sometimes want to use a relay for this type of application, but are
unsure about the details of doing so. Heres a quick rundown. To make a relay operate, you have
to pass a suitable .pull-in a holding Current (DC) through its energizing coil. And generally relay
coils are designed to operate from a particular supply voltage, Often 12V or 5V, in the case of
many of the small relays used for electronics work. In each case the coil has a resistance which
will draw the right pull-in and holding currents when its connected to that supply voltage. So the
basic idea is to choose a relay with a coil designed to operate from the supply voltage youre
using for your control circuit (and with contacts capable of switching the currents you want to
control), and then provide a suitable .relay driver. Circuit so that your low-power circuitry can
control the current through the relays coil. Typically this will be somewhere between 25mA and
70mA. Often your relay driver can be very simple, using little more than an NPN or PNP
transistor to control the coil current. All your low-power circuitry has to do is provide enough
8

base current to turn the transistor on and off, as you can see from diagrams A and B. In A, NPN
transistor Q1 (say a BC337 or BC338) is being used to control a relay (RLY1) with a 12V coil,
operating from a +12V supply. Series base resistor R1 is used to set the base current for Q1, so
that the transistor is driven into saturation (fully turned on) when the relay is to be energized.
That way, the transistor will have minimal voltage drop, and hence dissipate very little power, as
well as delivering most of the 12V to the relay coil. [3]

Circuit symbol of relay


Relays switch connections are usually labeled COM, NC and NO;
Where;
COM = Commons always connect to this; it is the moving part of the switch.
NC

= Normally Closed, COM is connected to this when the relay coil is off.

NO = Normally Open, COM is connected to this when the relay is on.


Connect to COM and NO if you want the switched circuit to be on when the relay coil is on.
Connect to COM and NC if you want the switched circuit to be on when relay coil is off.
2.3.4 Choosing a relay
During choosing a relay for a certain circuit several factors should be considered and the
following some of them;
I. Coil voltage; the relays coil voltage rating and resistance must suit the circuit powering
the relay coil. Many relays have a coil rated for a 12V supply but 5V and
II. 24V relays are also readily available. Some relays operate perfectly well with a supply
voltage which is a little lower than their rated value.
III. Coil resistance; the circuit must be able to supply the current required by the relay coil.
You can use Ohms law to calculate the current.
Relay coil current =

Supply Voltage
Coil resistance

For example: A 12V supply relay with coil resistance of 400 passes a current of 30mA. This is
okay for 555 timers IC. This almost is going to be used in the fire alarm system using GSM
cellular phone.
IV. Switch rating (voltage and current)
The relays switch contacts must be suitable for the circuit they are to control. Voltage and
current rating should be checked regularly, usually the voltage rating is high for AC, for
example 5A at 24V DC or 125V AC. [4]

2.4 Alert Systems


An alert system is a system that sends an alert to the user when a condition is met. It is used to
monitor events and send signals that would alert a user who is not physically present at the scene
of the occurrence. Alert systems are often incorporated with surveillance systems to give a
complete alert and surveillance system.
2.4.1The Alarm System Process

Detection
Medium
system

Manageme
nt system

GSM
module

Wireless
communication

Immediate
security
measure

Owner
of asset

Figure: 2.3 Simple Design of the Alarm System Process


2.4.2 Previous Work Carried Out On Alert Systems
There is a 2-way Intrusion detection system (IDS) that detects an intruders presence in a car.
The two-way intrusion detection security (IDS) system enables a car owner to detect any
unauthorized access to ones own car.
The disturbances created enable the Mops system to send an instant message on the mobile/Email to the authorized user about the unauthorized access to warn the customer of the possible
intrusion or theft in his/her vehicle. Once the user detects unauthorized presence in his/her car,
the user can send a text message for immobilization of the car. The immobilization is based on a
10

simple SMS command that shuts off the engine of the car. The system, which is easy to install,
can be operated through use of mobile (SMS)/E-mail/telephone. In case of multiple authorized
users, all such users will receive information. The system response is immediate and the
authentic user will immediately receive the message, even if he is located anywhere in the world.
This system efficiently alerts the user of an intruder in his car and the user can immobilize the
car. This project would apply a similar technology to security and surveillance of a building.
2.4.3 Using Telephones for Alert Systems
The telecopy project uses a telephone system for an audio surveillance system. The telephone
system makes a call and gives virtual ears to the users so that they can hear what is going on in
their homes. The system uses a motion sensor and a microphone. The Motion Sensor: The
Telecopys motion sensor is PIR or Passive Infrared Technology. The passive infrared sensor
detects changes in the room's heat signature due to occupant motion. The range is in excess of
9m at which point the width is about 6m, creating about a 45 degree wedge beyond the sensor
origin.

2.5 Proposed System.


This project is intended to come up with a system which will identify the person once he enters
the controlled zone a certain distance before coming close to the house. As signals detected by a
sensor will be sent to the control circuit so as to operate an alarm which will alert the homeowner
that there is someone entering the protected zone.
After a certain delayed time, the alarm will operate which will be heard only inside the house so
as to inform the house owner that, a particular person is still around the protected zone without
him/herself to know.
2.5.1. Significance of the Proposed System.

It will improve security system in residential premises

It will be used at any area where the security system is not reliable.

The system will operate automatically

11

2.5.2 Project Design.

Figure: 2.4 Shows the block diagram of the designed system


2.5.3 Microcontroller
A microcontroller is essentially an inexpensive single chip computer. Single chip means the
Entire computer system lies within the confines of a sliver of silicon encapsulated inside the
Plastic housing of an integrated circuit. The microcontroller has features similar to those of a
Standard personal computer. The microcontroller contains a CPU (central processing unit), RAM

12

(Random access memory), ROM (read-only memory), I/O (input/output) lines, control unit,
serial and parallel ports, timers, and sometimes other built-in peripherals such as analog to digital
(A/D) analogue comparator and digital to analog (D/A) converters (John Iovine, 2000)
The features of a microcontroller are described in detail as follow;
2.5.4 Central Processing Unit
The central processing unit (CPU) is the part of a microcontroller that is used to run a program
(Executes program instructions) it consists of control unit and arithmetic unit (Timoth J. Leary
and Linda I. oLeary, 2008).
2.5.5. Microcontroller Memories
The microcontroller has two types of memory that are EPROM (Electrically Programmable Read
only Memory) and Random Access Memory (RAM). EPROM is where we store written
program. This kind of memory is non-volatile and is not affected with the absence of power.
During execution of the instructions all the manipulation of data is done in the registers, this kind
of memory is known as Random Access Memory (RAM) and is volatile memory, meaning that
data are lost with the absence of power (www.wikipedia.org).
2.5.6 Input Lines.
The input lines to a microcontroller are used to receive signal from input components. The input
components consists of digital devices such as switches, push buttons and analogue sensors such
as light dependent resistors, thermistor, gas sensors, pressure sensors and any type of sensor or
Input from any source.
2.5.7 Control Unit.
The microcontroller will monitor the inputs and as a result the program would turn output ON
and OFF. The microcontroller stores the program in its memory, and executes the instructions
under the Control of the clock circuit.
2.5.8 Output Lines.
The output lines are used to send the executed output to the output devices. In my project, the
output will be sent from a microcontroller to a CCTV.

13

2.5.9 Analogue to Digital Converter.


An analog-to-digital converter (abbreviated ADC, A/D or A to D) is a device which converts
continuous signals to discrete digital numbers. The reverse operation is performed by a digital-to
analog converter (DAC).Typically, an ADC is an electronic device that converts an input analog
voltage (or current) to a digital number. The digital output may use different coding schemes,
such as binary, Gray code or two's complement binary. The A/D and D/C will be either inside a
microcontroller or

outside, this

is

due to

the availability of

a microcontroller.

(www.wikipedia.org).

2.6. Factors to Consider In the Choice of a Microcontroller

The most obvious consideration is how many digital inputs, analogue inputs and outputs
does the system require. This specifies the minimum number of I/O the microcontroller
must have.

The next consideration is the size of the program memory we need. This is very
important feature as one would find discarding a microcontroller for the reason that it
does not suite the capacity required.

Clock frequency, this determines the speed at which the instructions are executed. This is
important for any long execution of a program. With the higher frequency the
microcontroller will finish one task and start another.

Number of interrupts and timer circuits required, for instance, how many number of data
EEPROM is needed.

2.7. Current to Voltage Converter and Control System


This is circuit which will be used to change current from a current transformer to voltage that can
be compared by a comparator which will be either inside a micro controller or outside a
microcontroller. This will be determined by availability of a microcontroller.

2.8. Closed Circuit Television (CCTV)


CCTV is a contributor to the development of the raw surveillance picture and is a particularly
important sensor in that at shorter ranges a CCTV sensor is able to recognize target type and in
some cases target identity.

14

Modern cameras can provide high definition coverage in all types of visibility during both day
and night. Infrared and thermal imaging improves target detection and recognition. When
coupled with image becomes a very effective sensor in its own right and a supplier of essential
identifies information.
CCTV sensors can be remotely controlled in three axes, pant, tilt and zoom and they can accept
designation from other sensor information such as Radar, RDF and AIS and continue to track the
designated target. CCTV (Closed Circuit television) system can protect our property in case an
intruder picks your house. Close Circuit means only you have to access to footage your camera
system. Operating with CCTV system at any area store understands convenience of owning a
powerful camera system and thats why we carry the numerous options of camera systems. 2camera systems, 16-camera systems, Digital Video Recorders that store footage for weeks,
wireless cameras, and camera built with infrared, dome and bullet styled camera system, smart
phone monitoring, and touch screen television monitoring- our selection of kits will suit any
circumstances of your protection and needs. Surveillance camera system can be simple or
elaborate, but ultimately they all save the same purpose. Security camera Store has many
surveillance accessories to choose from. Accessories housed in our warehouses include camera
cable & bracket, CCTV warning signs, connectors& adapters, DVR lock boxes & brackets,
monitor brackets & accessories, and tools.
Although many surveillance kits come with accessories it will likely be necessary to make
addition purchases. Thats because installing a surveillance system will take special tools and
equipment and if you dont have already these items in advance you will need to get them before
you can complete installation.
One of the most time consuming steps of setting up and installing your security system will be
dealing with wire and cables. Thats why you should first make sure that you buy the right cable
and next make sure that you have the proper tools to cut cable and tuck it away. Such tools
include a wire stripper and staple gun.

15

2.8.1 Alarm System


The principle function of an alarm system is usual considered to;

Alert the people that someone is the intrusion area

Drive the intruder away

Give signal to the owners

Provide a loud alarm noise

2.8.2 False Alarm


False alarm could be generated by movement on the other side. False alarms due to inanimate
moving object are not possible unless the object is worm, because the device is actuated only by
objects that are warm and moving. The detector is not affected by heating system with the
possible exception forced air heating.
2.8.3 Power Supply
The power supply for running the system is taken from the main supply with backup battery
which switches in automatically if the supply fails. The control box must be permanently wired
to a suitable mains connection box should never be supplied from a plug socket as the socket
could be switched off or the plug be pulled out.

2.9. Sensors.
A sensor is a type of transducer which uses one type of energy, a signal of some sort, and
converts it into a reading for the purpose of information transfer. A mercury thermometer is an
example of a sensor that convert the expansion and contraction of volume of mercury in response
to change in temperature (the signal), to a reading on a calibrated glass tube giving information
about ambient temperature. Other sensors such as a thermocouple produce an output voltage or
other electrical output which may be attached to ammeter for reading a change or interpreted by
another device (such as a computer).for accuracy in the application a calibration of the sensor
and its output information is necessary.
Sensors are used in everyday objects such as touch-sensitive elevator buttons and lamps which
dim or brighten by touching the base. There are also innumerable applications for sensors of

16

which most people are never aware. Applications include automobile, machines, aerospace,
medicine, industry, and robotics.
Sensor's sensitivity indicates how much the sensor's output changes when the measured quantity
changes. Sensors that measure very small changes must have very high sensitivities.
Technological progress allows more and more sensors to be manufactured on microscopic scale
as micro sensors using MEMS technology. In most cases, a micro sensor reaches a significantly
higher speed and sensitivity compared with macroscopic approaches.
Because sensor is a type of transducer they change one form of energy into another. For this
reason, sensors can be classified according to the type of energy transfer that they detect.
2.9.1 Passive Infra-Red Sensor
The PIR Sensor detects motion up to 6m away by using a Fresnel lens and infrared-sensitive
element to detect changing patterns of passive infrared emitted by objects in its vicinity.
Inexpensive and easy to use, it's ideal for alarm systems, motion-activated lighting, and holiday
props. The PIR Sensor is compatible with all Parallax microcontrollers.
2.9.2 Pir-Based Motion Detector (PID).
A passive infrared sensor (PIR sensor) is an electronic sensor that measures infrared (IR) light
radiating from objects in its field of view. They are most often used in PIR-based motion
detectors.
2.9.3 Operating Principles of Pir
All objects with a temperature above absolute zero emit heat energy in the form of radiation.
Usually this radiation is invisible to the human eye because it radiates at infrared wavelengths,
but it can be detected by electronic devices designed for such a purpose.
The term passive in this instance refers to the fact that PIR devices do not generate or radiate any
energy for detection purposes. They work entirely by detecting the energy given off by other
objects. It is important to note that PIR sensors don't detect or measure "heat" per se; instead they
detect the Infrared radiation emitted from an object which is different from but often
associated/correlated with the object's temperature (e.g., a detector of X-rays or gamma rays

17

would not be considered a heat detector, though high temperatures may cause the emission of X
or gamma radiation).

The concept of motion detector for security system

Figure: 2.5 Active infrared motion detectors


2.9.4 Active Infra-Red Beam
Infra-red radiation lies just below visible light in the spectrum, it is fixed frequency but actually
has a wider frequency band than visible light ranging from

to

Hz or 1000 to

100,000GHz which is wave length of 300m to 3m.


It can be generated by a variety of source including a low temperature blackened filament lamp,
but usual generator is gallium arsenide crystals. Unlike microwave, infra-red radiation is affected
by snow rain and ice and so much be operated well within the specified range if used outdoors.

Table 2.1
Number

Refraction

Penetration

75

84

56

70

42

60

50

18

For indoor application these problem do not apply but losses are incurred at each refraction or
glass penetration. These reduce the range as shown in table 2.1 above. More than three
reflections reduce the range to 30% and are not recommended.

2.10 Calibration
The PIR Sensor requires a warm-up time in order to function properly. This is due to the
settling time involved in learning its environment. This could be anywhere from 10-60 seconds.
During this time there should be as little motion as possible in the sensors field of view. There is
a variable resistor (Delay Time) on the PIR sensor to control the ON delay time for the sensor.
Turning the variable resistor clockwise will give longer ON delay time while turning
anticlockwise with reduce the ON delay time.

2.11 Sensitivity
The PIR Sensor has a range of approximately 5 meters. The PIR sensor can sense object up to
120 within 1 meter range. The sensitivity can vary with environmental conditions. The sensor is
designed to adjust to slowly changing conditions that would happen normally as the day
progresses and the environmental conditions change, but responds by making its output high
when sudden changes occur, such as when there is motion.

19

CHAPTER THREE
METHODOLOGY
3.1 Introduction:
To achieve the objectives of this project the PROTOTYPING method is used as a framework to
structure the plan and development of the system.
The following are procedures in which some of them have already been used and others have to
be taken in order to accomplish the project:
a. .Literature review.

Consultation from project supervisor and other professionals from the relevant
field.

site visit

study existing system

internet surfing to study relevant theories

technical data collection and analysis

b. Design circuit.
c. Simulation of circuit.
d. Implementing and testing the circuit.

3.2 Literature review:


The review of books and other sources relevant to a particular project, providing a description,
summary, and critical evaluation of each work, the purpose is to offer an overview of significant
literature published on a topic.
As a part of methods to the accomplishment of the work, this part involves consultation of the
project supervisor as well as those who were in the position to give any assistance, support and
encouragement to the success of the work as well as the study of existing system.

20

3.3 Circuit design:


The circuit design based on the information collected in order to meet the objectives of the
project.
As it is very important part, the circuit design involves the following parts:

Power supply.

Sensor.

Switching mechanism.

PIC (Peripheral Interface Controller) microcontroller.

Relay/contactor.

The data collected will determine the proper selection of the components to be used in the
circuit.

3.4 Simulation:
Different parts of this system after design were simulated in order to observe results of each part
before implementing the complete circuit.
The simulation of the circuit and the analysis of the result have been done in this part of the
project and the available software used to fulfill the requirements.

3.5 Implementation and testing:


The results obtained from the simulation compared with the result obtained in this part, in which
the prototype realized from the circuit diagram and have been implemented on the breadboard.
The corrective procedures will be taken if the results will not meet the project requirements.
However, if the results obtained will be correct then the circuit will further be taken to the test
stage.

21

CHARTER FOUR
DATA COLLECTION

The data collected are information about proposed project for use in evaluation, which will
determine project effectiveness. It describes some situation from which conclusion can be drawn.
The following are data which were collected from House no 223

Total length of the fence to be secured is 80 m, width is 50 m

Height of the fence 3m, 1.5m is solid wall and 1.5m square frame attached on top of that
solid wall and supported by concrete beams

4. I. Tables of Summary of Collected Data


FENCE

HOUSE

Length m

80

16

Width m

50

12

Height m

Table: 4.1Shows dimension of fence and house no 223


Front

5m

Rear

3m

Side 1 right

4m

Side 2 left

5m

Table: 4.2 Show dimensions from the house to the fence

22

4.2. Data Specification of PIR sensors


Model

Operating

Current

voltage

Detecting

Operating

range(feet)

temperature

D203B

3-15 Volts

<100A

Up to15ft

25C

D203S

3-15 Volts

<100A

Up to15ft

25C

D203X

3.3-5 Volts

<100A

1-15ft

0C to50C

Table: 4.3 Specification of PIR sensors

4.3. Data Specification of Security Camera


TABLE:2 SPECIFICATION 0F CAMERA
Camera

12 volts dc, 1 lamp, 16mm


12 volts dc 1 lamp, 6mm
12volts dc 1 lamp ,3.6mm

Digital video recorder

4ways, 220volts, 50Hz


8ways,220volts 50Hz

HARD DISK DRIVE

500GB, 1000GB

Monitor
Coaxial cable without power

RG59CP,100M,750Ohms,
Table: 4.4 Specification of camera.

4.4. Specifications Data of Alarm


power supply

Construction

6-24volts ,50 Hz

Flying

10mA
amperes

to

leads

Sound pressure level

Resonance frequency

Up to 110dB

1500- 2kHz

PCB

several mount
electromechanical

Table: 4.5 Specification of Alarm.

23

4.5. Specifications of Microcontroller


Name

Value

Program memory type

Flash

Number of pins :

40

Clock speed :

48 MHz

Program memory

32

(kB)
CPU speed (MIPS) :

12

RAM Bytes :

2048

EEPROM Data memory :

256

Mounting type :

Through hole

Operating voltage range (v) :

(2.00 5.50)V

Table: 4.6. Specifications for Microcontroller PIC18F4550

24

Figure: 4.7 Diagram showing circuit for Microcontroller PIC18F4550

25

CHARTER FIVE
DATA ANALYSIS
5.1 INTRODUCTION:
In this design the necessary technical data were collected and will be used in the design stage,
from the fact that any design process there must be some data which are supposed to be collected
in order to achieve the design requirement. The analysis of the collected data has to be done in
this second part of the project. During the process of data collection, data were obtained through
the following methods:
From the project site.
Through literature review.

5.2 Basic equations on power supply circuit:


Peak secondary voltage of transformer (V p);

(I)

Output voltage (V p out) of the power supply is;


(i.e. 1.4V is the voltage drop of bridge rectifier). (ii)
For the filter circuit;
Peak inverse voltage (PIV) of each diode is given by;
0.7V;

PIV

(i.e. 0.7V is the voltage drop across each diode) (iii)

The capacitor (C) for filter circuit is given by;


C=(

(iv)

Where;
= ripple factor which is about 3.9% for the bridge rectifier.

26

R= is the resistance and


f = is the frequency of the supply
The pure dc voltage (Vdc) is given by;
Vdc

+ (v)

Note that

5.3 Power supply


The requirement of power supply is to produce the output voltage of about 12Vdc. Recall
the equations used to calculate the parameters of power supply as mentioned

above from

equation (i) (v) based on power supply.


Let Vp be rectifier output voltage, Vs = transformer secondary voltage, so;
Vs = 1.414 12V=16.96V
Vp = Vs 1.4 = 16.96 -1.4 = 15.55 (pulsating)
PIV for @ diode = Vp + 0.7 = 16.25V. (Unfiltered dc)
By taking ripple factor = 3.97%,
V p (rect) = Vp 1.4 = 15.55 1.4 = 14.15V: then for proper value of capacitor (C) we have;
C = 1/ (4 0.0397 f R 1.732), let R = 3.6K and f = 50Hz; then C = 20F.
For pure Vdc = (1- (1/ (2fRC)) 14.15V
Vdc = 12.18V. (After putting the values above)
With this voltage the regulator LM 7812 will be useful since it has the characteristics of
producing Vdc of 12.5V 25V at 0c 125c and LM 7805 will be useful since it has the
characteristics of producing Vdc of 5.5V 10.5V

27

Figure: 5. Diagram showing the power supply circuit

5.4 The area to be protected


Length 80m width 50m Fence
Length 16m width 12m House
Length from the house to the fence
80-16 = 64m
Width from the house to the House
50-12 = 38m
Protected zone
Length 12m Width 12m
Area =12 12 = 144m2
Setting and allocation of the sensors
The sensor detects motion of object up to 6m
Length to be protected is 12m that needs 2 sensors to cover the distance

28

We have four (4) sides that we should have to have


24 = 8 PIR sensors
5.4.1 Sensors coverage area:
The type of sensor to be used is capable to cover about the angle of 140 degree from where it is
planted. On top the type of that device is capable of detecting radiations which are about 6 to 8
meters perpendicular from where it is planted, and the distance which the device can sense
decreases as you go away (left or right) from the perpendicular line.
The diagram below shows the above explanations in details.

Figure: 5.1. Diagram showing coverage area of the sensor to be used


5.4.2 Passive Infrared Detector PIR Data
The PIR Sensor detects motion up to 6m away by using a Fresnel lens and infrared-sensitive
element to detect changing patterns of passive infrared emitted by objects in its vicinity.
Inexpensive and easy to use it's ideal for alarm systems, motion-activated lighting, and holiday

29

props. The PIR Sensor is compatible with all Parallax microcontrollers. Passive infrared sensor is
a good because it detects heat from a body of a person.

5.5. Switching circuit

Figure: 5.2. Diagram showing Switching circuit

From data sheet of relay (www.futurlec.com/RelDip.shtml)


Current=1A and Voltage=12V, type of relay SPDT Pc Mount Relay.
Voltage output from PIC terminal
High=5V=ON
Low=0V=OF
Find for R7

30

From Data sheet (https://www.google.co.tz/)


NPN Transistor datasheet Type=Zetex 115 which draw 3A and has >300
(

R7=1290
But standard resistance which is available=1k
Let R7=1k.

5.6 Camera circuit

Figure: 5.3 Showing Camera circuit diagram


5.6.1 Relay
Relay coil resistance (Rc) = 240
Supply voltage (Vcc) = 12V
The relay contacts can withstand the current up to 30A
31

The current through the relay is given by:

But, when the transistor is biased,


, therefore

5.6.2 Transistor Specifications


The data obtained from the transistor data sheet are shown below,
The selected transistor is BC 107, silicone transistor.
From the transistor data sheet,
Maximum collector emitter voltage
Maximum base emitter voltage
Maximum collector power
Maximum collector current
Forward current transfer ratio (hfe)
From,

5.6.3 The Value of the Biasing Resistors


Now from,

32

For silicon transistor VBE = 0.7V

But standard resistance which is available = 10k

5.7 proposed circuit diagram

Figure: 5.4 Showing proposed circuit diagram

33

5.8 Circuit operation


This circuit is the improvement of the existing system that was using the light as a security .This
circuit is improved by adding PIR sensors, Buzzer and Cameras that stores the invents.
This circuit uses LDR to switch ON the light during the night and to switch OFF the light during
day time. LDR when senses the light the resistance drops dramatically that allow the current to
flow and hence cause the low voltage at the input of the PIC. When there is dark LDR
experiences high resistance about 1M that causes high voltage at the input of the PIC.PIC is
programmed that when there is low voltage at the input, indicates that there is light ie it is day
time, hence send signal which is items of voltage to switch OFF the light and verse versa.
There are four sensors in which each sensor is planted with respect to its side, as all objects with
a temperature above absolute zero emit heat energy in the form of radiation. So the PIR
sensors are tuned to detect this IR wavelength which only emanates when a human being arrives
in their proximity. When the sensor on side A or B or C or D senses an intruder it send the
signal to PIC, then PIC activate the Camera to capture that event and store it for further
investigation, at the same time send the signal to activate the buzzer at security room to alert the
security guard to watch on the display what happens and in which side of the house.

34

CHAPTER SIX
RESULTS AND DISCUSSION
6.1 Introduction
This chapter describes how the testing was carried out and what found from the test. Both
simulation and implementation have been done. Simulation has been done in PROTEUS 7
Professional while the program was written in Micro Basic language in the Micro Basic compiler
for PIC.

6.2 Simulation results


Simulations were done through different conditions of the circuit with different sides of the
house, when somebody comes closer to the protected zone and when temperature detection
meets the requirement.
The purpose of making circuit simulation is to check the performance of the designed circuit
before the physical implementation

35

6.3 when the system is activated


The system is activated,the Camera is OFF and all sensors detect nothin but LDR senses the
presence of dark the relay is on and the lighting system is ON

36

6.4 The sensor on side A


The sensor on side A senses the presence of an intruder the camera is activated to capture the event
and the alarm is ON,at the same time lighting system is ON

37

6.5 The sensor on side C


The sensor on side C senses the presence of an intruder the camera is activated to capture the event
and the alarm is ON,at the same time the lighting system is ON

38

6.6 The sensor on all side A,B,C and D


All the sensors on all sides A,B,C and D senses the presence of an intruder the camera is activated to
capture the event and the alarm is ON,at the same time the lighting system is ON

6.7 Conclusion
The result of simulation shows the successfulness of the design, and prototype built will reveal
and satisfies the security of the house and by how much the optimal performance of the security
system has been achieved.
It is not easy by now to state for how much the reliability of the system is, since all what
happened have been carried out virtual. But during the real implementation of the system I think
the result will be the same since the modelling, simulation, and prototyping are the key and
fundamental procedures in designing of any system in the field of engineering.
Shortly, we can conclude that the main objective as well the stated specific objectives have been
achieved and the system is suitable to be installed in the particular area as prescribed in the first
presentation of the title of this project.
39

This system cannot only benefit that particular house, but also the other houses, companies,
where security is not reliable
Recommendations
This circuit should be taken into consideration so as to reduce if not to eliminate the problem of
theft that will help the society to stay safely within their place.
It is recommended that there should be the regular corrective maintenance and preventive
maintenance to ensure the required system performance; this is because the system is operating
automatically so it does not require the existing of the operator most of the time.

40

6.8 Cost estimation


S/NO

ITEM

QTY

PRICE

TOTAL PRICE

1.

Printed circuit board

1pc

5000/-

5000/-

2.

Relay

2pc

3000/-

6000/-

3.

Variable Resistor

2pc

1000/-

2000/-

4.

Resistor 1/4W

10pcs

800/-

8000/-

5.

Polarized Capacitor

4pcs

500/-

2000/-

6.

Soldering wire

1reel

3500/-

3500/-

7.

Jumper

2m

1000/-

2000/-

8.

Soldering gun

1pc

10000/-

10000/-

9.

Soldering pump

1pc

5000/-

5000/-

10

Transistor (NPN)

2pc

1500/-

3000/-

11.

Transformer (12V)

1pc

5000/-

5000/-

12.

Infrared sensor

1pc

39000/-

39000/-

13.

Printing and binding/book

7 copies

6000-

42000/-

14.

Bridge rectifier

1pc

3000/-

3000/-

15.

Regulator LM7812

1pc

4500/-

4500/-

16

Regulator LM7805

1pc

4500/-

4500/-

17

PIC

1pc

40000/-

40000/-

18

Display

1Pc

30000/-

30000/-

Subtotal costs

260600/-

Contingency 20% of total cost

52120/-

Grand total

312720

Table 6: cost estimation

41

CODE FOR INTELLIGENT SECURITY SYSTEM


Project Title:Intelligent Security System
Mcu:18f4550
Xtal:8MHz
Date:March 22th, 2014
*/
#include "lcd_connections.hbl"
#include "Global_variables.hbl"
void lcdout(char Qw){
lcd_cmd(_lcd_clear);
lcd_out(1,1,Qw);
}

sound(){
for(sound1=0;sound1<4;sound1++){
for(sound2=0;sound2<2000;sound2++){
portc.f2=~portc.f2;
delay_us(500);
}
sound2=0;
}
}

void addf(){
char txt0[16]="";
x=PortD;

42

if(x!=hold){
if(portD.F0 || portD.F1 || portD.F2 || portD.F3){
strncpy(txt0,"Sector ",7);
if(portD.F0){
strcat(txt0," A");
}
if(portD.F1){
strcat(txt0," B");}
if(portD.F2){
strcat(txt0," C ");} if(portD.F3){
strcat(txt0," D ");}
lcd_cmd(_lcd_clear);
Lcd_out(1,1,txt0);
//lcd_cmd(_lcd_clear);
Lcd_out(2,1,"Alert!!!");
LatC.F0=1;
}
else{
lcd_cmd(_lcd_clear);
Lcd_out(1,1,"SECURITY SYSTEM");
Lcd_out(2,1," ACTIVATED");
LatC.F0=0;
}
hold=x;
//delay_ms(1000);

43

}
}
void main() {
TRISC=0X80;
portc=0x00;
TRISB=0X00;
TRISD=0X0f;
PORTD=0X00;
PORTB=0X00;
//INTCON=0XC0;
CMCON = 0x07; // Disable comparators
TRISa0_bit = 1;

// Configure RE1 pin as input

lcd_init();
delay_ms(500);
lcd_cmd(_lcd_cursor_off);
lcd_cmd(_lcd_clear);
Lcd_out(1,1,"SECURITY SYSTEM");
Lcd_out(2,1," ACTIVATED");
delay_ms(50);

do{

temp_res = ADC_Read(0);

// Get 10-bit results of AD conversion

temp = (temp_res * VREF)/1024; // Calculate temperature in Celsuis


// change Vref constant according

44

// to the power supply voltage


if(temp<1.7)
LatC.F1=1;
else
LatC.F1=0;
for(i=0;i<5000;i++){ //delay 5 sec
addf();
if(x>0)
sound();
delay_ms(1);
}
}while(1);
} //void mai

45

REFERENCES

Electrical Circuit Theory and Technology, John Bird, BSc(Hons), CEng, MIEE,FIEIE,
CMath, FIMA, FCollP, Revised second edition, Oxford OX2 8DP 200 Wheeler Rd,
Burlington, MA 01803

ELECTRIC POWER SYSTEMS, B.M. WEEDY, 3rd Edition, JOHN WILEY & SONS;
New York (1987); pg. 488.

Engineer's Reference Book, Sixteenth edition, M. A. Laughton CEng., FIEE, D. J. Warne


CEng., FIEE , OXFORD AMSTERDAM

.Timoth J. Leary and


Linda I. oLeary, Computing Essentials, McGraw-Hill Companies, 1998.

Vivian Capel. (1999), Security systems & Intruder Alarms, Second Edition.

Mike Tooley (2006), Electronic circuit Fundamental and Application Newes sterdam. pg.
122-131

Introduction to ELECTRONIC CIRCUITS, RICHARD C. DORF, 2nd Edition, JOHN


WILEY & SONS, Inc.; New York (1993); pp 9.

India

46

You might also like