+ All Categories
Home > Documents > Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring...

Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring...

Date post: 08-Jul-2016
Category:
Upload: michiemar
View: 217 times
Download: 1 times
Share this document with a friend
Description:
MOTION SENSORS
70
i IMPLEMENTATION OF OBJECT TRACKING AND MOTION SENSORS FOR HOME AND OFFICE- BASED WIFI MONITORING SYSTEM by Bobby Brian M. Cipriano Ramon S. Lapitan Charles Chester M.Macapagal Arvy Leandro N. Petil A Design Report Submitted to the School of Electrical, Electronics , and Computer Engineering in Partial Fulfillment of the Requirements for the Degree Bachelor of Science in Computer Engineering Mapua Institute of Technology November 2011
Transcript
Page 1: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

i

IMPLEMENTATION OF OBJECT TRACKING AND

MOTION SENSORS FOR HOME AND OFFICE-

BASED WIFI MONITORING SYSTEM

by

Bobby Brian M. Cipriano

Ramon S. Lapitan

Charles Chester M.Macapagal

Arvy Leandro N. Petil

A Design Report Submitted to the School of Electrical, Electronics ,

and Computer Engineering in Partial Fulfillment of the Requirements

for the Degree

Bachelor of Science in Computer Engineering

Mapua Institute of Technology November 2011

Page 2: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

ii

Approval Sheet

Mapua Institute of Technology School of EECE

This is to certify that I have supervised the preparation of and read the design report prepared by Ramon S. Lapitan, Arvy Leandro N. Petil, Bobby Brian M. Cipriano entitled IMPLEMENTATION OF OBJECT TRACKING AND MOTION SENSORS FOR HOME AND OFFICE BASED WIFI SECURITY SYSTEM and that the said report has been submitted for final examination by the Oral Examination Committee.

_____________________

Analyn N. Yumang Design Adviser

As members of the Oral Examination Committee, we certify that we have examined this design report, presented before the committee on November, 2011, and hereby recommended that it be accepted in fulfillment of the design requirements for the degree in Bachelor of Science in Computer Engineering.

______________________ ______________________

Joshua Cuesta Janette Fautso Panel Member Panel Member

______________________ Carlos Hortinela IV

Chairman This design report is hereby approved and accepted by the School of Electrical, Electronics, and Computer Engineering in partial fulfilment of the requirements for the degree in Bachelor of Science in Computer Engineering.

______________________ Dr. Felicito S. Caluyo

Dean, School of EECE

Page 3: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

iii

Acknowledgement

The researchers would like thank their design adviser, Analyn M. Yumang,

for her gentle encouragements, astute criticisms and thoughtful pieces of

advices. Also, they are grateful for their subject professor, Ayra Panganiban, who

has been an integral part during the early stages of the design. Her steadfast

support helped push the researchers to come up with a design of good value to

society.

Page 4: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

iv

Roles and Responsibilities of Group Members

Bobby Brian M. Cipriano

Chapter 1

Programmer

Ramon S. Lapitan

Chapter 2

Testing and soldering

Charles Chester M. Macapagal

Chapter 3

Chapter 5

Arvy Leandro N. Petil

Chapter 4

PCB Design

Page 5: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

v

TABLE OF CONTENTS

TITLE PAGE i

APPROVAL SHEET ii

ACKNOWLEDGEMENT iii

ROLES AND RESPONSIBILITIES OF GROUP MEMBERS iv

TABLE OF CONTENTS v

LIST OF TABLES vii

LIST OF FIGURES viii

ABSTRACT x

Chapter 1: DESIGN BACKGROUND AND INTRODUCTION 1

Background 3 Customer 3 Need 4 Solution 4 Benefits 6 Definition of Terms 7

Chapter 2: REVIEW OF RELATED LITERATURES AND STUDIES 8

Cost Effective IP Camera for Video Surveillance 8 Design and Implementation of a Real Time Video 9 Surveillance System with Wireless Sensor Networks Chapter 3: DESIGN PROCEDURES 14

Hardware Development 14 Software Development 21 Prototype Development 24 Chapter 4: TESTING, PRESENTATION, AND INTERPRETATION OF DATA 31

Image Capture Test 31

Page 6: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

vi

Functionality Test 34 Impact Analysis 44 Chapter 5: CONCLUSION AND RECOMMENDATION 45

BIBILIOGRAPHY 14

APPENDIX 75

Appendix A – Operations Manual 47 Appendix B – Pictures of Prototype 50 Appendix C – Source Code 57 Appendix D – Datasheets 63

Page 7: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

vii

List of Tables

Table 3.1: Component Price Listing 30

Table 4.1: Testing of left push button 38

Table 4.2 Testing of right push button 38

Table 4.3 Testing of left through beam sensor 39

Table 4.4 Testing of right through beam sensor 39

Table 4.5 Testing of center through beam sensor 40

Page 8: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

viii

List of Figures

Figure 3.1 : Conceptual Framework 14

