0% found this document useful (0 votes)
84 views

Automatic Access Control System Using Arduino and RFID: The Journal of Scientific and Engineering Research April 2018

The document describes an automatic access control system using Arduino and RFID. The system uses an RFID reader to detect an RFID tag and capture the unique identifier (UID). It then compares the captured UID to stored UIDs to determine if access should be granted or denied. If there is a match, access is granted. Otherwise, access is denied. The system provides a cheap, effective, and reliable means of access control for secure environments.

Uploaded by

Kumail Malik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

Automatic Access Control System Using Arduino and RFID: The Journal of Scientific and Engineering Research April 2018

The document describes an automatic access control system using Arduino and RFID. The system uses an RFID reader to detect an RFID tag and capture the unique identifier (UID). It then compares the captured UID to stored UIDs to determine if access should be granted or denied. If there is a match, access is granted. Otherwise, access is denied. The system provides a cheap, effective, and reliable means of access control for secure environments.

Uploaded by

Kumail Malik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

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

net/publication/336254229

Automatic Access Control System using Arduino and RFID

Article  in  The Journal of Scientific and Engineering Research · April 2018

CITATIONS READS

6 9,159

3 authors, including:

Everistus Zeluwa Orji Ujunwa Ifeoma Nduanya


Enugu State University of Science and Technology Enugu State University of Science and Technology
11 PUBLICATIONS   15 CITATIONS    16 PUBLICATIONS   12 CITATIONS   

SEE PROFILE SEE PROFILE

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

Irrigation View project

Real Time System View project

All content following this page was uploaded by Everistus Zeluwa Orji on 04 October 2019.

The user has requested enhancement of the downloaded file.


Available online www.jsaer.com

Journal of Scientific and Engineering Research, 2018, 5(4):333-340

ISSN: 2394-2630
Research Article CODEN(USA): JSERBR

Automatic Access Control System using Arduino and RFID

Orji EZ*, Oleka CV, Nduanya UI

Computer Engineering, Enugu State University of Science and Technology, Enugu, Nigeria
Abstract Wireless security based applications have rapidly increased due to the dramatic improvement of
modern technologies. Many access control systems were designed and/or implemented based on different types
of wireless communication technologies by different people. Radio Frequency Identification (RFID) is a
contactless technology that is widely used in several industries for tasks like access control system, book
tracking in libraries, tollgate system, supply chain management, and so on. In this paper, automatic RFID-based
access control system using Arduino was designed. The system combines RFID technology and Arduino to
accomplish the required task. When the RFID reader installed at the entrance detects an RFID tag, the system
captures the user unique identifier (UID) and compares it with the stored UID for a match. If the user UID
captured match with any of the stored UID, access is granted; otherwise access is denied. The results clearly
show that the system is cheap, effective, and a reliable means of granting or denying access in a secured
environment.

Keywords Arduino, RFID, Access Control, Arduino IDE, UID, Sensors


1. Introduction
Security systems play an important role to prevent unauthorized personnel entry into a secured environment,
which may include physical and intellectual property. Various door locks such as mechanical locks or electrical
locks were designed to attain basic security requirements. Basically, these locks can be easily hacked by
unwanted people thereby allowing unauthorized personnel into secured premises.
Automatic access control system has become necessary to overcome the security threats faced by many
organizations in Nigeria. By installing the system at the entrance will only allow the authorized personnel to
enter the organization. The system is not restricted to main entrance installation, but can be installed at various
entrances within the organization to track personnel movement thereby restricting their access to areas where
they are not authorized.

Figure 1: RFID Based Door Lock System [1]

Journal of Scientific and Engineering Research

333
Orji EZ et al Journal of Scientific and Engineering Research, 2018, 5(4):333-340

There are several automatic access control technologies including barcode, magnetic stripe and Radio
Frequency Identification (RFID) applied in security system. Radio-Frequency Identification (RFID) is an
emerging technology and one of the most rapidly growing segments of today’s access control. RFID technology,
offers superior performance over other automatic identification systems and is used in many areas such as public
transport, ticketing, animal identification, electronic immobilization, industrial automation, access control, asset
tracking, people tracking, inventory detection and many more [2].
Figure 1 show two different ways access control system can be accomplished. Use of keys which is old method
and by use of RFID technology. This paper discusses the design of an automatic access control system using
Arduino microcontroller and RFID system. The aim is granting access to authorized personnel and denying
access to unauthorized personnel by using RFID technology instead of keys as shown in figure 1. Each person is
issued an authorized tag, which can be used for swiping in front of the RFID reader to have access to a secured
environment.

