You are on page 1of 167

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/356785805

RFID and Bluetooth based Smart Door Lock

Research Proposal · March 2021

CITATIONS READS
0 1,281

1 author:

Sandesh Parajuli
London Metropolitan University
111 PUBLICATIONS   2,568 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

RFID and Bluetooth based Smart Door Lock View project

All content following this page was uploaded by Sandesh Parajuli on 05 December 2021.

The user has requested enhancement of the downloaded file.


Final Year Project
CS6P05
Year and Semester
2019-20, Spring
Final Project Report

Student Name: Sandesh Parajuli


London Met ID: 17030805
College ID: Np01NT4A170076

Internal Supervisor External Supervisor


Dipeshor Silwal Swarupa Gurung
Word Count: 9984
I confirm that I understand my coursework needs to be submitted online via Google Classroom
under the relevant module page before the deadline in order for my assignment to be accepted and
marked. I am fully aware that late submissions will be treated as non-submission and a mark of zero
will be awarded.
Abstract

This report is based on the smart door locking technology to develop a Smart door

lock system using RFID sensor, Bluetooth module, Android App and Arduino Uno that

allows convenience and security for the users in the field of door lock system. In this

project, RFID and Bluetooth based smart door lock system is proposed. This system is

designed to simulate an electronic solenoid lock, which is controlled through a Bluetooth-

enabled smartphone and RFID tag. Likewise, a smartphone android application is

developed, through which a controlling is established by sending a command via

Bluetooth to the Arduino circuit to monitor the door lock system. Moreover, this door lock

system is the combination of different technologies in which an android smartphone and

RFID tag work as a task handler, Bluetooth module and RFID reader as command agent,

Arduino UNO as controlling and data processing unit and solenoid lock as the output unit.
Acknowledgment

I specially want to thank Islington College for giving me this opportunity to enhance

my knowledge of report writing and project development skills. Without the support of our

college this report, and the project would not have been possible.

I am highly indebted to my project supervisor, Mr. Dipeshor Silwal, and Ms. Swarupa

Gurung for their continuous support, motivation, and guidance throughout the complete

duration of my project. Despite this pandemic situation and their hectic schedule, they

keep me updated and truly remained driving spirit in my project. Their experience on the

report writing and project development skills has truly helped a lot to develop this project

and to improve my report. Furthermore, I would like to express my deepest appreciation

to them because they helped me a lot to understand my project and always suggested

and encouraged me to complete this project.

Moreover, I am thankful to the staff of our college as well as London Metropolitan

University who gave the access to IEEE library which really helped me a lot while

researching about my project and I was able to complete my project on time. Finally, I

would like to thank my friend and my family who helped me a lot and motivated me and

provide me ideas during this project.


List of Abbreviation

IoT Internet of Things


RF Radio frequency
RFID Radio-frequency identification
CAGR Compound Annual Growth Rate
ICVS International Crime Victims Survey
API Application Program Interface
UNODC United Nations Office on Drugs and Crime
Table of Contents
CHAPTER 1: INTRODUCTION ................................................................................................. 1

1.1 Introduction ........................................................................................................................ 1

1.2 Current Scenario............................................................................................................................ 2

1.3 Problem Statement........................................................................................................................ 4

1.4 Project as a solution ..................................................................................................................... 5

1.5 Scope of this project .................................................................................................................... 5

1.5 Aim and Objectives ....................................................................................................................... 6

1.5.1 Aim ............................................................................................................................................. 6

1.5.2 Objectives ................................................................................................................................ 6

1.6 Structure of the report.................................................................................................................. 7

CHAPTER 2: BACKGROUND .................................................................................................. 8

2.1 About the end-users ..................................................................................................................... 8

2.1.1 About the Home user: ........................................................................................................... 8

2.2 Understanding the solution ........................................................................................................ 9

2.3 Similar System ............................................................................................................................. 10

2.3.1 Smart Home Security Using RFID System .................................................................... 10

2.3.2 Automatic Door Locking System Using Bluetooth Module ...................................... 11

2.3.3 Electronic Door Lock using RFID and Password-Based on Arduino..................... 12

2.4 Comparison with similar systems........................................................................................... 13

2.5 Critical Comparison with RFID and Bluetooth based Smart Door Lock ....................... 14

2.5.2 Smart Home Security Using RFID System .................................................................... 14

2.5.2 Automatic Door Locking System Using Bluetooth Module ...................................... 14

2.5.3 Electronic Door Lock using RFID and Password-Based on Arduino..................... 14

2.6 Literature Review ......................................................................................................................... 15


CHAPTER 3: DEVELOPMENT ................................................................................................16

3. Methodology........................................................................................................................16

3.1 Consider Methodology ............................................................................................................... 16

3.1.1 Waterfall Methodology ........................................................................................................ 16

3.1.2 Spiral Methodology.............................................................................................................. 17

3.1.3 Agile Methodology ............................................................................................................... 17

3.2 Selected Methodology................................................................................................................ 18

3.2.1 Why Agile methodology? ................................................................................................... 18

3.3 Phases of the methodology ...................................................................................................... 19

3.3.1 Brainstorm ............................................................................................................................. 19

3.3.2 Design ..................................................................................................................................... 20

3.3.3 Development and Coding .................................................................................................. 20

3.3.4 Android Application Development .................................................................................. 28

3.3.5 Testing .................................................................................................................................... 36

3.3.6 Deployment ............................................................................................................................ 36

3.4 Survey............................................................................................................................................. 37

3.4.1 Pre survey Result ................................................................................................................. 37

3.4.2 Post Survey Result .............................................................................................................. 37

3.5 Requirement Analysis ................................................................................................................ 38

3.5.1 Software Requirement ........................................................................................................ 38

3.5.1.1 Arduino IDE ........................................................................................................................ 38

3.5.1.2 Fritzing ................................................................................................................................. 39

3.5.1.3 MIT APP Inventor .............................................................................................................. 40

3.5.1.4 Google Firebase database.............................................................................................. 41

3.5.1.5 Firebase Authentication .................................................................................................. 41

3.5.1.6 Firebase Realtime database ........................................................................................... 42


3.5.2 Hardware Requirement ....................................................................................................... 43

3.6 Design............................................................................................................................................. 46

3.6.1 Circuit Design for RFID Reader Interfacing with Arduino ......................................... 46

3.6.2 Circuit Design for Bluetooth (HC-05) module Interfacing with Arduino ................ 48

3.6.3 Circuit Design for RFID reader, Buzzer, Led, Solenoid lock, Battery, and Relay
module Interfacing with Arduino ............................................................................................... 50

3.6.4 Circuit Design for All hardware components Interfacing with Arduino ................ 52

3.6.5 UML Diagram ......................................................................................................................... 54

3.7 Implementation ............................................................................................................................ 55

3.7.1 System Architecture ............................................................................................................ 55

3.7.1.1 Block Diagram ................................................................................................................... 55

3.7.1.2 Project Process Flow Chart ........................................................................................... 56

CHAPTER 4: TESTING ............................................................................................................57

4.1 Testing............................................................................................................................................ 57

4.2 Unit Testing ................................................................................................................................... 58

4.2.1 Test case 1: Assigning new RFID tag into the Arduino Uno .................................... 58

4.2.2 Test Case 2: Using Right “authorized” RFID tag in RFID Reader. .......................... 59

4.2.3 Test Case 3: Using Wrong “unauthorized” RFID tag in RFID Reader. ................... 60

4.2.4 Test Case 4: Using Right RFID tag to unlock the door. ............................................. 61

4.2.5 Test Case 5: When wrong RFID tag is used to unlock the door. ............................. 63

4.2.6 Test Case 6: Unlocking the door through Smartphone application. ...................... 65

4.2.7 Test Case 7: Locking the door through Smartphone application ........................... 67

4.2.8 Test Case 8: Turning OFF the RFID Reader through a smartphone ...................... 69

4.2.9 Test Case 9: Turning ON the RFID Reader through Smartphone application. .... 70

4.3 System Testing ............................................................................................................................ 71

4.3.1 Test Case 01: Signing up the new user in Smart Door lock android application71
4.3.2 Test Case 2: Login into Smart Door lock android application ................................. 74

4.3.3 Test Case 3: When the wrong password is entered. .................................................. 76

4.4.4 Test Case 4: The use of Forget password? option to set the password of the
user. ................................................................................................................................................... 78

4.4.5 Test Case 5: Paring Bluetooth of Smartphone with Bluetooth module HC-05. ... 81

4.6 Critical Analysis ........................................................................................................................... 83

CHAPTER 5: CONCLUSION....................................................................................................84

5.1 Summary and Conclusion ......................................................................................................... 84

5.2 Advantages ................................................................................................................................... 84

5.3 Limitations..................................................................................................................................... 85

5.4 Legal and Security issues ......................................................................................................... 86

5.4.1 Physical attacks ................................................................................................................... 86

5.4.2 Software attacks:.................................................................................................................. 86

5.4.3 Network attacks .................................................................................................................... 86

5.5 Ethical issues ............................................................................................................................... 87

5.5.1 User Identification: .............................................................................................................. 87

5.5.2 People’s Life Threat: ........................................................................................................... 87

5.5.3 Public and Private Border Line: ....................................................................................... 87

5.6 Social Issue ................................................................................................................................... 88

5.7 Future development or research ............................................................................................. 88

6. References...........................................................................................................................90

7. Appendix .............................................................................................................................93

7.1Appendix A: History..................................................................................................................... 93

7.2 Appendix B: Pre-Survey ............................................................................................................ 95

7.2.1 Pre-Survey Form .................................................................................................................. 95

7.2.2 Sample of Filled Pre-Survey Form ................................................................................... 99


7.2.3 Pre-Survey Result .............................................................................................................. 103

7.3 Appendix C: Post-Survey ........................................................................................................ 113

7.3.1 Post-Survey Form .............................................................................................................. 113

7.3.2. Sample of Filled Post-Survey Form ............................................................................. 116

7.3.3 Post-Survey Result ............................................................................................................ 119

7.4 Appendix D: Sample Code ...................................................................................................... 127

7.4.1 Arduino IDE Code .............................................................................................................. 127

7.5 Appendix E: Design .................................................................................................................. 131

7.5.1 Gantt Chart........................................................................................................................... 131

7.5.2 Work Breakdown Structure ............................................................................................. 132

7.5.3 Flowchart of the Smart Door Lock System ................................................................. 133

7.5.4 Hardware Architecture ...................................................................................................... 134

7.5.5 Use Case Diagram ............................................................................................................. 136

7.5.6 ER-Diagram of the Database of Smart Door Lock Application .............................. 137

7.5.7 Class-Diagram of Smart Door Lock Application ........................................................ 138

7.4.8 Relational Diagram of the database of Smart Door Lock System ......................... 138

7.5.9 Wireframes ........................................................................................................................... 139

7.5.9.1 Login Portal ...................................................................................................................... 139

7.5.9.2 Signup Portal ................................................................................................................... 140

7.5.9.3 Main Screen ...................................................................................................................... 141

7.6 Appendix F: Screenshots of the system ............................................................................. 142

7.6.1 Hardware components of this RFID and Bluetooth Based Smart Door Lock .... 142

7.6.1 Smartphone Application Interface ................................................................................. 144

7.7 Appendix G: User Feedback Form........................................................................................ 147

7.7.1 Sample of User Feedback Form ..................................................................................... 147

7.7.2 Sample of Filled User Feedback Form ......................................................................... 150


7.7.3 Feedback and suggestion from the users ................................................................... 153

Table of figures

Figure 1:Nepal-Bulgary-rate-per-100,000(population) (UNODC, 2015) .......................... 3


