0% found this document useful (0 votes)
59 views56 pages

REPORT

The document describes a RFID based access control system for a library using an ESP32 microcontroller. The system uses RFID tags on books and user cards to automate check-in/check-out processes and track entry/exit of users to manage attendance and ensure appropriate use of facilities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views56 pages

REPORT

The document describes a RFID based access control system for a library using an ESP32 microcontroller. The system uses RFID tags on books and user cards to automate check-in/check-out processes and track entry/exit of users to manage attendance and ensure appropriate use of facilities.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

GOVERNMENT COLLEGE OF ENGINEERING

SALEM -11
(An Autonomous Institution; Affiliated to Anna University)

RFID BASED ACCESS CONTROL FOR LIBRARY

A MINI PROJECT REPORT

Submitted by

SHAHERA BANU A - 2041036


PRADEEP T-61772141L05
SOBIKA K-61772141L08
KISHORE S-61772141T311

in partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING

IN

ELECTRICAL AND ELECTRONICS ENGINEERING

GOVERNMENT COLLEGE OF ENGINEERING SALEM -11

ANNA UNIVERSITY: CHENNAI 600 025

NOVEMBER 2023

i
GOVERNMENT COLLEGE OF ENGINEERING
SALEM-11
(An Autonomous Institution; Affiliated to Anna University)

ANNA UNIVERSITY, CHENNAI – 600 025

BONAFIDE CERTIFICATE

Certified that this project report “RFID BASED ACCESS CONTROL

FOR LIBRARY” is the bonafide work of

SHAHERA BANU A (2041036)

PRADEEP T (61772141L05)

SOBIKA K (61772141L08)

KISHORE S (61772141T311)

who carried out the project work under our supervision

SIGNATURE SIGNATURE
Dr. V GEETHA Dr. S.K.S. ANGURAJ
HEAD OF THE DEPARTMENT SUPERVISOR
Professor and Head Assistant Professor (Adhoc)
Department of Electrical and Electronics Department of Electrical and
Engineering Electronics Engineering
GOVERNMENT COLLEGE OF GOVERNMENT COLLEGE OF
ENGINEERING SALEM-11 ENGINEERING SALEM-11

Submitted for the project viva-voce examination held on

INTERNAL EXAMINER EXTERNAL EXAMINER


ii
ABSTRACT

This paper describes RFID technology to track books information in the library

andthe number of people that access the library. The libraries are very important

aspects for humans. They are essential in acquiring and retaining the knowledge of

a person. But the earlier library system has caused many problems. This project

helps to identify the large number of tagged books using radio waves. RFID

technology provides a secure means of access control. library access can be

restricted to individuals with valid RFID cards or tags, preventing unauthorized

entry. RFID tags can be embedded in library books, allowing for automated check-

in and check-out processes. Patrons can simply pass their books over an RFID

reader, and the ESP32 can manage the transactions, updating the library system in

real-time. It can facilitate real-time monitoring of access events. Library staff can

track entry and exit times, helping with attendance management and ensuring that

library facilities are used appropriately.

Key Words: RFID technology, library access, RFID cards or tags, ESP32
microcontroller.

iii
ACKNOWLEDGEMENT

We would like to express our sincere thanks to our Principal Dr.R.


VIJAYAN Ph.D., for forwarding us to do our project and offering adequate
duration to complete our project.
I feel privileged to express my grateful thanks and gratitude toDr. V.
GEETHA M.E., Ph.D., Head of the Department for Electrical andElectronics
Engineering, for her precise and inspiring guidance, valuable and generous
suggestions for this project.
We express our heartfelt and sincere thanks to our project guide Dr.S.K.S.
ANGURAJ, Assistant Professor (Adhoc), Department of Electrical and
Electronics Engineering for his kind guidance and encouragement during this
project. He contributed to a measure in surmounting all hardships; I faced during
the project work. His tolerance in dealing the problems and encouragement were
constant source of inspiration
We are also expressing our indebt thanks to our teaching and non-teaching
faculties of electrical engineering department, Government College of
engineering, Salem.

iv
TABLE OF CONTENTS

CHAPTER TITLE PAGE


NO. NO.
ABSTRACT III
TABLE OF CONTENTS V
LIST OF TABLES VIII
LIST OF FIGURES IX

1 INTRODUCTION 1
1.1 GENERAL 1
1.2 INTRODUCTION 1
1.3 RFID TECHNOLOGY 3
1.4 LIBRARY ACCESS CONTROL 4
1.5 INTRODUCTION TO EMBEDDED SYSTEMS 4
1.5.1 EMBEDDED SYSTEM 5
1.6 SIGNIFICANCE OF THE PROJECT 6

2 LITERATURE REVIEW 7
2.1 GENERAL 7
2.2 LITERATURE SURVEY 7

3 OVERVIEW OF PROPOSED METHOD 10


3.1 GENERAL 10
3.2 PROBLEM STATEMENT 10
3.3 OBJECTIVE 10
3.4 EXISTING METHODS 11
3.5 PROPOSED METHOD 12
3.6 BLOCK DIAGRAM OF PROPOSED METHOD 13

4 HARDWARE REQUIREMENTS 14
4.1 GENERAL 14
4.2 ESP 32 MICROCONTROLLER 14
4.2.1 ABOUT ESP 32 14
4.2.2 SPECIFICATIONS 15
4.2.3 PIN DIAGRAM AND ITS EXPLANATION 15
4.3 SERVOMOTOR 17
4.3.1 GENERAL 17
4.3.2 SG90 MINI SERVOMOTOR 17
4.3.3 PULSE WIDTH MODULATION 18
v
4.3.4 WORKING OF SERVOMOTOR 18
4.3.5 SPECIFICATION 19
4.3.6 FEATURES 19
4.3.7 APPLICATIONS 19
4.4 RFID MODULE 20
4.4.1 GENERAL 20
4.4.2 RFID RC522 MODULE 20
4.4.3 SPECIFICATION 21
4.4.4 FEATURES 21
4.4.5 APPLICATIONS 22
4.4.6 ADVANTAGES 22
4.5 RFID TAGS 22
4.5.1 GENERAL 22
4.5.2 RFID TAG 22
4.5.3 SPECIFICATIONS 23
4.5.4 ADVANTAGES 24
4.5.5 APPLICATIONS 24
4.6 BREAD BOARD 24
4.7 JUMPER WIRES 25
4.8 OLED DISPLAY 26
4.8.1 SPECIFICATIONS 26
4.9 4*4 MATRIX KEYBOARD 27
4.9.1 SPECIFICATIONS 28
4.10 LIGHT EMITTING DIODE(LED) 29
4.11 BUZZER 29
4.12 PUSH BUTTON 30

5 SOFTWARE REQUIREMENTS 31
5.1 GENERAL 31
5.2 ARDUINO IDE 31
5.2.1 ABOUT ARDUINO IDE 31
5.3 INTRODUCTION TO EMBEDDED SYSTEMS 33
5.3.1 EMBEDDED SYSTEMS PROGRAMMING 33

6 APPENDICES 35
6.1 GENERAL 35
6.2 SOURCE CODE FOR MICROCONTROLLER 35

vi
7 RESULT 42
7.1 GENERAL 42
7.2 RESULT ANALYSIS 42

8 CONCLUSION AND FUTURE SCOPE 45


8.1 GENERAL 45
8.2 CONCLUSION 45
8.3 FUTURE SCOPE 46