2. Literature Review
Umar et al [3] proposed an RFID based security and access control system. It is the design of RFID based
security and access control system for use in hostels inside Punjab University promises. The system combines
RFID technology and biometrics to accomplish the required task. When the RFID reader installed at the
entrance of the hostel detects tag UID, the system captures the user’s image and scans the database for a match.
If both card UID and captured image matches a registered user, access is granted; otherwise, access is denied
and the system turns on alarm to alert the security personals. The advantage of the system is that it successfully
accomplished security and control task by processing information from sub-controllers like; entrance monitoring
controller, exit monitoring controller and mess monitoring controller installed at entrance gate, exit gate and
mess gate respectively. Although the developed system is useful in reducing security threats to the hostels, there
is a room for improvement in the response time of the system. The response time can be improved by using
dedicated processors instead of computer systems capable of processing the images in real time.
RFID based access control security system with GSM technology was proposed by Peter et al [4]. The work was
archived through the use of RFID system operating on 125 KHz frequency, microcontroller programmed to send
control signals, DC motor, relay, buzzer, liquid crystal display (LCD), and GSM/GPRS modem. Once the RFID
tag which contains the user’s unique information is scan by the RFID reader and confirmed match with the
information stored in the microcontroller, the microcontroller is instructed to turn on the DC motor, display user
number and card number on the LCD and activates the GSM/GPRS modem to send an SMS alert about
authorized user card to the security personnel. Else, the DC motor remained off, LCD displays invalid card,
buzzer turns on for about 5seconds, and GSM/GPRS modem activated to send unauthorized user card to the
security personnel.

3. Methodology
In this proposed work, the RFID reader reads the data from tag and sends the card UID number to Arduino
microcontroller for comparison, if the card is valid then Arduino microcontroller display access granted else,
access denied on the screen.
3.1. Hardware Overview
RFID Technology - RFID stands for Radio Frequency Identification and it’s a non-contact technology that’s
broadly used in many industries for tasks such as personnel tracking, access control, supply chain management,
books tracking in libraries, tollgate systems and so on [5].
Our RFID system consists of two main components, a tag which is located on the RFID card one want to be
identified, and a transceiver or a reader which is installed at the secured entrance.
Our system RFID reader consists of a radio frequency module, a control unit and an antenna coil which
generates high frequency electromagnetic field as shown in figure 2. On the other hand, the tag used in this work
is a passive component, which consists of just an antenna and an electronic microchip, so when it gets near the
electromagnetic field of the transceiver installed at the secured entrance (2 to 5 inches), due to induction, a

Journal of Scientific and Engineering Research

334
Orji EZ et al Journal of Scientific and Engineering Research, 2018, 5(4):333-340

voltage is generated in the tags’ antenna coil and this voltage serves as power for the microchip of our system
tag.
Now as the tag is powered, it can extract the transmitted message from the reader, and for sending message
(UID) back to the reader, it uses a technique called load manipulation. Switching on and off a load at the
antenna of our tag will affect the power consumption of the reader’s antenna which can be measured as voltage
drop. These changes in the voltage will be captured as ones and zeros and that’s the way the data is transferred
from the tag to the reader.

Figure 2: RFID Working Principles [5]


How the reader reads the tag
We have one RFID tag with UID (B0 A5 8D 7C) and for RFID reader to get such information from the tag it
needs to be converted from hexadecimal value to binary as shown in table 1.
Table 1: UID - B0 A5 8D 7C Conversion
Hexadecimal value Binary value
B 1011
0 0000
A 1010
5 0101
8 1000
D 1101
7 0111
C 1100
32 bit worth of data is transferred from the tag to the reader in binary form (1011 0000 1010 0101 1000 1101
0111 1100). This data is transferred using high frequency (HF) 13.56MHz, which is the frequency that our
RFID system operates on.

