Project Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 39

A REAL TIME PROJECT ON

FINGERPRINT DOOR LOCK SYSTEM

A dissertation submitted to JNTU Hyderabad in partial fulfilment of the

academic requirements for the award of the degree

Bachelor of Technology
In

Computer Science and Engineering

Submitted by

AAMER ALI

(22291A0502)

ABDULLAH KHAN

(22291A0504)

ADITYA TIWARI

(22291A0507)

Under The Esteemed Guidance of

Assistant professor
Department Of Computer Science And Engineering

VIJAY RURAL ENGINEERING COLLEGE


Manik Bhandar, Nizamabad-503003

2022-2026

VIJAY RURAL ENGINEERING COLLEGE


Approved by AICTE and affiliated to JNTUH-HYD

Rochis Valley, ManikBhandar, Nizamabad -503003

CERTIFICATE
This is to certify that the Real time project report entitled “ FINGERPRINT DOOR LOCK SYSTEM"

begin submitted by AAMER ALI(22291A0502), ABDULLAH KHAN(22291A0504), ADITYA TIWARI


(22291A0507) in partial fulfilment for the award of Bachelor of Technology in Computer Science and
Engineering is a record of Bonafide work carried my guidance andsupervision.

The results embody in this project report have not been submitted to any

other University or Insititute for award of any Degree

faculty name Dr.N.SWAPNA

Assistant Professor Associate Professor and HOD

Dept of CSE Dept of CSE

Dr. S.N.V.Ganesh

Submitted for viva voice Examination held on _______________ External Examiner


DECLARATION
We, The students of II B.Tech, Department of Computer science and Engineering, VIJAY

RURAL ENGINEERING COLLEGE, Manikbandar, Nizamabad, hereby declare that under

the supervision of project Guide Faculty name, Assistant professor, has carried out the

project titled "Fingerprint Based Door Lock system" and submitted the report in partial

fulfillment of the requirement for the award of Bachelor of technology in Computer

Science and Engineering from Jawaharlal Nehru Technology University, Hyderabad during the
academic year 2023-2024.

AAMER ALI (22291A0502)

ABDULLAH KHAN (22291A0504)

ADITYA TIWARI (22291A0507)


ACKNOWLEDGEMENT

With great pleasure, we want to take this opportunity to express our heartfelt

gratitude to all the people who helped in making this project work a grand

success.

We extend our sincere and deep sense of gratitude, pleasure, gratefulness,

and indebtedness to acknowledge to Mettu Navya, Assistant Professor,

Project Guide for his unstinted support, guidance and for keen interest

evinced at all stages of our project. We convey our sincere and earnest

thanks for his continuous guidance and encouragement for the project

We also extend our special thanks to Dr. N Swapna, Associate Professor &

HOD, Department of Computer Science and Engineering for her guidance

in project and support at every step.

Our sincere thanks to Dr.SNV.Ganesh, Principal, Vijay Rural Engineering

College, Nizamabad, for providing all the necessary facilities to complete

this dissertation.

Last but not least, we express our sincere thanks to Mr. K. Narender Reddy

garu, and Mrs. Amrutha Latha garu, secretary VIJAY Group of Institutions,

for their continuous care towards our achievements.


Abstract

This project presents the development and implementation of a fingerprint door lock system
designed to enhance security and convenience through biometric authentication. The system is built
using an optical fingerprint sensor, a relay module, an Arduino Uno microcontroller, a solenoid lock,
and a 12V power adapter. The primary goal is to replace conventional lock-and-key mechanisms with
a more secure and user-friendly solution.

The fingerprint door lock operates by capturing and storing fingerprint data from authorized users.
When a user places their finger on the optical sensor, the system scans and compares the input
against the stored data. Upon a successful match, the Arduino Uno triggers the relay module, which
in turn activates the solenoid lock to unlock the door. If the fingerprint does not match any stored
data, access is denied, and the door remains locked.

This project demonstrates the practical application of biometric technology in everyday security
systems, emphasizing its potential for widespread adoption in both residential and commercial
settings. The system's design prioritizes ease of use, reliability, and security, providing a robust
solution to modern access control challenges. Additionally, the project showcases the integration of
various electronic components and programming to create an efficient and functional security
device.
Chapter-1
Introduction
1.1 Project Overview

In today's world, security is of paramount importance, especially when it comes to safeguarding


personal and sensitive areas. Traditional locks and keys, while effective, have their limitations and
vulnerabilities. With advancements in technology, more secure and convenient solutions are
becoming accessible. One such innovative solution is the fingerprint door lock, which leverages
biometric technology to enhance security.

This project aims to design and implement a fingerprint-based door lock system using an Arduino
Uno microcontroller. The core components of the system include a fingerprint sensor, a 5V relay
module, a solenoid lock, and essential connecting jumper wires. The fingerprint sensor serves as the
primary input device, scanning and authenticating the user's fingerprint to grant or deny access. The
Arduino Uno acts as the brain of the system, processing the fingerprint data and controlling the relay
module, which in turn activates the solenoid lock to secure or unlock the door.
1.2 Objectives

