A DESIGN OF MOVEMENT DETECTION SECURITY CAMERAS USING ARDUINO
JERRON BIN PIUS (41546)
Bachelor of Engineering (Hons) in Electronics (Telecommunications)
2016/2017
UNIVERSITI MALAYSIA SARAWAK
Grade:
Please tick (-J)
Final Year Project R.eport
Masters
B
PhD
D
DECLARATION OF ORIGINAL WORK
This declaration is made on the. ':f ...day of.... .. )LH" E ...2017.
Student's Declaration:
I JERRON BIN PIUS (41546) from FACULTY OF ENGINEERING hereby declare that the work entitled A DESIGN OF MOVEMENT DETECTION SECURITY CAMERAS USING ARDUINO is my original work. I have not copied from any other students' work or from any other sources except where due reference or acknowledgement is made explicitly in the text, nor has any part been written for me by another person.
10' · (, · :2.01':{
DaLe submitted
-- J -- ER ~ ~US
(41546)Supervisor's Declaration:
I NURUL 'IZZATI BINTI HASHIM hereby certifles that the work entitled A DESIGN OF MOVEMENT DETECTION SECURITY CAMERAS USING ARDUlNO was prepared by the above named student, and was submitted to the "FACULT'C' as a * partial/full fulfillment for the conferment of BACHELOR OF ENGINEERING (HONS) IN ELECTRONICS <TELECOMMUNICATION) and the aforementioned work, to the best of my knowledge, is the said student's work.
Received for examination by:
---- 1kL-!", ' '-'----'-'_____
Date:_--,-7-_'~6_.
_Q_<'l_'1''---_NURUL 'IZZATI BINTI HASHIM
- . --- -
I declare that Project/Thesis is classified as (Please tick (>i» :
o
CONFIDENTIAL (Contains confidential information under the Official Secret Act 1972)"o
RESTRICTED (Contains restricted information as specified by the organization where research was done)*~OPENACCESS
Validation of ProjecUThesis
I therefore duly affirmed with free consent and willingness declare that this said Project/Thesis shall be placed officially in the Centre for Academic Information Services with the abiding interest and rights as follows:
• This Projectn'hesis is the sole legal property of University Malaysia Sarawak (UNIMAS).
• The Centre for Academic Information Services has the lawful right to make copies for the purpose of academic and research only and not for other purpose.
• The Centre for Academic Information Services has the lawful right to digitalize the content for the Local Content Database.
• The Centre for Academic Information Services has the lawful right to make copies of the ProjectIThesis for academic exchange between Higher Learning Institute.
• No dispute or any claim shall arise from the student itself neither third party on this ProjectlThesis once it becomes the sale property of UNIMAS.
• This Projectrrhesis or any material, data and information related to it shall not be distributed, published or disclosed to any party by the student except with UNIMAS permission.
Student signature _ __ ~---:~==
~ ___ _
Supervisor sig'nature:_-,N£l-+=L ~' __
(JERRON BIN PIUS) (NURUL 'IZZATI BINTI HASHIM)
Curre n t Add ress: _ _ -"P-'-/O"'--'B"'o"'x'--"'2"'O,,,.S"'9"-"""4"'O'--_ _ __ ____ _ __
Kampung KiaI'u, Kuala Penyu, Sabah.
Notes: * If the Project/Thesis is CONFIDENTIAL or RESTRICTED, please attach together as annexure a letter from the organization with the period and reasons of confidentiality and restriction.
[The instrument is duly prepared by The Centre for Academic Information Services]
A DESIGN OF MOVEMENT DETECTION SECURITY CAMERAS USING ARDUINO
JERRON BIN PIUS
A report submitted
in fulfillment of the requirements for the Bachelor of Engineering (Hons) in Electronics
(Telecommunications)
Faculty of Engineering University Malaysia Sarawak
2016/2017
ii
Dedicated to my beloved parents, family and lecturers
iii
ACKNOWLEDGEMENT
First and foremost, I praise God, almighty for providing me this opportunity to proceed successfully.
This Final Year Project appears in its current form due to the assistance and guidance of several people. My cordial thanks to my supervisor, Madam Nurul ‘Izzati binti Hashim for accepting me as her student, your warm encouragement, critical comments, thoughtful guidance and correction of the report help me to fulfil this Final Year Project. I also want to express my deep thanks to all my friends for the insightful discussion, offering a valuable advice and become a supporter during the whole period of study, and especially for their patience and guidance during the writing process.
Next, I greatly appreciate to my teammate, Hidayati binti Kelana for her excellent assistance for providing a good atmosphere in handling the paperwork together and also give me a lot of useful discussion regarding to my project. Last but not least, I want to express my gratitude and deepest appreciation to my parents, Mr Pius bin Sindin and Mrs Jamilah binti Dinil for their material and spiritual support in all aspects of my life and also provided assistance in numerous ways.
iv
ABSTRAK
Kamera adalah suatu kemudahan yang sangat berguna dan menjadi sebahagian daripada kehidupan manusia. Tanpa kamera, manusia tidak dapat merekod detik-detik kehidupan mereka sama ada pahit atau indah. Dalam era globalisasi, perkembangan kamera di negara ini telah meningkat dari semasa ke semasa. Hal ini disebabkan oleh perubahan teknologi semasa dan juga keperluan manusia terutamanya apabila berurusan dengan benda hidup. Meskipun kamera sekarang mempunyai ciri-ciri yang baik seperti berupaya untuk menangkap imej berkualiti tinggi, meningkatkan ruang penyimpanan memori, berwayar atau tanpa wayar dan banyak lagi, namun kebanyakkan kamera tersebut adalah bersifat pegun. Oleh itu, projek ini diperkenalkan untuk membuat sedikit penambahbaikan di mana ia mampu membuat pergerakkan mengikut arah jam atau berlawanan berdasarkan kepada arah yang ditetapkan. Projek ini menggunakan Piroelektrik Inframerah (PIR) Sensor dan Arduino sebagai mikropengawal untuk mengesan setiap pergerakan yang berlaku dalam julat yang ditetapkan. Projek ini diuji terhadap pergerakan tubuh manusia, benda hidup dan mati yang mana dipecahkan kepada lima bahagian; kesan perbezaan pergerakan, suhu, permukaan, kelajuan dan jarak.
v
ABSTRACT
A camera is a useful facility and very common to the part of human life. Without camera, human are not able to create either bad or beautiful moments in their life. During this era of globalization, the development of cameras in this country had been increased from time to time. This is due to the change of technology and also human’s need especially when dealing with a living being. Although a single camera has improve its specification including their ability to capture a high quality image, increasing the memory storage, wired or wireless and many more, however most existing cameras are stationary. Hence, this project was introduce to make an improvement on how to make it moves clockwise or counter clockwise based to the pointed direction. This project will use the basic Pyroelectric Infrared (PIR) Sensor with the help of an Arduino microcontroller to detect the motion that occur within the specified range. The testing of the project including the human body, living and non-living objects which divided into five parts; detection of the different motion, temperature, surfaces, speed and distance.
vi
TABLE OF CONTENT
CONTENT PAGE
DEDICATION ii
ACKNOWLEDGEMENT iii
ABSTRAK iv
ABSTRACT v
TABLE OF CONTENTS vi
LIST OF TABLES x
LIST OF FIGURES xii
LIST OF ABBREVIATION xv
CHAPTER 1 INTRODUCTION
1.1 Project Overview 1
1.2 Problem Statement 2
1.3 Objectives 3
1.4 Project Scope 3
1.4.1 Parameter 3
1.4.1.1 Range of coverage 3
1.4.2 Software 4
1.4.2.1 Arduino/ Genuino IDE 4
1.4.3 Hardware 4
1.4.3.1 List of hardware 4
1.5 Project Outline 4
CHAPTER 2 LITERATURE REVIEW
2.1 Conceptual of Security Camera 6
2.2 Related Work on Security Camera 7
vii
2.2.1 Completely Wireless Security Camera System by Joseph A Bosman, Steven Oliveiri, Ipek Ozil and Brandon C. Steacy
7
2.2.2 Raspberry-Pi Security Camera tutorial by Christoph Bunger
9
2.2.3 Hybrid Intelligent Surveillance System by Koichi Sato
11
2.3 Movement Detection and Rotational
Theory
13
2.3.1 Introduction 13
2.3.2 Infrared Technology 15
2.3.3 Motorized Technology 16
2.4 Privacy and Security Variation 18
2.5 Electronic Hardware 19
2.5.1 Arduino/Genuino Uno R3 19
2.5.2 Pyroelectric Infrared (PIR) Sensor 21
2.5.3 Servo Motor 22
2.5.4 Arduino Uno Proto Shield 24
2.5.5 IP Security Camera 24
2.5.6 Breadboard 25
2.5.7 Jumper Wire 26
2.5.8 Light Emitting Diode (LED) 27
2.5.9 Resistor 28
2.5.10 Capacitor 29
2.6 Electronic Software 30
2.6.1 Arduino IDE Software 30
CHAPTER 3 METHODOLOGY
3.1 Introduction 32
3.2 Project Methodology 33
3.2.1 Project Study 34
viii
3.2.2 Software Development 35
3.2.3 Hardware Development 38
3.2.4 Project Testing 40
3.3 Design of The Draft Project 42
3.3.1 Project Design Flowchart 42
3.3.2 Description of The Draft Project 43
3.3.3 Schematic Diagram of Hardware Connection
44
3.4 Project Schedule 45
3.5 Electronic Hardware and Software 47
3.5.1 Arduino/Genuino Uno 47
3.5.2 Pyroelectric Infrared (PIR) Sensor 48
3.5.3 Servo Motor 48
3.5.4 Arduino IDE Software 49
CHAPTER 4 RESULTS AND DISCUSSION
4.1 Introduction 50
4.1.1 Connection of all Electronic Components 50
4.1.2 Pin-Port Connection 52
4.1.3 Arduino IDE Coded Language Development
53
4.1.4 Project Testing 56
4.1.4.1 Detection of Human Body 57
4.1.4.2 Detection of Different Surfaces 59 4.1.4.3 Detection of Different Object Heat 61 4.1.4.4 Detection of Different Distance 63 4.1.4.5 Detection of Different Speed 65
CHAPTER 5 CONCLUSION AND
RECOMMENDATIONS
5.1 Conclusion 68
ix
5.2 Recommendations 69
CHAPTER 6 REFERENCES
6.1 References 71
APPENDIX
APPENDIX 1 74
APPENDIX 2 75
APPENDIX 3 76
x
LIST OF TABLES
TABLES PAGES
2.1 Advantage and Disadvantage of Wireless Security Camera
9
2.2 Advantages and Limitations of Raspberry-Pi Security Camera
11
2.3 Embedded System vs PC-Based System 12
2.4 Summarize Surveillance System by Other Researcher 13
2.5 Division of Infrared Radiation 16
2.6 Specification of Arduino Uno R3 20
2.7 Operation of Servo Motor 23
2.8 Benefits of LEDs 27
3.1 List of Parameters and Their Specifications 34
3.2 Project Gantt Chart for FYP 1 45
3.3 Project Gantt Chart for FYP 2 46
4.1 LED connection 52
4.2 Servo Motor Connection 52
4.3 PIR Sensor Connection 53
4.4 Detection of Human Body 58
4.5 Detection of Different Surfaces 60
xi
4.6 Detection of Different Object Heat 62
4.7 Detection of Different Distance 65
4.8 Detection of Different Speed 69
xii
LIST OF FIGURES
FIGURES PAGES
1.1 Total cases involving stolen cars and motorcycles 2
2.1 Base Station Architecture 8
2.2 Raspberry-Pi Security Camera Fabrication 10
2.3 Ptolemy Simulation Video 12
2.4 Rotation of Three Dimension Object at X, Y and Z-axis 14
2.5 Infrared Spectrum 15
2.6 The First DC Motor 16
2.7 Construction of Electric Motor 17
2.8 Privacy and Security Analogy 18
2.9 Arduino/Genuino Uno R3 Board 19
2.10 Pyroelectric Infrared (PIR) Sensor 21
2.11 Servo Motor 22
2.12 Arduino UNO Proto Shield 24
2.13 IP Security Camera 24
2.14 Breadboard 26
2.15 Jumper Wire 26
2.16 Light Emitting Diode 27
2.17 Resistor 28
xiii
2.18 Colored Band Estimation 28
2.19 Capacitor 100µF 29
2.20 Arduino IDE version 1.6.12 30
2.21 Uploading the Codes 31
2.22 Process Completed 31
3.1 Project Flowchart 33
3.2 Software Development Flowchart 35
3.3 Block Diagram for Arduino Uno Input and Output 36
3.4 Coded initializing 37
3.5 Coded Finalizing 37
3.6 Hardware Development Flowchart 38
3.7 Hardware Connection Block Diagram 39
3.8 Servo Motor Testing Principle 40
3.9 LED Diode Testing Principle 41
3.10 Full Draft Project Operation Flowchart 42
3.11 Full Draft Design with Illustration 43
3.12 Schematic Diagram 44
3.13 Arduino Uno Board 47
3.14 Pyroelectric Infrared (PIR) Sensor 48
3.15 Servo Motor 48
3.16 Arduino IDE version 1.6.12 49
4.1 Hardware Connection 51
xiv
4.2 Declaration of Main Components 54
4.3 Setup of Main Components 55
4.4 Setup of Main Loop 56
4.5 Movement Detection Security Camera 57
4.6 Cat’s Thermal Radiation 64
4.7 Human’s Thermal Radiation 64
4.8 Area of Detection 68
xv
LIST OF ABBREVIATION
Abbreviation Description
PIR - Pyroelectric Infrared Sensor
PDRM - Polis Diraja Malaysia
LED - Light Emitting Diode
USA - United State of America
IEEE - Institution of Electrical and Electronic Engineering
RCM - Radio Control Module
USB - Universal Serial Buses
SD - Secure Digital
IP - Internet Protocol
HD - High Definition
CISC - Complex Instruction Set Computing
DRAM - Dynamic Random-Access Memory
TSV - Tab Separated Values
PC - Personal Computer
IR - Infrared
NIR - Near Infrared
SWIR - Short Wavelength Infrared
xvi
MWIR - Medium Wavelength Infrared
LWIR - Long Wavelength Infrared
VLWIR - Very Long Wavelength Infrared
DC - Direct Current
AC - Alternating Current
IDE - Integrated Development Environment
CPU - Central Processing Unit
FTDI - Future Technology Devices International
I/O - Input and Output
IOREF - Input and Output Reference
GND - Ground
ICSP - In-Circuit Serial Programming
JPG - Joint Photographic Group
Wi-Fi - Wireless Fidelity
MP4 - Multimedia Player 4
PWM - Pulse-Width Modulation
1
CHAPTER I
INTRODUCTION
1.1 Project Overview
A camera is a useful facility and very common to the part of human life. Without camera, human are not able to create either bad or beautiful moments in their life. Camera is an optical instrument which can capture many things around them by using its powerful lens that made up from a good quality of material called quartz glass and plastic like acrylic.
It can built a single image with the help of a visible spectrum of light.
During this era of globalization, the development of cameras in this country had been increased from time to time. This is due to the change of technology and also human’s need especially when dealing with a living being. Therefore, a single camera will improve all the specifications including their ability to capture a high quality image, increasing the memory storage, wired or wireless and many more. The most interesting part of today’s camera is where it can film or record a movement object around them in order to make it a video. It is very important features because this will help us to handle all activities that is happening every day.
When talk about security, the degree of protection in our country is very low. This is because the specification of a camera has not been completely improve or said to be poor. It can only use a stationary camera and should be controlled manually. Thus, in order to overcome all these issues, this project was introduce and it will make an improvement on how to make the security camera moves clockwise or counter clockwise based to the pointed direction.
This project will use the basic Pyroelectric Infrared (PIR) Sensor with the help of an Arduino microcontroller to detect the motion that occur within the specified range. PIR sensor which
2
is mainly made up from a Fresnel lens is often use to detect a warm of the living body including animal (mammal). The programming has been made where the coding will be implanted to Arduino board to make it works in order to generate the sensor. After that, the servo motor will rotate when there is a motion detected by one of the PIR sensor. Then, the servo motor will stop and pointing to the detected body for a recording purpose through the lens of a camera.
1.2 Problem Statement
According to Utusan Sarawak, October 2016 [1], the government was prompted to install a security camera in a most affected areas especially in a shop, residential area, streets, public parking and also in a village. Jabatan Jenayah Polis Diraja Malaysia (PDRM) has reported that the number of cases involving motorcar in Malaysia had been drastically increased to 1143 cases as compare to 453 cases earlier in 2015. Plus, the total number of a stolen motorcycle also rise from 2222 to 2715 cases in 2016. The statistic of the stolen cars and motorcycles can be describe in the Figure 1.1.
Figure 1.1: Total cases involving stolen cars and motorcycles
0 500 1000 1500 2000 2500 3000
2015 2016
Car Motorcycle
3
The purpose of installing the security camera at the involved locations is to reduce the number of crime cases in this country. However, there is a main problem occur where the security camera should be controlled manually and unable to move freely. Besides, citizen will not be able to buy a fully functional security camera due to the expensive price of installment and material. For example, one unit of a security camera will cost around RM400 and above excluding the installation charge. This will let them to ignore their safety and thus it will led the unscrupulous people to stole again.
1.3 Objective
The objectives of this project are:
1.3.1 To design a security camera that will detect the movement of a living being in order to rotate the servo motor at the pointed direction.
1.3.2 To develop a programming using Arduino IDE software that can control input and output.
1.3.3 Totest the end product with different subjects and elements.
1.4 Project Scope
The scope of this project is designed base on the following considerations:
1.4.1 Parameter
1.4.1.1 Range of coverage:
PIR sensor = 5 Meters
Rotation = 0o to 180o
Areas = 5 Meters x 5 Meters
4 1.4.2 Software
1.4.2.1 Arduino/ Genuino IDE
Develop a programming language like coding with Arduino/Genuino Uno version 1.6.12 and uploading it to Arduino/Genuino board.
1.4.3 Hardware.
1.4.3.1 List of hardware
Arduino/Genuino Uno R3 Compatible
Arduino/Genuino Uno Proto Shield
PIR Motion Sensor
180o Servo Motor
Light Emitting Diode (LED) Generic
IP Security Camera
Capacitor 100µF
Resistor 220Ω
1.5 Project Outline
This report consists of the investigation and analysis process to the movement detection security camera. Basically, this report is divided into five main chapters which are an introduction, literature review, methodology, results and discussions, and conclusion.
Brief information of each chapter is described below:
Chapter 1 consist of an introduction of a project background. It talk about the type and specification need to be improve and how it works. The problem encountered also stated in order to make precaution about all activities happen around us without our supervision.
Next, the basic tools that underlie all strategic and planning activities had been listed as an objective of the project.
5
The technique used and a review from literature side that is related to this topic is describe in Chapter 2. Meaning to say, the full information about the security system and their specifications will be discussed.
Next, Chapter 3 is all about the full procedures in order to make the security camera works successfully. These will explained step by step with the help of figures and illustrations.
The result and discussion of entire data and outcome from the project will be included in Chapter 4. Analyzing and computing the data can be achieve through this chapter after completed the project.
Lastly, Chapter 5 is a conclusion which involve the overall summary of the project based on the result. There is also some recommendations used to be a suggestion to improve the design or product for the future generation.