REFERENCES 47

vii
LIST OF TABLES

TABLE PAGE NO
NO TABLE DESCRIPTION

4.1 Specifications of ESP32 15

viii
LIST OF FIGURES

FIGURE PAGE
FIGURE DESCRIPTION
NO NO
3.1 BLOCK DIAGRAM OF PROPOSED METHOD 13
4.1 ESP32 BOARD 14

4.2 PIN DIAGRAM OF ESP32 15


4.3 SG90 MINI SERVOMOTOR 17

4.4 RC522 MODULE 20


4.5 RFID TAGS 23
4.6 BREAD BOARD 25
4.7 JUMPER WIRES 26
4.8 OLED DISPLAY 27
4.9 4*4 MATRIX KEYBOARD 28
4.10 LIGHT EMITTING DIODE(LED) 29
4.11 BUZZER 30

4.12 PUSH BUTTON 30


7.1 CONNECTION DIAGRAM 43

7.2 DEMO PROJECT 43


7.3 BLIETOOTH SERIAL MONITORING APP 44

ix
CHAPTER 1

INTRODUCTION

1.1 GENERAL
The Radio frequency identification and detection (RFID) based library
management system was developed these days that will enhance the use and
management of library, the service being rendered can be managed with the help of
software and hardware tools. This system uses RFID technology to track books
information in the library and the number of people that access the library. The device
consists majorly of a RFID reader, a Bluetooth module, and a microcontroller and the
material to be tracked are tagged with a RFID (a transponder). The unique IDs are
stored in a PC running an application with other information on the materials into a
database. Through these processes, books, library users with their information as well
as their tag ID can easily be used for cataloging and user authentication. A model of the
system was built, tested with several data and the result showed satisfactory
improvement in the efficiency of the library management system.

1.2 INTRODUCTION
Over the years, efforts had been made to see library services such as book
borrowing, user’s information tracking etc. being provided in an effortless manner.
Library Management Systems (LMS) are computer based systems that automate one or
all functional areas of a typical library and have had a history of evolution going back
to the mid-1950s. LMS have also been referred to as Integrated Library Systems (ILS)
in later years to reflect the fact that all functions are managed via a central database
(what is today being called a soloed application) with processes that transparently
exchange data between functional components such as catalogue recordsand circulation
transactions. By the end of the 1990s some LMSs incorporated interfaces to standard
tools such as Microsoft’s Excel for the presentation of statisticaldata. New kinds of
enterprise applications have become available to institutions andthere is demand for
better integration of LMS with such systems

1
The rapid development in information technology has brought out a
revolutionary change in the field of library system management and services. The new
information technology had changed the manual scenario of library to computerized
automated library. The Radio Frequency Identification (RFID) technology is a latest
technology for automatic identification method. RFID has been used in diverse
applications from inventory tracking to building access. The concept of RFID can be
simplified to that of an electronic barcode and can be used to identify or detect library
holdings at the circulation desk and in the daily stock maintenance. This system
consisting of short RFID labels (tags), hardware, and software provides library with
more effective way of managing their collection while providing greater customer
services to their regular customers.
Campus Management RFID technology can fully automate various transactions
of happening within a Campus. Students, teachers, lectures and staff can be provided
with RFID smart cards for their attendance and access to variouslabs and library.
Library systems can also be automated by using RFID which can include issuing of
books, security gates, searching of books, etc. Assets like computers, electronic
equipment and mechanical tools which are constantly on the go for student experiments
can be tracked to improve their usage by various departments. Hostel canalso be better
managed with access control system installed for students.
The Radio Frequency Identification and Detection RFID is a technology that has
sparked interest in the library community because of its applications that promise to
increase efficiency, productivity and enhance user satisfaction. Current library
management systems use security strips and barcode technology. Using these
technologies, a library management system can keep records of lending, borrowing and
shelving status of items such as books, audio or video tapes, CDs, DVDs, etc. But
barcodes and security strips have their limitations. They are slow to read and are prone
to be stolen. All these led to irreparable loss to a library and its valuable inventory stock.
This is where RFID technology can come to the aid of library managers.

2
1.3 RFID TECHNOLOGY
RFID is a technology that uses radio waves to transmit data between a reader
and an electronic tag attached to an object, typically for the purpose of tracking and
identifying the object. It is made of two components. The RFID module RC522 is a
popular RFID reader and writer module that operates at 13.56 MHz frequency. It is
commonly used for projects involving RFID-based systems, such as access control,
attendance systems, and inventory tracking.
Features:

o Rapid check in/check out


o Simplified patron self- checkout/check in
o High reliability
o High-speed inventorying
o Automated materials handling
o Long tag life

Specification:

o Voltage: 3.7V
o Operating Voltage: DC 3.3V
o Operating Current: 13-26mA
o Idle Current: 10-13mA / DC 3.3V
o Sleep Current: < 80uA
o Peak Current: < 30mA
o Operating Frequency: 13.56MHz
o Module interface: SPI
o Data transfer rate: Maximum 10Mbit/s
o Reader Distance: ≥ 50mm / 1.95" (mifare 1)
o Dimension: 40mm*60mm(L*W)
o Package Includes: 1 x 12V 1.2Ah Rechargeable Lead Acid Battery

3
1.4 LIBRARY ACCESS CONTROL

RFID Library access control is based on both hardware and software solutions.
The hardware requirements are ESP32 microcontroller, computer system, RC522
module, RFID tags, SG90 Mini servo motor, Light emitting diode (LED), 0.96 Inch
I2C/IIC 4 pin OLED Display module BLUE,4*4 matrix keypadand a electronic buzzer
beep alarm bell. While Arduino ide software is used. The features of the system are
RFID enabled library for cataloging of books, Bluetooth enabled for easy mobility,
flexibility in searching information, centralized database, user identification through
their RFID tags and security features that include a login procedure with password
protection for both the librarian and members.

1.5 INTRODUCTION TO EMBEDDED SYSTEMS

Microcontrollers are widely used in Embedded System products. An Embedded


product uses the microprocessor (or microcontroller) to do one task & one task only. A
printer is an example of embedded system since the processor inside it performs one
task only namely getting the data and printing it. Contrast this with Pentium based PC.
A PC can be used for any no. of applications such as word processor, print server, bank
teller terminal, video game player, network server or internet terminal. Software for
variety of applications can be loaded and run. Of course, the reason a PC can perform
multiple tasks is that it has RAM memory and an operating system that loads the
application software into RAM & lets the CPU run it. In and Embedded system there is
only one application software that is typically burn into ROM. An x86PC Contain orit’s
connected to various Embedded Products such as keyboard, printer, modem, Disc
controller, Sound card, CD-ROM Driver, Mouse & so on. Each one of these peripherals
as a microcontroller inside it that performs only one task. For example, inside every
mouse there is microcontroller to perform the task of finding the mouse position and
sending it to PC.

4
Although microcontroller is preferred choice for many embedded systems, there
are times that a microcontroller is inadequate for the task. For this reason, in recent
years many manufactures of general-purpose microprocessors such as INTEL,
Motorola, and AMD & Cyrix have targeted their microprocessors for the high end of
embedded market. While INTEL, AMD, Cyrix push their x86 processors for both the
embedded and desktop pc market, Motorola is determined to keep the 68000 families
alive by targeting it mainly for high end of embedded system.