The primary objectives of this project are:

1. To develop a secure and reliable fingerprint-based door lock system.

2. To integrate a fingerprint sensor with an Arduino Uno microcontroller for real-time


authentication.

3. To utilize a 5V relay module to control the solenoid lock mechanism effectively.

4. To create a user-friendly interface for enrolling and managing fingerprints.

5. To ensure the system's robustness against common vulnerabilities such as false acceptances and
rejections.

1.3 Scope

The scope of this project includes:

1. Designing the hardware and circuitry required for the fingerprint door lock system.

2. Writing and optimizing the firmware to interface the fingerprint sensor with the Arduino Uno.

3. Implementing the control logic to operate the relay and solenoid lock based on fingerprint
authentication results.

4. Testing the system's performance in various scenarios to ensure reliability and accuracy.

5. Documenting the design process, challenges encountered, and solutions implemented.

The project is intended to provide a scalable and adaptable security solution that can be integrated
into various environments, such as residential homes, small offices, and other areas requiring
restricted access. By utilizing biometric technology, this project not only enhances the security of the
premises but also eliminates the need for traditional keys, offering a seamless and modern approach
to access control.
Literature survey
2.1 Overview of Fingerprint Recognition Systems:

Fingerprint recognition systems are a type of biometric technology that use the unique patterns of
ridges and valleys on a person's finger to identify or verify their identity. These systems are widely
used in various applications, including security, forensics, and personal identification, due to their
accuracy, reliability, and ease of use.

Key Components

1. Fingerprint Sensor:

- Optical Sensors: Use light to capture an image of the fingerprint.

- Capacitive Sensors: Measure the electrical current to form an image.

- Ultrasonic Sensors: Use sound waves to create a detailed image of the fingerprint.

2. Processing Unit:

- Processes the captured fingerprint image.

- Extracts unique features (minutiae points) such as ridge endings and bifurcations.

3. Database:

- Stores fingerprint templates (extracted features) of authorized users.

4. Software Algorithms:

- Match the captured fingerprint against stored templates.

- Determine the authenticity based on the match score.

Process of Fingerprint Recognition

1. Image Capture:

- The fingerprint sensor captures an image of the fingerprint.


2. Image Enhancement:

- The captured image is enhanced to improve the quality.

- Techniques like noise reduction and contrast enhancement are used.

3. Feature Extraction:

- Unique features (minutiae points) are extracted from the enhanced image.

4. Template Creation:

- A digital template of the fingerprint is created from the extracted features.

5. Matching:

- The new template is compared against the stored templates in the database.

- Matching algorithms calculate a score based on the similarity of features.

6. Decision Making:

- A threshold score determines whether the fingerprint is a match.

- If the score exceeds the threshold, the identity is verified or identified.

Applications

1. Security Systems:

- Access control in buildings, computers, and mobile devices.

2. Forensics:

- Criminal identification and evidence verification.

3. Financial Transactions:

- Secure authentication for banking and online transactions.

4. Time and Attendance:

- Employee attendance tracking in workplaces.


Advantages:

1. High Accuracy:

- Unique fingerprint patterns ensure precise identification.

2. Non-Intrusive:

- Simple and quick process that doesn't require physical effort.

3. Difficult to Forge:

- High level of security due to the complexity of fingerprint patterns.

4. Cost-Effective:

- Widely available and affordable technology.


2.2Advances in Arduino-Based Security Projects

Arduino has become a cornerstone in the development of various security projects due to its
versatility, affordability, and extensive community support. Recent advancements have further
enhanced the capabilities of Arduino-based security systems, making them more reliable,
sophisticated, and user-friendly. This section explores some of the key advancements in Arduino-
based security projects, particularly in the context of access control and biometric systems.

1. Integration with Advanced Sensors

- Biometric Sensors: The integration of advanced biometric sensors, such as fingerprint, facial
recognition, and iris scanners, has significantly improved the security and accuracy of Arduino-based
projects. High-resolution fingerprint sensors and compact facial recognition modules are now more
accessible and easier to interface with Arduino, providing robust authentication mechanisms.

- Environmental Sensors: Modern Arduino projects incorporate environmental sensors to detect


changes in conditions that may indicate security breaches. For example, motion sensors (PIR),
temperature sensors, and light sensors can trigger alerts or activate recording systems, enhancing
situational awareness.

2. Wireless Communication Technologies

- Wi-Fi and Bluetooth: The use of Wi-Fi (ESP8266, ESP32) and Bluetooth (HC-05, HC-06) modules has
enabled Arduino-based security systems to communicate wirelessly. This allows for remote
monitoring and control of security devices through smartphones or web interfaces, enhancing
convenience and real-time responsiveness.

