Design and Implementation of Motion Detector With Alarm System

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

i

DESIGN CONSTRUCTION AND IMPLEMENTATION OF A MOTION


DECTECTION SYSTEM

BY

FARUK JIBRIL

1510340010

A PROJECT REPORT SUBMITTED TO THE DEPATMENT OF

INFORMATION AND COMMUNICATION TECHNOOGY, KEBBI STATE


UNIVERSITY OF SCIENCE AND TECHNOLOGY, ALIERO

IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE AWARD

OF

BACHELOR DEGREE (B.TECH. INFORMATION AND COMMUNICATION


TECHNOLOGY)

MAY, 2021

i
ii

DECLARATION

I FARUK JIBRIL, hereby declare that this project work carried out is the result of my personal
effort and has not been submitted elsewhere for this purpose. All sources of information are
duly acknowledged by means of references.

………………………………. ………………………….
FARUK JIBRIL DATE
1510340010
iii

CERTIFICATION

This project work is titled “design construction and implementation motion detection system”
by Faruk Jibril meets the requirement for the award of Bachelor of Technology (B.Tech.)
degree in Information and Communication Technology Department, Kebbi State University of
Science and Technology Aliero.

……………………………. ……………….
Mal.YUNUSA ADAMU BENA DATE

(Project supervisor)

……………………………… …………………
Dr. RUFAI ALIYU YAURI DATE

(Head of Department)

……………………………… …………………
Prof. SALEH ABDULLAHI DATE

(External Supervisor)
iv

DEDICATION

This projection is dedicated to my beloved parents Alh and Haj. JIBO ABULLAHI for their
love, care and encouragement, also for their financial and moral support given to me. My
greeting also extends to all member of my family, who in one way or the other have positively
contributed to the success of my academic pursuit.
v

ACKNOWLEDGEMENT

My profound gratitude goes to the almighty God for his grace, mercy and protection
throughout the period of my degree programed, also to my immediate family who strive each
day to make sure the dreams of me being an Engineer is actualized, my siblings who go out of
their ways to ensure I get all I need for my academics pursuit, I love you all.

I cannot but appreciate the principal partner of my supervisor in person of Mr. Yunusa
Adamu Bena for his contributions towards achieving the purpose of this project work and my
colleagues for their support during my project work. My profound gratitude is not only to those
I have mentioned their names but also to several others especially my colleagues at school who
have contributed in one way or the other to my success. To the head of department, all lecturers
and staff of the department, I say a very big thanks to you all for your tips and guides over the
years. Thanks for your support.
vi

ABSTRACT

This work present the design, construction and testing of a motion detection system. The principle
of operation of this burglar alarm is simple. When an object move towards the direction of the sensor the
alarm is triggered and the siren begins to operate. The sensor can operate in a dark environment as it
depends on the temperature of an object, the system also support lighting of your environment as you can
on and off your bulbs through the system. These actions thus alert the owner of the residence and/or
security personnel of the presence of an intruder. The purpose of this project was to build a motion
detector. The main components used were the Arduino microcontroller and the PIR sensor. The project
also used an LED and a Piezo buzzer to indicate when motion was detected. The group sought to
demonstrate the workings of each component as well as how they work together to carry out the task. The
group also drew up a circuit from which the components were connected. From the results, it was
demonstrated that motion, which is a physical property, can be used to effect changes in a digital device
and using the LED and Piezo buzzer, the motion can be announced thereby allowing it to be used as an
intruder alarm.
vii

TABLE OF CONTENTS

CHAPTER TITLE PAGES

TITLE PAGE i
Error! Bookmark not defined.

DECLARATION i

CERTIFICATION iii

DEDICATION iv

ACKNOWLEDGEMENT v

ABSTRACT vi

TABLE OF CONTENTS vii


LIST OF ABBREVIATIONS x

1 INTRODUCTION 1

1.1 Background of the Project 1


1.2 Statement of the problem 3
1.3 Aim and Objectives 4
1.4 Scope and Limitation 4
1.5.1 Scope 4

1.5.2 Limitation 5

2 LITRATURE REVIEW 6

2.1 Types of alarm systems 6


viii

2.1.1 Wireless Alarm Systems 7

2.1.2 Wired Alarm Systems 7

2.1.3 Monitored Alarm Systems 8

2.1.4 Unmonitored Alarm Systems 9

2.2 Theoretical Background 10


2.3 Review of past researches 12

3 METHODOLOGY 15
3.1 Introduction 15
3.2 Hardware Design 15
3.2.1 Pin Configuration of ATmega 328 17
3.2.2 Power Supply 19

3.2.3 Relays 20

3.2.4 Electronic Components 22

3.2.5 Regulated Power Supply Unit 24


3.2.6 Microcontroller Unit 25
3.2.7 Switching Unit 26

3.3 Software Design 28

4 RESULT AND DISCUTION 31


4.1 Motion detector circuit 31
4.2 Static tests 32

5 CONCLUSION AND RECOMMUNDATION 41


REFERENCE 37
ix

List of Figure

FIGURE NO TITLE PAGE

Figure 1: ATmega 328 with Arduino Uno Mapping 17


Figure 2: Circuit Diagram Of The System 18
Figure 3: A Liquid Crystal Display Module 19
Figure 4: Power Supply Block Diagram 19
Figure 5: Passive Infrared sensor (PIR sensor Passive Infrared sensor) 20
Figure 6: Diode 23
Figure 7: Resistor 23
Figure 8: Transistor 24
Figure 9: Capacitor 24
Figure 10: Proposed Circuit Diagram of Regulated Power Suppply 25
x

LIST OF ABBREVIATIONS

LCD - Liquid Crystal Display

PIR - Passive Infrared

GSM - Global System for Mobile Communication

PCB - Printed Circuit Board

RAM - Random Access Memory

ROM - Read Only Memory

I/O - Input / Output

PSU - Power Supply Unit