Figure2:Global-Smart-Door-Lock-Forecast (Strategy Analytics, 2018) ........................... 4
Figure 3:Actual-growth-of-home-user-having-smart-lock (Statista, 2020) ....................... 9
Figure4: Smart-Home-Security-Using-RFID-System (ADAM, 2016) ............................. 10
Figure5:Similar-system-2.3.2Module- (Lubhansh Kumar Bhute, 2017) ......................... 11
Figure6:Similar-System-2.3.3- (Ni Ni San Hlaing, 2019) ............................................... 12
Figure7:Waterfall-Methodology- (Agarwal, 2020) .......................................................... 16
Figure8:Spiral-Methodology- (Pal, 2020)....................................................................... 17
Figure9:Agile-Methodology-for-RFID-and-Bluetooth-based-Smart-Door Lock .............. 19
Figure10: Picture-of-before-and-After-of-RFID-Sensor ................................................. 20
Figure11: Circuit-Diagram-of-Arduino-Uno-and-RFID-Reader ...................................... 21
Figure12:Code-for-defining-RFID-reader ...................................................................... 22
Figure13: Initiating-RFID-reader .................................................................................... 22
Figure14:Code-to-print-UID-of-tag ................................................................................ 22
Figure15:Authorized-RFID-tag-UID ............................................................................... 23
Figure16: Unauthorized-RFID-tag-UID .......................................................................... 23
Figure17:Interfacing(HC-05)-with-Arduino-Uno ............................................................. 24
Figure18:Defining-Rx-and-Tx-as-SoftwareSerial ........................................................... 25
Figure19: Code-For-Movement-Of-Door-And RFID-reader ........................................... 25
Figure20:Circuit-diagram-of-all-components ................................................................. 26
Figure 21 Defining all components ................................................................................ 27
Figure 22 Code for running the LED, Buzzer, Relay ..................................................... 27
Figure23:Login-Portal .................................................................................................... 28
Figure24:Signup-Portal ................................................................................................. 31
Figure25:Main-Screen ................................................................................................... 33
Figure26:Arduino-IDE-User-Interface ............................................................................ 38
Figure27:Fritzing ........................................................................................................... 39
Figure28:MIT-APP-Inventor (Inventor, 2019) ................................................................ 40
Figure29:Google-Firebase-Console (Firebase, 2020) ................................................... 41
Figure30:Firebase-Authentication-Console (Firebase, 2020) ........................................ 42
Figure31:Firebase-Realtime-database-Console (Firebase, 2020) ................................ 42
Figure32:Arduino-Uno ................................................................................................... 43
Figure33:RFID-Reader/Sensor ..................................................................................... 44
Figure34:Bluetooth-module(HC-05) .............................................................................. 44
Figure35: Single-channel-Relay .................................................................................... 44
Figure36:12V-Solenoid-Lock ......................................................................................... 45
Figure37:Circuit-Diagram-of-Arduino-Uno-and-RFID-Reader ....................................... 46
Figure38: Schematic-Diagram-ArduinoUno-and-RFID-Sensor ..................................... 47
Figure39:Circuit-Diagram-of-ArduinoUno-and-Bluetooth-Module .................................. 48
Figure40:Schematic-diagram-of-ArduinoUno-and-Bluetooth-Module ............................ 49
Figure41:Circuit-Diagram-of-ArduinoUno-and-Bluetooth-Module .................................. 50
Figure42:Schematic -Diagram-of-Arduino-Uno-and-Bluetooth-Module ......................... 51
Figure43:Circuit-Diagram-of-All-Hardware-Components ............................................... 52
Figure44:Schematic-Diagram-of-all-hardware-components-together ............................ 53
Figure45:Block-Diagram-of-RFID-and-Bluetooth-based-Smart-Door-Lock ................... 55
Figure46:Flowchart-of-RFID-and-Bluetooth-based-Smart-Door-Lock ........................... 56
Figure47:Activity-Diagram-of-RFID-and-Bluetooth-Based-Smart-Door-Lock ................ 54
Figure 1 Door Lock in Ancient time (Wiredsmart, 2019) ................................................ 93
Figure 36 Advance Door lock (Brinkmannhardware, 2014) ........................................... 94
Figure48: Sample of Pre-Survey Form .......................................................................... 98
Figure 49 Sample of Filled Pre-Survey Form .............................................................. 102
Figure 50 Sample of Post-Survey Form ...................................................................... 115
Figure 51 Sample of Filled Post-Survey Form............................................................. 118
Figure 52 Arduino IDE Code 1 .................................................................................... 127
Figure 53 Arduino IDE Code 2 .................................................................................... 128
Figure 54 Arduino IDE Code 3 .................................................................................... 129
Figure 55 Arduino IDE Code 4 .................................................................................... 130
Figure 56 Gantt chart .................................................................................................. 131
Figure 57 Work Breakdown Structure ......................................................................... 132
Figure 58 Flowchart of Smart Door Lock System ........................................................ 133
Figure 59 Hardware Component Circuit Diagram of Bluetooth Authentication RFID Door
Lock............................................................................................................................. 134
Figure 60 Schematic Diagram of all hardware components together .......................... 135
Figure 61 Use case Diagram ....................................................................................... 136
Figure 62 ER-Diagram ................................................................................................ 137
Figure 63 Class-Diagram ............................................................................................ 138
Figure 64 Relational Diagram ...................................................................................... 138
Figure 65 Login Portal wireframe ................................................................................ 139
Figure 66 Signup Portal wireframe .............................................................................. 140
Figure 67 Main Screen wireframe ............................................................................... 141
Figure 68 When the door is unlocked .......................................................................... 142
Figure 69 When the door is locked .............................................................................. 143
Figure70:Login-Portal .................................................................................................. 144
Figure71:Signup-Portal ............................................................................................... 145
Figure72:Main-Screen ................................................................................................. 146
Table of Tables

Table 1 Comparison of RFID and Bluetooth Technology (Juan Jose Echevarria, 2012) 2
Table 2 Comparison with a similar system .................................................................... 13
Table3: Assigning-new-RFID-tag-into-the-ArduinoUno ................................................. 58
Table 4 Test case 2: Using-Right-“authorized”-RFID-tag-in-RFID-Reader. ................... 59
Table 5 Test case 3: Using-Wrong-“unauthorized”-RFID-tag-in-RFID-Reader.............. 60
Table 6 Test case 4: Using-Right-RFID-tag-to-unlock-the-door. ................................... 61
Table 7 Test case 5: When-wrong-RFI- tag-is-used-to-unlock-the-door........................ 63
Table 8 Test case 6: Unlocking-the-door-through-Smartphone-application. ................. 65
Table 9 Test case 7: Locking-the-door-through-Smartphone-application. ..................... 67
Table 10 Test case 8: Turning-OFF-the-RFID-Reader-through-a-smartphone ............. 69
Table 11 Test case 9: Turning-ON-the-RFID-Reader-through-Smartphone-application.
...................................................................................................................................... 70
Table 12 Test case 1: Signing-up-the-new-user-in-Smart-Door-lock-android-application
...................................................................................................................................... 71
Table 13 Test case 2: Login-into-Smart-Door-lock-android-application ........................ 74
Table 14 Test case 3: When-the-wrong-password-is-entered. ...................................... 76
Table 15 Test case 4: The-use-of-Forget-password?-option-to-set-the-password-of-the-
user. .............................................................................................................................. 78
Table 16 Test case 5: Paring-Bluetooth-of-Smartphone-with-Bluetooth-module(HC-05).
...................................................................................................................................... 81
CS6P05 FYP Final Report

CHAPTER 1: INTRODUCTION

1.1 Introduction

In the context of the modern world, the IoT market is growing rapidly. With the rapid
growth and advancement of IoT, companies are focusing on time to time market and
releasing more products at a pace rather than focusing on the development of secure
products. This results in many IoT products to have insufficient protection against various
types of security attacks. The IoT products are getting more expensive, thus it is getting
inappropriate for the consumers. However, the advancement of IoT and digital technology
have also brought new possibilities and improvement on different types of system that
also includes the door locking system. The ever-growing needs of security, privacy, and
safety in modern society lead to the innovation of a smart door locking system that
integrates the concept of digital technology with various traditional lock systems.

Likewise, when we see a sophisticated door locking system, the price tag struck
immediately along with the utility. In countries like Nepal, such door lock systems are not
cheap. This is an RFID and Bluetooth based Smart Door Lock project using RFID
sensor, Bluetooth module, Android App and Arduino Uno to develop an affordable
automatic door lock device that enhance household security. This system uses both RFID
and Bluetooth technology together to develop a smart door locking system.

• RFID technology: RFID is an inexpensive technology that is used for wireless data
transmission. The RFID tag and card are the key components of RFID-technology that
is used for tracking and controlling the movement of RFID sensors. There are two
types of RFID tags that are Active and Passive tags. In this project, a passive tag is
used for developing a smart door lock. The active tag needs a battery or source to
operates whereas the Passive tag does not require any power source. (Juan Jose
Echevarria, 2012)

1
Sandesh Parajuli
CS6P05 FYP Final Report

• Bluetooth Technology: Bluetooth is a low power wireless technology that is used for
exchanging data within a short distance. In this project, the HC-05 Bluetooth module
is used as a Bluetooth device to pair with a Smartphone. This technology can
communicate easily with a smartphone. In this project, the smartphone application is
developed to connect with the Bluetooth module and to control the movement of the
door lock. (ScientificAmercican.com, 2007)

The comparison between Bluetooth and RFID technology is shown in the table below: -

Table 1 Comparison-of-RFID-and-Bluetooth-Technology (Juan Jose Echevarria, 2012)

1.2 Current Scenario


In the context of Nepal, many people suffered from household burglaries due to
the weak security of door locks. According to recent studies, the police filed the theft
cases against a total of 2,646 persons in the last fiscal year in our country and it is growing
rapidly which is expected to be happened by unsafe door locks and other security
problems. (MyRepublica, 2019). The below diagram represents the burglary rate in Nepal
per 100000 population made by UNODC at which the Nepal rank at 107 positions at the
global level in the burglary rate. It is reported that the burglary rate of Nepal was highest
in the year 2005 with 0.20. (UNODC, 2015)
2
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 1:Nepal-Bulgary-rate-per-100,000(population) (UNODC, 2015)

Moreover, there are various types of smart lock available in the market. The market of a
smart lock is increasing, and the use of such Smart Lock has been proved to minimize
household burglary rate in the world. It is estimated that the global smart door lock market
is expected to reach $2.4 billion by selling 26 million units by 2023, recording a CAGR of
19% from 2014 to 2023. This indicates that the number of active users and the market of
smart door locks are increasing and resulting in good market views in the sector of door
locks. (ResearchAndMarkets.com, 2020).

3
Sandesh Parajuli
CS6P05 FYP Final Report

Figure2:Global-Smart-Door-Lock-Forecast (Strategy Analytics, 2018)

1.3 Problem Statement


The necessity of security can be achieved by designing different types of door
locks such as mechanical locks or any electrical locks. Usually, mechanical door locks
are designed with one or more keys, but for locking a huge area many keys and locks are
needed which creates difficulties and various problems. Generally, traditional locks are
heavy and delicate as they can easily be damaged. Moreover, keys can be easily
misplaced or may fall into wrong hands which creates a possibility for an intruder to break
into a house, while the owner does not even get notified about the situation. Likewise, the
use of such traditional lock system has been the main risk factor for increasing household
burglary in Nepal, to minimize the burglary rate the use of a smart lock is must. There are
so many advance smart door lock technologies available in the market to overcome these
problems, but they are very expensive and not applicable to all users.
4
Sandesh Parajuli
CS6P05 FYP Final Report

1.4 Project as a solution


