DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

65
DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT FINAL ASSIGNMENT A Partial Fulfillment of the Requirements for the Diploma III Degree By: AHMAD MIFTAHUL ZAKI NIM.1605114020 COMPUTER ENGINEERING STUDY PROGRAM COMPUTER ENGINEERING AND INFORMATICS DEPARTMENT POLITEKNIK NEGERI MEDAN AUGUST 2019

Transcript of DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

Page 1: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

DESIGN OF DOOR SECURITY SYSTEM WITH

RFID, PIN, AND FINGERPRINT

FINAL ASSIGNMENT

A Partial Fulfillment of the Requirements for the

Diploma III Degree

By:

AHMAD MIFTAHUL ZAKI NIM.1605114020

COMPUTER ENGINEERING STUDY PROGRAM

COMPUTER ENGINEERING AND INFORMATICS

DEPARTMENT

POLITEKNIK NEGERI MEDAN

AUGUST 2019

Page 2: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

ii

ABSTRACT

This system is a prototype system built with a door safety with three levels of

authentication using RFID, PIN, and fingerprint based on Arduino Mega 2560. The

system consists of software and hardware. The hardware consists of Arduino Mega

2560 as a microcontroller. RFID sensor keypad 3x4 and fingerprint sensor as an

authentication input. The software consists of the C language that is populated in

the microcontroller as the data processor. The LCD will provide the information in

the form of characters about door security steps. Solenoid Door lock serves as a

door lock that is connected on a 1-channel relay. This door security system can

provide security because this tool works when scanning RFID card on the RFID

sensor. Followed by a password inserted through the keypad 3x4 in the correct

state. Then proceed with fingerprint scanning on the sensor fingerprint. Once all

authentication has been received in a faring state, the relay will move the solenoid

and that the door can be opened. If one of the three authentications encounter an

authentication input error the buzzer will sound, and the process will start again

from scratch.

Keywords: Arduino Mega 2560, RFID sensor, Keypad 3x4, Fingerprint sensor,

Buzzer, LCD, Solenoid Door Lock.

Page 3: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

iii

PREFACE

Praise and gratitude to Allah SWT. the Almighty for mercy and blessing that

has been given, so that the author can finish final report entitled " Design of Door

Security System with RFID, PIN, and Fingerprint".

Finally, created as an academic requirement that must be taken to complete

the Program of Diploma 3 in Computer Engineering Study Program Department of

Computer Engineering and Informatics of Politeknik Negeri Medan.

In the completion of this final project, the author of many receive guidance

and assistance in the form of manpower, material and encouragement from various

parties is very useful for the author. So, the author wants to thank the amount to:

1. Mr. M. Syahruddin, ST, MT, as Director of the Polytechnic of Medan.

2. Mr. Ferry Fachrizal, ST, M.Kom., as Chairman of the Department of Computer

Engineering Informatics

3. Mr. Zakaria Sembiring, ST, M.Sc., as Head of Computer Engineering Study

Program.

4. Mr. Rahmat Widia Sembiring, M.Sc. IT, Ph. D, as Supervisor in the completion

of this final project.

5. Mr. Dr. Benny Benyamin Nasution, Dipl. Ing., M. Eng., as Lecturer Guardian

CE-6C class which always provides direction and support and input in the

running of this final project completion.

6. Entire Lecturer of Computer Engineering Department which has provided

advice and guidance to the completion of this final project.

7. Parents, who always provide prayer and material support.

8. Vonna Sari Br. Tarigan, as partner in this final project.

9. All the friends of CE-6C who have offered prayers and always support the

authors in completing this final project.

10. Toserba Pi, who helps the writer on making design of this final project.

11. All those who have helped in the completion of this final project.

Page 4: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

iv

Although the authors have tried as much as possible, the authors recognize

that this final project there are deficiencies that need to be repaired. To the authors

suggestions and constructive criticism from readers.

Finally, the authors hope that the final report could have been more perfect

and can provide benefits for writers and readers.

Medan, August 25th, 2019

Author

Ahmad Miftahul Zaki

NIM. 1605114020

Page 5: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

v

TABLE OF CONTENTS

ABSTRACT ............................................................................................................ ii

PREFACE .............................................................................................................. iii

TABLE OF CONTENTS ........................................................................................ v

LIST OF IMAGES ................................................................................................ vii

LIST OF TABLES ............................................................................................... viii

LIST OF ATTACHMENT ..................................................................................... ix

CHAPTER I INTRODUCTION ............................................................................. 1

Background .............................................................................................. 1

Formulation of Problems .......................................................................... 1

Scope of Problem ..................................................................................... 2

Final Project Objectives ........................................................................... 2

Final Project Contributions ...................................................................... 2

Methodology ............................................................................................ 3

1.6.1 Data Collection Techniques .............................................................. 3

1.6.2 Completion Steps .............................................................................. 4

Writing Systematics ................................................................................. 4

CHAPTER II REVIEW OF THE LIBRARY ......................................................... 6

3 CHAPTER III ANALYSIS AND DESIGN .................................................. 10

System Explaination ............................................................................... 10

Situation Analysis ................................................................................... 10

3.2.1 Before Creating System .................................................................. 10

3.2.2 After Creating System ..................................................................... 10

Block diagrams ....................................................................................... 11

3.3.1 How the System Works ................................................................... 12

3.3.2 Identification System ...................................................................... 12

3.3.3 System Constraints .......................................................................... 12

3.3.4 Used Equipment (Hardware)........................................................... 13

Circuit of RFID with Arduino ................................................................ 13

Circuit of Keypad 3x4 with Arduino ...................................................... 14

Circuit of Fingerprint Sensor with Arduino ........................................... 15

Series of Relay and Solenoid with Arduino ........................................... 16

Series of Buzzer with Arduino ............................................................... 17

Circuit LCD + I2C with Arduino ............................................................ 18

Mechanical Design ................................................................................. 18

Page 6: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

vi

Overall Circuit ........................................................................................ 18

Flowchart ................................................................................................ 20

4 CHAPTER IV TESTING AND ANALYSIS SYSTEM ............................... 23

Voltage Testing on The Appliance ......................................................... 23

4.1.1 Test Voltage on Arduino ................................................................. 23

4.1.2 Voltage Testing on RFID Sensor .................................................... 24

4.1.3 Voltage Testing on Keypad 3x4 ...................................................... 24

4.1.4 Voltage Testing on Fingerprint Sensor ........................................... 26

4.1.5 Voltage Testing on LCD + I2C ....................................................... 26

4.1.6 Voltage Testing on Buzzer .............................................................. 27

4.1.7 Voltage Testing on Relay ................................................................ 29

4.1.8 Voltage Testing on Solenoid Door Lock ........................................ 29

Testing and Analysis of Programs .......................................................... 30

4.2.1 Program Code of Data Type Declaration ........................................ 30

4.2.2 Pin Initialization Program Code ...................................................... 31

4.2.3 Program Code of Looping ............................................................... 32

4.2.4 Program Code of Scanning Function on RFID Sensor ................... 33

4.2.5 Program Code of Input Function on Keypad 3x4 ........................... 34