Figure 3.2: Block Diagram 15

Figure 3.3: PCB Layout 16

Figure 3.4: Schematic Diagram 20

Figure 3.5: Flowchart 1 21

Figure 3.6: Flowchart 2 22

Figure 3.7: Flowchart 3 22

Figure 3.8: Arduino 24

Figure 3.9: Servo Motor 25

Figure 3.10: Through-beam Sensor 25

Figure 3.11: Switch 26

Figure 3.12: Pushbutton 26

Figure 3.13: Resistors 27

Figure 3.14: IP Camera 27

Figure 3.15: Adapter 28

Figure 3.16: Wires 29

Figure 4.1: Testing the Set-up 32

Figure 4.2: Live Connection 32

Page 9: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

ix

Figure 4.3: Sample Test Object 33

Figure 4.4: Testing the pushbuttons and switch 41

Figure 4.5: Testing the servo motor 42

Figure 4.6: Testing the through beam in other modes 42

Page 10: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

x

Abstract

There has been a long standing issue on the cost that comes with security. The present design aimed to break that chain by providing comprehensive security systems. Moreover, the designers changed the medium of data transmission making the system portable and allowing for remote viewing anywhere with an internet connection. The design consists of an IP camera attached to an Arduino microcontroller. The microcontroller then manages data from the sensors and switches to properly move the camera based on the setting that is active. The design was successful in proving that the use of sensors is a suitable alternative to just installing multiple cameras. This means that one can reduce the total cost incurred by installing security systems. The design has accomplished all desired objectives, and further studies should be conducted for the improvement of the design.

Keywords: monitoring, surveillance, security, web-based application, IP camera

Page 11: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

1

Chapter 1

DESIGN BACKGROUND AND INTRODUCTION

Background

Standard CCTV cameras employ wired systems and have the disadvantage

of being fixed to a particular area. Their location cannot simply be changed

without incurring additional costs to the company. Installations as well as the

work of cabling the said cameras require professional help. This gap is addressed

by the present design which implements an IP camera due to its advantages

over wired cameras.

IP cameras allow remote access since the video taken is converted into

digital video, thus it can be viewed by any digitally formatted device such as

smartphones, internet browsers or televisions with Internet connection

capability. Moreover, since the video taken is converted to digital format, the

data can be stored into a variety of storage devices such as hard disks and CDs

which usually have bigger storage space than conventional tapes. Also, digital

files are easier to manage, duplicate and allow sending of data over the Internet.

The IP camera used in the design is also able to operate at night. The

camera reacts to movements in the video by taking a screenshot of the video

and sends it to the user’s email account. It is able to send pictures via email

because the camera is connected to a router with Internet connection.

Page 12: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

2

Just like other surveillance cameras, the camera can scan the area

(oscillating mode), pivoting from left to right and vice versa. It can also be

manually operated by a user using two pushbuttons (manual mode) to direct the

camera to the left or right. Additionally, we used through-beam sensors wired to

the circuit board to trigger the camera to react to the area where the sensor was

triggered (tracking mode).

Through-beam sensors are a type of sensor that uses two main

components: one that transmits a beam and one that receives the beam. When

an object passes by, the beam is blocked and therefore the receiving component

will trigger in the absence of the beam. The trigger event results in a voltage

being sent to the microcontroller. The microcontroller used is the Arduino

microcontroller. The microcontroller then sends a signal to the servo motor to

turn to the area where the sensor was placed. This microcontroller is responsible

for the processing of the input from the sensors or pushbuttons and making the

servo motor rotate the camera.

These three modes- oscillating, manual and tracking mode- can be

accessed using a switch.

The camera can rotate 180 degrees but can be programmed to rotate up

to 360 degrees depending on the customer’s specification.

Page 13: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

3

Customer

The Center for Student Advising is Mapua Institute of Technology’s free

tutoring service. The tutors commonly called peer advisers are students who

demonstrate academic excellence and want to share their knowledge to other

students who are more academically challenged. CSA-Intramuros has five offices,

the main office at W501, and four satellite offices at SW306b, N103b, NW201b,

and S101b. The coordinator for CSA is Ms. Mary Anne M. Balmes and she has a

staff member to help her in both the Intramuros and Makati campuses. CSA also

has an office for Makati, but will not be the focus for this study. CSA also

employs student assistants called Junior Staff Advisers to help manage all the

centers by keeping the centers neat and organized, allocating and distributing

advisees and advisers properly and making sure that centers are always available

to accommodate advisees. The great distance between the centers are on

purpose to make them available around the campus, however this also makes

communication between them a challenge. Moreover, the centers are quite small

and can sometimes be overwhelmed by the sheer number of advisees seeking

tutoring sessions.

Need

In the confusion caused by students entering and leaving the center,

occurrences of theft can go unnoticed since the field of view is often limited and

the space cramped. Another problem that arises is that since Ms. Balmes

Page 14: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

4

manages both Intramuros and Makati campuses, she is unable to monitor both