As compared with a mechanical lock, the electronic lock is always better as it
resolves the security problem arises by using the mechanical lock. Nowadays, digital
technology is widely being used for locking purposes. Many smart locking systems such
as automatic door opening and closing system, wireless door locking system, Biometrics,
and Password based system are being used for controlling the movement of a door
without the utilization of key, which is even used for maintaining the overall security of the
house. The implementation of such smart lock helps to overcome various security
problems as they alert the user and have built-in various features. Thus, RFID and
Bluetooth based Smart Door Lock is also one of the types of smart lock. It is a
reasonable technology that can be applied for various applications such as assets safe,
jewelry safe, access tracking, access control, etc. It is a very cheap and affordable design
of smart lock that allows convenience and security for users. This smart lock can be
controlled through application so that users should not carry bunch of keys and have the
fear of losing or misplacing keys.

1.5 Scope of this project


The main motive of this project is to maintain the household security through the
development of a smart door locking system, which is secured and advanced than
traditional or mechanical door locking system. The household burglary rate of Nepal is
increasing rapidly as most of the peoples are being affected by burglary in regular
manner. The main cause of household burglary is the lack of security of door lock, the
thieves are breaking the house of peoples causing property loss, money theft and crimes.
This door lock technology can be deployed to strengthen security of door lock, which
helps to get rid for such problems. The use of this system in the household helps to
minimize and can completely drop the burglary rate throughout the country. The sensors
and the alerting system of this technology notify the people about the burglar so that they
got caught before breaking the system. This system is very cost effective thus it can be
applied in every people’s door.

5
Sandesh Parajuli
CS6P05 FYP Final Report

1.5 Aim and Objectives

1.5.1 Aim
The main aim of this project is to design and implement an RFID and Bluetooth
based Smart Door Lock using the Arduino microcontroller which can be deployed for
the secured passage of an authorized user.

1.5.2 Objectives
The objectives of this smart door lock are given below: -

• To develop a smartphone application and door lock device that can lock the door
virtually.

• To decrease the household burglary rate to a large extent.

• To develop a reliable and convenient smart door lock so that people will have an
easier time unlocking their doors.

• To develop a hassle-free smart door lock system to enhance household security


by providing modern technology.

• To create a simple and cost-effective product in a short period so that it can


applicable and affordable to the average people and can compete in the present
market.

6
Sandesh Parajuli
CS6P05 FYP Final Report

1.6 Structure of the report

Briefly, the report will contain five main chapters which will represent the overall
progression from the commencement to the result of the project. At last, a conclusion and
appendix will be written according to the findings of the project.

Chapter 1-Introduction: In this chapter, the brief introduction to the subject matter is
discussed that includes an intro to the subject matter, problem statements, current
scenario, the scope of the project, and the project as a solution. The Aim and objectives
of the project are also mentioned.

Chapter 2-Background: This chapter is about the details of the background of a project
that includes About the end-user, Understanding the solution, Literature review, a Similar
system. The critical comparison with similar systems is also discussed in this chapter.

Chapter 3-Development: A detail of the project development is discussed in chapter 4


which includes the Selected methodology, Phases of methodology, Design and
Implementation. The requirement analysis and the result of Pre and Post survey is also
described in this section.

Chapter 4-Testing: This chapter is about the testing where the white box testing is used
for performing the testing of System and the application. This chapter also includes the
critical analysis of the project.

Chapter 5-Conclusion: In this chapter, the conclusion and summary are mentioned that
includes Advantages, limitation of the developed project. The security, ethical and the
social issues are also presented in this chapter. Moreover, appendix, references and the
future development is also included in this chapter.

7
Sandesh Parajuli
CS6P05 FYP Final Report

CHAPTER 2: BACKGROUND

2.1 About the end-users


This RFID and Bluetooth based Smart Door Lock is an IoT based system.
Generally, the business model has two different domains relating to the IoT-based
systems. The two domains are defined as business to enterprise and business to
consumer. The business to enterprise models targets the enterprises whereas, business
to consumer delivers the products to the end-user. Thus, this study will be oriented
towards end-users i.e. business to consumer as they are more vulnerable to IoT attacks
due to the lack of technical expertise and deployment of protection methods to avoid any
potential attacks. Therefore, this approach is mainly focused on Home Users as they are
more vulnerable and have low household security.

2.1.1 About the Home user:


The door lock is one of the major necessities of the home user as it is widely used
to protect their houses from any intruders from gaining unauthorized access. After
understanding the necessity of smart door lock in home users and taking their problems
into the consideration this project was developed.

This door lock system is provided with a smartphone application, where the user must
register. After registering, the user can log-in to the Smart door lock application. This
application stores all the essentials information about the user into the database. The
user is also provided with an RFID tag, which is used for unlocking the door. After
unlocking the door, it gets automatically locked within a few seconds. Therefore, to
enhance the strength and to maintain the security of the household individual this door
locks can be deployed.

Moreover, the below graph shows the actual growth of home-users, who are using the
smart locks in their household. According to the security segment, the number of active
house users having a smart door lock system is expected to amount to 115.8M by 2022.
(Statista, 2020)

8
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 3:Actual-growth-of-home-user-having-smart-lock (Statista, 2020)

2.2 Understanding the solution


Unlike many other IoT devices, Smart locks are also vulnerable to a host of technical
issues. However, traditional locks have their own flaws like lock-picking. But the smart
locks connected with internet, result in more possibility of doing this remotely and can
even allow the hackers to break into many locks at once. A compromised lock could give
an adversary both access to the house and information about the users. Thus, the security
of such IoT based Smart locks can be classified into three specific characteristics, that
are as follows: -

1. User-Based IoT-based Smart locks are operated primarily by actuators and sensors
that allow the devices to communicate with the user's physical environment. Likewise,
in this project, the door lock is provided with RFID tags and cards to unlock the door.
Thus, when the device is compromised it can cause serious harm as the device can
contain private data as well as the possibility of monitoring it.

2. Internet-connected: This door lock is provided with a smartphone application and


needs the internet to run through. Such a connection of devices to the internet makes
it more exposed to a vast amount of diverse attacks. Such attacks can either be direct
or indirect. The direct attack includes that the hackers access it without any

9
Sandesh Parajuli
CS6P05 FYP Final Report

intermediaries. The indirect attack includes gaining access to the device by exploiting
the existing vulnerabilities of the device while the users are unaware of the attack.

3. Complex: The complex devices with sophisticated hardware expose to more


vulnerability which can be very hard to discover and to overcome. The complex
system can also be inappropriate for the users, as the users seek for user-friendly
devices that are more convenient to use.

2.3 Similar System

2.3.1 Smart Home Security Using RFID System


This Door Lock system is a magnetic door lock that allows users to easily lock and
unlock the doors. It contains an RFID reader, relay, and magnetic door lock, and the user
is provided with a passive RFID tag to lock or unlock the door. This system uses the PIC
16F877A microcontroller for controlling the whole system. Moreover, in this system, an
LCD was used to display the door status. The components included in this system are
simple and uses only an RFID technology to develop a door lock and consist of an LCD
to give an output message. (ADAM, 2016)

Figure4: Smart-Home-Security-Using-RFID-System (ADAM, 2016)

10
Sandesh Parajuli
CS6P05 FYP Final Report

2.3.2 Automatic Door Locking System Using Bluetooth Module


This is a Bluetooth-based door locking system that uses the servo motor to lock or
unlock the door. Bluetooth module in this system works as a command agent and a
smartphone application is used for controlling the motion of the servo motor. The overall
system of this door lock is controlled by Arduino Uno. The ideal purpose of this system is
to lock and unlock the door by using a smartphone. (Lubhansh Kumar Bhute, 2017)

Figure5:Similar-system-2.3.2Module- (Lubhansh Kumar Bhute, 2017)

11
Sandesh Parajuli
CS6P05 FYP Final Report

2.3.3 Electronic Door Lock using RFID and Password-Based on Arduino


This electronic door lock uses RFID and password-based technology. This door
lock system can be used on doors and cupboards as electronic lock and so on. Like other
projects, this door lock system uses an RFID tag and password to unlock or lock the door.
The extra password function of this project makes the door lock more secure and helps
to enhance the security of home. Similarly, this door lock system is also controlled by
using a microcontroller Arduino Uno. (Ni Ni San Hlaing, 2019)

Figure6:Similar-System-2.3.3- (Ni Ni San Hlaing, 2019)

12
Sandesh Parajuli
CS6P05 FYP Final Report

2.4 Comparison with similar systems

Table 2 Comparison-with-a-similar-system
Door Lock Smart Home Automatic Door Electronic RFID and
Hardware Security Using Locking System Using Door Lock Bluetooth based
Component RFID System Bluetooth Module using RFID Smart Door Lock
and Password

Arduino ✘ ✔ ✔ ✔

PIC 16F877A ✔ ✘ ✘ ✘
RFID Sensor ✔ ✘ ✔ ✔

Relay Module ✔ ✘ ✔ ✔

Servo motor ✘ ✔ ✘ ✘
Bluetooth ✘ ✔ ✘ ✔
(HC-05)
Keypad ✘ ✘ ✔ ✘
Led lights ✘ ✔ ✔ ✔

Buzzer ✘ ✘ ✘ ✔

Breadboard ✘ ✘ ✔ ✔

Solenoid ✔ ✘ ✔ ✔
Lock

Android App ✘ ✔ ✘ ✔
(Smartphone)

Power Supply ✔ ✔ ✔ ✔

Battery ✘ ✔ ✘ ✔

Voltage ✘ ✘ ✔ ✘
Regulator

13
Sandesh Parajuli
CS6P05 FYP Final Report

2.5 Critical Comparison with RFID and Bluetooth based Smart Door Lock

2.5.2 Smart Home Security Using RFID System

This door locking system is simply an RFID Based system that needs an RFID tag to
unlock the door. As compared with this system, it lacks security features like alert function,
indication features, and so on. This door lock system does not have batteries for failsafe
which creates problems during the power cut.

2.5.2 Automatic Door Locking System Using Bluetooth Module

This door lock system is only controlled by smartphones and needs a smartphone
to unlock or lock the door. Similarly, this door lock system also lacks security features
such as alerting function and do not have another method to unlock the door rather than
via smartphone. This door lock system uses a servo motor for controlling the motion of
the door lock which is less secure as compared to the solenoid lock.

2.5.3 Electronic Door Lock using RFID and Password-Based on Arduino

This electronic door lock uses RFID and password-based technology. Although
the extra password function of this project makes the door lock more secure, it lacks
security features like alert function and does not have any battery backup. Moreover, this
system has a voltage regulator is relatively big then comparing to our system.

14
Sandesh Parajuli
CS6P05 FYP Final Report

2.6 Literature Review

Generally, there are so many factors that are needed for consideration while
building and designing a smart door locking system. The system is designed to be cost-
effective, versatile, hassle-free, and more user-friendly so that these modern devices can
be integrated into everyone's system. The main goal of such a system is to maintain and
to enhance the strength of security to the next level.

(Ralph Ting, 2014) proposed an RFID door lock that is based on security and access
control. It is designed to create a convenient way to unlock the door than the traditional
key. The components included in this system are simple and uses only an RFID
technology to develop a door lock. This system lacks the important security features as it
has no any alerting system. This system suggests adding additional features such as
buzzer for alerting purpose, SMS alert, and so on.

(Ni Ni San Hlaing, 2019), in his research on RFID door lock system suggests the use of
keypad to secure the system by adding a password after scanning the RFID tag. The
extra password function in the system makes the door lock more secure.

(Lia Kamelia, 2014) in her research on smart door lock recommends that to be able to
unlock the door using smartphone helps the users to interact more easily than other door
locking system. The proposed door lock is the combination of different technologies in
which an android smartphone works as a task handler, Bluetooth module as command
agent, Arduino Uno as controlling and data processing unit, and solenoid as the output.

(Peter Adole, 2016) introduced an RFID Based Security Access Control System with
GSM Technology. Although this is an advanced system that uses a GSM technology to
alert the user, the additional technology gives rise to the cost of the overall system. Thus,
the system fails to be cost-effective as compared to other systems.