4.2.6 Program Code of Input Function on Fingerprint Sensor ................. 35

4.2.7 How to Add a User ID to The Program .......................................... 38

4.2.8 Adding a Fingerprint Program Code ............................................... 39

4.2.9 How to Add a Fingerprint ............................................................... 44

Door Security System Testing ................................................................ 45

4.3.1 Testing Objectives ........................................................................... 45

4.3.2 Equipment Needed .......................................................................... 45

4.3.3 Testing Procedure............................................................................ 45

4.3.4 Test Results ..................................................................................... 46

CHAPTER V CLOSING ...................................................................................... 47

Conclusion .............................................................................................. 47

Suggestion .............................................................................................. 47

BIBLIOGRAPHY ................................................................................................. 48

Page 7: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

vii

LIST OF IMAGES

Figure 3.1 System Block Diagram ........................................................................ 11

Figure 3.2 Circuit of RFID-RC522 and Arduino .................................................. 13

Figure 3.3 Circuit of Keypad 3x4 and Arduino .................................................... 14

Figure 3.4 Circuit of Fingerprint Sensor and Arduino .......................................... 15

Figure 3.5 Circuit of Relay and Solenoid with Arduino ....................................... 16

Figure 3.6 Circuit of Buzzer and Arduino ............................................................ 17

Figure 3.7 Circuit of LCD + I2C and Arduino ...................................................... 18

Figure 3.8 Overall Circuit ..................................................................................... 19

Figure 3.9 System Flowchart ................................................................................ 21

Figure 4.1 Process of inserting fingerprint ID ...................................................... 44

Figure 4.2 Fingerprint has been accepted ............................................................. 44

Page 8: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

viii

LIST OF TABLES

Table 3.1 RFID configuration with Arduino......................................................... 13

Table 3.2 Keypad 3x4 Configuration with Arduino ............................................. 15

Table 3.3 Fingerprint Sensor Configuration with Arduino ................................... 16

Table 3.4 Relay and Solenoid Configuration with Arduino ................................. 16

Table 3.5 Buzzer Configuration with Arduino ..................................................... 17

Table 3.6 LCD + I2C Configuration with Arduino ............................................... 18

Table 4.1 Voltage measurements on Arduino ....................................................... 23

Table 4.2 Voltage measurements on RFID sensor ................................................ 24

Table 4.3 Voltage measurements on the 3x4 keypad ............................................ 25

Table 4.4 Voltage measurements on fingerprint sensor ........................................ 26

Table 4.5 Voltage measurements on LCD + I2C .................................................. 27

Table 4.6 Voltage measurements on buzzer ......................................................... 28

Table 4.7 Voltage measurements on relay ............................................................ 29

Table 4.8 Voltage measurements on solenoid door lock ...................................... 30

Table 4.9 Test results if all authentication is successful ....................................... 46

Table 4.10 Test results if an authentication input error is performed ................... 46

Page 9: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

ix

LIST OF ATTACHMENT

Attachment 1 Surat Permohonan Pengajuan Judul Tugas Akhir

Attachment 2 Surat Persetujuan Judul Tugas Akhir

Attachment 3 Surat Ketersedian Dosen Pembimbing

Attachment 4 Kartu bimbingan Tugas Akhir

Attachment 5 Surat Keterangan Persetujuan Ujian TA

Attachment 6 Formulir Revisi Tim Penguji

Attachment 7 Formulir Bebas Revisi Tim Penguji

Page 10: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

1

CHAPTER I

INTRODUCTION

Background

The current home security system is largely still using conventional

mechanical keys.[4] The conventional mechanical key consists of several technical

work which are lever and cylinder.[2] The lever lock is a key model that has an

elongated shape consisting of a per and jagged slab with a slight with simple amount

of cleats.[2] While the cylinder key principle works almost the same as the lever lock

only the cleats form is made in such a way and complicated. The indentation of the

cleats serves to rotate the cylinder on the slot so it can be opened and closed.[2]

There are already several modern home door lock models whose digital work

is claimed to be more reliable and secure than conventional keys.[1] Nowadays there

are some models of digital door locks that exist in the Indonesian market, namely

the model of PIN, RFID, and fingerprint. RFID (Radio Frequency Identification) is

a wireless system that uses radio waves to read data located within the tag. Tags

can be shaped like a credit card or in another form.[5] PIN (Personal Identification

Number) is a security system that uses a combination of numbers to access the

security. The fingerprint sensor is a sensor that is shown to recognize a person's

fingerprint.[5] The user must have a RFID card already recorded on the system and

move closer to the sensor board, up to a high-accuracy door lock model with

fingerprint identification and a door lock PIN using the keypad.

The term authentication refers to an electronic process that allows the

electronic identification of people naturally or legally. In addition, authentication

can also confirm the authenticity and integrity of the data in electronic form. The

overall purpose of authentication is to reduce potential fraud, especially if a person

intentionally misrepresents their identity or through unauthorized use of another

person's credentials.[3]

Formulation of Problems

Based on the background that has been found, the problems that arise in this

final task are: How to improve the door security system using three steps of

authentication (RFID, PIN, fingerprint) to reduce the presence of a breach?

Page 11: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

2

Scope of Problem

In writing this final task to overcome the existing problem then the authors

limit the problem as follows:

1. The system uses microcontroller Arduino Mega 2560.

2. The language of programming is used in the design of the system is the C

language.

3. PIN uses only numbers.

4. Notification of the entire authentication input error using a buzzer.

5. Display information interface uses LCD.

6. It does not use the battery as additional power when the power goes out and can

be used as a further development.

7. The authentication level must be in order, starting from RFID, PIN, then

fingerprint.

8. The door opens manually, because it does not refer to the automation system

9. UID of RFID tak or rard cannot be changed because it has a unique code in

hexadecimal.

Final Project Objectives

Based on the issues discussed, the objectives of this end task are:

A. General purpose

To fulfill one of the final requirements completed Diploma education at the

Politeknik Negeri Medan.

B. Special purpose

As a door security enhancer that later reduces the threat of conceded by the

unauthenticated parties.

Final Project Contributions

The contributions that can be given are as follows:

a. For the academic and science world, especially the Politeknik Negeri Medan.

1) Can be used as a reference and know the level of student’s ability, in

addition to the student of Computer Engineering Politeknik Negeri Medan.

2) Completion for this final project, certainly has a big influence on the

quality of education of the State Polytechnic Medan by looking at the

power and way of thinking each student.

Page 12: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

3

3) Provide journal reference for the sister of the class and the relevant student

in case of completing the final assignment.

b. For the surrounding environment

For environments that want to improve their security (home, safety deposit

room, server room or laboratory room) can tighten the security system so that

it is not easily compromised.

c. For authors

1) To apply the science that has been gained during the lecture and to add

insight into the creation of Arduino-based prototype tools.

2) For the contribution of authors in the educational world to be useful for

daily life and can be developed at a later date.

Methodology

In writing this author collects the data performed as follows:

1.6.1 Data Collection Techniques

The data collection techniques used in these final tasks are:

1. Literature study, by searching and collecting studies – studies and literature

relating to this study, the form of articles, guest references, related research

journals, and other related sources.