at the same time, nor is she able to monitor more than one center at any given

moment. There is a need for CSA to be able to monitor all centers remotely

without having to be physically present. Furthermore, remote viewing will also

mean that the person can monitor a center without further adding to the already

occupied space.

Solution

Objectives -The goal of the design is to provide a low cost monitoring

system that makes use of the school’s internet for the various satellite offices of

the CSA. With low cost, it refers to installation, maintenance and cost of

materials needed to build the system. This means that in all three fields, it must

be comparatively cheaper than current products available in the market.

Moreover, in terms of replacing broken parts, since the design is easy to

segment and troubleshoot, one does not need to replace the entire product but

only the defective device. This allows for better monitoring of centers to prevent

stealing and overcrowding at centers. Moreover it allows for satellite offices to be

monitored ensuring that they are always neat and organized.

Constraints - The main limitation of the design is that it requires a

constant internet connection to operate. This means that in the event of a power

failure or the loss of a stable connection, one will not be able to use the design.

Secondly, the design will not be tested in the Makati campus. The SMTP email

Page 15: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

5

assigned to the camera is that of Google’s, the group will limit the email to only

one Gmail account. The placement of the camera is also a limiting factor. The

camera can only turn horizontally and not vertically, therefore if the camera is

placed too low, one will not capture important information about the event. For

the experiment, the camera will be placed five feet off the ground so that the

face and overall body structure of the person will be recorded. Also, the

environment used is free of weather disturbances such as smog or fog, since it is

a closed space. Moreover, the maximum distance for identifying a person or

object is 4-5 meters since the object will be too far to get any unique identifiers

from if it goes beyond that distance.

Impact - The safety and security of any establishment is always a

primary concern. Through the design, the designers provide a method of

monitoring locations that is accessible anywhere with a secure internet

connection. This translates into allowing people to monitor their establishments

without the hassle of being there. For the CSA, Ms. Mary Anne Balmes has other

responsibilities aside from just monitoring the center. Now, she has a means to

run other errands without losing the ability to monitor all the centers. Even

when she is not monitoring the centers, the proximity sensors automatically

report events when a sensor is triggered. Emails of the triggered event are sent

to an email so that the she may view the event.

Differentiation - The first big change of the design is that it is low cost,

most motorized CCTVs range from 3,000-5,000Php. Secondly, the design is also

Page 16: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

6

automated, making it easy for a user to just leave it on so that one can continue

doing responsibilities without compromising security. Lastly, the use of internet

as a means of communication makes it easily accessible as long as there is a

connection. This is a change from the conventional taped and recorded style

where only one station can be used to view the feed.

Benefits

CSA will be benefited by being given the ability to increase security and

efficiency without having to invest in the large cost of conventional CCTVs.

Moreover, the mobility provided to Ms. Balmes will allow her to delegate more

time to more important tasks than just monitoring centers.

Page 17: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

7

Definition of Terms

Arduino – An Arduino is a single-board microcontroller and includes a software

suite for programming it.

CCTV – A closed circuit television is a television system in which video signals

are transmitted from one or more cameras to a set of monitors.

Home security system – A system that secures a home from various threats

like intrusion.

IP Camera – An Internet protocol camera, or IP camera, is a type of digital

video camera commonly employed for surveillance, and which unlike analog

closed circuit television (CCTV) cameras, can send and receive data via a

computer network and the Internet.

Proximity Sensor– A sensor able to detect the presence of nearby objects

without any physical contact.

Sensor– A device that detects a physical property and records, indicates or

otherwise responds to it.

Servo motor – A motor used for motion control.

Wifi– Wireless Fidelity is a Wireless local area network that uses high frequency

radio signals to transmit and receive date over distances.

Page 18: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

8

Chapter 2

REVIEW OF RELATED LITERATURES AND STUDIES

Cost Effective IP Camera for Video Surveillance

IP cameras are key devices for a video surveillance system. This paper

introduces a cost effective, power efficient and low profile IP Camera. The

camera consists of a video preprocessing unit, an H.264 encoder, and an

embedded streaming server. The video preprocessing unit is used for video data

acquisition and format conversion; the H.264 encoder compresses the

preprocessed data with H.264 baseline encoding tools; and the streaming server

produces a continuous flow of data for the Internet video communication and

surveillance applications. Both the encoder and the streaming server are

implemented with the cost effective and power efficient Blackfin DSP and ARM9

processors. Key approaches for efficient usage of the DSP resources and main

optimization methods for the encoding speed are presented in this paper.

Performance tests and practical uses of the IP camera indicate that it is easy to

use and able to deliver CIF or VGA size of real-time video clips directly to the

Internet with high PSNR quality and low bitrates. Application of these IP cameras

to the video surveillance systems may greatly lower the requirements for the

network bandwidth, significantly improve the video quality, and efficiently

enhance the system reliability accordingly (Yang, Tham, Wu, & Goh, 2009).

Page 19: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

9

According to the paper of Yang, Tham, Wu and Goh, the use of IP