IR - Infrared

FET - Field Effect Transistors

DC - Direct Current

AC - Alternative Current

LED - Light Emitting Diode


1

CHAPTER 1

INTRODUCTION

1.1 Background of the Project

According to (Jati & Gata Grace, 2011), burglar alarm is a system designed to
detect intrusion-unauthorized entry into a building or area. They are also called security
alarms, security systems, alarm systems, intrusion detection systems, perimeter detection
systems, and similar terms. Burglar alarms are used in residential, commercial,
industrial, and military properties for protection against burglary (theft) or property
damage, as well as personal protection against intruders. Car alarms likewise protect
vehicles and their contents. Prisons also use security systems for control of inmates.

Some alarm systems serve a single purpose of burglary protection; combination


systems provide both fire and intrusion protection. Intrusion alarm systems may also be
combined with closed-circuit television surveillance systems to automatically record the
activities of intruders, and may be interface to access control systems for electrically
locked doors. Systems range from small, self-contained, noisemakers, to complicated,
multi-area systems with computer monitoring and control.
Samuel Bango was the first person to invent a motion detector whereby he came up
with a burglar alarm in the early 1950s. He used principles of a radar to ultrasonic waves
in which he could detect fire or thieves that people were unable to hear. Doppler Effect is
the main principle upon which Samuel’s motion detector is based on. Majority of motion
detectors today still employ the same principle. A good example is the IR sensor and
microwave sensor which by the changes in the frequencies they emit they are able to
sense motion. Security systems have picked up the motion detectors and they are being
used in offices and shopping malls as well as in homes as intruder alarms. The motion
2

detectors are also being used to stop serious accidents by detecting anyone who is too
close to it. Automatic doors in office buildings and shopping malls employ the motion
detectors. In the motion detector, the dual infrared reflective sensor is the major element.
Some detectors use different kind of sensors (Bajpai & Agrawal, 2013)
There are different types of motion detectors. The main ones are; the Passive
Infrared Sensor, Ultrasonic sensor and infrared (IR) sensor. The Passive Infrared Sensor
(PIR) detects somebody’s body heat as they get closer to the device. They are small and
require very minimal amount of power (Moghavvemi & Seng, 2004). They are also
cheap. For these reasons, PIR are very common in gadgets and home appliances. When
the PIR senses motion, it gives out a digital output. The Ultrasonic sensors on the other
hand are used to measure a moving object’s reflection. Their also go by the name of
transducers. In principle, the transducer vibrates with a specific range of frequencies and
emits sound waves when some voltage is fed into it in the form of a. electric pulse. As an
obstacle comes within sensor’s range, then there is a reflection of the sound waves, a
process which gives out an electric pulse(Ying, n.d.). The echo patterns detect the
motion (Badamasi, 2014). The IR Sensor detects the aspects of its surroundings by
emitting or sensing IR radiation. It is an electronic device that is made up an IR LED
source emitting the light which has the actual IR wavelengths. The emitted frequency of
the IR beam is received by the detector circuit which has at the same time an optical
component that focuses the infrared radiation and limits the spectral response. In this
project, the group used a PIR Sensor (Wren et al., 2007). There are three things that are
very crucial in this sensor.
A Fresnel lens, an infrared detector and supporting detection circuitry. Any
infrared around is focused by the lens towards the infrared detector. Human bodies give
out infrared heat and this is detected by the sensor. With the detection of a person, the
sensor gives out a voltage (5V) signal for a sixty seconds period. The span of detection
offered by this sensor is approximately 6m and it is highly sensitive (Philosophy, 2010).
The other main component that was used by the group is the Arduino. This is
technically an open source prototyping platform which relies on easy-to-use hardware
and software. Arduino have the ability to read inputs for example, someone’s finger on a
button or a message on Twitter and eventually turn the input into output such as turning
on an LED or publishing something online. By sending instructions to the
microcontroller, a user can command the board to carry out some functions.
This is done by the use of Arduino programming language which is based on the
wiring done on the board and the Arduino Software or Integrated Development
Environment, which is based on Processing (Tarus, 2017). The Arduino was invented at
the Ivrea Interaction Design Institute. The main use for the device was as an easy tool for
3

fast prototyping, and it was targeting those students who lacked knowledge on
fundamentals of electronics and programming. As its market grew, the board began to
evolve adapting new needs and challenges (Adriansyah, 2014).

1.2 Statement of the problem

When someone mentions burglar alarms it is not unreasonable to think of high tech
devices developed in the silicon age. The truth is the concept of an alarm system is one
that was invented long before that. For thousands of years man has used animals, more
notably the dog, to guard and alert him of any one trying to temper or steel his valuables.
In the middle ages large gongs were used to warn a population of impending doom or
large bonfires lit to warm imminent invasion.
As important as these development were, it was not until 1852 that the first electro-
mechanical alarm system was invented. Edwin Holmes was an American Inventor from
Boston Massachusetts; the alarm he devised was simplistic but effective. A solenoid
struck a gong when a trip wire was disturbed. Although his alarm system is nothing
compared to today’s offerings it was positively received in its day. (Sufiyanu A. Bako
2013). These early alarm systems continued to make use of simple electrical circuits and
relays. A typical installation would see wire wound along windowsills and around
doorframes coupled with conductive lead foil and mechanical or magnetic switches laced
with thin wire.
This project work is basically based on the designed, construction and
implementation of a simple motion detection alarm system. In other words, the burglar
alarms are designed for protection against burglary (theft) or property damage as well as
personal protection against intruders. These systems are commonly found in residential
and commercial places.
Security system are gaining increase importance in recent times to protect life and
valuable resources, many advanced method of providing security have been developed
and are in use in the last few decades. Of this one important area is the security system
required for military /strategic applications, which has advanced greatly. But such
systems being complex and expensive are useful to high end application only. However
with recent progress in technology and the growing need for increased security in
civilian and other applications, many low cost solutions for security system have now
emerged. In the field of Burglar Alarm Systems using modern approaches has become a
major means of providing security in all applications, both military and civilian. Due to
high state of insecurity being experienced in the entire world the need to keep the
occupants of the office aware of any intrusion in to their premises forms part of the
project.
4