2. In-depth interviews: The data collection techniques done by asking questions

directly to the subject of the study. As the development of technology,

interviews are not only done with face-to-face, but also biased through

communication media, such as phone, email, blog, WhatsApp, Instagram,

Facebook, and many more.

3. Observation, which is a data collection technique that is done by observing

directly the circumstances or situations of the research subject. The Data of

the observation results is not only seen from the course attitude, but there are

many factors that should be considered. It can be said this observation is a

very complex research technique, because it is not only fixed in one

phenomenon.

Page 13: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

4

1.6.2 Completion Steps

The completion steps to be performed on this final assignment are:

1. Planning

In the planning phase, the author has a plan on how and what kind of system

and this tool will be created later.

2. Data Analysis and tool design

In the stage of data analysis, the author will do the analyzing of the data

related to the tool's work so that there is no fault in the tool that will create

the author later. In this stage also, the author will design the layout and

skeleton of the tool in a board, until the state machine either from the system

that is running or that is in use or proposed system.

3. Tool creation

At this stage, the authors will perform the creation of tools based on the data

analysis step and the design/framework of the tool to be worked on.

4. Testing tools

This step will be done when the tool that the author created is complete. This

step is done with the aim of knowing if the tools are made already in

accordance with the procedure or still there is to be repaired.

Writing Systematics

The following are the writing systematics used in the preparation of the final

project report:

1. CHAPTER I INTRODUCTION

This chapter contains explanations of background selection of titles,

limitation of problems, motivation and objectives of the final assignment, goals of

the final project, methods of final assignments and writing systematics.

2. CHAPTER II REVIEW OF THE LIBRARY

This chapter contains the foundation of theory which is the main reference in

the writing of final assignments. The theory discussed is related to the working of

the door safety system with the three layers of authentication (RFID, PIN,

fingerprint) that will be designed. And also used for the purpose of analysis and

design.

Page 14: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

5

3. CHAPTER III ANALYSIS AND DESIGN

This chapter contains the analysis and design of tools in order to describe also

describing the activities carried out on systems and tools in progress as well as the

design of tools.

4. CHAPTER IV TESTING AND ANALYSIS SYSTEM

This chapter contains analysis and test results as well as the system research

that will be conducted covering the overall system work and analyzing the results

obtained from system and tool trial results.

5. CHAPTER V CLOSING

This chapter explains the final results of all the writing done, namely

conclusions and suggestions that contain inputs to develop and complement the

tools that have been built in the future.

Page 15: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

6

CHAPTER II

REVIEW OF THE LIBRARY

1. Design of Magnetic Door Lock using Keypad and Solenoid based on

Arduino Uno Microcontrolller (Guntoro Helmi, et al. 2013)

The results of this research are door safety tools using Magnetic Door Lock,

Keypad, and the Arduino Uno-based Solenoid microcontroller. The purpose of

making this tool is to make based on Arduino Uno magnetic door lock tools for

home security such as doors, cabinets, lockers, safe deposit, and others

electronically without having to use a conventional key. The results of this tool

testing the keypad connections, relays, and solenoid with the Arduino Uno

microcontroller can work fine. Each key-pressed keypad can be detected and

read by the Arduino Uno microcontroller. Solenoid also works well.

2. Door Guard Design using Fingerprints and Android Smartphones based on

Atmega328 (Sandro Lumban Tobing. 2014)

The result of this research is the door security system using a microcontroller-

based fingerprint. The purpose of this research is to design a door security system

using fingerprints and applications installed on an Android smartphone. The

fingerprint that has been accessed by the radius of the family members will give

the data to the microcontroller to be processed which will then give the command

to the microcontroller to be processed which will then give orders to the solenoid

To unlock the door. The more over this security system can also be controlled

via an Android smartphone that has been installed by the authors self-designed

application. The research methods in this thesis include the study of libraries,

system design, manufacturing of mechanics, hardware designing (hardware) and

software (software).

Page 16: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

7

3. Automatic Door Lock System using RFID (Radio Frequency Identification)

based on Arduino Uno R3 Microcontroller (Halifia Hendri. 2017)

The result of this research is that automatic door lock system is designed to

facilitate security control of certain homes or rooms. This system can also be

used in government offices and factories to restrict a person from entering a room

that cannot be entered by any person. In the system on this automatic door lock

using RFID reader type RC-522, PICC card (Peripheral Interface Controller

Card) or transponder, Arduino UNO, Buzzer 5v, Solenoid Door Lock, Relay

module, and LCD. Where RFID reader RC-522 as receiver and PICC card as

transmitter. This system works by means of the RFID reader will detect the

identity number on the PICC card called UID (a kind of unique code that is in

the PICC card). If the UID is appropriate, the LCD will display the text "Please

enter" and the door lock (using the solenoid door lock) will automatically open

immediately. Whereas if the PICC card is scanned not according to what we

program, then the buzzer (speaker) will be immediately toned and the lock on

the door will not open.

4. Smart Key Security (Prima Ellanda P, et al. 2019)

The result of this research is a smart key-based security Arduino that is a security

that uses a password that is able to lock the door and we can settings password

as we want, and also very effective when used and when something happens to

eat Will sound alarm if someone breaks through the door and this tool works

pretty easily, you squeeze the pin that is in the keypad and will appear in the

LCD (Liquid Crystal Display) as you squeeze when properly fed successfully

opened. The tool uses Arduino Uno to control passwords and supporting

components such as PIR sensors and others.

Page 17: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

8

5. Security System on Door Using Keypad and Sensor with Microcontroller

Based (M. Rifky Bawono, et al. 2017)

The result of this research is the system that can solve the problem is to create

security system with security using password. From this it is made a security

system microcontroller-based door ATMega32, where keypad, push button,

servo, photodiode and buzzer in the door operation.

6. Arduino Mega-based Door Security System (Akbar Iskandar, et al. 2017)

The result of this research aims to 1) to design the security prototype of Arduino-

based mega-base lecturer that integrated with Fingerprint and camera, 2) test the

effectiveness of prototype room door lecturer. This type of research is a type of

research planning that is within the scope of R&D Research (Research and

development). Data is collected based on observation and interviews. Data

analysis techniques in a descriptive way. The results of the study showed that

the prototype room door guard STMIK AKBA use camera and fingerprint based

on Arduino Mega can help the lecturer in improving security on the lecturer

room and based on the analysis of the results descriptively Found that the device

can run effectively.

7. Building a Door Security System Using RFID (Radio Frequency

Identification) and Arduino Severino (Ardika Wicaksana, Herman Setiya

Utama. 2014)

The result of this research is a system that is expected to cope with the occurrence

of theft at home that is often left by the occupants. In addition, the use of RFID

can also minimize the all entire home key, so that each member of the family

needs a single tag card/key to unlock the entire key on the door that is in the

house.

Page 18: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

9

8. Auto door safety design using E-KTP based on microcontroller ATmega328

(Eko saputro. 2016)

The result of this is using Research and Development method which is a method

that aims to produce or develop certain products. This method is applied to the

research procedure to be 9 stages i.e. (1) beginning, (2) Potential and problems,

(3) Information collection, (4) Equipment design, (5) Design validation, (6) tool