- RFID and NFC: Radio Frequency Identification (RFID) and Near Field Communication (NFC)
technologies have been integrated into Arduino projects for contactless authentication. These
technologies provide a secure and user-friendly method for access control, commonly used in door
locks and attendance systems.

3. Enhanced Data Security


- Encryption: Advances in data encryption techniques have improved the security of data
transmission and storage in Arduino-based projects. Libraries and modules supporting AES, RSA, and
other encryption standards help protect sensitive information, such as biometric data and access
logs, from unauthorized access.

- Secure Storage: Secure storage solutions, such as EEPROM and external secure digital (SD) cards
with encryption, have been employed to store sensitive data securely. This prevents data tampering
and ensures that biometric templates and other critical data are protected.

4. Improved Power Management

- Energy-Efficient Components: The development of energy-efficient sensors and components has


made it possible to create low-power Arduino-based security systems. This is particularly important
for battery-operated devices and remote installations where power availability is limited.

- Sleep Modes and Wake-up Triggers: Advanced power management techniques, such as sleep
modes and wake-up triggers, help conserve energy by keeping the system in a low-power state until
a security event, such as motion detection or fingerprint scanning, occurs.

5. IoT Integration

- Cloud Connectivity: Integration with cloud services allows Arduino-based security systems to store
and analyze data remotely. Cloud platforms like AWS IoT, Google Cloud IoT, and Blynk offer tools for
real-time monitoring, data analytics, and remote management.

- Mobile Applications: The development of mobile applications for Android and iOS enables users to
control and monitor Arduino-based security systems from anywhere. These apps provide real-time
alerts, access logs, and control interfaces, enhancing the user experience and response time.

6. Machine Learning and AI

- Edge AI: Recent advancements have seen the implementation of machine learning algorithms on
Arduino-compatible hardware, such as the Arduino Nano 33 BLE Sense. Edge AI allows for real-time
processing of sensor data, enabling more sophisticated features like anomaly detection and
predictive maintenance.
- Facial Recognition and Object Detection: The integration of AI-powered facial recognition and
object detection capabilities has transformed Arduino-based security systems. Using libraries like
OpenCV and TensorFlow Lite, these systems can perform complex image processing tasks, enhancing
security and functionality.

Case Studies and Applications

- Smart Door Locks: Combining fingerprint sensors, RFID, and Wi-Fi modules, Arduino-based smart
door locks offer multi-factor authentication and remote access control. Users can manage access
permissions and monitor entry logs via mobile apps or web interfaces.

- Home Security Systems: Comprehensive home security solutions include motion detectors,
door/window sensors, cameras, and environmental sensors, all managed by an Arduino controller.
These systems provide real-time alerts and remote monitoring to ensure home safety.

- Industrial Security: Arduino-based security systems in industrial settings monitor critical


parameters, such as temperature, humidity, and unauthorized access, ensuring the safety and
security of facilities and equipment.

Conclusion

The continuous advancements in Arduino-based security projects have made it possible to develop
more secure, efficient, and user-friendly systems. The integration of advanced sensors, wireless
communication, data encryption, IoT connectivity, and AI capabilities has significantly enhanced the
functionality and reliability of these systems. As technology continues to evolve, Arduino-based
security projects will likely become even more sophisticated, offering innovative solutions for a wide
range of security challenges.
2.3 Applications of Solenoid Locks in Security Systems:

Solenoid locks are electromechanical devices that utilize a solenoid to control their locking and
unlocking mechanisms. Widely used in various security systems, these locks offer reliability,
durability, and easy integration with electronic control systems. Below are detailed applications of
solenoid locks in security systems, elaborated to fit within two A4 size pages.

1. Access Control Systems

Buildings and Offices: Solenoid locks are integral to access control systems in commercial buildings
and office spaces. They provide secure entry points managed electronically, ensuring that only
authorized personnel can access specific areas. These systems can include keycards, biometric
scanners, or PIN codes, integrating seamlessly with solenoid locks to enhance security and
operational efficiency.

Smart Homes: In residential applications, solenoid locks are a key component of smart home security
systems. Homeowners can control these locks via smartphones, keypads, or voice commands,
providing a convenient and secure alternative to traditional keys. This integration supports remote
monitoring and control, enhancing the overall security of the home.

2. Automated Doors and Gates

Entrance Gates: Solenoid locks are commonly used in automated gates for residential, commercial,
and industrial properties. These locks offer robust security while allowing remote operation,
ensuring that only authorized individuals can access the premises. Integration with intercom
systems, remote controls, or automatic sensors enhances both security and convenience.

3. Cabinet and Locker Security

Storage Cabinets : Solenoid locks are employed to secure storage cabinets in various settings,
including offices, laboratories, and healthcare facilities. They protect sensitive documents, chemicals,
and medical supplies from unauthorized access. The locks can be operated using keypads, RFID
cards, or biometric systems, providing flexibility and enhanced security.
Personal Lockers: In environments like gyms, schools, and workplaces, solenoid locks are used to
secure personal lockers. These locks eliminate the need for traditional keys, reducing the risk of theft
and providing a convenient solution for users. The locks can be managed centrally, allowing for easy
reassignment and access control.