One of the most critical needs of the embedded system is to decrease power
consumptions and space. This can be achieved by integrating more functions into the
CPU chips. All the embedded processors based on the x86 and 680x0 have low power
consumptions in additions to some forms of I/O, Com port & ROM all on a single chip.
In higher performance Embedded system, the trend is to integrate more & more
function on the CPU chip & let the designer decide which feature he/she wants to us.

1.5.1 EMBEDDED SYSTEM

An Embedded System employs a combination of hardware & software (a


“computational engine”) to perform a specific function; is part of a larger system that
may not be a “computer works in a reactive and time-constrained environment.
Software is used for providing features and flexibility Hardware = {Processors, ASICs,
Memory...} is used for performance & sometimes security.

An embedded system is a special purpose system in which the computer is


completely encapsulated by the device it controls. Unlike a general-purpose computer,
such as a PC, an embedded system performs predefined task’s usually with very
specific tasks design engineers can optimize it reducing the size and cost of the product.
Embedded systems are often mass produced, so the cost savings may be multiplied by
millions of items.

5
The core of any embedded system is formed by one or several microprocessor or
micro controller programmed to perform a small number of tasks. In contrast to a
general-purpose computer, which can run any software application, the user chooses,
the software on an embedded system is semi- permanent, so it is often called firmware.

1.6 SIGNIFICANCE OF THE PROJECT

This device enhances security by restricting access to authorized individuals.


Only users with valid RFID cards or tags can enter secured areas, reducing the risk of
theft, unauthorized access, or other security breaches. it allows for quick and efficient
access management. Users can enter the library by simply presenting their RFID cards
or tags to the reader, eliminating the need for traditional key-based systems or manual
check-ins. RFID tags can be embedded in library books, enabling automated check-in
and check-out processes. This automation streamlines library operations, reduces
queues, and minimizes the need for manual handling of books during these processes.
This system provides a convenient and user-friendly experience. Userscan access
library resources without the hassle of physical keys or extensive manual procedures.
This can lead to increased satisfaction among library patrons. enable real- time
monitoring of library access. Library staff can track entry and exit times, helping with
attendance management and ensuring that library facilities are used appropriately.RFID-
based access is quick and contactless. Users can enter the library by waving or tapping
their RFID cards or tags near the reader, promoting a faster and more convenient entry
process.

6
CHAPTER 2

LITERATURE REVIEW

2.1 GENERAL

A literature review is a written summary of major works and other sources on a


specific topic. Each source is described, summarized and evaluated in the literature
review.

2.2 LITERATURE SURVEY

The following journal papers has been reviewed and the technology used, pros
and cons are inferred.

1. Edwards, E.O. and Orukpe, P.E., 2014. Development of a RFID based library
management system and user access control. Nigerian Journal of Technology,
33(4), pp.574-584.

This paper This paper developed a RFID based library management system
(LMS) using UNIBEN as a case study. The need to manage time consumption is utmost
desire of an organization, a firm or an institute. Library management System reduces
time wasted in performing a particular job by librarian and library staffs. Librarians in
the library spend time sorting out books that has been mixed with others on different
shelves. But with this system adopted and used, time will effectively be saved in
performing such tasks in the library. This designed system worked satisfactorily.

2. Dhanalakshmi, M. and Mamatha, U., 2009. RFID based library management


system. Proceedings of ASCNT, 3(1), pp.227-234.

This paper proposed that the RFID in the library speeds up book borrowing,
monitoring, books searching processes and This paper proposed that the RFID in the
library speeds up book borrowing, monitoring, books searching processes and

7
frees staff to do more user-service tasks. But the performance varies with respect to the
vendors of RFID readers and tags. The efficient utilization of the technology also
depends upon the information to be written in tag. Experimental results with respect to
effectiveness of RFID reader position, tag position are presented in this paper.
Developments in RFID technology continue to yield larger memory capacities, wider
reading ranges, and faster processing.

3. Malipatil, N., Roopashree, V., Gowda, R.S., Shobha, M.R. and Kumar, H.S., 2020.
RFID based library management system. International Journal of Research in
Engineering, Science and Management, 3(7), pp.112-115.

They are essential in acquiring and retaining the knowledge of a person. But the
earlier library system has caused many problems. This project helps to identify the large
number of tagged books using radio waves. The database shows the availability of the
book in the library so that the student can search in the database and if available, they
can collect book from the library. It helps to handle the issue, renewal and return process
via RFID tags easily. Student will get notified about the due date of book usingGSM. If
the student failed to return the book after the due date corresponding fine will be
generated based on the time period. RFID EAS system
is used for theft detection at the library.

4. Srujana, C., Murthy, B.R., TanveerAlam, K., Sunitha, U., DV, M. and Thimmaiah,
P., 2013. Development of RFID based library management system using MATLAB.
International Journal of Engineering and Advanced Technology, 2(5), pp.480-483.

In this paper, RFID technology is found to be a versatile technology in many


real time applications, especially in library management system. This provides an
intelligent library management, which creates better service quality with quick and
effective benefits to both library management and students This technology can be
applied to a system of volume. Either it may be a small departmental library or vast

8
university library its effects are more obvious and applicable. This RFID technology
also provides the facility of self-check for the library staff and non-returned books
effectively. So, it is expected that this RFID technology will soon replace the presently
existing technology method. The proposed system successfully implemented in our
library and it is satisfactory working.

5. Addepalli, S.L. and Addepalli, S.G., 2014. Library management system using RFID
technology. International journal of computer science and information
technologies, 5(6), pp.6932-6935.

This paper presents that the Radio frequency identification (RFID) is a rapidly
emerging technology which allows productivity and convenience. Radio Frequency
Identification (RFID) is a new generation of Auto Identification and Data collection
technology which helps to automate business processes and allows identification of
large number of tagged objects like books, using radio waves. This paper proposes
RFID Based Library Management System that would allow fast transaction flow and
will make it easy to handle the issue and return of books from the library without much
intervention of manual book keeping which benefits by adding properties of traceability
and security. The proposed system is based on RFID readers and passive RFID tags
that are able to electronically store information that can be read with the help of the
RFID reader. This system would be able to issue and return books via RFID tags and
also calculates the corresponding fine associated with the time period of the absence of
the book from the library database.

9
CHAPTER 3

OVERVIEW OF PROPOSED METHOD

3.1 GENERAL

This chapter gives the overview of the proposed solution.

3.2 PROBLEM STATEMENT

• Outdated Access Control: Existing library access systems rely on outdated


methods, leading to security vulnerabilities.

• Inefficient Processes: Manual book checkouts and returns create long queues and
frustrate both staff and patrons.

• Inventory Challenges: Current systems struggle to track real-time book locations,


resulting in misplaced items and user frustration.

• User Experience: Patrons expect modern, user-friendly services, which traditional


systems often fail to provide.

• Data Deficiency: Libraries lack comprehensive user behavior and book usage data

3.3 OBJECTIVE

• Enhanced Library Security: Develop an advanced access control system that


integrates RFID and fingerprint recognition to ensure only authorized patrons can
enter the library, significantly enhancing library security.

• Efficient Library Operations: Streamline library processes by automating book


check-out and return procedures through RFID technology, reducing queues and
wait times for patrons and staff.

10
• Real-Time Inventory Management: Implement RFID-based book tracking to
provide real-time information on book locations within the library, reducing
incidents of misplaced or lost books and improving user experience.

• User Convenience: Improve the overall patron experience by offering self-