1.3 Aim and Objectives

This project is aimed at designing and subsequently constructing a


Direction/Location Display system capable of detecting intrusion at any location, as it
will prompt an alarm to ring and using LCD displays the exact location can be traced.

The system has to satisfy the following objectives:


i. To design a system that ensure the security of an environment where it is installed.
ii. To design a system that ensure prompt notice through the alarm system of an
intruder into an unauthorized premise.
iii. To design a system that provide psychological satisfaction of being secure to the
office occupant.

1.4 Significance of the Project

The importance of an installation of a burglar alarm is to protect oneself and one’s


family. The installation of a burglar alarm can help in attaining a sense of relief and
security whether you are staying at home or whether you are on a vacation. Even though,
today, there are different choices for burglar alarms, including ones with the best
technology, there is a very high probability that you might not find the kind of alarm
system you are looking for. The choices can range from the simplest ones that secure
only against intruders to ones that are as detailed as you can think of. Most of the burglar
alarms in our market are imported and there is need to develop our knowledge and
design using commonly available materials in our stock. Results could be used to plan a
more efficient and robust system which would lead to commercialization.

1.5 Scope and Limitation

1.5.1 Scope: The scope of this project is to design and construct a Burglar alarm
system using P.I.R Sensor using commonly available electronics components and
simulate the complete system using modular approach with circuit design software called
“proteus software”.
5

Using predefined programs, the device to be developed is expected to detect


motion in the event of unauthorized entry into the building. The intruder-detention
system can be controlled with remote, or even a mobile phone application.

1.5.2 Limitation: The device will be electricity dependent, for its design will not
include provision for battery or any energy storage media. As it is a motion-sensing
device with an alarm system, it is unable to digitally display the exact location of the
intruder. Also the device cannot differentiate between people.
6

CHAPTER 2

LITERATURE REVIEW AND THEORETICAL BACKGROUND

2.0 Literature Review

An alarm system is a device that is activated by the activities of trespassers,


intended to deter burglars. It must take into account the actions of people attempting
to trespass or cause destruction. Security is the degree of protection against danger, loss
and criminals. Throughout history, human have sought to protect their life, property and
professions .The busy lifestyle of people is leading to the necessity of controlling the
devices at home remotely and increasing the necessity of keeping surveillance over their
home. Now when everything is available to us we can now design something that
provides us complete security. The very basic of this began with the simple alarm system
which include notifying suspicious activities at a very low cost. The need for security
system have rapidly grown from being specialized for high – risk areas such as banks,
companies, governmental institutions, to be available and demanded rapidly by the
average public. Some of the common characteristics of motion detection alarm and
security system as follow 24 hours monitoring, difficult to hack, Ability to control doors
and motion sensor.

2.1 Types of alarm systems

Alarms or alarm systems can take various shapes, sizes, designs and
configurations, as well as several scopes of application. In this work, all alarm systems
are categorized based on four distinct and general classes; wireless alarm system, wired
alarm systems, monitored alarm systems and unmonitored alarm systems.
7

2.1.1 Wireless Alarm Systems: In these systems, the sensors of a wireless alarm
communicate with the control panel using a secure radio frequency. If a sensor is tripped
while the alarm is armed, it transmits a signal that’s picked up by the control panel, and
the alarm is triggered. It’s important that all sensors and control panels are within range
of each other in order to communicate properly. If your sensors are too far away from the
control panel, or there are too many obstacles in the way, the signal won’t be able to
reach its intended target. Since there aren’t any wires to run, wireless alarm systems are
the simplest to install. Most wireless systems can be installed without help, although
professional installation is always suggested (Studies, 2018).

Pros

Simple installation

Cons

Limited range between sensors

Battery charges

Best Uses

Wireless alarm systems are great for residential properties and small businesses.

2.1.2 Wired Alarm Systems: Wired alarm systems, as the name might suggest, are
hard-wired into your building. Every sensor, control panel, and detector is connected
with physical wires. Every part of the system is also wired into your property’s power
supply. Wired systems are generally considered to be the most reliable, since you never
have to worry about connectivity between sensors or running out of batteries (Tanner &
Mead, n.d.).
8

Installation of wired alarm systems can be difficult. Unless you’re okay with
wires running along your ceilings and walls, walls need to be taken down in order to
properly install the system. More difficult installation typically means higher cost.

It’s a common misconception that wired alarm systems don’t have the same
versatility or mobile functionality as wireless alarm systems. The truth is that many
modern wired systems offer the same remote accessibility as wireless systems.

Pros

More reliable

Less maintenance

Cons

Expensive Installation

Best Uses

Wired alarm systems are best used in larger facilities. When control panels and
sensors are connected using wires, distance isn’t a factor. Wired systems are also harder
to hack, so they’re generally considered to be slightly more secure than wireless systems
as well.

2.1.3 Monitored Alarm Systems

When an alarm is triggered, who gets alerted? With a monitored alarm system, an
alert is sent directly to a professional alarm monitoring team who can respond
immediately to any type of threat. If there’s a break-in, they’ll dispatch the police. If
there’s a fire, the fire department will be contacted. Even for false alarms, a monitoring
service will know how to handle it. It’s like having a smart alarm system that can
respond differently depending on what triggered the alarm (Faisel et al.,
2019).Monitored alarm systems ensure that even when you’re not home or able to get to
9

your phone to check for alarm alerts, your property is still protected. They offer
unparalleled peace of mind.

Pros

Most secure

Reliable

Customized alarm responses

Cons

Additional monthly fee

Best Uses