creation, (7) test tools, (8) data collection and (9) data analysis. Based on the test

results can be concluded that the simulation of door safety equipment can operate

properly, according to the design made. RFID reader used has a frequency of 13,

56MHz placed in a box with a thickness 2mm can read E-ID card with a

maximum distance of 1.8 cm. Solenoid can open the door lock if the ID E-KTP

in accordance with the microcontroller memory ATmega328, solenoid will be

locked back within 10 seconds.

9. Fingerprint Identification Machine Creation as Door Security Lock (July

Dian Purbani. 2010)

The result of this research is this door safety system using U. are. U 2000. This

fingerprint Sensor is processed in the PC using the Visual Basic programming

and using an Access database to store fingerprint data. To move the door then

used a minimum system based on AT89S51. From the test result the door will

open if the fingerprint is matched according to the fingerprint that is already

stored in the database. If the matched fingerprint does not match the fingerprint

already stored in the database It will appear "fingerprint not registered". If the

fingerprint matches the fingerprint that is already stored in the database, then the

door will open. As a result of this final task can be made fingerprint identification

machine as door safety.

Page 19: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

10

3 CHAPTER III

ANALYSIS AND DESIGN

System Explaination

The system is designed to reduce or minimize the occurrence of a breach for

the system of the part that is applied in the home or room. Because when using one

authentication alone is still a possibility of a breach. And increase security levels in

the Security section for the implementation of three-step authentication (RFID,

PIN, and fingerprint).

This system works starting from inserting a RFID input using the RFID card

that is scanned on the RFID sensor. After authentication is accepted, proceed by

entering the PIN input on the keypad. And after both authentications is accepted,

proceed with inserting the fingerprint input on the fingerprint sensor. Once all three

authentications are received without any faults in each of them, the solenoid will

pull the slug and the door can be opened.

Situation Analysis

Situation analysis is a comparison and conclusion that occurs before and

after the system is applied.

3.2.1 Before Creating System

The previous security system only uses the application or password password

static default that in which the system is very vulnerable impersonetly or the

password can be recorded, and the previous password can be used again. And of

course, this system is not secured in the field of password security and the absence

of real-time notifications to the user so that the user does not pass the error input

password or a breach.

3.2.2 After Creating System

After implementing the security system by adopting three authentications will

increase the level of security on the door. As more and more layers of security will

make the security system stronger. And among the three authentication is supported

by biometric security that makes the difficulty of the breach increasingly higher.

Page 20: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

11

Block diagrams

The block diagram is the basic overview of the circuit system to be designed,

each of which has its own function block diagram. The system block Diagram is

designed as follows:

RFID

Keypad 3x4

Fingerprint Sensor

Power Supply

LCD 16x2

Relay

Buzzer

Selenoid Door

Lock

INPUT OUTPUT

Module IIC

AR

DU

INO

ME

GA

25

60

Figure 3.1 System Block Diagram

The function of each block diagram is as follows:

1. The Arduino Mega 2560 serves as the control center of the entire circuit system

and to process data between inputs and outputs.

2. The RFID sensor serves as a sensor to scan the RFID card or tag.

3. Keypad function to process password input or pin with keypad size 3x4.

4. The fingerprint sensor functions as a sensor for scanning fingerprints.

5. The LCD functions as an output, where the LCD as a medium displays the

process results performed by the Arduino.

6. Module I2C serves as a pin saver between the LCD and the Arduino.

7. The relay serves as an output, by working as a switch to disconnect and connect

the flow of the network and solenoid door lock.

8. Solenoid door lock serves as the door opener when the system is active and

locks the door during the system shut down.

Page 21: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

12

9. The buzzer acts as an alarm and indicator sounds to reminder Authentication

input errors.

10. 12V power supply 3A serves as a power supply to provide as much electricity

as 12V to the Arduino.

3.3.1 How the System Works

The security system uses three authentication steps that work when the system

is activated using the RFID card that is scanned to the RFID sensor. Then proceed

by entering the PIN on the keypad that has been crossed with the RFID card. After

that proceed with fingerprint scan that has integrated with RFID card. And the

system should run according to the order specified: RFID, PIN, and fingerprint.

If one of the authentication steps incorrectly the buzzer will sound, and the

system repeats the authentication steps from scratch again. And when all

authentication inputs are correct, the solenoid key will open so that the door can be

opened. The solenoid key is closed after 5 seconds after the door opens.

3.3.2 Identification System

The purpose of this system is to increase security on the part of the security

system that is still vulnerable to a breach that has occurred in some cases. By

implementing the method, that is, with three steps of authentication, so that the

security level becomes stronger which will minimize the level of breach in the

security system.

3.3.3 System Constraints

Here are the constraints experienced in the system:

1. The system must use a 12V voltage in order to move the solenoid.

2. The PIN input process still uses how to press the keypad to input through the

3x4 keypad.

3. Fingerprint Scan uses only one type of fingerprint.

4. Refers to the security part as a security system rather than on automation

systems.

5. The door opens manually because it does not refer to the automation system.

Page 22: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

13

3.3.4 Used Equipment (Hardware)

In designing the necessary hardware components of the system (hardware)

that supports that the system goes well, including:

a. Arduino Mega 2560

b. Fingerprint Sensor (FPM10A)

c. RFID RC522 13.56MHz

d. RFID 1Kb Card

e. Keypad 3x4

f. Relay 1 Channel

g. Solenoid Door Lock

h. Power Supply 12V 3A

i. Cable

j. Buzzer

k. LCD + I2C

Circuit of RFID with Arduino

Here is a series of RFID and Arduino.

Figure 3.2 Circuit of RFID-RC522 and Arduino

The following configuration tables between RFID with Arduino.

Table 3.1 RFID configuration with Arduino

RFID Module RC522 Arduino

SDA (SS) 10

SCK 52

MOSI 51

MISO 50

RST 9

Page 23: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

14

Explanation of each pin on RFID-RC522:

1. SCK receives a clock pulse provided by the SPI bus Master Arduino.

2. The SDA (SS) acts as a signal input when the SPI interface is enabled, acting as

a serial record when the I2C interface is enabled and acting as a serial data input

when the UART interface is enabled. These pins are usually marked by wrapping

the pin in a box so that it can be used as a reference to identify other pins.

3. MOSI is an SPI input to the RC522 module.

4. MISO acts as a Master-In-Slave-Out when the SPI interface is enabled, acting

as a serial clock when the I2C interface is activated and acting as a serial data

output when the UART interface is enabled.

5. RST is an input for Reset and power off. When this pin becomes low, a hard

outage is enabled. It turns off all internal current sinks including an oscillator

and an input pin disconnected from the outside world. On the ascending side, the

module is reset.

Circuit of Keypad 3x4 with Arduino

Here is a series of 3x4 keypad connected to the Arduino.

Figure 3.3 Circuit of Keypad 3x4 and Arduino

Page 24: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

15

The following configuration tables between the keypad 3x4 with Arduino.

Table 3.2 Keypad 3x4 Configuration with Arduino

Keypad 3X4 Arduino

PIN 1 A8

PIN 2 A9

PIN 3 A10

PIN 4 A11