checkout and return options and ensuring secure, convenient access to library
resources.

• Data-Driven Decision-Making: Gather comprehensive data on user behavior, book


usage, and library traffic patterns to enable data-driven decisions for resource
allocation and service improvements.

• Integration of Technologies: Successfully integrate RFID, fingerprint recognition,


and servo motor control technologies to create a cohesive, smart library system.

3.4 EXISTING METHODS

• Traditional barcodes are widely used for library materials. Each book is assigned
a unique barcode, and library staff can use barcode scanners for tasks such as
check-in, check-out, and inventory management.

• Library Management Systems are comprehensive software solutions that assist in


various library operations, including cataloging, circulation, acquisitions, and
patron management. LMS helps streamline and automate many routine tasks.

• RFID (Radio-Frequency Identification) technology is used for access control,


inventory management, and automated check-in/check-out processes in libraries.

• Online public access catalog (OPAC) systems provide users with online access to
the library catalog, allowing them to search for books, check their availability, and
place holds or requests.

11
3.5 PROPOSED METHOD

Interfacing RFID Technology with ESP32 microcontroller


• RFID technology provides a secure means of access control. By interfacing RFID
readers with an ESP32, library access can be restricted to individuals with valid
RFID cards or tags, preventing unauthorized entry.

• The combination of RFID and ESP32 enables efficient authentication processes.


Users can gain access to the library by presenting their RFID cards or tags to the
reader, offering a quick and convenient method compared to traditional key- based
systems.

• RFID tags can be embedded in library books, allowing for automated check-in and
check-out processes. Patrons can simply pass their books over an RFID reader, and
the ESP32 can manage the transactions, updating the library system in real-time.

• The ESP32 microcontroller can facilitate real-time monitoring of access events.


Library staff can track entry and exit times, helping with attendance management
and ensuring that library facilities are used appropriately.

• With the ESP32, it becomes feasible to implement customized access levels.


Different user groups, such as students, faculty, and staff, can have varying levels
of access to different sections of the library, ensuring that resources are
appropriately restricted.

• The ESP32 is known for its low-power operation, making it suitable for
applications where energy efficiency is essential. This is particularly important in
scenarios where the system needs to operate for extended periods on battery
power.

• The ESP32 comes equipped with Wi-Fi and Bluetooth capabilities, enabling
wireless communication. This allows for remote monitoring and control of the
access control system, enhancing flexibility and management.

12
3.6 BLOCK DIAGRAM OF PROPOSED METHOD

Figure 3.1 Block Diagram of Proposed Solution

13
CHAPTER 4

HARDWARE REQUIREMENTS

4.1 GENERAL

This chapter gives the basic description of the hardware components that is used
in the proposed solution.

4.2 ESP32 MICROCONTROLLER

4.2.1 ABOUT ESP32

• The ESP32 is a series of low-cost, low-power system on a chip microcontroller


• Single or Dual-Core 32-bit with clock frequency up to 240 MHz.
• 34 Programmable GPIOs.
• Supports 802.11 b/g/n Wi-Fi connectivity with speeds up to 150 Mbps.
• Support for both Classic Bluetooth v4.2 and BLE specifications.
• Secure Boot and Flash Encryption.
• Ethernet MAC for physical LAN Communication

Figure 4.1 ESP32 Board

14
4.2.2 SPECIFICATIONS

Processor Xtensa LX6


Type ESP32
Clock frequency upto 240 MHz
RAM 520 KiB
ROM 448 KiB
Data Storage 520Kb
Frequency 160MHz
Operating voltage 2.2V-3.6V DC
Operating current 200 mA
Dimensions 6*6mm
Operating temperature - 40°C - 125°C
Weight 8g
Data interfaces UART/I2C/PWM/GPIO

Table 4.1 Specifications of ESP32

4.2.3 PIN DIAGRAM AND ITS EXPLANATION

Figure 4.2 Pin Diagram of ESP32


15
• Vin: Power supply voltage (3.3V recommended).

• GND: Ground.

• 3.3V: Output from the on-board 3.3V regulator. You can use this to supply power
to other components.

• EN: Enable pin. Keep it pulled high for normal operation.

• GPIO (General Purpose Input/Output): These pins can be configured as either


input or output. They are versatile and often used for tasks like reading sensors,
driving LEDs, or interfacing with other digital devices.

• Analog Pins (ADC): The ESP32 has some pins that can be used to read analog
signals using its Analog-to-Digital Converter (ADC). These pins are often labeled
with numbers like A0, A1, etc.

• Serial Communication Pins (TX/RX): These pins, labeled as TX (transmit) and


RX (receive), are used for serial communication, such as UART

• SPI (Serial Peripheral Interface) Pins: ESP32 has pins dedicated to SPI
communication, which is commonly used for connecting to peripherals like
displays or other microcontrollers.

• PWM (Pulse Width Modulation) Pins: These pins allow you to generate PWM
signals, which are useful for tasks like controlling the brightness of an LED or the
speed of a motor.

• I2C (Inter-Integrated Circuit) Pins: These pins are used for I2C communication,
a protocol for connecting multiple devices on a shared bus.

16
4.3 SERVO MOTOR

4.3.1 GENERAL

A servomotor (or servo motor or simply servo) is a rotary actuator or linear


actuator that allows for precise control of angular or linear position, velocity, and
acceleration in a mechanical system. it is a closed-loop servomechanism that uses
position feedback to control its motion and final position.

4.3.2 SG90 MINI SERVO MOTOR

servo motor is a type of motor that is powered by a DC source, either from an


external supply or by a controller. A small and lightweight servo motor with high output
power is called a micro servo motor sg90. This means that the sg90 micro servo motor
will only work as hard as is required to complete the task at hand. A wide range of
applications for servo motors exists, including cameras, telescopes, antennas, industrial
automation, and robots. Servo motor is a type of motor that is powered by a DC source,
either from an external supply or by a controller. A small and lightweight servo motor
with high output power is called a micro servo motor sg90. This means that the sg90
micro servo motor will only work as hard as is required to complete the task at hand. A
wide range of applications for servo motors exists, including cameras, telescopes,
antennas, industrial automation, and robots. A motor rotates from 0 to 180 degrees at
each position of 90 degrees so that names it SG90.

Figure 4.3 SG90 mini servomotor

17
4.3.3 PULSE WIDTH MODULATION

Pulse width modulation is a tried-and-true method for controlling semiconductor


devices in power electronics. A typical control method that produces analog signals
from digital devices like microcontrollers is called pulse width modulation or PWM.
The resulting signal will consist of a series of square wave-like pulses. This means that
the wave will either be high or low at any given time.
A servo motor is wound with stator and rotor windings on its stationary and
rotating portions, respectively. In addition to using less electricity, this motor is very
efficient, and it is quite easy to maintain. Servo motors are driven by driver amplifiers,
which receive velocity commands from controllers. Feedback devices such as resolvers
and encoders provide information on the speed and position of servo motors. It is
possible to build the resolver or encoder within the motor, or it may be placed
somewhere else. Closed-loop systems allow servo motors to run in accordance with a
particular motion profile programmed into the controller.
Servo motor consists of 3 pins, Vcc, GND and PWM. In the robotics field, servo
motors are widely used because they provide the precise position required for specific
tasks. SG90 consist of four parts, these are Electronics assembly, Protective case, drive
gears, and output spline.

4.3.4 WORKING OF SERVOMOTOR