cameras over conventional CCTV or Bluetooth proved to not only be cost

effective but also more effective because the IP camera allows remote access.

This means that the data sent to the client can also be accessed by a remote

terminal as long as it has the same program and has knowledge of the username

and password.

Design and Implementation of a Real Time Video Surveillance System

with Wireless Sensor Networks

“One important goal of surveillance systems is to collect information about the

behavior and position of interested targets in the sensing environment. These

systems can be applied to many applications, such as fire emergency,

surveillance system, and smart home. Recently, surveillance systems combining

wireless sensor networks with video cameras have become more and more

popular. In traditional video surveillance systems, the system performance and

cost is proportional to the number of deployed video camera. In this paper, the

researchers propose a real time video surveillance system consisting of many low

cost sensors and a few wireless video cameras. The system allows a group of

cooperating sensor devices to detect and track mobile objects and to report their

positions to the sink node in the wireless sensor network. Then, the sink node

uses the IP cameras deployed in the sensing area to record these events and

display the present situations. The designers also propose a camera control

scheme to initialize the coverage distribution of cameras and support the inter-

Page 20: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

10

task handoff operations between cameras. They have implemented the proposed

system with 16 sensor nodes and two IP cameras, and evaluated the system

performance. The result shows that the surveillance system is adaptable to

variant environments and provides real time information of the monitored

environment (Chen, Chen, Lee, & Chi-Fu Huang, 2008).

Chen, Chen, Lee and Huang proved that when coupling cameras with

other sensors in a network, one can achieve the same amount of coverage and

security for an area using less cameras making the design of the system cheaper

than using just cameras.

What the designers propose to further improve is the automation of the

system given. This means that the camera will automatically process events that

are triggered by the sensors instead of just informing the user. The deisgners

will do this by allowing the program to independently access the motor so it can

move at will and move back to a default setting after the triggered event has

passed. This allows cameras to monitor lots of areas even without the presence

of a user. This is important in large companies or with areas with many sections

since a person is no longer required to monitor all of them continuously.

Moreover, the researchers improve the alert system by sending a message to the

user and a snapshot of the area that was triggered to give details on the event.

Page 21: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

11

The following is the reply of Globe business solutions upon request of an

IP camera system.

What is Globe Broadband Web Eye? Remote business web-based video solution that allows you to view your business in the Philippines from anywhere, at anytime, through the web browser via an Internet connection, preferably a broadband connection.

What are the features of Web Eye? What does it do? Globe Broadband Web Eye will allow your company to do the following: - Captures images and converts it to a digital format - Record a video feed - Video storage - Support motion detection - Provides security from unauthorized viewers

How Does a globe Broadband Web Eye work? a. Images at the location are captured and digitized by the IP (Internet Protocol) Camera. b. Images are sent via the Globelines Broadband dedicated access to the Internet. c. Images are viewed from any web browser

Can Web Eye record a video/ images and for how long? Web Eye comes with a free Digital Video recorder software that can store up to around 1 month's worth of video.

Do I need to subscribe to Globe Broadband? Yes, Web Eye is a bundled service/package with Globe Broadband preferably the business packages: Trader, Tycoon or Taipan.

Page 22: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

12

What if I am already an existing Globe Broadband subscriber? You only have to subscribe to the Web Eye service as a VAS to your broadband service.