4. Vending and ATM Machines

Vending Machines: Solenoid locks secure the internal compartments of vending machines,
protecting both the products and the cash from unauthorized access. These locks ensure that only
authorized personnel can open the machines for restocking and maintenance, reducing the risk of
theft and tampering.

ATM Security: In ATMs, solenoid locks provide an additional layer of security by controlling access to
cash compartments. They are often integrated with the ATM's security system, ensuring that only
authorized personnel can access the machine's interior. This helps protect against unauthorized
access and potential security breaches.

5. Emergency and Fire Exits

*Controlled Egress*: Solenoid locks are used in emergency and fire exits to secure doors while
allowing controlled egress. These locks can be integrated with fire alarm systems to automatically
unlock during emergencies, ensuring safe and rapid evacuation. This integration helps balance
security with safety requirements, providing peace of mind in critical situations.

6. Vehicle Security Systems

Car Doors and Trunks: Solenoid locks are a key component in vehicle security systems, controlling
the locking and unlocking of car doors and trunks. These locks are often integrated with remote
keyless entry systems, providing convenience and enhancing security. Advanced systems can include
biometric access or smartphone controls, further improving vehicle security.

Fleet Management: In fleet management, solenoid locks ensure that only authorized drivers can
access and operate vehicles. This enhances security, prevents unauthorized use, and improves
accountability. Integration with fleet management software allows for centralized control and
monitoring of vehicle access.

Advantages of Solenoid Locks :

- Remote Control: Solenoid locks can be controlled remotely through electronic systems, offering
convenience and flexibility in managing access.

- Integration with Security Systems: These locks integrate easily with various security systems,
including keypads, biometric devices, and card readers, providing a comprehensive security solution.

- Durability and Reliability: Designed to withstand heavy use and harsh conditions, solenoid locks are
suitable for high-security applications.

- Fail-Safe and Fail-Secure Options: Depending on the application, solenoid locks can be configured
to remain locked or unlocked in the event of a power failure, ensuring both security and safety.
3.1 Existing Systems

In the context of fingerprint-based door lock systems, several existing systems and technologies
have been developed and implemented, each with varying degrees of sophistication, security, and
user experience. Analyzing these existing systems helps identify their strengths, weaknesses, and
areas for improvement, which can be leveraged to enhance the proposed fingerprint door lock
project.

1.Traditional Key and Lock Systems:

Description: The most basic and widely used method for securing doors involves traditional
mechanical locks and keys.

Advantages:

- Simplicity: Easy to use and understand.

- Cost-Effective: Generally cheaper to install and maintain.

*Disadvantages*:

- Security Risks: Keys can be lost, stolen, or duplicated.

- Convenience Issues: Users must carry physical keys, which can be inconvenient.

2.Keypad Locks

Description: These locks use a numeric keypad where users enter a PIN code to unlock the door.

Advantages:

- No Physical Keys: Eliminates the need for carrying keys.

- Configurable: PIN codes can be easily changed.


Disadvantages:

- Security Risks: PIN codes can be guessed or observed.

- Maintenance: Keypads may wear out over time, especially in high-traffic areas.

3. RFID Card Locks

Description: These systems use RFID cards that users swipe or tap against a reader to unlock the
door.

Advantages:

- Convenience: Easy to use and manage, especially for multiple users.

- Customizable Access: Access can be controlled and revoked centrally.

Disadvantages:

- Card Loss: RFID cards can be lost or stolen.

- Cost: Higher initial setup cost compared to traditional locks.

4. Existing Fingerprint Door Lock Systems:

Standalone Fingerprint Locks: These are integrated units that include a fingerprint scanner and
locking mechanism in a single device.

Advantages:

- Ease of Installation: Can be installed without extensive wiring or additional systems.

- Convenience: Simple to use for end-users.

Disadvantages:
- Limited Features: Often lack advanced integration capabilities with other security systems.

- Power Dependency: Rely on batteries or direct power supply, which can be a limitation in power
outages.

5. Smart Fingerprint Locks: These systems combine fingerprint recognition with smart home
technologies, allowing remote control and monitoring via smartphones or central security systems.

Advantages:

- Integration: Can be integrated with other smart home devices and systems.

- Remote Access: Users can control and monitor the lock remotely.

Disadvantages:

- Complexity: Requires a more complex setup and maintenance.

- Security Risks: Potential vulnerabilities in wireless communication and smart home networks.

6. Analysis and Insights:

1. Security: Traditional locks and keypad systems offer basic security but are prone to physical
attacks and human errors. Biometric systems, particularly fingerprint locks, offer a higher level of
security by relying on unique personal traits.