As compared with these doors locking system proposed by different authors, our project
has extra features and uses more technology to build a door lock. The two-way
authentication feature of this project add extra security to the system and the use of
smartphone makes it more user-friendly.

15
Sandesh Parajuli
CS6P05 FYP Final Report

CHAPTER 3: DEVELOPMENT

3. Methodology

3.1 Consider Methodology


There are a wide variety of project management frameworks which have been
evolved over a year with their own strength and weaknesses. The system development
methodologies are not suitable for all projects. Thus, the methodology should be chosen
based on the specific project after acquiring the required knowledge by research. The
followings are the considered methodology for this project:

3.1.1 Waterfall Methodology


The waterfall methodology is regarded as the traditional and oldest methodology
used in project management. The waterfall methodology is the sequential movement of
the project through finite phases, in which the previous phases need to be verified to
move on the next phase. Thus, to overcome this problem Agile methodology was
developed. (Agarwal, 2020)

Figure7:Waterfall-Methodology- (Agarwal, 2020)

16
Sandesh Parajuli
CS6P05 FYP Final Report

3.1.2 Spiral Methodology


This methodology is a sophisticated approach for project management which is
generally used for early identification and limitation of project risks. It is usually started on
a small scale and then move to another phase after identifying risk and planning for risks.
(Pal, 2020)

Figure8:Spiral-Methodology- (Pal, 2020)

3.1.3 Agile Methodology


Agile is a type of methodology which describe a set of values and principle for
software development. Nowadays it can also be used for a hardware development
project. Mainly, agile is used for the project management process which includes many
iterations process. This plays an effective role when the project requires a lot of creativity
as the task has can be simplified into small tasks. It must be designed and established to
meet the dynamic set of prospects. The main goal of Agile methodology in project
management is to optimize the development process by establishing communication
through collaborative efforts between teams and customers and by increasing flexibility
in production. (Gonçalves, 2017)

17
Sandesh Parajuli
CS6P05 FYP Final Report

3.2 Selected Methodology

The main goal of this project is to design a smart door lock and Bluetooth based
android application. Therefore, after researching and by discussing the need for a
potential user Agile methodology is followed in this project. The description of the phase
of agile approach for this project is presented in 3.3.

3.2.1 Why Agile methodology?

The agile methodology was developed after the downfall of a traditional methodology
called the Waterfall methodology. Usually, In the waterfall methodology, the testing team
does not get enough time to complete the testing process as more time is spent and
wasted during the early phase for detailed documentation. But, in Agile methodology
testing is not taken as a separate phase but as an important phase of the development
process. Therefore, the agile methodology is used in this project because of the following
reasons: -

• The request for changes is easy to implement as it follows an adaptive planning


method.
• Testing is done in a timely manner by taking an important phase during the
development process.
• It works by working on minimal and essential documentation which helps to
minimize the burden of extensive documentation.

The below diagram shows the Agile methodology approach that is used for developing
this RFID and Bluetooth based Smart Door Lock: -

18
Sandesh Parajuli
CS6P05 FYP Final Report

Figure9:Agile-Methodology-for-RFID-and-Bluetooth-based-Smart-Door Lock

3.3 Phases of the methodology

3.3.1 Brainstorm
This phase deals with the research done about the smart door locking
system by reading journals, articles, and by watching video tutorials. In this phase,
the hardware components got delivered and required research was done regarding
hardware components.

19
Sandesh Parajuli
CS6P05 FYP Final Report

3.3.2 Design
After having all the required hardware components, circuit diagram and schematic
diagrams were constructed by using Fritzing software. Many types of research were done
to build the circuit diagram. Thus, by researching and after acquiring knowledge of all the
components features, the circuit diagrams were successfully constructed. The design of
this project is discussed in 3.6.

3.3.3 Development and Coding


After completing the designing process, the development and coding process was
commenced. In this section, all the hardware components were wired together and
interfaced with the Arduino board. That includes Relay module, led lights, RFID sensor,
Bluetooth module, solenoid lock, which are connected using jumper wires and 12V AC
adapter was used to power up the components. This phase also includes the
development of Smartphone Application. The task carried out in this phase are given
below: -

3.3.3.1 Soldering the RFID Sensor:

The RFID sensor usually comes with the 8-pins unsoldered version in a packet.
At first, the RFID sensor was soldered using an iron with corresponding 8-pins. The
picture of the RFID Sensor before and after soldering is shown below: -

Figure10: Picture-of-before-and-After-of-RFID-Sensor

20
Sandesh Parajuli
CS6P05 FYP Final Report

3.3.3.2 RFID Sensor Interfacing with Arduino Uno:

After finishing the soldering of RFID sensor, it is connected to Arduino Uno


correspondingly as shown in the figure below:

Figure11: Circuit-Diagram-of-Arduino-Uno-and-RFID-Reader

After finishing connecting the wire, the RFID reader library is added and the SDK
and Reset pin is defined into the Arduino UNO.

21
Sandesh Parajuli
CS6P05 FYP Final Report

Figure12:Code-for-defining-RFID-reader

3.3.3.3 Burning the RFID tag and assigning its information into Arduino Uno:

After setting up the RFID reader MFRC522 into the Arduino, the RFID tag
is burned, and the information of the respective tag is added for the movement of
the solenoid lock. To set up the communication between RFID tag and RFID
reader, the serial port is started and MFRC522 RFID reader is initiated by the
following command.

Figure13: Initiating-RFID-reader

Next, the RFID tag information is printed on the serial monitor. The below screenshot is
the code for displaying the UID of RFID tag on serial monitor.

Figure14:Code-to-print-UID-of-tag

22
Sandesh Parajuli
CS6P05 FYP Final Report

The below screenshot displays the RFID code of the authorized RFID tag in serial
monitor.

Figure15:Authorized-RFID-tag-UID

The below screenshot displays the unauthorized RFID tag in serial monitor:

Figure16: Unauthorized-RFID-tag-UID
23
Sandesh Parajuli
CS6P05 FYP Final Report

3.3.3.4 Interfacing Bluetooth module with Arduino Uno

The Bluetooth module HC-05 is connected to the Arduino Uno as shown in the figure
below.

Figure17:Interfacing(HC-05)-with-Arduino-Uno

The Rxd and Txd of HC-05 is connected to the digital pin 7 and 8 of Arduino UNO. Then,
it is defined as Software serial and Software serial library is also included. The software
serial is used for connecting the smartphone and Bluetooth module with Arduino Uno to
control the movement of solenoid lock and to monitor RFID sensor through a smartphone.
The below screenshot shows the code for defining RX and TX as a SoftwareSerial.

24
Sandesh Parajuli
CS6P05 FYP Final Report

Figure18:Defining-Rx-and-Tx-as-SoftwareSerial

To transmit the data from Smartphone to Arduino Uno, two variables are assigned. The
variable “a” is used for opening the door and “b” is used for closing the door. Respectively
to monitor the RFID sensor, the variable “1” is used for Turing ON and “2” is used for
turning OFF the RFID sensor.

Figure19: Code-For-Movement-Of-Door-And RFID-reader

25
Sandesh Parajuli
CS6P05 FYP Final Report

3.3.3.5 All hardware components Interfacing with Arduino

All the hardware components i.e. RFID reader, HC-05, relay module, Red LED, Green
LED and Solenoid lock is connected with Arduino UNO as shown in the diagram below:

Figure20:Circuit-diagram-of-all-components

Next, the green LED, red LED, Relay, Buzzer are defined in the Arduino IDE. The access
delay and denied delay is also defined as 2000ms and 1000ms which is further used for
closing the door automatically after opening it. The below screenshot displays the code
for defining all the components.

26
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 21 Defining all components

The buzzer, LED lights, movement of the door is controlled through the given code which
is shown in the screenshot below-

Figure 22 Code for running the LED, Buzzer, Relay

27
Sandesh Parajuli
CS6P05 FYP Final Report

3.3.4 Android Application Development

The android application was build using the open-source android application
development software called MIT App Inventor 2. The developed application is based on
Bluetooth clients in which users get connected and interact with the smart door lock
system. The overall system is controlled by the Arduino board. One can either lock or
unlock the door through the application. This application is also used for two-way
authentication which means the RFID Sensor can be turned off or on respectively. The
developed smartphone application consists of 3 screens that are Login Portal, Signup
portal, and Main Screen.

3.3.4.1 Login Portal:

This is the login portal where the user login through smartphone by entering their
signup credential. The user must have a Gmail account to get logged in. Firstly, the user
should signup and after signing the user can use their username and password to get
logged. If the user forgets their password, they can easily change their password by
clicking the Forgot Password option. The below screenshot shows the login portal of the
smartphone app. This login portal uses Firebase authentication to save the username
and password.

Figure23:Login-Portal
28
Sandesh Parajuli
CS6P05 FYP Final Report

The code of the login button is shown in screenshots below:

When the signup button is clicked it take to another screen that is Signup portal which is
shown below: -

The below block shows the code for calling Firebase Authentication when the username
and password is entered.

29
Sandesh Parajuli
CS6P05 FYP Final Report

When Forget password button is clicked it send the reset password link to email address
of the user. The firebase Reset password API is used for sending the reset link. The code
blocks to reset the password is given below.

30
Sandesh Parajuli
CS6P05 FYP Final Report

3.3.4.2 Sign up portal:

This portal is the user interface portal where the user creates an account by submitting
their details which includes Name, Phone No, Email address and Password. The user
detail is stored on a firebase database and the email and password is stored in firebase
authentication.

Figure24:Signup-Portal

31
Sandesh Parajuli
CS6P05 FYP Final Report

The code of Signup button given below-

The below code is used for calling the Firebase authentication to store the Email and
Password of the users.

32
Sandesh Parajuli
CS6P05 FYP Final Report

3.3.4.3 Main Screen:

This is the main screen where the user controls the movement of door lock and monitor
the RFID reader after logged in successfully. The below screenshot shows the Main
Screen of the smartphone application where the connection is establishment between the
user and smart door lock.

Figure25:Main-Screen

The Bluetooth client is used in this screen to form a connection between smartphone and
the door lock. The user uses their smartphone’s Bluetooth to connect the door lock and
to establish a connection between them. The code block of the Bluetooth client is given
below:
33
Sandesh Parajuli
CS6P05 FYP Final Report

When the user clicks the “Door Unlock” button the variable “a” pass to the system and
door is unlocked. Likewise, when the user clicks the “Door Lock” button the variable “b”
is pass and the door is locked which is shown below in code block:

34
Sandesh Parajuli
CS6P05 FYP Final Report

The smartphone is also used to turn on and off the RFID reader to form a Two-factor
authentication. The user must turn on the RFID reader to unlock the door through RFID
tag. The code blocks for Turing ON and OFF RFID reader is given below:

The user can even use their fingerprint to Unlock the door. This is the additional feature
of this application. The application uses the inbuilt fingerprint sensor of the Smartphone
to unlock the door.

The code block for Unlocking the door through fingerprint are:

35
Sandesh Parajuli
CS6P05 FYP Final Report

3.3.5 Testing
This is the important phase where the testing was performed for the entire system. In this
phase the testing of the system and the smartphone application is done by using white
box testing techniques. All the errors and bugs of the door lock device is fixed in this
phase. The detail of the testing is presented on the Chapter 4.

3.3.6 Deployment
In this phase, the smart door lock is deployed for the household security after finishing
designing, development and testing of the project. The device is ready for deployment
and to sell after this phase.

36
Sandesh Parajuli
CS6P05 FYP Final Report

3.4 Survey

3.4.1 Pre survey Result