PIN 5 A12

PIN 6 A13

PIN 7 A14

Explanation of each pin on the keypad 3x4:

1. Pin 1 is the pin for the first line.

2. Pin 2 is the pin for the second line.

3. Pin 3 is the pin for the third line.

4. Pin 4 is the pin for the fourth row.

5. Pin 5 is the pin for the first column.

6. Pin 6 is the pin for the second column.

7. Pin 7 is the pin for the third column.

Circuit of Fingerprint Sensor with Arduino

It is a set of fingerprint sensors and Arduino.

Figure 3.4 Circuit of Fingerprint Sensor and Arduino

Page 25: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

16

The following configuration tables between fingerprint sensors with Arduino.

Table 3.3 Fingerprint Sensor Configuration with Arduino

Fingerprint Sensor Arduino

TX Digital 4

RX Digital 5

Explanation of each pin on the sensor fingerprint:

1. TX is as a pin to receive fingerprints.

2. RX is as a pin to send fingerprints.

Series of Relay and Solenoid with Arduino

Here is a series of relays and solenoid with Arduino.

Figure 3.5 Circuit of Relay and Solenoid with Arduino

The following configuration tables between relay & solenoid with Arduino.

Table 3.4 Relay and Solenoid Configuration with Arduino

LED Strip Relay Relay Arduino

VCC NO + 12V VCC VCC VCC

GND NC + 12V GND GND GND

IN1 Digital 2

Explanation of each pin on the relay 1 channel and solenoid door lock:

1. GND: connect to Ground (0 Volt).

2. IN1: control the relay channel first will be connected to digital 2 on Arduino.

Page 26: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

17

3. VCC: Connect to 5V.

4. COM: Pin used in general or common.

5. No (Normally Open): There is no contact between the common pin and pin NO.

So, when you trigger a relay, connect it to COM pin and supply is provided for

load.

6. NC (Normally Closed): There is a contact between the common pin and the NC

pin. There is always a link between COM and pin NC, even when the relay is

turned off. When you trigger a relay the circuit is opened, and no supply is

provided for the load.

Series of Buzzer with Arduino

Here is a series of buzzer with Arduino.

Figure 3.6 Circuit of Buzzer and Arduino

The following configuration tables between buzzer and Arduino.

Table 3.5 Buzzer Configuration with Arduino

Buzzer Arduino

VCC Digital 3

GND GND

Explanation of each pin on the buzzer:

1. The VCC on the buzzer is connected to the digital 3 on the Arduino.

2. The GND is connected to ground (0 Volt).

Page 27: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

18

Circuit LCD + I2C with Arduino

Here is a picture of the LCD series + I2C with Arduino.

Figure 3.7 Circuit of LCD + I2C and Arduino

Here is a configuration between buzzer and Arduino.

Table 3.6 LCD + I2C Configuration with Arduino

LCD +I2C Arduino

SDA SDA

SCL SCL

Explanation of each pin on the LCD + I2C:

1. SDA (Serial Data): Data on its serialized pins.

2. SCL (Serial Clock): The Sync Clock path.

Mechanical Design

Mechanical material security system door designed with board made of

acrylic material that has a basic size of 40 x 30 cm as a receptacle for all cicuits that

formed as a prototype.

Overall Circuit

Where the entire circuit is configured to the hardware and specified in the

placements of the pin, combined according to each of the circuit configuration

tables mentioned above. And added step down XL4015 as a voltage lowering on

the Arduino, relay and buzzer.

Page 28: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

19

Figure 3.8 Overall Circuit

Page 29: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

20

Flowchart

Here is the flowchart of the designed system.

Start

Read RFID card

If the card is

correct

Enter the

keypad code

Read keypad code

Display to

LCD

Display to

LCD

Buzzer onNo

Yes

A B C

Paste RFID

card

System

Initialization

Page 30: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

21

If the code is

correct

Insert

fingerprint

Read fingerprint

If the finger is

correct

Display to

LCD

Door opened

Display to

LCD

End

Buzzer on

Buzzer on

Yes

Yes

No

A B C

No

Figure 3.9 System Flowchart

Page 31: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

22

Description of flowchart of door security system:

1. Start

The initial process where all systems run.

2. Initialization system

The process of giving the Arduino hardware value is done by the program to

determine the input or output.

3. Display to LCD

The process where the LCD shows text information.

4. Read RFID Card

The process where RFID sensor reads RFID card. If the card is correct it will

proceed to the next process. Otherwise the buzzer will sound and will return to

the initial process.

5. Buzzer on

The process by which the buzzer sounds when an input error occurs.

6. Enter the Keypad Code

The process of entering the password via keypad.

7. Read Keypad Code

The condition is done checking the password via Arduino. If the password is

correct, then it will proceed to the next process. Otherwise the buzzer will

sound and will return to the initial process.

8. Insert Fingerprint

Fingerprint input process on fingerprint sensor.

9. Read Fingerprint

The condition where fingerprint is performed through the Arduino. If the

fingerprint is correct, the door will be unlocked. Otherwise, the buzzer will

sound, and the system will return to the initial process.

10. Door Opened

The process when all authentication has been successfully received correctly

then the solenoid key will open so that the door can be opened.

11. End

The final process of system and system is back to the initial process.

Page 32: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

23

4 CHAPTER IV

TESTING AND ANALYSIS SYSTEM

Voltage Testing on The Appliance

The tool voltage testing is performed to determine whether the voltage in

the appliance corresponds to which data is obtained.

4.1.1 Test Voltage on Arduino

In the voltage testing on the fingerprint sensor, the first thing to do is to set

the multimeter to the appropriate voltage unit (Volt). Then a red probe is connected

to VCC 5V on the Arduino and the black probe is connected to the GND (ground).

And the measurement test results can be seen in the following table.

Table 4.1 Voltage measurements on Arduino

Figure Tension

(Volt)

5. 01 V

Page 33: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

24

4.1.2 Voltage Testing on RFID Sensor

In testing the voltage on the RFID sensor, the first thing to do is to set the

multimeter to the appropriate voltage unit (Volt). Then a red probe is connected to

VCC 3.3 V on the Arduino and the black probe is connected to the GND (ground).

And the measurement tests result can be seen in the following table.

Table 4.2 Voltage measurements on RFID sensor

Figure Tension

(Volt)

3.3 V

4.1.3 Voltage Testing on Keypad 3x4

In the voltage testing on the 3x4 keypad, the first thing to do is to set the

multimeter to the corresponding voltage unit (Volt). Then the red probe is

connected to between the A8 pin or up to A14 on the Arduino and the black probe

is connected to the GND (ground). And the measurement tests result can be seen in

the following table.

Page 34: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

25

Table 4.3 Voltage measurements on the 3x4 keypad

Figure Condition Tension

(Volt)

Pressed 4.8 V

Unpressed 0.2 V

Page 35: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

26

4.1.4 Voltage Testing on Fingerprint Sensor

In the voltage testing on the fingerprint sensor, the first thing to do is to set

the multimeter to the appropriate voltage unit (Volt). Then a red probe is connected

to VCC 3.3V on the Arduino and the black probe is connected to the GND (ground).