2. Convenience: Biometric and RFID systems are more convenient for users compared to traditional
keys and keypads. Fingerprint systems, in particular, offer a seamless user experience without the
need for carrying physical items or remembering codes.

3. Cost: While traditional and keypad locks are cost-effective, biometric systems have higher initial
costs. However, the added security and convenience may justify the investment, especially in high-
security environments.

4. Integration: Advanced fingerprint systems that integrate with smart home technologies provide
enhanced functionality but require careful consideration of potential security vulnerabilities in
wireless communication.

By analyzing these existing systems, we can design a fingerprint door lock system that addresses the
limitations of current solutions, offering enhanced security, convenience, and integration
capabilities. This analysis informs the proposed system's design, ensuring it meets user needs while
leveraging the strengths and mitigating the weaknesses of existing technologies.
3.2 Functional Requirements

1. Fingerprint Authentication:

The system should accurately recognize authorized users by scanning their fingerprints.

It should store, match, and verify fingerprints to allow or deny access.

2. Door Lock Control:

The system should activate a solenoid lock to secure or release the door based on authentication.

The lock should engage when the door is closed and disengage when access is granted.

3. User Management:

There should be functionality to add, update, or remove authorized fingerprints.

The system should store multiple fingerprints in the database for different users.

4. Power Supply Management:

The system should operate using a 12V adapter for the Arduino and lock mechanism.

There should be a backup power source or a low-power mode for emergency use.

5. Relay Operation:

The relay should control the solenoid lock and respond to fingerprint authentication results.
3.3Non Functional Requirements
1. Performance:

The system should process fingerprint recognition and unlock the door within a few seconds.

It should handle multiple user authentications efficiently without delays.

2. Reliability:

The fingerprint sensor and lock mechanism should be durable and function consistently under
various environmental conditions.

The system should handle multiple use cycles without failure.

3. Scalability:

The system should support the addition of more users (fingerprints) without requiring major
hardware changes.

It should be flexible to integrate with other IoT devices, such as doorbell cameras or security alarms.

4. Security:

The system should ensure that stored fingerprint data is secure and protected from unauthorized
access or tampering.

Communication between the components (fingerprint sensor, Arduino) should be secure.

5. Usability:

The system should be user-friendly with simple operation for both adding new fingerprints and
normal use.

Error messages and feedback should be clear and understandable to users.

6. Power Efficiency:

The system should be energy-efficient, minimizing power consumption when the door lock is idle.

Backup power options should be considered to ensure continuous operation in case of power
failure.

7. Maintainability:

The system should be easy to maintain, with replaceable parts like the fingerprint sensor or lock.

Regular updates or changes (e.g., adding new fingerprints) should be simple to implement.

Would you like to modify or add anything to these requirements?


3.4 Feasibility Analysis

1. Economic Feasibility:

Initial Costs: The components (fingerprint sensor, Arduino, relay, solenoid lock) are affordable, with
minimal installation and setup costs.

Maintenance: Low, as the system requires little upkeep and updates can be done easily.

ROI: High, offering improved security and reduced risk of key loss, making it cost-effective for home
or business use.

2. Technical Feasibility:

Hardware: All components are widely available and simple to integrate.

Skills: Requires basic knowledge of Arduino and electronics, making it feasible for hobbyists or
students.

Scalability: Can support more users and be expanded to work with other IoT devices.

Reliability: System is durable, with stable power options and reliable fingerprint recognition.

3. Social Feasibility:

User Acceptance: High, due to convenience and enhanced security compared to traditional keys.

Concerns: Privacy concerns about biometric data can be addressed with secure data storage.

Community Impact: Increases safety and raises awareness of IoT-based home automation.

In summary, the project is economically affordable, technically achievable, and socially well-
accepted.
4.1Hardware Requirements

1. Optical Fingerprint Sensor:For scanning and verifying fingerprints.

2. Arduino Uno:Microcontroller to process fingerprint data and control the locking mechanism.

3. Solenoid Lock:Electromechanical lock for securing the door, activated based on fingerprint
authentication.

4. Relay Module:To switch the solenoid lock on and off based on the Arduino’s output.

5. 12V Power Adapter:To supply power to the Arduino and the solenoid lock.

6. Jumper Wires and Breadboard:For connecting components like the fingerprint sensor, relay, and
lock to the Arduino.
Software Requirements:

1. Arduino IDE:For writing, compiling, and uploading the code to the Arduino Uno.

2. Fingerprint Sensor Library:Libraries for handling the fingerprint sensor, such as Adafruit
Fingerprint Sensor Library, to manage fingerprint enrollment and verification.

3. C/C++ Code:To program the Arduino, manage fingerprint data, and control the relay and lock.

4. Drivers:Necessary USB drivers for the Arduino Uno to communicate with the computer.
5.1 Circuit Diagram
The circuit diagram illustrates how the components in the fingerprint door lock project are
connected. It includes the following:

- Arduino Uno: Serves as the brain of the project, controlling the fingerprint sensor and relay.

- Fingerprint Sensor: Captures and matches fingerprints to grant or deny access.

- 5V Relay Module: Controls the power to the solenoid lock, opening it when the fingerprint is
verified.

- Solenoid Lock: Physically locks and unlocks the door.

- Power Supply: Provides power to the Arduino, relay, and solenoid.

- Wiring: Jumper wires connect the components to the Arduino's pins.

5.2 Assembly Instructions


1. Prepare the Components: Gather the Arduino Uno, fingerprint sensor, 5V relay module, solenoid
lock, and necessary jumper wires.

2. Connect the Fingerprint Sensor:

- Connect the VCC pin of the sensor to the 5V pin on the Arduino.

- Connect the GND pin of the sensor to the GND on the Arduino.

- Connect the TX pin of the sensor to Pin 3 on the Arduino.

- Connect the RX pin of the sensor to Pin 2 on the Arduino.

3. Set Up the Relay Module :

- Connect the IN pin of the relay to a digital pin (e.g., Pin 7) on the Arduino.

- Connect the VCC pin of the relay to the 5V pin on the Arduino.

- Connect the GND pin of the relay to the Arduino’s ground.


4. Wiring the Solenoid Lock:

- Connect one wire of the solenoid lock to the NO (Normally Open) terminal of the relay.

- Connect the other wire of the solenoid lock to the GND.

- Provide a power source (e.g., external 12V power supply) to the solenoid through the COM
(Common) terminal of the relay.

5. Power the Arduino: Connect the Arduino to a power supply or a USB port for testing.

5.3 Wiring Guide


Here’s the wiring configuration for each component:

- Arduino Uno:

- 5V pin: Power supply to the relay and fingerprint sensor.

- GND pin: Ground connection for the relay, fingerprint sensor, and solenoid lock.

- Pin 2 (RX): Connected to the TX pin of the fingerprint sensor.

- Pin 3 (TX): Connected to the RX pin of the fingerprint sensor.

- Pin 7: Connected to the IN pin of the relay module to control it.

- Fingerprint Sensor:

- VCC to 5V on Arduino.

- GND to GND on Arduino.

- TX to Pin 3 on Arduino.

- RX to Pin 2 on Arduino.

- 5V Relay Module:

- VCC to 5V on Arduino.

- GND to GND on Arduino.

- IN to Pin 7 on Arduino.

- NO connected to one terminal of the solenoid lock.

- COM connected to the positive terminal of the external power supply (12V).

- Solenoid Lock:

- One terminal to the NO pin on the relay.

- The other terminal to GND.


6.1. Arduino IDE Setup:

Download and Install:Download the Arduino IDE from the official website and install it on your
computer.

Configure Arduino Board:Connect the Arduino Uno to your computer via USB.

In the Arduino IDE, go to Tools > Board > Arduino Uno and select the correct Port where the Arduino
is connected.

Install Necessary Libraries:You’ll need specific libraries to handle the fingerprint sensor and relay
control. These can be installed via Sketch > Include Library > Manage Libraries.

6.2. Libraries Used:

1. Adafruit Fingerprint Sensor Library:This library is crucial for interfacing with the optical fingerprint
sensor.

It handles fingerprint enrollment, matching, and communication with the sensor.

Install it by searching for "Adafruit Fingerprint Sensor Library" in the Arduino IDE library manager.

2. EEPROM Library (optional):To store fingerprints persistently on the Arduino’s EEPROM.

This ensures that even after a reset or power loss, the enrolled fingerprints are retained.

3. Servo or Relay Control Library (if needed):For managing the relay or solenoid lock activation
through the Arduino’s digital pins.
6.3. Code Explanation:

Main Components of the Code:

1. Initializing the Fingerprint Sensor:

Begin by defining the necessary pins (TX/RX) for the fingerprint sensor and relay/lock.

Use the Adafruit_Fingerprint object to interact with the sensor.

#include <Adafruit_Fingerprint.h>

// Fingerprint sensor TX/RX pins

SoftwareSerialmySerial(2, 3); // RX, TX for Arduino Uno

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

int relayPin = 7; // Pin connected to the relay module

2. Setup Function:

In the setup() function, initialize the fingerprint sensor and check if it is properly connected.

Set up the relay pin as output.