At the beginning of this project, the survey was done asking people about this
RFID and Bluetooth based smart door lock. The total of 34 individuals have filled the pre-
survey form. The result of the pre-survey indicates that the additional security is require
for the door lock these days. Among 34 peoples only few were familiar with smart
technology that indicate only half of the individuals are familiar with the smart door locking
system. It also pointed out the smart lock needs to user friendly, so that everyone can
have easier time using the lock. The pre-survey also pointed out the obvious fact that the
people like to use of RFID and Smartphone for unlocking the door. Moreover, the pre-
survey feedback result has provided new ideas and view through which project could be
better.

The detailed of the survey result and the summary can be obtained from Appendix B.

3.4.2 Post Survey Result

After finishing the development of this project, another survey was done. The total
number of 36 individuals filled the post survey form. The post-survey indicate that the first
prototype of this project was satisfactory. The individuals liked the approach of using
smartphone and RFID tag to unlock the door. Moreover, the two-factor authentication of
the smart door lock was also appreciated. Although, the consumers wanted the additional
feature of biometrics and iris scanner, the current features were marked satisfactory and
interface friendly. The post-survey result indicates that adding those features on the smart
door lock would be ready for deployment and to compete in the market

The survey result and the summary are described below in the following bar diagrams
and pie chart Appendix C.

37
Sandesh Parajuli
CS6P05 FYP Final Report

3.5 Requirement Analysis

3.5.1 Software Requirement

3.5.1.1 Arduino IDE


Arduino IDE is a software that is developed for coding the Arduino board. It consists of a
sketch editor where the Arduino code is written, a text console for interaction with the
host, where errors are displayed and the result. Generally, the Arduino board is connected
to Arduino IDE for communicating and to upload programs. The serial monitor displays
the result after coding. In this project Arduino IDE is used for coding all the hardware
component to connect with Arduino Uno.

Figure26:Arduino-IDE-User-Interface

38
Sandesh Parajuli
CS6P05 FYP Final Report

3.5.1.2 Fritzing
Fritzing is an open-source software that is used for developing a breadboard diagram,
schematics circuit diagram to design electronics hardware. It helps the designers to
develop a prototype to build a permanent circuit. It was developed at the University of
Applied Sciences Potsdam. All the circuit and the breadboard designs is done using this
software for this smart door lock project (Fritzing, 2015)

Figure27:Fritzing

39
Sandesh Parajuli
CS6P05 FYP Final Report

3.5.1.3 MIT APP Inventor


MIT APP Inventor is a web application integrated development environment maintained
by the Massachusetts Institute of Technology. It is a blocks-type editor that allows
creating Android apps easily. While comparing with Android studio as the development
of the apps is very easy as coding skills are not required. The app can be easily developed
by simple drag and drop and connecting the blocks. (Inventor, 2019). In this project, it is
used for making a smart door lock application to connect the smartphone to the system.

Figure28:MIT-APP-Inventor (Inventor, 2019)

40
Sandesh Parajuli
CS6P05 FYP Final Report

3.5.1.4 Google Firebase database


The Google Firebase is a software development platform running by Google which
enables the various developers to create Android, iOS and WEB apps. The firebase
provides the developer various tools for analytics, reporting and setting app bugs.

Figure29:Google-Firebase-Console (Firebase, 2020)

3.5.1.5 Firebase Authentication


In this smart door lock system, the Firebase authentication is used for developing
an authentication system in smartphone application. It is used for signing up a new user
in the application, the username and password is authenticated by using this feature of
this service. This service of Google Firebase provides identity solution by securing
username, password, phone number and more. (Firebase, 2020)

41
Sandesh Parajuli
CS6P05 FYP Final Report

Figure30:Firebase-Authentication-Console (Firebase, 2020)

3.5.1.6 Firebase Realtime database


The Realtime Database is the service provide by Google Firebase to stores the
application data in the cloud storage. It is a cloud hosted NoSQL database which stores
the data and sync the data between the users in real time. In this system, the Realtime
database is used for storing the user information which includes name, phone number,
email address and password. (Firebase, 2020)

Figure31:Firebase-Realtime-database-Console (Firebase, 2020)


42
Sandesh Parajuli
CS6P05 FYP Final Report

3.5.2 Hardware Requirement


The hardware components which are required while building this RFID and
Bluetooth based Smart Door lock are given below.

➢ Arduino UNO

In this project, the Arduino microcontroller is used for monitoring and coding all the
necessary hardware to develop a smart door locking device using RFID Senor to
unlock the door. This microcontroller consists of 14 digital input/output pins, 6
analogs I/pins and a power jack. (WWW.ARDUINO.CC, 2019)

Figure32:Arduino-Uno

➢ RFID Reader

In this project, the RFID reader is used for reading the RFID cards and tags to
unlock the door. The RFID reader is a wireless device that is usually used for
transferring data to recognize and to track tags that are connected. (Tlasrfidstore,
2019).

43
Sandesh Parajuli
CS6P05 FYP Final Report

Figure33:RFID-Reader/Sensor

➢ Bluetooth Module (HC-05)

The HC-05 is a Bluetooth SSP module, designed for connecting two


microcontrollers or two devices. In this project Bluetooth Module “HC-05” is used
for connecting android smartphones with Arduino. It is used in this project to control
the door lock and RFID reader by reacting as a command agent.

Figure34:Bluetooth-module(HC-05)

➢ Relay Module

It is a microcontroller development board that is used in this project for controlling


lights bright and the movement of push-pull solenoid lock through control pins high
impedance. (Subramanian, 2018). It is generally used in this project for powering
the solenoid lock and to control the movement of the door lock.

Figure35: Single-channel-Relay

44
Sandesh Parajuli
CS6P05 FYP Final Report

➢ Solenoid Lock

It is a push-pull solenoid mechanical lock of which is connected with Arduino for


locking a door. The 12V solenoid lock is used as an output mechanism in this
project, which is used for locking and unlocking the door by its push-pull
movement.

Figure36:12V-Solenoid-Lock

➢ LED

Two LED lights green and red are used for an indication in this project. The red
LED indicate the wrong RFID and the green LED indicate the correct RFID tag.

➢ Buzzer

It is used for alerting by making buzz sound. In this project it is used as an altering
mechanism, when the intruder or the wrong RFID tag is used it alert the user about
the situation.

➢ Breadboard

It is a mini solderless prototype breadboard used for the Arduino shield to connect
the wires. It is used for interconnecting all the hardware components in this project

45
Sandesh Parajuli
CS6P05 FYP Final Report

➢ Jumper Wires

It is wired which used for connecting all the components. It is used for wiring all
the hardware components in this project.

3.6 Design
The circuit and schematic design for all the hardware components of this project is
given below: -

3.6.1 Circuit Design for RFID Reader Interfacing with Arduino

The Arduino and RFID reader are connected as shown in the figures below:

Figure37:Circuit-Diagram-of-Arduino-Uno-and-RFID-Reader

46
Sandesh Parajuli
CS6P05 FYP Final Report

Figure38: Schematic-Diagram-ArduinoUno-and-RFID-Sensor

47
Sandesh Parajuli
CS6P05 FYP Final Report

3.6.2 Circuit Design for Bluetooth (HC-05) module Interfacing with Arduino
The Bluetooth module and Arduino Uno are connected as shown in the figures below:

Figure39:Circuit-Diagram-of-ArduinoUno-and-Bluetooth-Module

48
Sandesh Parajuli
CS6P05 FYP Final Report

Figure40:Schematic-diagram-of-ArduinoUno-and-Bluetooth-Module

49
Sandesh Parajuli
CS6P05 FYP Final Report

3.6.3 Circuit Design for RFID reader, Buzzer, Led, Solenoid lock, Battery, and Relay
module Interfacing with Arduino

The RFID reader, buzzer, led, solenoid lock, battery and Relay module are connected
with Arduino as shown in the figure below:

Figure41:Circuit-Diagram-of-ArduinoUno-and-Bluetooth-Module

50
Sandesh Parajuli
CS6P05 FYP Final Report

Figure42:Schematic -Diagram-of-Arduino-Uno-and-Bluetooth-Module

51
Sandesh Parajuli
CS6P05 FYP Final Report

3.6.4 Circuit Design for All hardware components Interfacing with Arduino
All hardware components are connected with Arduino as shown in the figures below.

Figure43:Circuit-Diagram-of-All-Hardware-Components

52
Sandesh Parajuli
CS6P05 FYP Final Report

Figure44:Schematic-Diagram-of-all-hardware-components-together

53
Sandesh Parajuli
CS6P05 FYP Final Report

3.6.5 UML Diagram


The activity of the person with the door lock is shown in the below diagram. It also shows the
working of the hardware components when a person interacts with this door lock.

Figure45:Activity-Diagram-of-RFID-and-Bluetooth-Based-Smart-Door-Lock

54
Sandesh Parajuli
CS6P05 FYP Final Report

3.7 Implementation

3.7.1 System Architecture

3.7.1.1 Block Diagram

The below figure shows the block diagram of the whole door lock system. This door lock
system is the combination of different technologies in which an android smartphone and
RFID tag work as a task handler, Bluetooth module and RFID reader as command agent,
Arduino UNO as controlling and data processing unit and solenoid as the output.

Figure46:Block-Diagram-of-RFID-and-Bluetooth-based-Smart-Door-Lock

55
Sandesh Parajuli
CS6P05 FYP Final Report

3.7.1.2 Project Process Flow Chart


The below diagram shows the control flow connection of the whole system which includes
the working of hardware components and the Two-way authentication.

Figure47:Flowchart-of-RFID-and-Bluetooth-based-Smart-Door-Lock

56
Sandesh Parajuli
CS6P05 FYP Final Report

CHAPTER 4: TESTING

4.1 Testing
There are different types of methodologies that are available to test the system and its
software whose main motive is to address the bugs in the system and to fix it. The bugs
are the error in the system which can be seen while running the system. (Mohd Ehmer,
2012) The main objectives of the testing are given below: -

- To ensure the smartphone application and the device works correctly as specified by
the developer
- To ensure the bug and error-free application and system.
- To achieve user satisfaction.

After researching the various testing methodologies, white box testing is followed in this
project to test the door lock device and the smartphone application. As this project is
developed for the user, the white box testing is appropriate and meets all the objectives
mentioned above for testing. The tester should know the source code of the system and
should completely understand the working mechanism of the system and the software to
perform the testing. Thus, when the error or bugs are found while performing the testing,
it should be resolved as soon as possible. The testing was done using white box testing
because: -

- It assures that all the unit of the device and the software is working as all the units
are tested at least once.
- It helps to find out the differences between expected results and the actual results
and shows the behavior of the device and the application.
- It covers maximum areas during test scenario that helps to optimize the code by
finding the errors. (Gaurav Saini, 2013)

The white box testing implements three levels for testing that are unit, integration and
system testing. The testing of the Smart door lock system is shown in the below tables:

57
Sandesh Parajuli
CS6P05 FYP Final Report

4.2 Unit Testing

4.2.1 Test case 1: Assigning new RFID tag into the Arduino Uno
Table3: Assigning-new-RFID-tag-into-the-Arduino Uno

Test Case 01

Objective To assign the new RFID tag into the door lock system to unlock the
door.

Expected Results. 1. The RFID tag UID number should display in the serial monitor
of Arduino IDE.

Actual Results The RFID Tag is successfully displayed on the serial monitor. Task1
successful!

Analysis The UID of the RFID tag is later used for the access control and
unlocking the solenoid lock.

Proof:

58
Sandesh Parajuli
CS6P05 FYP Final Report

4.2.2 Test Case 2: Using Right “authorized” RFID tag in RFID Reader.
Table 4 Test case 2: Using-Right-“authorized”-RFID-tag-in-RFID-Reader.

Test Case 0w

Objective To use the authorized RFID tag to unlock the door

Expected Results. 1. The serial monitor should display the message “Authorized
access”

Actual Results The serial monitor displays the message successfully. Test 2
successful!

Analysis The authorized RFID tag can be used for unlocking the solenoid lock
of the door