Monitored alarm systems are best for people who are frequently away from their
home or business. Even when you’re not there, you’ll feel secure knowing that your
property is still being monitored by a professional. They’re also helpful if you’re looking
for some additional security. In reality, having a monitored alarm system is beneficial for
all properties, commercial and residential.

2.1.4 Unmonitored Alarm Systems

Instead of sending an alert to a professional security team who can respond to


threats, unmonitored alarm systems simply trigger audible and visual signals to alert
someone in the immediate vicinity. Its then up to you or your neighbors to react. Some
unmonitored alarm systems can send you an alert to your mobile device in the form of a
text, email, or notification, but it’s still up to you to address the threat (Tiwari et al.,
2016).
10

Since there aren’t any security professionals watching over your property,
unmonitored alarm systems offer much less protection compared to monitored alarm
systems, but they’re usually cheaper.

Pros

Inexpensive

Cons

Less protection

Reliant on the user

Best Uses

Unmonitored alarm systems

2.2 Theoretical Background

The development of the alarm system started with creation of man. Man required
giving alert information and adopted a form of signaling exclamation and shouting. This
was later replaced by clapping of hands and beating of gongs by town criers to alert the
community in order to disseminate information in the early African society.
Nevertheless, none of these methods were reliable and efficient because they are crude.

Furthermore, in another literature the concept of alarm system is one that was
invented long before the silicon age. For thousands of years man has used animals, more
notably the dog, parrot, cat, geese, et cetera to guard and alert him of any one trying to
temper or steel his valuables. In the middle ages, large gongs were used to warn
population of impending doom or large bonfire lit to warn of imminent invasion
(Wayman et al., 2005).

It was not until 1852 that the first electric mechanical alarm system was invented.
Edwin Holmes was an American inventor from Boston Massachusetts; the alarm he
11

devised was simplistic but effective. That is, a solenoid stick a gong when a trip wire
was disturbed. Although with the advancement of science and technology, the crude
methods of generating alarm were replaced by electronic alarm system in the late
eighteenth century. This electronics alarm system operate without any human effort. It
gives an indication in the form of loud sound or noise depending on its design (Wayman
et al., 2005)

A simple and reliable touch sensitive security system by (Adamu Murtala


Zungeru, et al, 2012). The system uses sensor technology to revolutionize the standards
of living and it consist of three parts, that is, power supply. Control sensor unit and the
alarm unit (output). Elute promise, 2007 also design and construct a door alarm system.
In Cornell University, a course on ECE 4760 introduces the design and implementation
of security system by using a touch sensitive devices (2012).

Also, (M.S Ahmed, A.S Mohammed and G.A Agbo) of Department of electrical
and computer engineering, federal university of technology Minna also published a topic
“development of a simple sound activated burglar alarm system. (Telaumbanua et al.,
2018). Most burglar alarm systems run from a fixed 12V power supply. This is also the
standard operating supply voltage for usual subsystems such as any ultrasonic, PIR, heat,
pressure or magnetic sensors etc also the majority of the Strobe flashing lights and sirens
available also run from 12V. Bearing this knowledge in mind, my burglar alarm control
panel should run from a 12V supply, and when an alarm output has to be activated, a
supply of 12V should be supplied. A standard also exists for how input sensors operate.
They normally use a normally closed (N.C.) loop for sensors, so that an alarm condition
is signaled by a switch being opened within the sensor and cutting the circuit. This also
means that should a burglar cut the wires to a sensor, then the loop will be cut and an
alarm signal is generated. Most commercial burglar alarms have the capability to
monitor the input sensors separately, so that in the event of a burglary, it is known which
sensors were and were not triggered so that the point of entry and extent of break in can
be deduced (K et al., 2015).
12

2.3 Review of past researches

In Kenya most security solutions are provided by security firms. These systems
have been operation for some time which mostly is foreign developed. These translates
that they tend to be expensive and hard to maintain because suppliers keep on producing
new product and not supporting their older versions. However this project is geared to
development of office grown simple security system that meets the same needs as
commercially available system. The final product will be cheaper, easy to maintain and
foolproof (Home Security System Using Arduino UNO Microcontroller Way SMS,
2016).

Motion detection surveillance technology has gained a lot of interests over the
past few years .Based on the study and evaluation of current available different methods.
The proposed system is quite efficient and convenient for home uses and offices .The
system captures images only when the motions exceeded a pre-set value or threshold.
This system seem to be more prone to error as there is less 3% chances to skip any
detection (Tiwari et al., 2016)m There may be some false detection due to the
illumination effects which can be overcome for the better performance.

In the design and construction of advance security Guard with PIR sensor for
commercial residential use came up with a standard approach to automation home and
industrial equipment these days (Adriansyah, 2014). The designs of hardware circuit
allowed each user deployed this home security system wirelessly .Also, an SMS was sent
to the registered user mobile that uses the GSM modem. The embedded microcontroller
circuit switches ON and OFF the electrical appliances at houses and industries based on
SMS messages received through the GSM modem of the user. It was carried out that, the
proposed security system was more advanced than the one earlier used due to some
reasons.

In the development of anti-theft device, (Faisel et al., 2019) proposed to


determine the performance of anti-theft device using appropriate motion detection and to
observed the functionality of the device. The output of the study was more accurate in
13

terms of detection of moving objects with body temperature during day and night times.
The studies showed that, the device has a good performance and acceptable in terms of
functionality. Moreover, based on the results of evaluation, the anti –theft device using
motion detection and body temperature is acceptable in terms of accuracy, efficient and
reliability.

In creating a system that make the surveillance of home devices easily,


(Telaumbanua et al., 2018) suggested the development of a system which ameliorates the
traditional of fencing to avoid in filtration .It shows that, the image and video along
with the location of the intrusion are sent to the central control station through the dual-
radio board for the authorities to take actions efficiently In conclusion, As soon as the
routing and the communication between control station and user works, new
opportunities may arise to make the system viable for people with special requirements.