void setup() {

Serial.begin(9600);

finger.begin(57600);
if (finger.verifyPassword()) {

Serial.println("Sensor found!");

} else {

Serial.println("Fingerprint sensor not detected");

while (1);

pinMode(relayPin, OUTPUT);

}
7.1 Fingerprint Enrollment Process

The fingerprint enrollment process is essential for registering authorized users. Here’s a step-by-step
explanation:

1. Setting Up the Arduino:

- Power the Arduino and connect it to a computer using a USB cable.

- Ensure that the necessary fingerprint sensor library (e.g., Adafruit Fingerprint Sensor Library) is
installed in the Arduino IDE.

2. Running the Enrollment Sketch:

- Open the fingerprint enrollment example code provided by the library in the Arduino IDE.

- Upload the code to the Arduino board.

3. Enroll a Fingerprint:

- Open the serial monitor on the Arduino IDE.

- Follow the on-screen instructions. You will be prompted to place your finger on the sensor
multiple times to capture the fingerprint from different angles.

- The fingerprint template is then saved in the memory (EEPROM) of the Arduino.
4. Store Fingerprints:

- The system can store multiple fingerprints. Repeat the enrollment process for each user that
needs access.

5. Verify Enrollment:

- Once fingerprints are stored, the system will compare future scans with these saved templates
for verification.

7.2 Testing the System

Once the hardware is assembled and the software is uploaded, it’s important to test the system
thoroughly to ensure everything works as expected. Here’s how to perform testing:

1. Initial Setup Test:

- Power up the Arduino and check if all components are functioning correctly (i.e., fingerprint
sensor lights up, the relay clicks when activated).

2. Fingerprint Recognition Test:

- Place an enrolled fingerprint on the sensor and observe whether the system recognizes it. The
relay should activate and unlock the solenoid.

- Test with multiple enrolled users to ensure all fingerprints are recognized properly.
3. Unauthorized Access Test:

- Place an unregistered fingerprint on the sensor. The system should deny access, and the relay
should remain inactive (keeping the solenoid lock closed).

4. Relay and Lock Test:

- Test whether the relay successfully activates the solenoid lock. When an authorized fingerprint is
detected, the relay should click, and the door lock should release.

5. Re-enrollment Test:

- Enroll a new fingerprint and test whether the system immediately recognizes it.

6. Stress Test:

- Perform multiple entries and exits by repeatedly scanning the fingerprint and verifying the system
doesn’t lag or fail after continuous usage.

7.3 Troubleshooting Common Issues

During testing or use, several common issues might arise. Here’s a troubleshooting guide for
potential problems:

1. Fingerprint Not Recognized:

- Cause: Finger not enrolled, poor placement, or sensor issue.

- Solution: Re-enroll the fingerprint with proper placement and ensure the sensor is clean. Ensure
the sensor's wiring is intact and secure.

2. Relay Not Activating:

- Cause: Faulty wiring or incorrect pin assignment.

- Solution: Check the wiring connections from the relay to the Arduino. Ensure the control pin is
correctly assigned in the code and verify the relay’s integrity with a multimeter.

3. Solenoid Lock Not Engaging/Disengaging:

- Cause: Insufficient power supply to the solenoid, or a faulty relay.


- Solution: Check the external power supply providing power to the solenoid lock. Ensure the relay
is switching power properly by measuring voltage output when triggered.

4. System Freezes or Crashes:

- Cause: Memory overflow or power supply issues.

- Solution: Reset the Arduino. Ensure that the Arduino is receiving sufficient power and that the
code uploaded is optimized for memory usage.

5. Fingerprint Enrollment Fails:

- Cause: Poor fingerprint quality or sensor malfunction.

- Solution: Clean the sensor, try using a different finger, or check for faulty connections between
the sensor and Arduino.

8.1 Data Protection

Data protection is crucial for ensuring that the sensitive biometric data (fingerprints) stored in the
system is safe from unauthorized access and tampering. In this section, you can outline the key
strategies used to protect data:

1. Secure Fingerprint Storage:

- The fingerprints captured by the sensor are not stored as images but as hashed templates. This
reduces the risk of someone reconstructing a fingerprint from the stored data.

- These templates are stored in the EEPROM of the Arduino, which is less vulnerable to external
tampering.

2. Access Control:

- Only authorized users with their fingerprint registered in the system can gain access to the lock.

- Fingerprint data should be encrypted if more advanced encryption libraries are used, ensuring
that even if someone gains access to the Arduino's memory, they cannot easily extract the
fingerprint templates.

3. Preventing Data Tampering:

- The system should be designed to prevent unauthorized users from enrolling new fingerprints.
This can be done by requiring a master fingerprint or code to access the enrollment process.
4. Backup and Recovery:

- In case of system failure, ensure that a backup of the registered fingerprints is maintained
securely. A recovery mechanism should be implemented, allowing the system to restore fingerprint
data without compromising security.

5. Limited Data Retention:

- Fingerprint data should be stored only for as long as needed. For example, when users are no
longer part of the system, their fingerprints should be securely deleted to reduce the attack surface.

8.2 System Hardening

System hardening involves securing the entire fingerprint door lock system against potential threats,
including physical tampering, unauthorized access, and attacks targeting the electronics or software.
Here are some key considerations:

1. Physical Security:

- Enclosure Protection: The Arduino, relay, and fingerprint sensor should be enclosed in a tamper-
resistant case to prevent unauthorized access to the internal components.

- Lock Placement: Ensure that the solenoid lock is installed in a way that is difficult to bypass or
tamper with physically (e.g., by using robust materials).

2. Software Security:

- Code Integrity: Ensure that the code running on the Arduino is secure and does not allow for
backdoors. Avoid hard-coding sensitive information, such as master passwords or special access
codes.

- System Updates: Keep the firmware and libraries up to date to patch any known vulnerabilities.
Although the Arduino environment is generally secure, keeping everything updated ensures you
have the latest security protections.

3. Access Control for Programming:

- Restrict Physical Access to the Arduino: Only trusted individuals should have physical access to
the Arduino board. To prevent unauthorized users from modifying the system code or gaining access
to stored fingerprint data, the board should be kept secure or hidden.
4. Master Override:

- Implement a secure method for administrators to access the system in case of a malfunction. This
can be a master fingerprint or a secure, hidden reset mechanism that is only accessible by
authorized personnel.

5. Power Supply Protection:

- Battery Backup: Consider adding a battery backup in case of power failure. This ensures that the
door remains functional even during outages, preventing physical break-ins when the system is
unpowered.

- Overcurrent and Overvoltage Protection: Protect the components from voltage spikes or power
surges, which could damage the system or lead to unexpected failures. Use components like fuses or
surge protectors.

6. Relay and Lock Security:

- Debounce the Relay: Prevent rapid switching of the relay to avoid damaging the system. Ensure
that the relay module used is robust enough to handle frequent switching without degradation.

- Fail-Safe Mechanism: In case of a system failure, ensure that the door lock remains in a secure
state (i.e., locked) to prevent unauthorized access.
9.1 Project Summary
The fingerprint door lock project successfully demonstrated the integration of modern biometric
technology with a physical security system. Utilizing an Arduino Uno, a fingerprint sensor, and a 5V
relay module, the system provided a secure and efficient solution for controlling access to a door.

The project involved several key components:

- Fingerprint Sensor: Used to capture and authenticate user fingerprints for secure access.

- Arduino Uno: Acted as the central controller, processing fingerprint data and controlling the relay.

- Relay Module: Managed the electrical connection to the solenoid lock, controlling when the door
would unlock.

- Solenoid Lock: Provided a physical locking mechanism for the door.

The system was thoroughly tested to ensure proper functionality, including successful fingerprint
recognition, secure relay operation, and effective solenoid lock engagement. Troubleshooting steps
were also implemented to handle common issues encountered during testing.

Overall, the project showcased the feasibility of creating a low-cost, secure, and reliable fingerprint-
based access control system.
9.2 Future Improvements

While the project was successful, several enhancements could improve the system’s performance,
security, and scalability. Possible future improvements include:

1. Advanced Data Encryption:

- Implement encryption algorithms to further secure the fingerprint data stored in the system,
ensuring it is protected against more advanced attacks.

2. Wireless Connectivity:

- Add Wi-Fi or Bluetooth capabilities to enable remote control and monitoring of the system,
allowing administrators to manage user access remotely and receive alerts if unauthorized access is
attempted.

3. Battery Backup:

- Incorporate a backup power system to ensure the door lock remains operational during power
outages, preventing unauthorized access or being locked out.

4. Touchscreen Interface:

- Replace the basic fingerprint enrollment process with a touchscreen interface for easier
enrollment, management, and system configuration.

5. Multiple Lock Integration:

- Expand the system to control multiple doors or zones using one central controller, making the
system scalable for larger facilities or homes.

6. Mobile App Integration:

- Create a mobile app to manage user access, view logs, and provide real-time monitoring of the
door lock status.

7. Multi-Factor Authentication:

- Enhance security by combining fingerprint authentication with other authentication methods,


such as a passcode or RFID card, for added layers of protection.
9.3 Lessons Learned

Throughout the course of the project, several important lessons were learned that can be applied to
future developments:

1. Importance of Planning and Prototyping:

- The project reinforced the value of careful planning and prototyping before the final assembly.
Early testing helped identify issues with the MOSFET overheating, which led to replacing it with a
more reliable 5V relay module.

2. Effective Troubleshooting:

- During development, common issues like incorrect wiring and sensor malfunctions highlighted
the need for systematic troubleshooting techniques. Understanding how to diagnose and resolve
these issues helped to ensure smooth project progress.

3. Power Management:

- Managing power for the solenoid lock and the Arduino proved crucial. Ensuring that components
received the proper voltage and current was essential for system stability and reliability.

4. Security Considerations:

- Developing a secure fingerprint system highlighted the importance of securing biometric data and
physical components. This project increased awareness of potential vulnerabilities in IoT-based
security systems and ways to mitigate them.

5. Teamwork and Communication:

- Collaboration and communication within the team were vital to the project's success. Regular
updates, feedback, and problem-solving sessions ensured that all team members contributed
effectively and that challenges were overcome efficiently.

You might also like