Proof:

59
Sandesh Parajuli
CS6P05 FYP Final Report

4.2.3 Test Case 3: Using Wrong “unauthorized” RFID tag in RFID Reader.
Table 5 Test case 3: Using-Wrong- “unauthorized”-RFID-tag-in-RFID-Reader

Test Case 03

Objective To use the wrong RFID tag in RFID reader.

Expected Results. 1. The serial monitor should display the message “Access
denied”

Actual Results The serial monitor displays the message successfully. Test 3
successful!

Analysis When an unauthorized RFID tag is used the door is locked and the
user is alert by a buzzer.

Proof:

60
Sandesh Parajuli
CS6P05 FYP Final Report

4.2.4 Test Case 4: Using Right RFID tag to unlock the door.
Table 6 Test case 4: Using-Right-RFID-tag-to-unlock-the-door.

Test Case 04

Objective To test the system that should work when the Right RFID tag is used

Expected Results. 1. The serial monitor should display the message authorized access.
2. The Green LED light should turn on.
3. The solenoid lock should be pushed backed to unlock the door.
4. The buzzer should turned off.

Actual Results The serial monitor prompt the message, Green LED is turned On, the door
is unlocked and the buzzer did not turn on. Test 4 successful!

Analysis The door should be unlocked for the secure passage to the user.

Proof:

61
Sandesh Parajuli
CS6P05 FYP Final Report

62
Sandesh Parajuli
CS6P05 FYP Final Report

4.2.5 Test Case 5: When wrong RFID tag is used to unlock the door.
Table 7 Test case 5: When-wrong-RFID- tag-is-used-to-unlock-the-door.

Test Case 05

Objective To test the system that should not work when the wrong RFID tag is used

Expected Results. 1. The serial monitor should display the message “access denied”.
2. The Red LED light should turn on.
3. The solenoid lock should be at initial stage and door shoulde be
locked.
4. The buzzer should turn on.

Actual Results The serial monitor prompt the message, Red LED is turned On, the door
is locked, and the buzzer is turned on. Test 5 Successful!

Analysis The buzzer should alert the user about the intruder on the house.

Proof:

63
Sandesh Parajuli
CS6P05 FYP Final Report

64
Sandesh Parajuli
CS6P05 FYP Final Report

4.2.6 Test Case 6: Unlocking the door through Smartphone application.


Table 8 Test case 6: Unlocking-the-door-through-Smartphone-application.

Test Case 06

Objective To test the system that should work when the smartphone is used to
unlock the door.

Expected Results. 1. The door should be unlocked.


2. The serial monitor should display the result “The door is
unlocked” and show the variable “a”

Actual Results The serial monitor prompts the message, and the door should is unlocked.
Test 6 Successful!

Analysis The smartphone is used for unlocking the door when the user is inside the
house, as the RFID reader is placed outside the door.

Proof:

65
Sandesh Parajuli
CS6P05 FYP Final Report

66
Sandesh Parajuli
CS6P05 FYP Final Report

4.2.7 Test Case 7: Locking the door through Smartphone application.

Table 9 Test case 7: Locking-the-door-through-Smartphone-application.

Test Case 07

Objective To test the system that should work when the smartphone is used to lock
the door.

Expected Results. 1. The door should be locked.


2. The serial monitor should display the result “The door is locked”
and show the variable “b”

Actual Results The serial monitor prompts the message, and the door locked. Test 07
Successful!

Analysis The smartphone is used for locking the door when the user is inside the
house, as the RFID reader is placed outside the door.

Proof:

67
Sandesh Parajuli
CS6P05 FYP Final Report

68
Sandesh Parajuli
CS6P05 FYP Final Report

4.2.8 Test Case 8: Turning OFF the RFID Reader through a smartphone
Table 10 Test case 8: Turning-OFF-the-RFID-Reader-through-a-smartphone

Test Case 08

Objective To test the system that should work when the smartphone is used to turn
OFF the RFID reader.

Expected Results. 1. The RFID reader should be turned OFF.


2. The serial monitor should display the result “The RFID reader is
turned OFF” and show the variable “2”

Actual Results The serial monitor prompts the message, and the RFID reader is turned
off. Test 08 Successful!

Analysis This creates a two-factor authentication in such a way that the RFID
reader should be turned ON through a smartphone to unlock the door by
using an RFID tag.

Proof:

69
Sandesh Parajuli
CS6P05 FYP Final Report

4.2.9 Test Case 9: Turning ON the RFID Reader through Smartphone application.
Table 11 Test case 9: Turning-ON-the-RFID-Reader-through-Smartphone-
application.

Test Case 09

Objective To test the system that should work when the smartphone is used to turn
ON the RFID reader.

Expected Results. 1. The RFID reader should be turned ON.


2. The serial monitor should display the result “The RFID reader is
turned ON” and show the variable “1”

Actual Results The serial monitor prompts the message, and the RFID reader is turned
on. Test 09 Successful!

Analysis This creates a two-factor authentication in such a way that the RFID
reader should be turned ON through a smartphone to unlock the door by
using an RFID tag.

Proof:

70
Sandesh Parajuli
CS6P05 FYP Final Report

4.3 System Testing


The testing of Android Application is given below:

4.3.1 Test Case 01: Signing up the new user in Smart Door lock android application
Table 12 Test case 1: Signing-up-the-new-user-in-Smart-Door-lock-android-
application

Test Case 01

Objective To test the application that should register the new user in the Smart Door
lock application

Expected Results. 1. The user details should be added to the firebase database.
2. The new user should be registered.
3. The username and the password should be store into the Firebase
authentication

Actual Results The new user is successfully registered and the user details are stored in
the Firebase database.

Analysis This application uses the Firebase database to store the user details and
the firebase authentication is used for logging in the user into the Smart
Door Lock application

Proof:

71
Sandesh Parajuli
CS6P05 FYP Final Report

72
Sandesh Parajuli
CS6P05 FYP Final Report

73
Sandesh Parajuli
CS6P05 FYP Final Report

4.3.2 Test Case 2: Login into Smart Door lock android application
Table 13 Test case 2: Login-into-Smart-Door-lock-android-application

Test Case 02

Objective To test the application that should work when the correct login credential
is used.

Expected Results. 1. The user should be logged in into the Smart Door Lock application

Actual Results The user is successfully logged in the Smart Door Lock application. Test
02 Successful!

Analysis While logging in the application the Firebase Authentication call the data
stored into firebase application to log in the user into the application

Proof:

74
Sandesh Parajuli
CS6P05 FYP Final Report

75
Sandesh Parajuli
CS6P05 FYP Final Report

4.3.3 Test Case 3: When the wrong password is entered.


Table 14 Test case 3: When-the-wrong-password-is-entered.

Test Case 03

Objective To test the application should deny the user when the wrong password is
entered

Expected Results. 1. The pop-up message should appear saying login failed

Actual Results The pop-up message is successfully displayed the user is denied to login.

Analysis The Firebase authentication validates the password with the actual
password of the user and prompt login failed when the password is
incorrect.

Proof:

76
Sandesh Parajuli
CS6P05 FYP Final Report

77
Sandesh Parajuli
CS6P05 FYP Final Report

4.4.4 Test Case 4: The use of Forget password? option to set the password of the
user.
Table 15 Test case 4: The-use-of-Forget-password?-option-to-set-the-password-of-the-
user.

Test Case 09

Objective To test the application that works when the forget password option is
clicked to reset the password

Expected Results. 1. The reset link should be sent to change the password

Actual Results The reset link is sent successfully, and the password is changed. Task 4
successful!

Analysis The firebase API is used for sending the reset email on the respective
email address of the user

Proof:

78
Sandesh Parajuli
CS6P05 FYP Final Report

79
Sandesh Parajuli
CS6P05 FYP Final Report

80
Sandesh Parajuli
CS6P05 FYP Final Report

4.4.5 Test Case 5: Paring Bluetooth of Smartphone with Bluetooth module HC-05.
Table 16 Test case 5: Paring-Bluetooth-of-Smartphone-with-Bluetooth-module(HC-05).

Test Case 04

Objective To test the application that should work when the smartphone is used to
connect with Bluetooth module HC-05.

Expected Results. 1. All the Bluetooth devices should be displayed


2. The smartphone Bluetooth should successfully pair with Bluetooth
module HC-05

Actual Results All the Bluetooth devices available are displayed and the smartphone is
successfully paired with the Bluetooth module HC-05. Test
04 successful!

Analysis After connecting the smartphone Bluetooth with the HC-05 module, the
connection is established between the smartphone and the Smart Door
lock system to monitor and to control the door lock and the RFID
reader/sensor.

Proof:

81
Sandesh Parajuli
CS6P05 FYP Final Report

82
Sandesh Parajuli
CS6P05 FYP Final Report

4.6 Critical Analysis


This system is designed to simulate an electronic solenoid lock, which is controlled
through a Bluetooth-enabled smartphone and RFID tag. The microcontroller “Arduino
UNO” is used in this system to stores the information of the RFID tag of the user and to
control all the hardware components. Firstly, the RFID tag is scanned, and a unique code
is generated which is used into the Arduino code to register a user. This RFID tag will
only be accessible to the user. When the registered user uses his/her tag into the reader,
the device should check it for verification. If the RFID tag gets matched, the green LED
will turn on for indication and the door is unlocked for the entry of the user. After unlocking
the door, it closes automatically within a specific time. When the wrong RFID tag is used,
the users get notified by a buzzer and the red LED light will turn on for indication. RFID
sensor is placed outside the door. So, the RFID tag will only be used to unlock the door
from outside. When the user is inside, they can use their smartphone to lock or unlock
the door. The controlling is established by sending a command via Bluetooth to the
Arduino circuit which works as a connection between Android smartphone and the door
lock.

Rather than using a key, this device uses a passive RFID tag. Moreover, to make this
device more secure two- way authentication is created between the RFID reader and a
smartphone to lock or unlock the door. Thus, the RFID reader must be turned on through
a smartphone to be able to read the RFID tag to unlock the door. Moreover, this door lock
device provides a safe and efficient solution for controlling the movement of the door
through a smartphone. Firstly, the user should register through a smartphone application.
After registering, the user can log-in to the Smart door lock application and can control
the door through the smartphone.

83
Sandesh Parajuli
CS6P05 FYP Final Report

CHAPTER 5: CONCLUSION

5.1 Summary and Conclusion


The Internet of things is one of the revolutionary achievements in the field of
technology. It is a concept that defines the idea of making the everyday physical object
digitalize by connecting with the internet. Similarly, this project is also connecting the door
lock with the internet to develop a smart door locking system. Likewise, the main aim of
this project is to design a smart door lock having RFID and Bluetooth technology, and the
smartphone application as a controlling mechanism has been developed successfully.
The objective of the smartphone application to connect the door lock with the internet is
successfully achieved at the end.

This project is an affordable design of smart lock that enhance the security of the houses.
This design is comparatively small and easy to install with just a pair of screws. Similarly,
this door lock device is advanced and secure than any other traditional locks. Moreover,
this type of door lock is not only for the house door, but also it can be great in use for
hotels, motels, hospitals, and other commercial buildings for access control and safe. It
can even be used in the car door too. Moreover, this lock can be a simple and cost-
effective upgrade to the average consumer’s security.

5.2 Advantages
There are many advantages associated while using this smart door lock. Some of
them are given below: -

1. Simple to use
Nowadays, technology is getting more complex with extra features and uses tons
of technologies. This door lock system is simple to use and very convenient as the
user will have an easier time unlocking their doors. It is hassle-free to install so
that anyone can install it into their house’s door with ease.

2. Cost-effective
The hardware components and the technologies used while developing this door
lock is very cheap. Therefore, this smart door lock device is very cheap comparing

84
Sandesh Parajuli
CS6P05 FYP Final Report