And the measurement test results can be seen in the following table.

Table 4.4 Voltage measurements on fingerprint sensor

Figure Tension

(Volt)

3.3 V

4.1.5 Voltage Testing on LCD + I2C

In the voltage testing on the LCD + I2C, the first thing to do is to set the

multimeter to the appropriate voltage unit (Volt). Then the red probe is connected

to the 5V VCC of LCD on the Arduino and the black probe is connected to the

GND (ground). And the measurement tests result can be seen in the following table.

Page 36: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

27

Table 4.5 Voltage measurements on LCD + I2C

Figure Tension

(Volt)

5 V

4.1.6 Voltage Testing on Buzzer

In the voltage testing on the buzzer, the first thing to do is to set the multimeter

to the corresponding voltage unit (Volt). Then the red probe is connected to the

digital pin 3 on the Arduino and the black probe is connected to the GND (ground).

And the measurement tests result can be seen in the following table.

Page 37: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

28

Table 4.6 Voltage measurements on buzzer

Figure Condition Tension

(Volt)

On 4.97 V

Off 0 V

Page 38: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

29

4.1.7 Voltage Testing on Relay

In the voltage testing on the relay, the first thing to do is to set the multimeter

to the corresponding voltage unit (Volt). Then a red probe connects to the 5V VCC

on the relay and the black probe is connected to the GND (ground). And the

measurement test results can be seen in the following table.

Table 4.7 Voltage measurements on relay

Figure Tension

(Volt)

5.02 V

4.1.8 Voltage Testing on Solenoid Door Lock

In the voltage testing at the solenoid door lock, the first thing to do is to set

the multimeter to the appropriate voltage unit (Volt). Then the red probe is

connected to the COM pin on the relay and the black probe is connected to GND

(ground). And the measurement test results can be seen in the following table.

Page 39: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

30

Table 4.8 Voltage measurements on solenoid door lock

Figure Tension

(Volt)

12.23 V

Testing and Analysis of Programs

Ing code is programming on the Arduino USING the Arduino IDE software

version 1.8.9 with the C programming language.

4.2.1 Program Code of Data Type Declaration

#include <SPI.h>

#include <MFRC522.h>

#include <LiquidCrystal_I2C.h> //i2C LCD Library

LiquidCrystal_I2C lcd(0x27, 16, 2); //library i2c lcd

#define SS_PIN 10

#define RST_PIN 9

MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.

#include <Password.h>

//http://www.arduino.cc/playground/uploads/Code/Password.zip

Page 40: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

31

#include <Keypad.h>

//http://www.arduino.cc/playground/uploads/Code/Keypad.zip

#include <Adafruit_Fingerprint.h>

#define mySerial Serial3

#include <SoftwareSerial.h>

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

Password password = Password("1234"); // pin keypad

const byte ROWS = 4; // Four rows

const byte COLS = 3; // columns

// Define the Keymap

char keys[ROWS][COLS] = {

{'1','2','3'},

{'4','5','6'},

{'7','8','9'},

{'*','0','#'}

};

byte rowPins[ROWS] = { A8,A9,A10,A11 };// Connect keypad ROW0, ROW1,

ROW2 and ROW3 to these Arduino pins.

byte colPins[COLS] = { A12,A13,A14 };// Connect keypad COL0, COL1 and

COL2 to these Arduino pins.

// Create the Keypad

Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS

);

int success=0;

int idd=0;

int card=0;

int menu=0;

int fingerprint=0;

int wrongfinger=0;

4.2.2 Pin Initialization Program Code

void setup()

{

lcd.begin(); //set lcd i2c

lcd.backlight();

lcd.noCursor(); //no cursor on lcd

lcd.clear(); //clear lcd

Serial.begin(9600); // Initiate a serial communication

Page 41: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

32

SPI.begin(); // Initiate SPI bus

mfrc522.PCD_Init();

pinMode(2,OUTPUT); //relay

digitalWrite(2,LOW);

pinMode(3, OUTPUT); //buzzer

keypad.addEventListener(keypadEvent);

finger.begin(57600);

if (finger.verifyPassword()) {

Serial.println("Found fingerprint sensor!");

} else {

Serial.println("Did not find fingerprint sensor :(");

while (1) { delay(1); }

}

finger.getTemplateCount();

Serial.print("Sensor contains "); Serial.print(finger.templateCount);

Serial.println(" templates");

Serial.println("Waiting for valid finger...");

}

4.2.3 Program Code of Looping

void loop()

{

if (menu==0)

{

lcd.setCursor(0,0);

lcd.print("Stick a Card");

readCard();

digitalWrite(2,LOW);

}

else if (menu==1)

{

lcd.setCursor(0,0);

lcd.print("Insert PIN");

keypad.getKey();

digitalWrite(2,LOW);

}

Page 42: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

33

else if (menu==2)

{

lcd.setCursor(0,0);

lcd.print("Stick a Finger");

getFingerprintID();

delay(50);

}

}

4.2.4 Program Code of Scanning Function on RFID Sensor

void readCard()

{

// Look for new cards

if ( ! mfrc522.PICC_IsNewCardPresent())

{

return;

}

// Select one of the cards

if ( ! mfrc522.PICC_ReadCardSerial())

{

return;

}

//Show UID on serial monitor

//lcd.setCursor(0,0);

//lcd.print("UID tag :");

String content= "";

byte letter;

for (byte i = 0; i < mfrc522.uid.size; i++)

{

Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");

Serial.print(mfrc522.uid.uidByte[i], HEX);

content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));

content.concat(String(mfrc522.uid.uidByte[i], HEX));

}

Serial.println();

Serial.print("Message : ");

content.toUpperCase();

Page 43: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

34

if (content.substring(1) == "40 18 7F A6" || content.substring(1) ==

"27 45 E3 29") //change here the UID of the card/cards that you want to

give access

{

lcd.setCursor(0,1);

lcd.print("Card is Correct");

delay(1000);

//lcd.clear();

card=1;

menu=1;

lcd.clear();

}

else {

lcd.setCursor(0,1);

lcd.print("Card is Wrong");

delay(1000);

lcd.clear();

digitalWrite(3, HIGH);

delay(2000);

digitalWrite(3, LOW);

menu=0;

}

}

4.2.5 Program Code of Input Function on Keypad 3x4

void keypadEvent(KeypadEvent eKey){

switch (keypad.getState()){

case PRESSED:

Serial.print("Pressed: ");

Serial.println(eKey);

switch (eKey){

case '*': checkPassword(); break;

case '#': password.reset(); break;

default: password.append(eKey);

}

}

}

void checkPassword()

Page 44: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

35

{

if (password.evaluate() && card==1)

{

idd=1;

lcd.clear();

lcd.setCursor(0,1);

lcd.print("PIN is Correct");

delay(1000);

menu=2;

lcd.clear();

}

else{

lcd.clear();

lcd.setCursor(0,1);

lcd.print("PIN is Wrong");

menu=0;

digitalWrite(3, HIGH);

delay(2000);

digitalWrite(3, LOW);

password.reset();

lcd.clear();

}

}

4.2.6 Program Code of Input Function on Fingerprint Sensor