What speed is required for Web Eye to work? Ideally it should run on at least a 64kbps speed which is the committed information rate (CIR)* of Trader, 128kbps CIR for Tycoon, 256 for Taipan. *CIR - the speed we guarantee as a minimum level of service at any time. (You may measure your Globe Broadband speed. Just log on to http://utilities.globequest.com.ph and click the bandwith meter).

What if I don't have a Globe broadband service in my area? If you have other store branches or establishments where Globe Broadband facilities are available in those areas, then you can still avail of the service. The branch or establishment where we don't have a Globe Broadband facility can be serviced by other Telco provider.

How many sites/cameras can one monitor view? A PC monitor can hold or support up to 16 sites or cameras. But it is ideal to up to 4 cameras per PC monitor.

How much is the Web Eye service? What are the available Mode/s of Payment? Please refer to the payment modes table above.

What are the other charges in subscribing to a Web Eye aside from the MSF or broadband and the camera? a. Installation Fee (to be charged by Mozcom depending on the installation/ cabling works of the establishment of the client) b. Static IP (1,000 per month per camera upon purchase of a second camera per broadband connection) * A broadband connection has free 3 Static IPs which is dedicated to the modem of the broadband and the camera.

Page 23: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

13

How do I pay? How do I get billed for the service? Monthly service fee (MSF) of Broadband and payment for the camera shall be billed by Innove to the subscriber.

How soon can I get the service installed? Installation of broadband shall be within 3 days from the time the application is approved. The installation of the camera shall come within 24 or 48 hours after the installation of broadband.

Is there an installation fee? Installation of broadband is waived while there is an installation fee for the camera. Please note that these cost are basic costs regardless if the type of camera is wireless or wired. The cost shall depend on the depth of the cabling works or complexity of the installation. The fee shall be paid separately to Mozcom (our camera supplier).

Is there a warranty for the camera? Yes - 1 year upon installation of the camera if the mode of payment is outright purchase, lease-to-own (whether 12 or 24 months). However, if the mode of subscription of the camera is LEASE only, then the warranty is effective as long as the lease term is not terminated.

Page 24: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

14

CHAPTER 3

DESIGN PROCEDURES

HARDWARE DEVELOPMENT

BLOCK DIAGRAM

Figure 3.1 Conceptual Framework

The system will have three modes: active tracking, scanning and manual.

When in active tracking, the system will start in a default view, when either of

the sensors is activated, the camera moves in the direction of the event. While

in transit, the camera will take a series of snapshots that will automatically be

emailed to the assigned account. The camera will stay in the said position until

either another sensor is triggered or the user manually issues a move command

to the camera. In scanning mode, the camera ignores the sensors and moves

from end to end in a constant speed allowing full view of the room. The last

Active Tracking

input: proximity sensors

process: move towards sensor

output: send event and snapshot

Scanning

Input: none

process: swing from left to right

output: continuous oscillating camera with video and snapshot

Manual

input: wait for user move command

process: move and take snapshot

output: snapshot and video

Page 25: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

15

mode will allow the user to manually control the camera and may choose to

address or ignore any events triggered by the sensors.

Here the designers display the three modes used by the program. For all

three modes, the basic output is the same. This is because one of the objectives

of the design is to allow versatility and added functionality. This means that the

designers allow the user to select from many options, but still have the same

output to allow them to monitor the said location.

Figure 3.2 Block diagram

input sensor Arduino

servo camera snapshot

email

Page 26: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

16

SCHEMATIC DIAGRAM

Figure 3.3 PCB layout

Page 27: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

17

The schematic is the PCB that the designers attached to the Arduino

board. The following are the connections used to connect the Arduino to the

external components: through beam sensors, power supply, servo motor,

resistors, switches and buttons.

As shown in the diagram, pins 2 and 3 of the Arduino board make use of

the oscillating and manual mode. Both of these pins are connected to only one

three-way switch. Thus, if the manual mode is enabled, the other one will not

take effect. In addition, if the switch is centered or both of the pins are

connected to the ground, the active tracking will take place.

For the manual mode, the push buttons are connected to pins 4 and 5.

These buttons represent the left and right movement of the camera. Both of

these push buttons are connected to the Vcc of the Arduino board when pressed.

In either way, it is connected to the ground using pull-up resistors. As for the

oscillating mode, no controller was set since the movement will just basically

trace from left to right and vice versa.

During active tracking (both pins 2 and 3 are low), the through beam

sensors will take effect. Each of these pins represents the left, right and center

position of the camera. Thus, triggering one side of the sensor will cause a

movement depending upon the direction.

The servo motor is connected to the pin 9 of the Arduino board. This pin

serves as a digital input for the servo motor, in order for it to identify its direction

Page 28: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

18

of movement. The servo motor has a different power supply, connected to the

3.3V of the Arduino board in order to minimize the distortion or sharing of loads

from other components; thus, limiting the errors produced through its

movements. All other components are connected to the Vcc and ground of the

Arduino. The servo motor serves as a mount for the IP camera.

Page 29: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

20

5V

5V Vin P0 5V

GND P1; 5V

P2

P3

P4 PB1

P5

P6 PB2

P7

P8

P9

GRD Vin In

SERVO

Figure 3.4 Schematic Diagram

5V

5V

Page 30: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

21

SOFTWARE DEVELOPMENT

PROGRAM FLOW CHART

Figure 3.5 Flowchart 1

Page 31: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

22

A

Object detected

Oscillate serve left and right

No

Send emailYes

Power

Stop

No

Yes

Figure 3.7 Flowchart 3

Figure 3.6 Flowchart 2

Page 32: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

23

Figure 3.5 shows the flow chart of the prototype being designed. The process

activates as soon as the power supply is being inputted to the circuit. As shown,

the first process starts from initializing all the variables. This is to clear any

unwanted data that may cause the device to fail. It also prevents the servo

motor from generating random movements across every direction.

As shown in the flow chart, the device can provide three modes, namely

the manual, oscillating and sensor based mode. For all of each mode, it always

involves an object tracking feature, which means that even if the device does not

provide any movement, as long as there is an object spotted through the

camera, it will always send an email message to the owner.

For the manual mode, it always waits for the input generated by the push

buttons. Thus, if the button is pressed in either left or right the servo motor will

produce a movement of 1 degree depending upon the direction. To generalize,

as long as a certain button is pressed, it will continuously move toward its

destination.

For the osciallating mode, as shown in the flow chart, it will generate a

left and right motion. It will disregard any input coming from the sensors and the

push buttons.

For the sensor based mode, it is enabled if both manual and oscillating

mode is disabled. In this mode, it makes use of the sensors in which when one

gets an input or triggered, the servo motor will automatically move toward the

Page 33: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

24

position of the sensor. Thus, if two or more sensors are triggered at almost of

the same time, it will move toward the latest event depending upon the delay

that is programmed internally.

All the movement generated by each mode has a limit of 0 up to 180

degrees. Thus any motion out of the specified range will be disregarded.

PROTOTYPE DEVELOPMENT

1.) ArduinoDuemilanove