to other smart door lock devices on the market. It is a simple and cost-effective
upgrade to the average consumer’s security.

3. Controlling with Smartphone application


This smart door lock can easily be controlled by using a smartphone application to
lock or unlock the door, the users do not have to worry about losing keys.

4. Alerting feature:
This smart door lock has a buzzer so that when the intruder tries to open the door,
it alerts the user.

5. Two-Factor Authentication
This smart door lock has the two-factor authentication feature as the RFID reader
can be turned ON and OFF via smartphone application. Thus, to unlock the door
through the RFID tag it must be turned on. This helps to minimize different security
attacks of RFID tag and makes the lock secure.

5.3 Limitations

1. One of the major disadvantages is that if the phone ran out of charge then the user
cannot use their application to lock or unlock the door.
2. This smart door lock uses a power source that is batteries to run the system, in
case of power failure, the user cannot have access to the door. The batteries
should be changed in time.
3. This application is only developed in the android platform so, the people having
IOS and windows phone cannot access to this smart door lock.
4. This smart door lock is the IoT based device so the security attack performs by
hackers can damage the system and can even compromise it.

85
Sandesh Parajuli
CS6P05 FYP Final Report

5.4 Legal and Security issues


There are no cybersecurity standards for any IoT devices, every digital device has
its own flaws and vulnerabilities presented in their system. This smart door lock device is
also vulnerable to security attacks, which can be exploited by the hacker. Such security
attacks have a direct threat to the assets and the proprieties of the user as the hacker
can gain access to the house. Moreover, there are many legal implications ready for
protecting the users in such environment made by the country’s law. The security issues
and legal issues are arising from the below attacks: - (Hany F. Atlam, 2019)

5.4.1 Physical attacks


This type of attack deals with the hardware components of the system in which the
attackers need to be physically contacted with the IoT system to perform the attacks. The
RF interference of RFID and Node tempering is the example of the attack involve in this
smart door lock system.

5.4.2 Software attacks:


This type of attack deals with the software of the system, in which the attacker exploits
the vulnerabilities and threats presented on the system implementation using the interface
of communication. Virus, DoS attack, phishing, and spyware are the example of such
attacks.

5.4.3 Network attacks


This type of attack deal with the network of the system which are used for transferring the
data between different IoT devices. There is various type of network attack concerned
with smart door lock that includes RFID cloning, RFID spoofing, RFID unauthorized
access, which is used by the attacker to compromise the system for the access.

86
Sandesh Parajuli
CS6P05 FYP Final Report

5.5 Ethical issues


This smart door lock stores the user information while signing up in the smartphone
application. The user information includes the name, phone number, email address, and
password of the existing users. Therefore, the storing of such sensitive data always has
ethical issues. Some of the challenges presented in ethical issues of this smart door lock
are: (Hany F. Atlam, 2019)

5.5.1 User Identification:


The breach of the system can leak the user credentials, which can lead to horrific
consequences and even legal action in some cases. Many IoT based devices collect the
various types of data without the user’s permission that creates a critical problem that
should be addressed in IoT devices, also in this system.

5.5.2 People’s Life Threat:


The security breach on any system can lead to fatal consequences that include data loss,
physical threats to users. This door lock system is used for access control and can be
applied in home, car, hotels, hospital area, and so on. Thus, the breach of the system
directly affects the lives of the people. The attacker can gain control of the system and
cause serious damage to the people who are using such devices.

5.5.3 Public and Private Border Line:


There are multiple types of sensor which are used while building IoT based systems.
Such sensors can collect both public and private data of the users. The boundaries should
be well-defined in IoT applications to clear the line between public and private information
of users.

87
Sandesh Parajuli
CS6P05 FYP Final Report

5.6 Social Issue


The social issue is also one of the major issues of this project. The IoT devices are
directly connected with the internet thus it faces many attacks and threats coming from
the internet. Therefore, there are different types of risk associated while using IoT based
devices. This project is the development of smart lock, as locks are the product that
ensures the safety to the users, there should be great trust between the user and the
device they are using. If the trust is broken between the user and product, it will directly
affect the developers causing a bad reputation. The market for the product will also be
affected. The trust is very hard to acquire and easy to lose so the smart door lock should
have the ability to override such risks, allowing people to use the door lock without
hesitation. (Hany F. Atlam, 2019)

5.7 Future development or research


The smart door lock system developed in this project focusses on the security of
the door system more than the functionality and features. However, the main function of
this system has been developed successfully where the user can access the door using
the RFID tag and the mobile application. There are various places to improve on the
android application and the system to make it more advance and usable for the group of
users. Some of the future development that can be made in this smart door lock is given
below: -

1. Adding biometrics features in this smart door lock. So, the user can have an easier
time unlocking the door just by using their thumbprint.

2. Adding NFC technology to the smart door lock that allows the user to unlock the
door through NFC just by holding their smartphone to the lock.

3. Adding LED or AMOLED display, this feature can be implemented to provide the
status of the door, so that the user can know door status.

88
Sandesh Parajuli
CS6P05 FYP Final Report

4. The most important feature would be adding different language in the application.
Generally, this application is based on the English language so adding the Nepali
language would help the Nepalese people to use the app without a struggle.

5. This application can only be used in the android platform. To make it more
accessible, the IOS and Windows version can also be developed for the users.

6. Adding notification features such as receiving notification on the user’s phone


about the door lock and unlock can also be implemented in the future.

89
Sandesh Parajuli
CS6P05 FYP Final Report

6. References

Lubhansh Kumar Bhute, .G.S.A.S. (2017) Automatic Door Locking System Using Bluetooth. International
Journal for Research in Applied Science & Engineering, 5(V), pp.1128-31. Available at:
https://www.ijraset.com/fileserve.php?FID=7810.

ADAM, N.A.B. (2016) SMART HOME SECURITY USING RFID SYSTEM. SMART HOME SECURITY USING RFID
SYSTEM , 1(1), pp.1-24. Available at: http://eprints.utem.edu.my/16257/.

Agarwal, S. (2020) www.c-sharpcorner.com [Online]. (1) Available from: https://www.c-


sharpcorner.com/UploadFile/ae6b35/waterfall-model-in-software-testing/ [Accessed 2013 May 2013].

Bayoumi, A.K.J.A. (2016) RFID Security Threats and Basic Solutions. RFID Security, I(1), pp.27-41. Available
at: https://link.springer.com/chapter/10.1007/978-3-319-47545-5_2#citeas.

Brinkmannhardware. (2014) brinkmannhardware [Online]. (1) Available from:


https://brinkmannhardware.com/door-locks-protect-home-holidays/ [Accessed 4 Dec 2014].

Dijk, J.V. (2015) Property Crime: Victimization and Trends. International Encyclopedia of the Social &
Behavioral Sciences, 2nd(1), pp.100-13. Available at: https://www.sciencedirect.com/topics/social-
sciences/burglary.

Estes, A.C. (2019) www.gizmodo.com [Online]. Available from: https://gizmodo.com/the-history-and-


future-of-locks-and-keys-1735694812 [Accessed 20 October 2015].

Firebase. (2020) Firebase Documentation [Online]. (1.0) Available from: https://firebase.google.com/docs


[Accessed 31 May 2020].

Fritzing. (2015) www.Fritzing.org [Online]. (1) Available from: https://fritzing.org/home/ [Accessed 10


January 2015].

Gaurav Saini, K.R. (2013) An Analysison Objectives, Importanceand Typesof SoftwareTesting. International
Journal of Computer Science and Mobile Computing (IJCSMC), 2(9), pp.18-23. Available at:
https://docplayer.net/16691951-An-analysis-on-objectives-importance-and-types-of-software-
testing.html.

Gonçalves, R. (2017) www.hackernoon.com [Online]. (1) Available from:


https://hackernoon.com/moving-to-an-agile-environment-part-ii-scrum-by-the-book-5733dc6bee3e
[Accessed 2 November 2017].

Gyanendra Kumar Verma, T.P. (2010) A Digital Security System with Door Lock System Using RFID
Technology. International Journal of Computer Applications, 5(11), pp.1-10. Available at:
https://www.researchgate.net/publication/45602075_A_Digital_Security_System_with_Door_Lock_Syst
em_Using_RFID_Technology.

Hany F. Atlam, G.B.W. (2019) IoT Security, Privacy, Safety and Ethics. In Springer, ed. Digital Twin
Technologies and Smart Cities. 1st ed. Springer, Cham. pp.123-49.

90
Sandesh Parajuli
CS6P05 FYP Final Report

Inventor, M.A. (2019) MIT App Inventor [Online]. (3.0) Available from:
https://appinventor.mit.edu/about-us [Accessed 1 January 2012].

Juan Jose Echevarria, J.R.-d.-G.J.L.M.A. (2012) Comaprision of RFID and Bluetooth technology. WebTag:
Web browsing into sensor tags over NFC, 12(7), pp.8670- 8690. Available at:
https://www.researchgate.net/publication/231212227_WebTag_Web_browsing_into_sensor_tags_ove
r_NFC.

Lia Kamelia, A.N.S.R.M.S.a.W.S..E.M. (2014) ARPN Journal of Engineering and Applied Sciences. DOOR-
AUTOMATION SYSTEM USING BLUETOOTH-BASED ANDROID, 9(10), pp.1759-62. Available at:
https://www.researchgate.net/publication/292624568_Door-automation_system_using_bluetooth-
based_android_for_mobile_phone/citation/download.

LTD, A.T.C. (2015) Security for Home and Business. Advantages and disadvantages of RFID Door Locks,
I(2), pp.1-10. Available at: http://www.astclock.com/advantages-of-rfid-door-locks/.

Lubhansh Kumar Bhute, .G.S.A.S. (2017) Automatic Door Locking System Using Bluetooth. International
Journal for Research in Applied Science & Engineering, 5(V), pp.1128-31. Available at:
https://www.ijraset.com/fileserve.php?FID=7810.

Mohd Ehmer, F.K. (2012) A Comparative Study of White Box, Black Box and Grey Box Testing Techniques.
(IJACSA) International Journal of Advanced Computer Science and Applications, 3(6), pp.12-15.

MyRepublica. (2019) Theft cases on rise. Theft cases on rise, p.3. Available at:
https://myrepublica.nagariknetwork.com/news/theft-cases-on-rise/.

Ni Ni San Hlaing, S.S.L. (2019) International Journal of Trend in Scientific Research and Development
(IJTSRD). Electronic Door Lock using RFID andPassword Based on Arduino, 3(3), pp.799-802. Available at:
https://www.ijtsrd.com/engineering/electronics-and-communication-engineering/22875/electronic-
door-lock-using-rfid-and-password-based-on-arduino/ni-ni-san-hlaing.

Pal, S.K. (2020) About Us: A computer science portal foor geeks [Online]. (1) Available from:
https://www.geeksforgeeks.org/software-engineering-spiral-model/ [Accessed 5 January 2015].

Peter Adole, J.M.M.G.A.I. (2016) RFID Based Security Access Control System with GSM. American Journal
of Engineering Research (AJER), 5(7), pp.236-42. Available at:
http://www.ajer.org/papers/v5(07)/ZE050702360242.pdf.

Ralph Ting, M.K. (2014) RFID Door Lock. RFID Door Lock | Senior Project | Electrical Engineering
Department, 1(1), pp.1-37. Available at:
https://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?article=1267&context=eesp.

ResearchAndMarkets.com. (2020) Global Smart Lock Market Report 2020: Size, Share & Trends Through
2016-2027. Home Security and Safety. Dublin: Research and Markets Research and Markets.

ScientificAmercican.com. (2007) How does Bluetooth work? [Online]. (1) Available from:
https://www.scientificamerican.com/article/experts-how-does-bluetooth-work/ [Accessed 01 May
2020].

91
Sandesh Parajuli
CS6P05 FYP Final Report