As mentioned before, servo motors work with PWM converters and require a
controller to control the pulse, which can be controlled by microcontrollers such as the
Arduino, ARM, or other programmable controllers.

18
4.3.5 SPECIFICATION

o Weight 9g
o Size 22 x 11.5 x 27 mm
o Operating Speed 0.12sec/60 degrees
o Stall Torque (4.8V) 17.5oz/in (1.2 kg/cm)
o Temperature Range -30 to +60 Degree C
o Dead Band Width 7usec Operating Voltage:3.0-7.2 Volts

4.3.6 FEATURES

o High efficiency.
o High output power relative to their size.
o More constant torque at higher speed.
o Closed-loop control.
o Quiet operation.
o Highly reliable.
o High ratio of torque to inertia.
o High acceleration

4.3.7 APPLICATIONS

o Robotics
o Telescope
o Industrial production
o Machinery Works
o Production industries

19
4.4 RFID MODULE

4.4.1 GENERAL

RFID (Radio-Frequency Identification) modules are devices that use radio waves
to wirelessly transmit data between an RFID reader and an RFID tag. These modules
consist of an RFID reader, which emits radio waves, and RFID tags, which store data
and can be attached to objects or people. They're commonly used for access control,
inventory tracking, and other applications where wireless identification is needed

4.4.2 RFID RC522 module

This RC522 RFID Card Reader Module 13.56MHz is a low-cost MFRC522-


based RFID Reader Module is easy to use and can be used in a wide range of
applications. RC522 is the highly integrated RFID card reader which works on non-
contact 13.56mhz communication, is designed by NXP as low power consumption, low
cost and compact size read and write chip, is the best choice in the development of
smart meters and portable hand-held devices.

RFID Cards are frequently used as personal identifiers in personnel management


or access control systems. This is a version of the popular ISO format identity card. The
RFID technology is used for sensing and identifying tagged people and objects foraccess
control, automation, and a whole range of different applications.

Figure 4.4 RC522 Module

20
4.4.3 SPECIFICATIONS

o Operating Voltage DC 3.3V


o Operating Current 13-26mA
o Idle Current 10-13mA / DC 3.3V
o Sleep Current < 80uA
o Peak Current < 30mA
o Operating Frequency 13.56MHz
o Module interface SPI
o Data transfer rate Maximum 10Mbit/s
o Reader Distance ≥ 50mm / 1.95" (mifare 1)
o Dimension 40mm*60mm(L*W)

4.4.4 FEATURES

o Integrated MF RC522
o 13.56MHz contactless communication card chip.
o The low-voltage, low-cost, small size of the non-contact card chip to read and write.
o Suitable for Smart meters and portable handheld devices.
o Advanced modulation and demodulation concept completely integrated into all types
of 13.56MHz passive contactless communication methods and protocols.
o 14443A compatible transponder signals.
o ISO14443A frames and error detection.
o Supports rapid CRYPTO1 encryption algorithm, terminology validation MIFARE
products.
o MFRC522 support MIFARE series of high-speed non-contact communication, two-
way data transmission rate up to 424kbit/s.
o Low cost, and ideal for user equipment development.
o The reader and RF card terminal design meet advanced applications development
and production needs.
o Can be directly loaded into the various reader molds, very convenient.

21
4.4.5 APPLICATIONS

o Smart home project


o Voice broadcast access control system
o Attendance punch card system
o Can be used in RF communication and identification applications.
o Automatic billing systems
o Verification/Identification system
o Access control systems

4.4.6 ADVANTAGES

o low-temperature rise
o low power
o high efficiency
o high reliability
o high-security isolation

4.5 RFID TAG

4.5.1 GENERAL

RFID tags are a type of tracking system that uses smart barcodes in order to
identify items. RFID is short for “radio frequency identification,” and as such, RFID
tags utilize radio frequency technology. these radio waves transmit data from the tag to
a reader, which then transmits the information to an RFID computer program.

4.5.2 RFID TAG

This is a 13.56MHz RFID IC Key Tag. The RFID technology is used for sensing
and identifying tagged people and objects for access control, automation, and a whole

22
range of different applications. Operating on a frequency of 13.56MHz, these tokens
are all pre-programmed with unique ID numbers to communicate wirelessly with RFID
Readers.

This 13.56MHz RFID Tag makes it easy to distribute while maintaining a fair
amount of discretion. Additionally, the process of matching tags to readers is also very
simple as well, as all you have to do is tell the RFID Reader that you are adding a token,
and then hold the token nearby. Then, when the token passes by the reader, the system
can identify and log the ID number and time, or can even open up doors or other access
ways automatically. This means you can attach it to vehicles or items, keyrings, or even
pets’ collars to keep track of the location via an array of readers in the office,warehouse,
or home.

This basic RFID tag works in the 13.56MHz RF range and comes with a unique
32-bit ID. It is not re-programmable. This blank, smooth, and the mildly flexible RFID
tag is ready for your logo (or hand-drawn scribble)

Figure 4.5 RFID Tags

4.5.3 SPECIFICATIONS
o Size 30 40 3mmOperating
o Read write time 1 to 2 milli-seconds
o Operating Temperature 20 to 85 Endurance -100,000 times

23
o Boud Read write distance 2.5 to 10cm
o Communication speed 106K
o Frequency Available 13.56 MHz & 125 KHz
o Storage Capacity 8 K bit

4.5.4 ADVANTAGES

o Small, durable.
o Waterproof, anti-corrosion, shockproof.
o easy carrying.

4.5.5 APPLICATIONS

o Enterprise/campus card
o bus stored value card
o attendance systems

4.6 BREAD BOARD

A breadboard, solderless breadboard, or protoboard is a construction base used


to build semi-permanent prototypes of electronic circuits. unlike a perf board or
stripboard, breadboards do not require soldering or destruction of tracks and are hence
reusable. For this reason, breadboards are also popular with students and in
technological education.
A variety of electronic systems may be prototyped by using breadboards, from
small analog and digital circuits to complete central processing units (CPU).
Compared to more permanent circuit connection methods, modern breadboards
have high parasitic capacitance, relatively high resistance, and less reliable connections,
which are subject to jostle and physical degradation. Signaling is limited to about 10
MHz, and not everything works properly even well below that frequency.

24
Figure 4.6 Bread Board

4.7 JUMPER WIRES

A jump wire (also known as jumper, jumper wire, DuPont wire) is an electrical
wire, or group of them in a cable, with a connector or pin at each end (or sometimes
without them – simply "tinned"), which is normally used to interconnect the
components of a breadboard or other prototype or test circuit, internally or with other
equipment or components, without soldering.
Individual jump wires are fitted by inserting their "end connectors" into the slots
provided in a breadboard, the header connector of a circuit board, or a piece of test
equipment.
A jumper wire is an electric wire that connects remote electric circuits used for
printed circuit boards. By attaching a jumper wire to the circuit, it can be short circuited
and short-cut (jump) to the electric circuit.
By placing the jumper wire on the circuit, it becomes possible to control the
electricity, stop the operation of the circuit, and operate a circuit that does not operate
with ordinary wiring. Also, when specification change or design change is necessary
on the printed circuit board, reinforcement of the defective part, partial stop of the
unnecessary function, and change of the circuit configuration of the unnecessary output
part by attaching or detaching the jumper wire can.
SHOWA jumper wire (NSL: New Showa Lead) is a lead-free tin-plated annealed
copper wire. Tin plating is tin: 99.2%, copper: 0.8%.
25
In general, it is said that hot plating is difficult to control the plating thickness
compared with electroplating, but we control the plating thickness by the original
processing method.