uint8_t getFingerprintID() {

uint8_t p = finger.getImage();

switch (p) {

case FINGERPRINT_OK:

Serial.println("Image taken");

break;

case FINGERPRINT_NOFINGER:

Serial.println("No finger detected");

return p;

case FINGERPRINT_PACKETRECIEVEERR:

Serial.println("Communication error");

return p;

case FINGERPRINT_IMAGEFAIL:

Page 45: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

36

Serial.println("Imaging error");

return p;

default:

Serial.println("Unknown error");

return p;

}

// OK success!

p = finger.image2Tz();

switch (p) {

case FINGERPRINT_OK:

Serial.println("Image converted");

break;

case FINGERPRINT_IMAGEMESS:

Serial.println("Image too messy");

return p;

case FINGERPRINT_PACKETRECIEVEERR:

Serial.println("Communication error");

return p;

case FINGERPRINT_FEATUREFAIL:

Serial.println("Could not find fingerprint features");

return p;

case FINGERPRINT_INVALIDIMAGE:

Serial.println("Could not find fingerprint features");

return p;

default:

Serial.println("Unknown error");

return p;

}

// OK converted!

p = finger.fingerFastSearch();

if (p == FINGERPRINT_OK) {

Serial.println("Found a print match!");

} else if (p == FINGERPRINT_PACKETRECIEVEERR) {

Serial.println("Communication error");

return p;

} else if (p == FINGERPRINT_NOTFOUND) {

wrongfinger=1;

if (wrongfinger==1)

Page 46: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

37

{

lcd.setCursor(0,1);

lcd.print("Wrong Finger");

digitalWrite(3, HIGH);

delay(2000);

digitalWrite(3, LOW);

lcd.clear();

menu=0;

}

delay(1000);

return p;

} else {

Serial.println("Unknown error");

return p;

}

// found a match!

Serial.print("Found ID #"); Serial.print(finger.fingerID);

Serial.print(" with confidence of ");

Serial.println(finger.confidence);

if (finger.fingerID == 1 || finger.fingerID == 2 || finger.fingerID ==

3 || finger.fingerID == 4)

{

lcd.setCursor(0,1);

lcd.print("Finger is Correct");

delay(1000);

//lcd.clear();

fingerprint=1;

wrongfinger=0;

lcd.clear();

lcd.setCursor(0,1);

lcd.print("Open The Door");

digitalWrite(2,HIGH); //relay ON

delay(5000);

digitalWrite(2,LOW);

delay(1000);

lcd.clear();

menu=0;

}

Page 47: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

38

return finger.fingerID;

}

// returns -1 if failed, otherwise returns ID #

int getFingerprintIDez() {

uint8_t p = finger.getImage();

if (p != FINGERPRINT_OK) return -1;

p = finger.image2Tz();

if (p != FINGERPRINT_OK) return -1;

p = finger.fingerFastSearch();

if (p != FINGERPRINT_OK) return -1;

// found a match!

Serial.print("Found ID #"); Serial.print(finger.fingerID);

Serial.print(" with confidence of ");

Serial.println(finger.confidence);

return finger.fingerID;

}

4.2.7 How to Add a User ID to The Program

To add or change the keypad PIN can be done in the following sections of the

program.

Password password = Password( "1234" ); // pin keypad

If you want to change the PIN password, change the one in " " and replace it

with the new PIN password. And if you want to add a new PIN just add tag || after

the program above and add a new PIN password like the above program.

And to add or replace the RFID ID, first must know the ID on the RFID card

in the form of hexadecimal. After knowing the ID, then just added as in the

following program.