Statista, I. (2020) Number of Smart Homes forecast worldwide from 2016 to 2022. Smart Homes forecast
worldwide from 2017 to 2024. New York, 55 Broad Street : www.statista.com Statista, Inc.

Strategy Analytics, I. (2018) www.Businesswire.com | A BEERKSHIRE HATHAWAY COMPANY [Online]. (1)


Available from: https://www.businesswire.com/news/home/20180815005537/en/Strategy-Analytics-
Smart-Lock-Sales-Approach-26M [Accessed 18 May 2020].

Subramanian. (2018) Androiderode [Online]. (1.0) Available from: https://www.androiderode.com/relay-


module-and-working-details/ [Accessed 13 September 2018].

Tlasrfidstore. (2019) tlasrfidstore.com [Online]. Available from: https://www.atlasrfidstore.com/rfid-


beginners-guide/ [Accessed 28 February 2019].

UNODC. (2015) Nepal : Burglary (rate per 100,000 population). Ranking of Satistics. Kathmandu: -
Actualitix – All right reserved United Nations Office on Drugs and Crime (UNODC).

Wiredsmart. (2019) Wired Smart [Online]. (1) Available from: https://wiredsmart.io/smart-door-


locks/evolution-and-history-door-locks/#sidewidgetarea [Accessed 15 MAy 2015].

WWW.ARDUINO.CC. (2019) https://www.arduino.cc/en/Guide/HomePage [Online]. (1.5) Available from:


https://www.arduino.cc/en/Guide/HomePage [Accessed 01 JAnuary 2019].

92
Sandesh Parajuli
CS6P05 FYP Final Report

7. Appendix

7.1Appendix A: History

All through human history, door locks have been regarded as the basis of a security
system and been used with an essential function of limiting or restricting access to certain
spaces from undesirable users. Along with history, these lock systems have gone through
many enhancement and variations over centuries and have formed the establishment of
modern security systems nowadays.

Figure 48 Door Lock in Ancient time (Wiredsmart, 2019)

The origin of door lock can be traced from ancient time back in 4000 B.C when the
archaeologist around the world found a symbol of lock system in Egypt and Greece.
These lock systems were similar as today as it is based on the same principle of pin lock
system varying length and needs a key to unlock the door by matching and lining up the
pins to get access. By the medieval age and the industrial revolution, the door lock system
has gone through many variations in order to strengthen the security of the locking
system.(Wiredsmart, 2019)

93
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 49 Advance Door lock (Brinkmannhardware, 2014)

Today is the digital age, many progressions on digital and computer innovation have
brought numerous changes and improvements in the door locking system. The rising
needs of security and privacy in present society have brought a massive change and
formed a new door lock technology which coordinates the concept of traditional lock
system with computerized and smart technologies.

Although many changes and advancements are made on door lock throughout history
however their ultimate principle of keeping out the unwanted user has always been the
same. While the use of door lock in history might have been simple but their applications
in this modern world is limitless. (Estes, 2019)

94
Sandesh Parajuli
CS6P05 FYP Final Report

7.2 Appendix B: Pre-Survey


7.2.1 Pre-Survey Form

95
Sandesh Parajuli
CS6P05 FYP Final Report

96
Sandesh Parajuli
CS6P05 FYP Final Report

97
Sandesh Parajuli
CS6P05 FYP Final Report

Figure50: Sample of Pre-Survey Form

98
Sandesh Parajuli
CS6P05 FYP Final Report

7.2.2 Sample of Filled Pre-Survey Form

99
Sandesh Parajuli
CS6P05 FYP Final Report

100
Sandesh Parajuli
CS6P05 FYP Final Report

101
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 51 Sample of Filled Pre-Survey Form

102
Sandesh Parajuli
CS6P05 FYP Final Report

7.2.3 Pre-Survey Result

Do you think mechanical door locks are safe? COUNT

Maybe 7

No 4

Yes 23

Grand Total 34

Note: This Survey Has Been Conducted Among 34 individuals

103
Sandesh Parajuli
CS6P05 FYP Final Report

Do you think additional security is required for the Door lock these days? COUNT

Maybe 2

No 2

Yes 30

Grand Total 34

Note: This Survey Has Been Conducted Among 34 individuals

104
Sandesh Parajuli
CS6P05 FYP Final Report

Would you like to use a secure and cheap technology for your home security? COUNT

Maybe 5

No 2

Yes 27

Grand Total 34

Note: This Survey Has Been Conducted Among 34 individuals

105
Sandesh Parajuli
CS6P05 FYP Final Report

How much you are familiar with the Smart Door Locking System? COUNT

Less 18

More 11

Unknown 5

Grand Total 34

Note: This Survey Has Been Conducted Among 34 individuals

106
Sandesh Parajuli
CS6P05 FYP Final Report

Would you like using your smartphone to unlock your door? Count

Maybe 6

No 2

Yes 26

Grand Total 34

Note: This Survey Has Been Conducted Among 34 individuals

107
Sandesh Parajuli
CS6P05 FYP Final Report

Would you like to use RFID tag to unlock your door? Count

Maybe 9

No 4

Yes 21

Grand Total 34

Note: This Survey Has Been Conducted Among 34 individuals

108
Sandesh Parajuli
CS6P05 FYP Final Report

Do you think user should get notified when someone tries to unlock the door? Count

Maybe 1

No 2

Yes 31

Grand Total 34

Note: This Survey Has Been Conducted Among 34 individuals

109
Sandesh Parajuli
CS6P05 FYP Final Report

Would you feel safe using smart technology for household security? Count

Maybe 9

No 2

Yes 23

Grand Total 34

Note: This Survey Has Been Conducted Among 34 individuals

110
Sandesh Parajuli
CS6P05 FYP Final Report

Will you encourage others to use this technology? Count

Maybe 3

No 2

Yes 29

Grand Total 34

Note: This Survey Has Been Conducted Among 34 individuals

111
Sandesh Parajuli
CS6P05 FYP Final Report

Feedback

Note: This Survey Has Been Conducted Among 34 individuals

112
Sandesh Parajuli
CS6P05 FYP Final Report

7.3 Appendix C: Post-Survey


7.3.1 Post-Survey Form

113
Sandesh Parajuli
CS6P05 FYP Final Report

114
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 52 Sample of Post-Survey Form

115
Sandesh Parajuli
CS6P05 FYP Final Report

7.3.2. Sample of Filled Post-Survey Form

116
Sandesh Parajuli
CS6P05 FYP Final Report

117
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 53 Sample of Filled Post-Survey Form

118
Sandesh Parajuli
CS6P05 FYP Final Report

7.3.3 Post-Survey Result

What do you think about Smart Door Lock system? Count

Bad 0

Good 10

Great 26

Grand Total 36

Note: This Survey Has Been Conducted Among 36 individuals

119
Sandesh Parajuli
CS6P05 FYP Final Report

Do you trust this Smart Door Lock technology? Count

Maybe 3
No 5
Yes 28

Grand Total 36

Note: This Survey Has Been Conducted Among 36 individuals

120
Sandesh Parajuli
CS6P05 FYP Final Report

Do you think RFID card access is good for the Security in door lock system? Count

Maybe 5

No 5

Yes 26

Grand Total 36

Note: This Survey Has Been Conducted Among 36 individuals

121
Sandesh Parajuli
CS6P05 FYP Final Report

Do you like the approach of using your smartphone as a medium to unlock the door? Count

Maybe 2

No 6

Yes 28

Grand Total 36

Note: This Survey Has Been Conducted Among 36 individuals

122
Sandesh Parajuli
CS6P05 FYP Final Report

What do you think about Smart Door Lock system? Count

Bad 0

Good 34

Great 2

Grand Total 36

Note: This Survey Has Been Conducted Among 36 individuals

123
Sandesh Parajuli
CS6P05 FYP Final Report

D0 you like to use this Smart Door Lock device in your house? Count

Maybe 0

No 0

Yes 36

Grand Total 36

Note: This Survey Has Been Conducted Among 36 individuals

124
Sandesh Parajuli
CS6P05 FYP Final Report

Will you encourage others to use this Smart Door Lock? Count

Maybe 3

No 4

Yes 29

Grand Total 36

Note: This Survey Has Been Conducted Among 36 individuals

125
Sandesh Parajuli
CS6P05 FYP Final Report

Feedback

Note: This Survey Has Been Conducted Among 36 individuals

126
Sandesh Parajuli
CS6P05 FYP Final Report

7.4 Appendix D: Sample Code

7.4.1 Arduino IDE Code

Figure 54 Arduino IDE Code 1

127
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 55 Arduino IDE Code 2

128
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 56 Arduino IDE Code 3

129
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 57 Arduino IDE Code 4

130
Sandesh Parajuli
CS6P05 FYP Final Report

7.5 Appendix E: Design

7.5.1 Gantt Chart

Figure 58 Gantt chart

131
Sandesh Parajuli
CS6P05 FYP Final Report

7.5.2 Work Breakdown Structure

Figure 59 Work Breakdown Structure

132
Sandesh Parajuli
CS6P05 FYP Final Report

7.5.3 Flowchart of the Smart Door Lock System

Figure 60 Flowchart of Smart Door Lock System

133
Sandesh Parajuli
CS6P05 FYP Final Report

7.5.4 Hardware Architecture

Figure 61 Hardware Component Circuit Diagram of Bluetooth Authentication RFID Door Lock

134
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 62 Schematic Diagram of all hardware components together

135
Sandesh Parajuli
CS6P05 FYP Final Report

7.5.5 Use Case Diagram

Figure 63 Use case Diagram

136
Sandesh Parajuli
CS6P05 FYP Final Report

7.5.6 ER-Diagram of the Database of Smart Door Lock Application

Figure 64 ER-Diagram

137
Sandesh Parajuli
CS6P05 FYP Final Report

7.5.7 Class-Diagram of Smart Door Lock Application

Figure 65 Class-Diagram

7.4.8 Relational Diagram of the database of Smart Door Lock System

Figure 66 Relational Diagram

138
Sandesh Parajuli
CS6P05 FYP Final Report

7.5.9 Wireframes
7.5.9.1 Login Portal

Figure 67 Login Portal wireframe

139
Sandesh Parajuli
CS6P05 FYP Final Report

7.5.9.2 Signup Portal

Figure 68 Signup Portal wireframe

140
Sandesh Parajuli
CS6P05 FYP Final Report

7.5.9.3 Main Screen

Figure 69 Main Screen wireframe

141
Sandesh Parajuli
CS6P05 FYP Final Report

7.6 Appendix F: Screenshots of the system

7.6.1 Hardware components of this RFID and Bluetooth Based Smart Door Lock

Figure 70 When the door is unlocked

142
Sandesh Parajuli
CS6P05 FYP Final Report

Figure 71 When the door is locked

143
Sandesh Parajuli
CS6P05 FYP Final Report

7.6.1 Smartphone Application Interface

Figure72:Login-Portal

144
Sandesh Parajuli
CS6P05 FYP Final Report

Figure73:Signup-Portal

145
Sandesh Parajuli
CS6P05 FYP Final Report

Figure74:Main-Screen

146
Sandesh Parajuli
CS6P05 FYP Final Report

7.7 Appendix G: User Feedback Form

7.7.1 Sample of User Feedback Form

147
Sandesh Parajuli
CS6P05 FYP Final Report

148
Sandesh Parajuli
CS6P05 FYP Final Report

149
Sandesh Parajuli
CS6P05 FYP Final Report

7.7.2 Sample of Filled User Feedback Form

150
Sandesh Parajuli
CS6P05 FYP Final Report

151
Sandesh Parajuli
CS6P05 FYP Final Report

152
Sandesh Parajuli
CS6P05 FYP Final Report

7.7.3 Feedback and suggestion from the users

153
Sandesh Parajuli

View publication stats

You might also like