For home security system, (Syst & Vv, 2018) suggested that ,safety from theft,
leaking of raw gas and fire are the most important requirements of home security
system for people .He also established a fact that ,Global system for mobile
communications based security systems provides an enhanced security as whenever a
signal from sensor occurs, a text message must be sent to a desired number to take
necessary actions while a traditional home security systems gives signal in terms of
alarm. In conclusion, the type of system adopted was useful especially when the owner is
out of station and the home is locked.

(Lestari & Gata, 2011) Focused on the intelligent security system based on
image, video and home automation systems. The system is developed to automatically
react to every learned situation in a pre-specified way, protection against unauthorized
intrusion and supervision over ill persons. The developed design is based on well-known
and proven method along with its architecture and algorithms whose focus was put on
one of the aforementioned functionalities of the system. However, the threshold values
of these parameters determine the moment in which the alarm is triggered and system
response is activated .Experimental results has confirmed the effectiveness of the
approached used.
14

(Home Security System Using Arduino UNO Microcontroller Way SMS, 2016)
developed a real- time intrusion detection system using passive IR sensor, ATmega, SIM
900a etc. which guaranteed home security. Microcontroller continuously fetched signal
from infrared motion detector within the desired range as set by the user. An alert is sent
to program mobile device via GSM in case of untoward situations. The experimental
results showed that, by using this system the security services like police and fire brigade
of a nearby region also be informed about the intrusion instantly and they can steps
rapidly. So this system is safe and cost effective as well.(Jati & Gata Grace,
2011)Presented a design using Wi-Fi and GSM based home security system to reduce
the increasing rate of crime in most personal housing and office .The design is divided
into three main parts which comprises the software, the output part and micro secure
digital (SD) data storage card .It is based on the principle of infrared radiation generated
by a human body heat .Embedded microcontroller is used in the design to processed the
signal which later sent to user’s mobile phone via SMS. Experimental results showed
that, the design would help to increase the safety of the private premises because the user
can monitor premises from anywhere in real time.

There exists certain limitation as regard the security system which is the
commonest form of protection to lives and properties (Lestari & Gata, 2011) Some of
these limitations are real time monitoring and control of activities such as intruders in the
form of human beings, etc. The features include analysis and calculation which was
carried out through modelling, Simulated in proteus electronic stimulator environment.
Experimental results showed that, the design analysis and calculations were carried out
and finally, a positive result was achieved.
15

CHAPTER 3

METHODOLOGY

3.1 Introduction
/
The main goal of this project was to design construct and implement a motion
detection system that is capable of detecting motion and trigger an alarm upon detection.
In this methods chapter, I will discuss how I detailed the process of implementing this
mechanism. I started my research by confirming the need of potential users for such a
system and construct and implement a motion detection system.

The proposed system design is in two parts:


i. Hardware Design: This is made up of the design of the physical components
required to carry out the proposed project.
ii. Software Design: This is made of the programs that will control the
microcontroller at the center of the system.

3.2 Hardware Design

The hardware section, which is the physical part of this system is made up of the
following circuit units:
i. Regulated Power Supply
ii. Microcontroller Unit
iii. Switching Circuit
iv. PIR sensor unit
16

v. PCB unit
vi. Display Unit
vii. Remote control
viii. LCD panel
ix. buzzer

AT Mega 328P Description

ATmega328P is a very advance and feature rich microcontroller. It is one of a


famous microcontroller of Atmel because of its use in Arduino UNO board. It is a
microcontroller from the Atmel’s mega MVR microcontrollers family (Later in 2016 the
Atmel is obtained by Microchip Technology Inc), the microcontrollers manufactured in
mega MVR family are designed for handling larger program memories and each
microcontroller in this family contains different amount of ROM, RAM, I/O pins and
other features and also they are manufactured in different output pins which are from 8
pins to hundreds of pins (Home Security System Using Arduino UNO Microcontroller
Way SMS, 2016).

The internal circuitry of ATmega328P is designed with low current consumption


features. The chip contains 32 kilobytes of internal flash memory, 1 kilobyte of
EEPROM and 2 kilobytes of SRAM. The EEPROM and the flash memory are the
memories which saves information and that information still exist if the power is
disconnected or off but the SRAM is a memory which only saves the information until
the power is supplied and when the power is disconnected all the information saved in
SRAM will be erased (Home Security System Using Arduino UNO Microcontroller
Way SMS, 2016).
17

Figure 1: ATmega 328 with Arduino Uno Mapping

2.2.1.2 Applications of AT mega 328P

There are thousands of applications for Atmega328P also more to come in near
future depends on how creative one can think. Every day we see a new application built
using this chip by electronic students, engineers, hobbyists, tinkerers. Some of the
applications for the chip are as follow.

i. Industrial machinery controlling systems


ii. Solar powered machinery and applications
iii. IOT based applications
iv. Power supply and charger based applications
v. Weather systems
vi. Wireless communication applications
vii. Security based applications
viii. Medical & health related projects & systems
ix. Automobile related applications e.t.c.
18

Figure 2: Circuit Diagram of The System

LIQUID CRYSTAL DISPLAY (LCD)

The LCD is a 16x2 LCD based on HD44780 controller is used for displaying the
required parameter. The control lines EN, R/W and RS of the LCD module are
connected to pins A1, A2 and A3 of Port A of the microcontroller, respectively. The
commands and the data to be displayed are sent to the LCD module in the nibble mode
from Port D of the microcontroller. The higher four bits of the LCD (D4 through D7) are
connected to the lower nibble of Port D (DO through D3).
19

Figure 3: A Liquid Crystal Display Module

2.2.4 Power Supply

A power supply is an electronic circuit that converts an ac voltage to dc voltage. It is