Figure 4.7 Jumper Wire

4.8 OLED DISPLAY

The OLED display provides immediate visual feedback to users, confirming


whether access is granted or denied, enhancing the user experience. this Display relate
user information such as names, photos, or access levels, allowing for easy
identification and verification. It Provide clear instructions or prompts on the OLED
display, guiding users on how to use the system correctly and efficiently. OLED
displays allow for flexible and customizable interfaces, enabling system administrators
to tailor the visual aspects according to specific needs.
In case of issues like invalid cards or system malfunctions, the OLED display
can show error messages, aiding in troubleshooting. Display system status indicators,
indicating whether the system is active, in maintenance mode, or experiencing any
problems. OLED displays offer high contrast ratios and vibrant colors, contributing to
a visually appealing and modern design for the access control system.
26
The display can show real-time information about access logs, providing
administrators with immediate insights into system activity. integrating an OLED
display into the access control system enhances usability, communication, and overall
system functionality

Figure 4.8 OLED Display

4.8.1 SPECIFICATIONS

o OLED Driver IC SSD1306


o Resolution 128 x 64
o Visual Angle >160°
o Display Color Area Color (White)
o Input Voltage 3.3V ~ 6V
o Compatible I/O Level 3.3V, 5V
o Working temperature -30°C ~ 70°C
o Interface I2C
o Only Need 2 I/O Port to Control
o Full Compatible with Arduino

4.9 4*4 MATRIX KEYBOARD

A 4x4 matrix keyboard is a keypad with 16 keys arranged in a grid of four rows
and four columns. Each key represents a unique combination of a row and a column,
allowing for a total of 16 possible inputs.it allow users to input additional information
or perform specific actions using the keyboard. For instance, users might need to enter
a code for special access privileges.

27
The use of keyboard enables administrators to configure system settings or
perform maintenance tasks directly on the access control system.
It Implement features for adding or removing users, changing access levels, or
updating user information using the keyboard for administrative purposes.it Allow
users or administrators to input time-sensitive information, like time frames for
temporary access.
The integration involves connecting the 4x4 matrix keyboard to a
microcontroller (like Arduino) along with the RFID reader and other system
components. Programming is then done to manage input from both the RFID reader
and the keyboards.

Figure 4.9 4*4 Matrix keyboard

4.9.1 SPECIFICATIONS

• Maximum Rating: 24 VDC, 30 mA.


• Interface: 8-pin access to 4×4 matrix.
• Dimensions: Keypad: 2.7 x 3.0 in (6.9 x 7.6 cm) Cable: 0.78 x 3.5 in (2.0 x 8.8 cm)
• Operating temp range: 32 to 122 °F (0 to 50 °C)

28
4.10 LIGHT EMITTING DIODE (LED)

LEDs, or Light-Emitting Diodes, are semiconductor devices that emit light when
an electric current passes through them.
Use LEDs to visually communicate the status of access attempts. For example,
a green LED could indicate successful access, while a red LED could signify denied
access. Incorporate LEDs to guide users through the access control process. For
instance, use blinking LEDs to prompt users to present their RFID cards or enter PINs.
LEDs used to indicate the overall status of the access control system.
By integrating LEDs strategically into the library access control system, it creates
a user-friendly and informative environment.

Figure 4.10 Light emitting diode (LED)

4.11 BUZZER

A buzzer is an electronic device that produces sound when an electric current


passes through it. Emit a short, pleasant tone to confirm successful access when a valid
RFID card is presented, providing users with immediate feedback.it Provide audible
feedback in addition to visual indicators, assisting users, especially in noisy
environments or for individuals with visual impairments.

29
The buzzer is activated in case of system errors, card reader malfunctions, or
security breaches, alerting staff to investigate and resolve issues promptly.

Figure 4.11 Buzzer

4.12 PUSH BUTTON

A push button is a simple yet essential electronic component that, when pressed,
completes an electric circuit. Assigning specific functions to the push button, such as
toggling between access modes, activating maintenance mode, or initiating system
diagnostics. The push button is used for turning on and off the Bluetooth connection,
for access control and for the activation of regulation mode.

Figure 4.12 Push button

30
CHAPTER 5

5. SOFTWARE REQUIREMENTS

5.1 GENERAL

This chapter gives the description of the software methods used in this proposed
system.

5.2 ARDUINO IDE

5.2.1 ABOUT ARDUINO IDE

When using the Arduino IDE with an ESP32 microcontroller for library access control
various features and capabilities can be leveraged to create an effective and secure access
system.

Here are some key details:

ESP32 Board Support: Arduino IDE provides built-in support for the ESP32
microcontroller, making it easy to develop projects with this powerful and versatile chip.

Library Support: Access a wide range of libraries directly from the Arduino Library
Manager. This includes libraries for RFID modules, displays, and other peripherals
commonly used in access control systems.

Easy Programming: Utilize the simplicity of the Arduino programming language to develop
and upload code to the ESP32. Arduino IDE abstracts many complexities, making it
accessible for beginners and experienced developers alike.

31
Wi-Fi Connectivity: Leverage the ESP32's built-in Wi-Fi capabilities for network
connectivity. This could be useful for real-time data logging, remote monitoring, or
integration with other networked systems.

Integrated Development Environment (IDE): Benefit from a user-friendly IDE with featuressuch
as syntax highlighting, code completion, and a serial monitor for debugging and communication.

Serial Communication: Utilize the serial communication capabilities to interact with the
ESP32, allowing for debugging and data exchange between the microcontroller and the
computer.

Community Support: Tap into the vast Arduino community for support, tutorials, and shared
projects. The popularity of Arduino and ESP32 ensures a wealth of online resources.

Flexibility in Hardware Integration: Easily integrate various hardware components like RFID
readers, displays (OLED, LCD), push buttons, buzzers, and more, using the availablelibraries
and straightforward connections.

Access Control Logic: Implement access control logic in the Arduino code, defining how
the system responds to RFID card scans, button presses, and other events.

Security Considerations: Implement secure coding practices and consider security aspects
such as encryption for sensitive data, secure storage of access credentials, and protection
against unauthorized access.

Modularity and Expandability: Develop the access control system in a modular way,
allowing for future expansion or upgrades. The ESP32's capabilities and the Arduino IDE's
flexibility make it easy to add new features.

32
5.3 INTRODUCTION TO EMBEDDED SYSTEMS

Looking around, we find ourselves to be surrounded by various types of embedded


systems. Be it a digital camera or a mobile phone or a washing machine, all of them has
some kind of processor functioning inside it. Associated with each processor is the
embedded software. If hardware forms the body of an embedded system, embedded
processor acts as the brain, and embedded software forms its soul. It is the embedded
software which primarily governs the functioning of embedded systems. During infancy
years of microprocessor-based systems, programs were developed using assemblers and
fused into the EPROMs. There used to be no mechanism to find what the program was
doing. LEDs, switches, etc. were used to check correct execution of the program. Some
‘very fortunate’ developers had In-circuit Simulators (ICEs), but they were too costly and
were not quite reliable as well.
As time progressed, use of microprocessor-specific assembly-only as the
programming language reduced and embedded systems moved onto C as the embedded
programming language of choice. C is the most widely used programming language for
embedded processors/controllers. Assembly is also used but mainly to implement those
portions of the code where very high timing accuracy, code size efficiency, etc. are prime
requirements.