Arduino Uno Board - The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital
input/output pins (of which 6 can be used as PWM (pulse width modulation) outputs), 6 analog inputs, a 16
MHz ceramic resonator, a USB (universal serial box) connection, a power jack, an ICSP (in-circuit serial
programming) header, and a reset button. It contains everything needed to support the microcontroller; simply
connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started [6].

Figure 3: Arduino Uno Board

Journal of Scientific and Engineering Research

335
Orji EZ et al Journal of Scientific and Engineering Research, 2018, 5(4):333-340

The Arduino UNO board in figure 3 can be toyed without been concerned about doing something wrong with
the board, worst case scenario the chip can be replaced with a new and cheap one and start over again.

3.2. Software Overview


Arduino IDE – The IDE (Integrated Development Environment) is a special program running on computer that
allows one to write sketches for the Arduino board in a simple language modeled after the Processing language
[6].

Figure 4: Arduino IDE


To program the Arduino microcontroller Arduino coding language was used. The Arduino language is based on
C/C++ and the most basic executable program only needs two functions as shown in figure 4, a setup() and a
loop(), to run. In the setup() function variables, pin modes, serial communication, etc are initialized. This
function only runs once. The loop() function is where one write the actual code. As the name implies, the loop()
function loops continuously until the device is powered off. Simple as it may sound; it is possible to write
complex programs using the above described structure.

4. Working of the System


Before we start our automatic access control system using Arduino and RFID project, let’s take a look at the
system block diagram and the flow chart of the project.

Power Suply

RFID Tag 1

Input RFID Tag 2 Arduino Access


RFID RFID Reader Microcontroller Controller
Cards

RFID Tag n

Figure 5: System Block Diagram

Journal of Scientific and Engineering Research

336
Orji EZ et al Journal of Scientific and Engineering Research, 2018, 5(4):333-340

Figure 5 shows the access control system block diagram using Arduino and RFID. The system has three
separate parts, an RFID reader, a microcontroller, and an access controller. The RFID reader reads the RFID
tags and the microcontroller accept the data from the reader process it and use the result to either grant or deny
access to the user using access controller. The project can be enhanced by connecting an LCD display to display
if access is granted or denied instead of serial monitor.

4.1. Control Flow


All necessary information about all users is stored in the system. In other to add a new user, we must first
register the user with the system then, corresponding user information is burn in RFID tag. The new tag will
now be accessible through the system.

Start

RFID Tag No
Detected?

Yes

Read User
UID

Yes UID No
Match?

Access Granted Access Denial

Figure 6: Control Flow Diagram


When a user comes to the entry point where the RFID reader is installed and places the RFID tag close
(contactless) to the reader, the system checks whether it is a registered user or not. If the user is registered, the
tag information is matched with the user information stored in system as shown in figure 6. Access is granted to
such user while access is denied to unauthorized user see figure 6.

RFID Reader RFID


Keychain(Tag)

RFID Card
(Tag)

Arduino
Microcontroller

Figure 7: Automatic Access Control prototype using Arduino and RFID

Journal of Scientific and Engineering Research

337
Orji EZ et al Journal of Scientific and Engineering Research, 2018, 5(4):333-340

In figure 7, when the RFID tag is placed close to the RFID reader, access is granted or denied. The right tag
stored on the microcontroller grants access to the secure environment while the wrong tag not stored on the
microcontroller will deny access to the card holder. Access granted or denied is displayed on the serial monitor
as shown by figure 9.
Table 2: Connection of the RFID Reader with Arduino Microcontroller
RFID Module Arduino
SDA Digital Pin 10
SCK Digital Pin 13
MOSI Digital Pin 11
MISO Digital Pin 12
IRQ No Connection
GND GND
RST Digital Pin 9
3.3V 3.3v
Table 2 shows how the Arduino is interfaced with the RFID reader. Also note that 3.3v of the RFID module
must be connected to 3.3v on the Arduino board not 5v. With the above connections, the Arduino is ready to
take commands and execute accordingly.

4.2. Programming the Arduino Board