basically consisting of the following elements: transformer, rectifier, filter and regulator
circuits. Power supply units (PSU) are used in computers, amateur radio transmitters and
receivers, and all other electronic equipment that use dc voltage as an input.
Uninterruptible power supply is a must for computers which holds volatile data from
time to time. This can be further illustrated in figure 2.1 below.

Figure 4: Power Supply Block Diagram.


20

2.2.5 Relays:

Relay is an electrically operated switch, it consists of a set of input terminals for a


single or multiple control signals, and a set of operating contact terminals. The switch
may have any number of contacts in multiple contact forms, such as make contacts,
break contacts, or combinations of two. Typically is of different types such as Electro
thermal Relay, Electromechanical Relay, Solid State Relay and Hybrid Relay. Figure 5
shows the normal closed and normal open switch of relay.

Figure 5: Passive Infrared sensor (PIR sensor Passive Infrared sensor)

(PIR sensor) is an electronic device that measures infrared (IR) light radiating
from objects in its field of view. PIR sensors are often used in the construction of PIR-
based motion detectors (see below). Apparent motion is detected when an infrared
source with one temperature, such as a human, passes in front of an infrared source with
another temperature, such as a wall. All objects emit what is known as black body
radiation. It is usually infrared radiation that is invisible to the human eye but can be
detected by electronic devices designed for such a purpose. The term passive in this
instance means that the PIR device does not emit an infrared beam but merely passively
accepts incoming infrared radiation.

In passive infrared motion detectors, a sensor containing an infrared-sensitive


phototransistor is placed in the area to be protected. Circuitry within the sensor detects
21

the infrared radiation emitted by the intruder's body and triggers the alarm. The problem
with using this type of detector is that it can be falsely triggered by warm air movement
or other disturbances that can alter the infrared radiation levels in an area. In order to
prevent this problem, newer systems use two infrared sensors which monitor different
zones within a protected area. Logic within system triggers the alarm only when the two
zones are activated in sequence, as would occur if a person walked through the protected
area.

Pyro electric Sensors the pyroelectric sensor is made of a crystalline material that
generates a surface electric charge when exposed to heat in the form of infrared
radiation. When the amount of radiation striking the crystal changes, the amount of
charge also changes and can then be measured with a sensitive FET device built into the
sensor. The sensor elements are sensitive to radiation over a wide range so a filter
window is added to the TO5 package to limit detectable radiation to the 8 to 14mm range
which is most sensitive to human body radiation.

Typically, the FET source terminal pin 2 connects through a pull down resistor of
about 100 K to ground and feeds into a two stage amplifier having signal conditioning
circuits. The amplifier is typically bandwidth limited to below 10Hz to reject high
frequency noise and is followed by a window comparator that responds to both the
positive and negative transitions of the sensor output signal. A well filtered power source
of from 3 to 15 volts should be connected to the FE

The PIR325 sensor has two sensing elements connected in a voltage bucking
configuration. This arrangement cancels signals caused by vibration, temperature
changes and sunlight. A body passing in front of the sensor will activate first one and
then the other element whereas other sources will affect both elements simultaneously
and be cancelled. The radiation source must pass across the sensor in a horizontal
direction when sensor pins 1 and 2 are on a horizontal plane so that the elements are
sequentially exposed to the IR source. A focusing device is usually used in front of the
sensor
22

Fresnel lens

A Fresnel lens (pronounced Fresnel) is a Plano Convex lens that has been
collapsed on itself to form a flat lens that retains its optical characteristics but is much
smaller in thickness and therefore has less absorption losses. Our FL65 Fresnel lens is
made of an infrared transmitting material that has an IR transmission range of 8 to 14um
which is most sensitive to human body radiation. It is designed to have its grooves facing
the IR sensing element so that a smooth surface is presented to the subject side of the
lens which is usually the outside of an enclosure that houses the sensor.

The lens element is round with a diameter of 1 inch and has a flange that is 1.5
inches square. This flange is used for mounting the lens in a suitable frame or enclosure.
Mounting can best and most easily be done with strips of Scotch tape. Silicone rubber
can also be used if it overlaps the edges to form a captive mount. There is no known
adhesive that will bond to the lens material. The FL65 has a focal length of 0.65 inches
from the lens to the sensing element. It has been determined by experiment to have a
field of view of approximately 10 degrees when used with a PIR325 Pyroelectric sensor.
This relatively inexpensive and easy to use Pyroelectric Sensor and Fresnel lens can be
used in a variety of science projects, robots and other useful devices.

2.2.6 Electronic Components

Electronic components have a number of electrical terminals these terminals connect to


other electrical components, often over wire, to create an electronic circuit with a
particular function. These electronic components can briefly explain as follows.
23

2.2.6.1 Diodes

A diode is defined as a two-terminal electronic component that only conducts current in


one direction (so long as it is operated within a specified voltage level). An
ideal diode will have zero resistance in one direction, and infinite resistance in the
reverse direction. The figure below shows the symbol of diode.

Figure 6: Diode
2.2.6.2 Resistor

A resistor is a passive two-terminal electrical component that implements electrical


resistance as a circuit element. In electronic circuits, resistors are used to reduce current
flow, adjust signal levels, to divide voltages and bias active elements, it is also an
electrical device that limits or regulates the flow of electric current in electronic circuit.
Figure below describe the symbol of resistor.

Figure 7: Resistor

2.2.6.3 Transistor

A transistor is a semiconductor device used to amplify or switch electronic signals and


electrical power. It is composed of semiconductor material usually with at least three
24

terminals for connection to an external circuit. The figure below shows the symbol of
NPN and PNP transistor.

Figure 8: Transistor

2.2.6.4 Capacitor
Is a passive two terminal electric component used to store electrical energy temporarily
in an electric field. The figure below shows the symbols of fixed and polarized capacitor.

Figure 9: Capacitor

3.2.1 Regulated Power Supply Unit.

The Regulated Power Supply Unit is made up of a step-down transformer,