Figure 3.8 Arduino

The ArduinoDuemilanove serves as the main controller of all the

components presented in the circuit. It accumulates all the input coming from

the push buttons, switches, and through beam sensor and interprets the data for

the desired movement of the servo motor.

Page 34: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

25

2.) Servo Motor

Figure 3.9 servo motor

The servo motor generates all the movement concerning the device. It

serves as the mount point of the camera in order to automate its viewing

perspective. The movement of servo motor may vary depending upon the mode

selected in the device.

3.) Through beam sensors

Figure 3.10 Through-beam sensor

Page 35: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

26

The through beam sensors serve as the main component for automatically

detecting object. If an object is present in between the two ends of the sensor, it

will immediately send a signal to the Arduino to generate the required operation.

4.) Switches

Figure 3.11 switch

The switch serves as the mode selector of the device. It enables the user

to select his/her desired option depending upon the situation and type of

monitoring operation.

5.) Push buttons

Figure 3.12 push button

Page 36: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

27

The push button operates for the control of manual mode. It serves as a

controller for the left and right movement of the servo motor.

6.) Resistors

Figure 3.13 Resistors

The resistors are used in order to balance the flow of current in the

circuit. The resistors are used basically for pull-up in order to produce proper

input going through the device.

7.) IP camera

Figure 3.14 IP camera

Page 37: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

28

The IP camera serves as the viewing access of the device. It enables the

user to view the status or condition of the place being monitored at any place

providing better security.

8.) Adapter

Figure 3.15 Adapter

The adapter serves as the main power source of the device when it is

externally connected from the computer.

Page 38: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

29

9.) Connecting wires

Figure 3.16 Wires

The connecting wires are used to enhance the range of the through beam

sensors. It enables the component to be placed on more isolated area for the

ease of monitoring. Stranded wires are being used in the circuit since it is more

flexible.

Page 39: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

30

Table 3.1 Component Price Listing

COMPONENT PRICE (PHP) QUANTITY PRICE (PHP)

Through-beam Sensor 350.00 3 1050.00

ArduinoDuemilanove 850.00 1 850.00

Resistors (10k ohm) 2.50 4 10.00

Switch 20.00 1 20.00

Pushbutton 10.00 2 20.00

IP Camera 2380.00 1 2380.00

Servo Motor 1200.00 1 1200.00

Connecting Wires 200.00 1 roll 200.00

TOTAL 5730.00

Page 40: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

31

Chapter 4

TESTING, PRESENTATION, AND INTERPRETATION OF DATA

Image capture test

The unique aspect of the design is that it can capture alerts and

automatically send these alerts to the client’s email. More importantly, the

pictures captured are of the event triggered. The design will be useless if the

camera fails to capture what triggered the sensor.

Procedure:

1. First, the designers choose the target object/person that must be

captured by the camera.

2. They triggered the sensor where the object/person is located.

3. They check the email and verify if the object was captured by the camera.

4. The test is repeated for all sensors.

Page 41: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

32

Figure 4.1 Testing the Set-up

In this figure the designers present the set-up that will be used for testing

the camera’s ability to capture the object that triggered the event.

Figure 4.2 Live Connection

Along with the test of the email, the designers also watched the live feed

if the object will be visible in the stream and how clear it will be.

Page 42: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

33

Figure 4.3 Sample Test Object

This is an example of the test subject; the designers triggered the sensor

in front of a group of students and verified if it was in fact the image that was

sent to the email account

Here, the designers tested how the positioning of the camera affects the

ability of the user to identify the object or the person that triggered the sensor.

The data acquired by the test shows that the camera’s response is fast enough

to capture a triggered sensor. Moreover, the camera has to be at a considerable

height for it to be able to retrieve usable data to the user.

Page 43: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

34

Functionality test

The designers have implemented three modes for the design: automatic,

manual and oscillating. The designers tested each of the modes by testing if the

camera will respond in all three modes. This is done by waiting for an email of

the room from any mode. Since the program of the camera emailing snapshots is

built-in, the designers assume it to be always working.

Procedure:

1. First, the designers set-up the prototype and made sure it is functioning

properly.

2. They chose 1 of 3 modes

3. They logged in to the account that will receive the email.

4. They triggered the camera to send the email.

5. They checked the email account for the email.

6. They repeated for all other modes.

Page 44: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

35

The following table illustrates how each button and sensor must be tested

in each mode to ensure that the buttons and sensors will only work in the mode

that they need to.