The Arduino board was programmed through Arduino IDE and this paper captured the necessary code.
The loop() starts with a few lines of code that are looking for input, if there are no user input the device will do
nothing but wait.
void loop()
{
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
//Show UID on serial monitor
Serial.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();
if (content.substring(1) == "B0 A5 8D 7C") //change here the UID of the card/cards that you want to give
access or add multiple tags
{
Serial.println("Welcome Zeluwa your access is Authorized");
Serial.println();
delay(3000);
}

Journal of Scientific and Engineering Research

338
Orji EZ et al Journal of Scientific and Engineering Research, 2018, 5(4):333-340

else {
Serial.println("Sorry Access denied!");
delay(3000);
}
}
Figure 8: Code Listing
Once the program sees the correct combination of tag UID it will grant access to the user. While access will be
denied to incorrect tag UID or tags that are not store in the system. Tag UID can be added or remove by admin
through the IDE and re-uploaded back the Arduino board for effective operation.

4.3. Results
The project has the following workflow: on arriving at the door where the access control is installed, one is
asked to approximate their RFID tag to the reader as show on the output window (see figure 9). The reader reads
the tag and the microcontroller compare the tag’s UID for match and grant access if there is a match and deny
access if there is no match.

Figure 9: Output through serial monitor


An RFID tag can be added or removed through the Arduino IDE or any other programming language that
Arduino understands. For changes made on the sketch (i.e. adding or removing a tag) to be effective on our
system, the sketch must be re-uploaded to the Arduino board to override previous sketch.

4.4. Access Control System Analysis

Cost
Energy…
Speed With Arduino and…
Without
User…
Stability

0% 50% 100%

Figure 10: Access Control System with Arduino and RFID and without
Access control system was analyzed using the following criteria: cost, energy consumption, speed, user
satisfaction, and stability. The bar chart (figure 10) shows that there are significant enhancements in access

Journal of Scientific and Engineering Research

339
Orji EZ et al Journal of Scientific and Engineering Research, 2018, 5(4):333-340

control system using Arduino and RFID technology. The enhancements come in the area of cost, energy
consumption, speed, and stability. Other access control systems have high energy consumption rate which is a
great problem in Nigeria where energy is very expensive, while the users of the system have equal satisfaction
in both systems.

5. Conclusion
In this paper, a prototype of automatic access control system for use in an environment is presented. The system
uses radio frequency identification (RFID) with Arduino technology to differentiate between authorized and
unauthorized users. The RFID reader reads RFID tag issued to the user and matches it with stored UID on the
Microcontroller. On a successful match, the microcontroller grants access or deny access if no match was found.
An automatic access control system using Arduino and RFID has been prototyped and functioned as desired.
The system can be installed at the entrance of a secured environment to prevent an unauthorized individual
access to the environment.

References
[1]. Tarun Agarwal, (2015), "RFID based Automatic Door Lock System with Arduino", Retrieved 19
October 2017, from https://www.elprocus.com/automatic-door-lock-system-using-rfid-and-arduino/.
[2]. Ramalatha, M., Ramkumar, A. K., Selvaraj, S. and Suriyakanth, S, (2014), “RFID Based Personal
Medical Data card for Toll Automation”. Elysium Journal Engineering Research and Management.
Volume1, ISSN: 2347-4408, pp 51-52.
[3]. Umar Farooq, Mahmood ul Hasan, Muhammad Amar, Athar Hanif, and Muhammad Usman Asad,
(2014), "RFID Based Security and Access Control System" IACSIT International Journal of
Engineering and Technology, Vol. 6, No. 4, August 2014.
[4]. Peter Adole1, Joseph M. Môm and Gabriel A. Igwue, (2016), "RFID Based Security Access Control
System with GSM Technology", American Journal of Engineering Research (AJER) e-ISSN: 2320-
0847 p-ISSN: 2320-0936 Volume-5, Issue-7, pp-236-242.
[5]. Dejan Nedelkovski, (2017), "How RFID Works and How To Make an Arduino based RFID Door Lock
- HowToMechatronics", Retrieved 15 October 2017, from
[6]. http://howtomechatronics.com/tutorials/arduino/rfid-works-make-arduino-based-rfid-door-lock
[7]. Massimo Banzi, “Getting Started with Arduino” USE, Dale Dougherty, 2009.

Journal of Scientific and Engineering Research

340

View publication stats

You might also like