rectifiers (diodes), a ripple filter and a voltage regulator. Before designing a Power
Supply Unit, a current requirement evaluation is needed to determine the specification of
the Power Supply Unit. This is done to determine the current requirement of the load.
25

The output voltage needs to be specified too. The power supply unit converts the AC
mains supply voltage of 220V or 230V to a DC level of 12V as required by this work to
energize the relays and 5V to power the Microcontroller and the PIR Sensor Module.
Electronic circuits and devices require a direct current (DC) source for their operation.
This section is further divided into four stages. These sub-divisions include:
i. Step-down transformer
ii. Bridge rectifier
iii. Ripple Filter
iv. Voltage regulator

Figure 10: Proposed Circuit Diagram of Regulated Power Supply

3.2.2 Microcontroller Unit

Microcontrollers (also known as embedded controllers) are microcomputers. The


microcontroller has the ability of turning the pump ON and OFF based on the signal sent
from the Ultrasonic Sensor module connected to the microcontroller(Putera & Siahaan,
2016). An ATmega328 Microcontroller will be employed in this project. The diagram of
Microcontroller is shown in figure 3.6, while table 3.1 shows the technical specifications
of the ATmega328 Microcontroller (Moghavvemi & Seng, 2004).
26

Figure 11: An ATmega328 Microcontroller

3.2.3 Switching Unit

The proposed switching system to be used for this project consists of biasing
resistors, diodes, transistors and relays. 12V relays are employed in the design. Two 12V
relays are used in the system, one for each terminal input of the pump. Figure 3.7 shows
the diagram of a 12V relay.

Figure 12: 12V relay

A relay driver circuit is used to drive the relay, because relays require relatively
high DC currents from the ATmeg328a pins. The circuit consists of a BC547 transistor
27

with a base resistor of resistance R. A diode, D4 is also connected across the relay, as
shown in the figure 3.8 below.

Figure 13: Relay driver circuit

3.2.4 BUZZER

The buzzer serve to alert when the overload detected.

The magnetic buzzer used in this project has the following features:

i. Low Frequency
ii. Low Voltage
iii. Small and Slim Size
28

Figure 14: Buzzer Symbol

3.3 Software Design

The software running in the system are set codes developed in the Arduino

Integrated Development Environment embedded to the micro-controller to control the

components and dev We have the alarm control panel: this consists mainly of a small

keypad, plus an additional ‘buzzer’ to indicate that the alarm has sounded (Figure 3.8).

Alarm system is designed in such a way that the user – having set the alarm by entering a

four pass code via the keypad

Overall, the system is designed to operate as follows:

i. When initially activated, the system is in ‘Disarmed’ state.

ii. In Disarmed state, the sensors are ignored. The alarm does not sound.

iii. The System remains in this state until the user enters a valid password via the

keypad. When a valid password is entered, the system enters the ‘Arming’ state.

iv. In arming state, the system waits for 60 seconds, to allow the user to leave the area

before the monitoring process begins. After 60 seconds, the system enters the

‘Armed’ state.
29

v. In Armed state, the status of the various system sensors is monitored. If the sensor

is tripped, the system enters ‘Disarming’ state. The keypad activity is also

monitored: if a correct password is typed in, the system enters ‘Disarmed’ state.

vi. In Disarming state, we assume that the door has been opened by someone who

may be an authorized system user. The system remains in this state for up to 60

seconds, after which, by default, it enters ‘Intruder’ state. If, during the 60- second

period, the user enters the correct password, the system enters ‘Disarmed’ state.

vii. In Intruder state, an alarm will sound. The alarm will keep sounding (indefinitely),

until the correct password is entered.

3.3.1 Flowchart

The program was written using M-IDE 51 compiler following the design operation in the

previous section.
30

Figure 15: Simplified Program Flowchart For The Software Architecture.


31

CHAPTER 4

RESULTS AND DISCUSSION

4.1 Introduction

To achieve reliable results and optimum performance from any electronic

construction project, specific tests (static and dynamic) are carried out to determine if the

device is operating under the required standard conditions. Also the precautions taken

and safety considerations made in achieving both the hardware and software part of our

work are considered.

4.2 motion detector circuit

As mentioned earlier, this consists of an infrared transmitter and receiver

4.2.1 Infrared transmitter circuit

The transmitter was constructed using the CD4047 oscillator. The output of the oscillator

was tested using a multimeter in alternating current (ac) mode. The output gave 4.45

volts.
32

4.2.2 Infrared receiver circuit

The three pin IR receiver used produced 7.3 volts on its output when measured with a

multimeter. If it detects any IR beam, the output goes to 0 volts.

4.2.3 Results for the motion detector system

Detection range for the motion sensor detector system varies with battery

strength and the reflecting object surface. Its range is about 1.5 meters. The system was

demonstrated thus: the receiver output was connected to a light emitting diode (LED).

When an object enters the zone, the LED starts blinking.

4.3 Microcontroller circuit

When the entire circuit is powered, the voltage drop across each terminal of the

crystal oscillator will be between 2.3V to 2.5V to show that the crystal oscillator is good.

For the Microcontroller, regardless of any assembled program, its entire port will be high

all through. It shows that the microcontroller is in good order. A short blinking LED

program was burnt into the EEPROM of the microcontroller to test if the microcontroller

responded properly to the program.

4.4 Static tests

Here the various tests carried out on the components without power supply input shall be

discussed.
33

Capacitors

We tested the capacitors with the digital voltmeter in the resistance mode. We observed

their charging and discharging times.

Diodes

The 1N4007 diodes gave a low resistance when forward biased by the Digital voltmeter,

and a high resistance when reversed biased by the Digital voltmeter.

Relays

We tested the relay contacts when they were normally closed and they were found to be

continuous.

Also, the input terminals (across the relay coil) gave a good resistance value showing

that the relay coils were good.

Resistors