Page 45: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

38

Device to be

tested

Mode to be tested in

Expected output

Results

trial1

trial2

trial3

trial4

trial5

trial6

trial7

trial8

trial9

trial10

success rate

Left push button

Active tracking no effect success

success

success

success

success

success

success

success

success

success

100%

Left push button

Scanning no effect success

success

success

success

success

success

success

success

success

success

100%

Left push button

Manual move 1 to the left

success

success

success

success

success

success

success

success

success

success

100%

Table 4.1 Testing of left push button

Device to be tested

Mode to be tested in

Expected output

Results

trial1

trial2

trial3

trial4

trial5

trial6

trial7

trial8

trial9

trial10

success rate

Right push button

Active tracking no effect

success

success

success

success

success

success

success

success

success

success

100%

Right push button Scanning no effect

success

success

success

success

success

success

success

success

success

success

100%

Right push button Manual

move 1 to the right

success

success

success

success

success

success

success

success

success

success

100%

Table 4.2 Testing of right push button

Page 46: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

39

Device to be tested

Mode to be tested in

Expected output

Results

trial1

trial2

trial3

trial4

trial5

trial6

trial7

trial8

trial9

trial10

success rate

Left through beam sensor

Active tracking

move to 180° position

success

success

success

success

success

success

success

success

success

success

100%

Left through beam sensor Scanning no effect

success

success

success

success

success

success

success

success

success

success

100%

Left through beam sensor Manual no effect

success

success

success

success

success

success

success

success

success

success

100%

Table 4.3 Testing of left through beam sensor

Device to be tested

Mode to be tested in

Expected output

Results

trial1

trial2

trial3

trial4

trial5

trial6

trial7

trial8

trial9

trial10

success rate

right through beam sensor

Active tracking

move to 0° position

success

success

success

success

success

success

success

success

success

success

100%

right through beam sensor Scanning no effect

success

success

success

success

success

success

success

success

success

success

100%

right through beam sensor Manual no effect

success

success

success

success

success

success

success

success

success

success

100%

Table 4.4 Testing of right through beam sensor

Page 47: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

40

Device to be tested

Mode to be tested in

Expected output

Results

trial1

trial2

trial3

trial4

trial5

trial6

trial7

trial8

trial9

trial10

success rate

center through beam sensor

Active tracking

move to 90° position

success

success

success

success

success

success

success

success

success

success

100%

center through beam sensor Scanning no effect

success

success

success

success

success

success

success

success

success

success

100%

center through beam sensor Manual no effect

success

success

success

success

success

success

success

success

success

success

100%

Table 4.5 Testing of center through beam sensor

Page 48: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

41

As clearly seen, the program was written in such a way that even if the

push button is used outside of its mode of operation, it will not interrupt the flow

of the current mode.

Figure 4.4 Testing the pushbuttons and switch

Here, the designers test if the switches and push buttons work only in the

modes that they are supposed to.

Page 49: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

42

Figure 4.5 Testing the servo motor

Figure 4.6 Testing the through beam in other modes

Page 50: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

43

In all modes, the designers were able to confirm that the camera

responded to inputs coming from the pushbuttons and sensors. Furthermore,

they also confirmed that the email was received containing the pictures. It is

important that the three systems always exclude each other’s functionalities. If

this ever failed, serious problems can occur regarding the operation of the

camera.

Page 51: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

44

Impact Analysis

In these times of economic instability, crime is rampant. Poverty has

pushed people to the wall causing them to resort to illegal means such as

stealing and kidnapping. The ability to provide cheap yet effective means of

security is the designers’ main objective. It is through this design that they have

achieved such objective. Moreover, the versatility of the design has also made it

applicable to simply monitoring a facility, checking for productivity and efficiency.

In the long run, that means that the product targets not only people who want

to secure a business or home, but also those who want to do this without the

hassle of having to be physically present at the location.

Page 52: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

45

Chapter 5

CONCLUSION AND RECOMMENDATION

Conclusion

Comprehensive security systems are expensive, mainly because cameras

are expensive and a lot are needed to properly monitor an area. Moreover, most

of the time, the feed from these cameras only lead to a single room, usually

security offices. Also, the requirement that someone must always be watching

the monitors, makes these systems costly. All of these sum up to a large cost of

money required in security. If it is an office building several floors high, this can

become quite costly to operate.

Through the present design, the designers have found a way to greatly

reduce the cost of a security system. The use of sensors instead of multiple

cameras, have made it possible to monitor a large area while minimizing the use

of cameras. The implementation of IP cameras have made the streaming of the

signal wireless thus the system can be monitored from anywhere with a secure

connection. Furthermore, this reduces the need to employ security at all times,

since the system is automated.

Page 53: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

46

Recommendation

Even though the design accomplished all the objectives that had been

stated in this paper, there are still numerous limitations that need to be

addressed to make the existing design more versatile.

Firstly, ensuring that the connection is secure can be a major issue in

companies that deal with very sensitive data. The designers believe this can still