Initially C was developed by Kernighan and Ritchie to fit into the space of 8K and
to write (portable) operating systems. Originally it was implemented on UNIX operating
systems. As it was intended for operating systems development, it can manipulate
memory addresses. Also, it allowed programmers to write very compact codes. This has
given it the reputation as the language of choice for hackers too.

5.3.1 EMBEDDED SYSTEMS PROGRAMMING

Embedded systems programming is different from developing applications on a


desktop computer.

33
Two salient features of Embedded Programming are code speed and code size.
Code speed is governed by the processing power, timing constraints, whereas code size is
governed by available program memory and use of programming language. Goal of
embedded system programming is to get maximum features in minimum space and
minimum time.

Embedded systems are programmed using different type of languages:

o Machine Code

o Low level language, i.e., assembly

o High level language like C, C++, Java, Ada, etc.

o Application-level language like Visual Basic, scripts, Access, etc.

Assembly language maps mnemonic words with the binary machine codes that the
processor uses to code the instructions. Assembly language seems to be an obvious choice
for programming embedded devices. However, use of assembly language is restricted to
developing efficient codes in terms of size and speed. Also, assembly codes lead to higher
software development costs and code portability is not there. Developing small codes are
not much of a problem, but large programs/projects become increasingly difficult to
manage in assembly language. Finding good assembly programmers has also become
difficult nowadays. Hence high-level languages are preferred for embedded systems
programming.

34
CHAPTER 6

APPENDICES

6.1 GENERAL

This chapter gives the source code for ESP32 microcontroller.

6.2 SOURCE CODE FOR MICROCONTROLLER

#include <SPI.h>
#include <MFRC522.h>
#include <BluetoothSerial.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <esp_now.h>
#include <WiFi.h>
uint8_t broadcastAddress [] = {0x24, 0xD7, 0xEB, 0x0F, 0x97, 0x58};
const int RELAY = 27;
typedef struct struct_message
{int command;
} struct_message;
struct_message received_Data;
void OnDataRecv(const uint8_t *mac_addr, const uint8_t *data, int data_len)
{memcpy(&received_Data, data, sizeof(received_Data));

Serial.println();
Serial.print("Received command: ");
Serial.println(received_Data.command);
if (received_Data.command == 1) { digitalWrite(RELAY,
HIGH); // Set output pin HIGH
} else {
digitalWrite(RELAY, LOW); // Set output pin LOW
}
}
int lcdAddress = 0x27;
int lcdColumns = 16;
int lcdRows = 2;
unsigned long presentTime;
unsigned long previousTime;
unsigned long delayTime = 30000;
LiquidCrystal_I2C lcd(lcdAddress, lcdColumns, lcdRows);

35
BluetoothSerial SerialBT;
#define PUSH1 13
#define PUSH2 26
#define SS_PIN 5
#define RST_PIN 15
#define ON_PIN 12
#define OFF_PIN 32
#define BUZZ 14

const int MAX_ENTRIES = 20;

struct CardEntry {
String uid;
String name; // Changed 'name' to 'tag'
};

CardEntry entries[MAX_ENTRIES] = {{"4B043BBA", "John"}, {"E353F92E", "Alice"}};


int numEntries = 2;
bool isNewValueRequired = false;
MFRC522 rfid(SS_PIN, RST_PIN); // Create MFRC522 instance