The potentiometers gave resistance values varying from 0 Ω to 5.0k Ω in a fairly linear

fashion. We also confirmed the 100k Ω resistance value of the resistor used in the MCU.

4.5 Mounting and component connections

All connections made between components were either made via connecting wires or

directly with solder. The following steps were employed to achieve good connection of

components used in the project.

i. Soldering Iron tip was well scraped before commencing soldering.

ii. Good care was taken to avoid overheating of components.


34

iii. Solder sucker/extractor was used to remove improper and unintended joints.

iv. A digital multimeter was used for continuity, resistance, isolation test, voltage

and current measurements.

Circuit Board preparation

We used a matrix board for mounting the most of our circuit component. A matrix

board was chosen for the following reasons.

i. All connections are self-isolating.

ii. Difficulty in making unintended connections (i.e. bridging lines)

iii. Connection lines can be made with solder like that of a PCB facilitating the

tracing of errors during soldering.


35

CHAPTER 5

CONCLUSION & RECOMMENDATION

5.1 Conclusion

From the circuit schematic, the write up and the tests carried out, it can be

concluded that the alarm system is functional and can be installed were ever it is required

be it a commercial or residential asset to act as the first line of defense before the arrival

of the police in the event that a burglary incident occurs.

5.2 Recommendation

A burglar alarm can initiate a considerable response by police or private security

personnel, who may leave other important duties to race to the scene of the alarm.

Therefore, the following recommendations are stated so as to avoid the problems that are

most likely to arise due to the issue of false alarms and on how to make the system more

effective:
36

i. The active infrared detectors can be programmed to ignore the first movement

detected, as in when the intruder moves from one detection zone to another, and to

sound the alarm only when the movement passes through two or more detection

zones within a specified period of time.

ii. Another means of preventing false alarms is the dual-technology motion detector.

This is the more common type of detector used in more sophisticated burglar alarm

systems. A dual-technology detector combines an active infrared device and a

microwave device in one small unit. The active infrared device sees many detection

zones and measures the change in background temperature as a target moves across

them. At the same time, the detector projects microwaves and measures the Doppler

shift when a target moves through the protected space.

iii. If the alarm is to be used in commercial assets or high security areas the following

authorization methods could be added to ensure the effectiveness of the system e.g.

addition of multiple codes, or a fingerprint, badge, hand-geometry, retinal scan,

encrypted response generator, and other means that are deemed secure for the asset

in question.

iv. There should be need for Bluetooth connectivity so that user can be able to monitor

the system using his/her mobile phone.

v. Cameras also needs to be included into the system so as to take the picture of the

object detected.
37

REFERENCE

Adriansyah, A. (2014). Design of Small Smart Home System Based on Arduino. 123–
127.
Badamasi, Y. A. (2014). The Working Principle Of An Arduino .
Bajpai, M., & Agrawal, A. P. (2013). Integration of 2 D Secure Barcode in Identity
Cards : A New Approach. 2(4), 1225–1233.
Faisel, Z. G., Hussein, M. S., & Abood, A. M. (2019). Design and realization of motion
detector system for house security. 17(6), 3211–3217.
https://doi.org/10.12928/TELKOMNIKA.v17i6.13142
Home Security System using Arduino UNO Microcontroller Way SMS. (2016). 05(34),
7155–7157.
Jati, L., & Gata Grace. (2011). Webcam Monitoring Ruangan Menggunakan Sensor
Gerak Pir (Passive Infra Red). Bit, 8(2), 1693–9166.
K, S. K., Priscilla, P., Jose, G. K., & Balagopal, G. (2015). Human Detection Robot
using PIR Sensors. 4(3), 492–496.
Lestari, J., & Gata, G. (2011). WEBCAM MONITORING RUANGAN
MENGGUNAKAN SENSOR GERAK PIR ( PASSIVE INFRA RED ). 8(2), 1–11.
Moghavvemi, M., & Seng, L. C. (2004). PYROELECTRIC INFRARED SENSOR FOR
INTRUDER DETECTION. 14–17. https://doi.org/10.1109/TENCON.2004.1415018
Philosophy, L. (2010). DigitalCommons @ University of Nebraska - Lincoln Impact of
the Internet on Final Year Students ’ Research : A Case Study of Covenant University ,
Ota , Nigeria Impact of the Internet on Final Year Students ’ Research : A Case Study.
July.
Putera, A., & Siahaan, U. (2016). Rail Fence Cryptography in Securing Information.
7(7), 535–538.
Studies, A. T. (2018). No Title. 6(1), 26–38.
Syst, J. E. E., & Vv, S. (2018). Electrical & Electronic Systems. 7(4), 4–7.
https://doi.org/10.4172/2332-0796.1000289
Tanner, J., & Mead, C. (n.d.). An Integrated Analog Optical Motion Sensor. 59–76.
Tarus, Z. (2017). PIR Sensor-based Security System.
Telaumbanua, M., Anggraini, R., Sasongko, F. I., Fitri, A., Sari, R. F. M., & Waluyo, S.
(2018). Control System Design for Rat Pest Repellent in the Rice Field Using a Modified
ATMega328 Microcontroller Modified with Ultrasonic Sound Wave. 7(8), 22–28.
Tiwari, A. K., Raj, P., Kumar, J., & Engineering, I. (2016). Motion detection using pir
38

sensor 1. 1(5), 103–106.


Wayman, J., Jain, A., Maltoni, D., & Maio, D. (2005). An Introduction to Biometric
Authentication Systems. Biometric Systems, 1–20. https://doi.org/10.1007/1-84628-064-
8_1
Wren, C., Ivanov, Y., Leigh, D., & Westhues, J. (2007). The MERL Motion Detector
Dataset : 2007 Workshop on Massive Datasets.
Ying, L. I. N. (n.d.). The Design and Implementation of Host-based Intrusion Detection
System. https://doi.org/10.1109/IITSI.2010.127

You might also like