be improved in future work. It is suggested that there be a security check when

accessing the IP from any remote device. Moreover, it should be noted that

when using a public network, one must automatically require a password change

on next login to ensure security. Secondly, the sensors are still wired, it will be

more advantageous and easier to implement if all the sensors become wireless

as well. All of these go into the long term idea of security that is cheap and

reliable. Thirdly, the device can be improved by integrating the system to alert

the authorities when an event occurs. The last is the dependency of the network

to power; it would be advisable to implement a power supply to the system such

that when there is a loss of power, it will kick in as a back-up to the system. It

can even be coupled with temporary memory during the power outage so that

no data is lost during the outage.

Page 54: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

47

APPENDIX

APPENDIX A

OPERATION’S MANUAL

System requirement

IP CAMERA

Item Requirements

CPU Pentium 4 1600MHz (or equivalent AMD)

Graphic Card 64 MB RAM graphic cards(or equivalent on-board graphic cards)

RAM 512 MB

Operating System Windows2000, 2003, XP, Vista, Windows 7

Web Browser Internet Explorer 6 or later

Page 55: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

48

Installation procedure

1. Mount camera and servo on a solid level surface.

2. Connect one end of the sensors to the Arduino.

3. Connect the other end of the sensors across the first end; do not make

their distance greater than two meters. For best use, place at

entrances and locations where foot traffic is high.

4. Connect the power sources to the Arduino and sensors.

5. Using command prompt, identify the IP address of the camera.

6. Connect to the IP camera and reconfigure the default username and

password.

Page 56: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

49

Troubleshooting Guides and Procedures

1. Unable to connect to the camera.

Ensure that you have an internet connection. If you do, check to see if

you are accessing the right IP address. This can be done by checking

your router’s DHCP client list and finding the camera’s IP address.

2. Unable to access router.

Make sure you are connected to the router. If yes, determine the

address of the router by first running Command Prompt and typing

ipconfig. The router’s address will be found in the Default Gateway

Address. Use this address to access the router.

3. Video feedback from camera cannot be seen through its

browser interface.

Check if the camera is on and connected to the router. Make sure your

current browser supports or has Adobe Flash Player installed. This can

be downloaded from get.adobe.com/flashplayer. Refresh your browser

and check the video again.

Page 57: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

50

APPENDIX B

Pictures of Prototype

Page 58: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

51

Page 59: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

52

Page 60: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

53

Page 61: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

54

Page 62: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

55

Page 63: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

56

Page 64: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

57

APPENDIX C

SOURCE CODE

#include <Servo.h>

Servo myservo;

int moving = 2

int restrict = 3;

intmotionle = 4

intmotionri = 5;

int left = 6

intcenter = 7

int right = 8;

int logic = 0

int location

int angle = 90;

void setup()

{

Serial.begin(9600);

myservo.attach(9,600,2400);

pinMode(moving,INPUT);

pinMode(restrict,INPUT);

Page 65: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

58

pinMode(motionle,INPUT);

pinMode(motionri,INPUT);

pinMode(left,INPUT);

pinMode(center,INPUT);

pinMode(right,INPUT);

}

void loop()

{

if((digitalRead(restrict) == HIGH &&digitalRead(moving) == HIGH))

{

logic = 1;

}

else

{

if(digitalRead(restrict) == HIGH)

{

logic = 1;

}

else if(digitalRead(moving) == HIGH)

{

logic = 2;

}

else

Page 66: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

59

{

logic = 3;

}

}

if(logic == 1)

{

if(digitalRead(motionle) == HIGH && angle < 175)

{

angle++; myservo.write(angle);

delay(15);

}

else if(digitalRead(motionri) == HIGH && angle > 5)

{

angle--; myservo.write(angle);

delay(15);

}

}

else if(logic == 2)

{

myservo.write(5);

delay(200);

for(angle = 5; angle < 175; angle++)

{

if(digitalRead(moving) == LOW)

Page 67: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

60

{

break;

}

myservo.write(angle);

delay(15);

}

for(angle = 175; angle > 5; angle--)

{

if(digitalRead(moving) == LOW)

{

break;

}

myservo.write(angle);

delay(15);

}

}

else if(logic == 3)

{

if(digitalRead(left) == HIGH)

{

location = 1;

}

else if(digitalRead(center) == HIGH)

{

Page 68: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

61

location = 2;

}

else if(digitalRead(right) == HIGH)

{

location = 3;

}

else

{

location = 4;

}

switch(location)

{

case 1:

myservo.write(175);

delay(200);

angle = 175;

break;

case 2:

myservo.write(90);

delay(200);

angle = 90;

break;

case 3:

myservo.write(5);

Page 69: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

62

delay(200);

angle = 5;

break;

default:

myservo.write(angle);

delay(200);

break;

}

}

}

Page 70: Implementation of Object Tracking and Motion Sensors for Home and Office-based Wifi Monitoring System

63

DATA SHEETS


Recommended