void setup() {
Serial.begin(115200); // Initialize serial communication
//Serial.begin(115200);

WiFi.mode(WIFI_STA);
if (esp_now_init() != ESP_OK)
{ Serial.println("Error initializing ESP-
NOW");return;
}
esp_now_register_recv_cb(OnDataRecv);
esp_now_peer_info_t peerInfo;
memcpy(peerInfo.peer_addr, broadcastAddress, 6);
peerInfo.channel = 0;
peerInfo.encrypt = false;
if (esp_now_add_peer(&peerInfo) != ESP_OK)
{Serial.println("Failed to add peer");
return;
}
lcd.begin();
lcd.setBacklight(HIGH);
pinMode(PUSH1, OUTPUT);
pinMode(PUSH1,INPUT_PULLUP);
pinMode(PUSH2, OUTPUT);

36
pinMode(PUSH2, INPUT_PULLUP);
pinMode(ON_PIN, OUTPUT);
pinMode(OFF_PIN, OUTPUT);
pinMode(BUZZ, OUTPUT);
pinMode(RELAY, OUTPUT);
SPI.begin(); // Initiate SPI bus
rfid.PCD_Init(); // Initiate MFRC522
//SerialBT.begin("ESP32_456");
Serial.println("Place your RFID tag near the reader...");
lcd.setCursor(0, 0);
lcd.print("Place your RFID ... ");

void loop() {
// Check for new cards

if(digitalRead(PUSH2)==LOW){dig
italWrite(RELAY,HIGH);
delay(5000);
digitalWrite(RELAY,LOW);
}
if (rfid.PICC_IsNewCardPresent() && rfid.PICC_ReadCardSerial())
{String content = "";

// Read the UID of the card


for (byte i = 0; i < rfid.uid.size; i++)
{ content.concat(String(rfid.uid.uidByte[i] < 0x10 ? "0" :
""));content.concat(String(rfid.uid.uidByte[i], HEX));
}

Serial.println("RFID tag UID: " + content);

// Check if the UID matches the allowed UID patterns


bool uidMatched = false;
String name = ""; // Changed 'name' to 'tag'

for (int i = 0; i < numEntries; i++) {


if (content.equalsIgnoreCase(entries[i].uid))
{uidMatched = true;
name = entries[i].name; // Changed 'name' to 'tag'
break;
}
}

if (uidMatched) {
37
Serial.println("Access granted to "+ name); // Changed 'name' to 'tag'
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Access granted :");
lcd.setCursor(0, 1);
lcd.print(name); // Changed 'name' to 'tag'
digitalWrite(RELAY, HIGH);
digitalWrite(ON_PIN, HIGH);
digitalWrite(BUZZ, HIGH);
delay(500);
digitalWrite(ON_PIN, LOW);
digitalWrite(BUZZ, LOW);

delay(5000);
digitalWrite(RELAY, LOW);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Place your RFID ... ");
// Perform actions for granted access
} else {
Serial.println("Access denied!");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Access denied!");
digitalWrite(RELAY, LOW);
digitalWrite(OFF_PIN, HIGH);
digitalWrite(BUZZ, HIGH);
delay(100);
digitalWrite(OFF_PIN, LOW);
digitalWrite(BUZZ, LOW);
delay(100);
digitalWrite(OFF_PIN, HIGH);
digitalWrite(BUZZ, HIGH);
delay(100);
digitalWrite(OFF_PIN, LOW);
digitalWrite(BUZZ, LOW);
delay(100);
delay(5000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Place your RFID ... ");
// Perform actions for denied access
}
}
if (digitalRead(PUSH1) == LOW)
{ previousTime = millis();
lcd.clear();
38
lcd.setCursor(0, 0);
lcd.print("Register Mode");
lcd.setCursor(0, 1);
lcd.print("Activated");
SerialBT.begin("ESP_RFID");
Serial.println("Bluetooth Enabled");
delay(3000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Enter Password");
Serial.println("Enter a password");

while (true) {
if (SerialBT.available())
{delayTime += 30000;
String data = SerialBT.readStringUntil('\n');
data.trim(); // Remove leading/trailing whitespace characters, including the newline

if (data.equals("12345")) {
SerialBT.println("Please place your RFID tag to scan:");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Scan RFID tag");

while (true) {
if (rfid.PICC_IsNewCardPresent() && rfid.PICC_ReadCardSerial())
{String content = "";

// Read the UID of the card


for (byte i = 0; i < rfid.uid.size; i++)
{ content.concat(String(rfid.uid.uidByte[i] < 0x10 ? "0" :
""));content.concat(String(rfid.uid.uidByte[i], HEX));
}

Serial.println("RFID tag UID: " + content);


lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Enter name for UID");
lcd.setCursor(0, 1);
lcd.print(content);
while (true) {
if (SerialBT.available()) {
String name = SerialBT.readStringUntil('\n');
name.trim(); // Remove leading/trailing whitespace characters, including the newline

name= "," + name; // Add comma before the tag

39
int commaIndex = name.indexOf(',');
if (commaIndex != -1) {
String uid = content;
name = name.substring(commaIndex + 1); // Remove the leading comma

entries[numEntries].uid = uid;
entries[numEntries].name = name;
numEntries++;
if (numEntries >= MAX_ENTRIES) {
numEntries = 0; // Start overwriting from the beginning of the array
}
isNewValueRequired = true;

SerialBT.println("UID and tag added: " + uid + ", " + name);


lcd.clear();
lcd.setCursor(0, 0);
lcd.print("New UID Added");
lcd.setCursor(0, 0);
lcd.print("Place your RFID ... ");
delay(2000);
SerialBT.end();
break;
} else {
SerialBT.println("Invalid input format. Please enter tag without a leading comma.");
delay(2000);
SerialBT.end();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Invalid Tag");
delay(2000);
lcd.setCursor(0, 0);
lcd.print("Place your RFID... ");
break;
}
}
}
break;
}
}
break;
}
}
presentTime = millis();
if (presentTime - previousTime > delayTime) {SerialBT.end();

40
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Timeout");
delay(2000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Place your RFID ... ");

break;
}
}
}

// Halt PICC
rfid.PICC_HaltA();

// Stop encryption on PCD


rfid.PCD_StopCrypto1();
}

41
CHAPTER 7

RESULT

7.1 GENERAL

This chapter gives the result of the proposed solution.

7.2 RESULT ANALYSIS

The result of this project is to develop a prototype on RFID based access control
for library. The RFID technology is implemented to improve the efficiency, security,
and user experience within library environments. This technology enables controlled
access to library spaces. Authorized users, such as library staff or registeredpatrons, can
gain entry by presenting RFID cards or tags. Patrons can use RFID- enabled library
cards for quick and secure authentication. This eliminates the need for traditional
barcode-based systems and streamlines the borrowing and returning process.

RFID technology allows libraries to control access to restricted areas, ensuring


that only authorized personnel can enter spaces containing sensitive materialsor
equipment. These enabled systems automate the check-in and check-out processes.
Patrons can quickly and easily borrow or return books by simply scanning their RFID
cards or tagged items. RFID tags on books and other library materials enable real-time
tracking of inventory. This reduces the likelihood of lost or misplaced items and
streamlines the inventory management process. Libraries can deploy self- service
kiosks equipped with RFID technology. Patrons can independently check out and return
items, review account information, and renew materials withoutstaff assistance. These
systems provide faster and more efficient transactions, reducing waittimes for patrons
during check-in, check-out, and access processes. This technology can be used in anti-
theft systems, helping prevent unauthorized removal oflibrary materials.

42
Fig: 7.1 Connection Diagram

Fig: 7.2 Demo project

43
Fig 7.3: Bluetooth serial monitoring APP

44
CHAPTER 8

CONCLUSION AND FUTURE SCOPE

8.1. GENERAL
This chapter tells the conclusion of the proposed system and further ways todevelop
the system.

8.2 CONCLUSION
In conclusion, it is quite clear from the above discussion that an RFID system may
be a comprehensive system that addresses both the security and materials tracking needs
of a library. RFID in the library is not a threat if best practices guidelines followed
religiously, that it speeds up book borrowing and inventories and frees staff to do more
user-service tasks. The technology saves money too and quickly gives a return on
investment. It is important to educate library staff and library users about RFID
technology before implementing a program. It may be good for librarians to watch
developments in RFID until the cost of tags comes down to $.20 or less, the figure which
some librarians have determined is the key to their serious consideration of it. While
library RFID systems have a great deal in common with one another, including the use
of high frequency (13.56 MHz), passive, read-write tags, lack of a standard and
compatibility of tags produced by different vendors is a major problem in
implementation of RFID in libraries.

RFID tags can be embedded in library books, allowing for automated check-in and
check-out processes. Patrons can simply pass their books over an RFID reader, andthe
ESP32 can manage the transactions, updating the library system in real-time. The ESP32
microcontroller can facilitate real-time monitoring of access events. Library staff can
track entry and exit times, helping with attendance management and ensuring that
library facilities are used appropriately. With the ESP32, it becomes feasible to
implement customized access levels. Different user groups, such as students, faculty,
and staff, can have varying levelsof access to different sections of the library, ensuring
that resources are appropriately restricted.

45
8.3 FUTURE SCOPE

Recent developments in hardware and software for RFID systems have increased the
potential of this technology in library automation and security. ‘Today, the one
important result for libraries is the ability to use non-proprietary systems, now that the
new generation of RFID-chips with standard ISO 15693 (to be integrated into ISO
18000-3) is available,’ explains Dr Christian Kern, system development manager of
Bibliotheca RFID Library Systems, a Swiss company specializing in such systems for
libraries. “With this technology, libraries do not have to depend on one single supplier
for tags. As libraries make a long-term investment, which mainly consists of the quantity
of tags needed, this is a very important requirement.”

46
REFERENCES

1. Shahid, S.M., 2005. Use of RFID technology in libraries: A new approach to


circulation, tracking, inventorying, and security of library materials. Library
Philosophy and practice, 8(1), pp.1-9.

2. Renold, A.P. and Rani, R.J., 2013, April. An internet-based RFID library
management system. In 2013 IEEE Conference on Information & Communication
Technologies (pp. 932-936). IEEE.

3. Nadaf, A., RFID BASED LIBRARY MANAGEMENT SYSTEM. Engpaper


Journal.

4. Nisha, F., 2018. Implementation of RFID technology at defence science library,


DESIDOC: A case study. DESIDOC Journal of library & informationtechnology,
38(1), p.27.

5. Fujisaki, K., 2015, July. An RFID-based system for library management and its
performance evaluation. In 2015 Ninth International Conference on Complex,
Intelligent, and Software Intensive Systems (pp. 105-109). IEEE.

6. Fujisaki, K., 2015. Implementation of a RFID-based system for library


management. International Journal of Distributed Systems and Technologies
(IJDST), 6(3), pp.1-10.

7. Yu, S.C., 2007. RFID implementation and benefits in libraries. The Electronic
Library, 25(1), pp.54-64.

8. El Beqqal, M., Kasmi, M.A. and Azizi, M., 2017. Access control system in
campus combining RFID and biometric based smart card technologies. In Europe
and MENA Cooperation Advances in Information and Communication
Technologies (pp. 559-569). Springer International Publishing.

47

You might also like