if (content.substring(1) == "40 18 7F A6" || content.substring(1) == "27

45 E3 29") //change here the UID of the card/cards that you want to give

access

If you want to add a new ID then just add || like the above program, then

enter the ID of the new RFID card.

Page 48: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

39

And to increase the number of fingerprints more than one fingerprint can then

be added to the following programs.

if (finger.fingerID == 1 || finger.fingerID == 2 || finger.fingerID == 3

|| finger.fingerID == 4)

Can be seen in the program above already have 4 fingerprints are added. If

you want to add a new number of fingerprints just add it by continuing the above

program.

4.2.8 Adding a Fingerprint Program Code

#include <Adafruit_Fingerprint.h>

#define mySerial Serial3

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

uint8_t id;

void setup()

{

Serial.begin(9600);

while (!Serial); // For Yun/Leo/Micro/Zero/...

delay(100);

Serial.println("\n\nAdafruit Fingerprint sensor enrollment");

// set the data rate for the sensor serial port

finger.begin(57600);

if (finger.verifyPassword()) {

Serial.println("Found fingerprint sensor!");

} else {

Serial.println("Did not find fingerprint sensor :(");

while (1) { delay(1); }

}

}

uint8_t readnumber(void) {

uint8_t num = 0;

while (num == 0) {

while (! Serial.available());

num = Serial.parseInt();

}

return num;

}

Page 49: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

40

void loop() // run over and over again

{

Serial.println("Ready to enroll a fingerprint!");

Serial.println("Please type in the ID # (from 1 to 127) you want to

save this finger as...");

id = readnumber();

if (id == 0) {// ID #0 not allowed, try again!

return;

}

Serial.print("Enrolling ID #");

Serial.println(id);

while (! getFingerprintEnroll() );

}

uint8_t getFingerprintEnroll() {

int p = -1;

Serial.print("Waiting for valid finger to enroll as #");

Serial.println(id);

while (p != FINGERPRINT_OK) {

p = finger.getImage();

switch (p) {

case FINGERPRINT_OK:

Serial.println("Image taken");

break;

case FINGERPRINT_NOFINGER:

Serial.println(".");

break;

case FINGERPRINT_PACKETRECIEVEERR:

Serial.println("Communication error");

break;

case FINGERPRINT_IMAGEFAIL:

Serial.println("Imaging error");

break;

default:

Serial.println("Unknown error");

break;

}

}

// OK success!

Page 50: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

41

p = finger.image2Tz(1);

switch (p) {

case FINGERPRINT_OK:

Serial.println("Image converted");

break;

case FINGERPRINT_IMAGEMESS:

Serial.println("Image too messy");

return p;

case FINGERPRINT_PACKETRECIEVEERR:

Serial.println("Communication error");

return p;

case FINGERPRINT_FEATUREFAIL:

Serial.println("Could not find fingerprint features");

return p;

case FINGERPRINT_INVALIDIMAGE:

Serial.println("Could not find fingerprint features");

return p;

default:

Serial.println("Unknown error");

return p;

}

Serial.println("Remove finger");

delay(2000);

p = 0;

while (p != FINGERPRINT_NOFINGER) {

p = finger.getImage();

}

Serial.print("ID "); Serial.println(id);

p = -1;

Serial.println("Place same finger again");

while (p != FINGERPRINT_OK) {

p = finger.getImage();

switch (p) {

case FINGERPRINT_OK:

Serial.println("Image taken");

break;

case FINGERPRINT_NOFINGER:

Serial.print(".");

Page 51: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

42

break;

case FINGERPRINT_PACKETRECIEVEERR:

Serial.println("Communication error");

break;

case FINGERPRINT_IMAGEFAIL:

Serial.println("Imaging error");

break;

default:

Serial.println("Unknown error");

break;

}

}

// OK success!

p = finger.image2Tz(2);

switch (p) {

case FINGERPRINT_OK:

Serial.println("Image converted");

break;

case FINGERPRINT_IMAGEMESS:

Serial.println("Image too messy");

return p;

case FINGERPRINT_PACKETRECIEVEERR:

Serial.println("Communication error");

return p;

case FINGERPRINT_FEATUREFAIL:

Serial.println("Could not find fingerprint features");

return p;

case FINGERPRINT_INVALIDIMAGE:

Serial.println("Could not find fingerprint features");

return p;

default:

Serial.println("Unknown error");

return p;

}

// OK converted!

Serial.print("Creating model for #"); Serial.println(id);

p = finger.createModel();

if (p == FINGERPRINT_OK) {

Page 52: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

43

Serial.println("Prints matched!");

} else if (p == FINGERPRINT_PACKETRECIEVEERR) {

Serial.println("Communication error");

return p;

} else if (p == FINGERPRINT_ENROLLMISMATCH) {

Serial.println("Fingerprints did not match");

return p;

} else {

Serial.println("Unknown error");

return p;

}

Serial.print("ID "); Serial.println(id);

p = finger.storeModel(id);

if (p == FINGERPRINT_OK) {

Serial.println("Stored!");

} else if (p == FINGERPRINT_PACKETRECIEVEERR) {

Serial.println("Communication error");

return p;

} else if (p == FINGERPRINT_BADLOCATION) {

Serial.println("Could not store in that location");

return p;

} else if (p == FINGERPRINT_FLASHERR) {

Serial.println("Error writing to flash");

return p;

} else {

Serial.println("Unknown error");

return p;

}

}

Page 53: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

44

4.2.9 How to Add a Fingerprint

The first thing to do to add a new fingerprint is to open the program coding

on the software Arduino IDE dan upload it to the program.

After the program has been successfully uploaded, open the serial monitor in

the top right corner of the software. Then the Serial monitor window will appear

and enter the fingerprint ID number you want to add or change as the following

image.

Figure 4.1 Process of inserting fingerprint ID

After that it will be asked to attach a finger on the fingerprint sensor. If the

fingerprint has been successfully received, then the finger can be removed from the

sensor and will appear as the following image.

Figure 4.2 Fingerprint has been accepted

Page 54: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

45

Door Security System Testing

The following is a door safety test system using three authentication steps

(RFID, PIN, fingerprint).

4.3.1 Testing Objectives

The door safety testing system aims to determine whether the RFID sensor,

the 3x4 keypad, and the fingerprint sensor can be connected to the Arduino. And

whether the buzzer will sound if an error is detected authentication input. It can then

be seen whether the LCD can display the output of information. It can then be seen

whether the relay can move the solenoid so the door can be opened.

4.3.2 Equipment Needed

The equipment needed to test the system is:

1. Arduino Mega 2560

2. 12V 3A Power Supply

3. RFID RC522 Sensor 13.56MHz

4. RFID Card

5. Keypad 3x4

6. Fingerprint Sensor

7. LCD + I2C

8. Solenoid Door Lock

4.3.3 Testing Procedure

The procedures of the door safety system testing are:

1. RFID Sensors, 3x4 keypad, and fingerprint sensor can be connected to the

Arduino so that it can enter the authentication inputs sequentially.

2. And can be seen that the LCD can display information as a hint to run the system.

3. Once all authentication inputs are received successfully, the solenoid key will

open so that the door can be opened.

4. Then enter the wrong authentication input at each of the stages to confirm

whether the buzzer sounds or not.

Page 55: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

46

4.3.4 Test Results

From tests conducted based on the procedure of testing the RFID sensor, the

3x4 keypad and the fingerprint sensor sequentially. The results show that the RFID

sensor can receive authentication input from RFID card and can proceed to the next

stage. Then continue with a 3x4 keypad that manages to get a PIN input so that it

can move on to the next stage. And the final stage of the fingerprint sensor that

successfully gets the fingerprint input means that all levels of authentication have

been completed. Once all the authentication levels have been successful, the

solenoid key is open so that the door can be opened.

Then testing by making an authentication input error, the result indicates that

the buzzer reads after detecting the presence of an authentication input error. And

the test on the LCD that results shows that the LCD brings out information as a

protest to run the system.

The following is a table of door security system testing if all authentication

steps succeed.

Table 4.9 Test results if all authentication is successful

No. Phase of

Authentication LCD Display

Accepted

Inputs

The Buzzer

Sound

1. RFID Yes Yes No

2. PIN Yes Yes No

3. Fingerprint Yes Yes No

The following table is the test result of the door secutity system if the

authentication input is error.

Table 4.10 Test results if an authentication input error is performed

No. Phase of

Authentication LCD Display

Accepted

Inputs

The Buzzer

Sound

1. RFID Yes No Yes

2. PIN Yes No Yes

3. Fingerprint Yes No Yes

Page 56: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

47

CHAPTER V

CLOSING

This chapter contains a final summary after the trial and evaluation system

and suggestions when the system wants to be developed in the future.

Conclusion

Based on the results of the system design and all tests that have been done for

all conditions that may occur in the door safety system can be taken following:

1. This security door system using RFID, PIN, and fingerprint based on Arduino

Mega 2560 been successful and functioning as expected.

2. Based on the test results of the system performance is performed, the system

can function well with a percentage of 100%, proving that the system is a

stable system to operate or use.

Suggestion

Suggestions that can be given by authors for the development and

enhancement of these systems are as follows:

1. Further research should be given additional features in opening doors

automatically. Of course, it requires a servo motor, so that the door

automatically open and the use of this servo motor becomes more efficient as

the system is running.

2. Further research should focus on additional power in case of power outages.

Of course, it requires 12V voltage battery so that the system can still be used.

3. Further research should focus on additional button or switch to open the door

from inside.

Page 57: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

48

BIBLIOGRAPHY

[1] Iglooadmin. 2019. Perbandingan Kunci Pintu Digital dengan Kunci

Konvensional. Taken from: https://kuncirumahku.com/igloo/perbandingan-

kunci-pintu-digital-dan-konvensional/

[2] Sarana bangunan. 2019. Macam – macam kunci Pintu Rumah. Taken from:

https://www.sarana-bangunan.com/macam-macam-kunci-pintu-rumah/

[3] Turner, Dawn M. 2016. Digital Authentication: The Basics. Cryptomathic.

[4] Kim, J., Choi, M., Robles, R. J., Cho, E., & Kim, T. 2010. A Review on Security

in Smart Home Development. International Journal of Advanced Science and

Technology, 15, 13–22.

[5] Kadir, A. 2018. Arduino dan Sensor. Yogyakarta: Penerbit Andi

Page 58: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

ATTACHMENT

Page 59: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

A-1

Page 60: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

A-2

Page 61: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

A-3

Page 62: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

A-4

Page 63: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

A-5

Page 64: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

A-6

Page 65: DESIGN OF DOOR SECURITY SYSTEM WITH RFID, PIN, AND FINGERPRINT

A-7