Skip to content

How to Make a Fingerprint Door Lock with Arduino

This article is a collaborative effort, crafted and edited by a team of dedicated professionals.

Contributors: Muhammad Baballe Ahmad, Mehmet Cavas, Sudhir Chitnis, and Zhen-ya Liu.

✓ Verified & Tested Information

Follow this guide to see how you can make your very own fingerprint door lock using an Arduino board!

Introduction

Fingerprint door locks are a great way to make your home more secure. The use of a fingerprint door lock eliminates the need for a key and makes it difficult for people to gain access to your property. This tutorial will show you how to make your own fingerprint door lock with Arduino. By the end of this tutorial, you will be able to make your own fingerprint door lock using the included hardware, software and code.

What is Arduino

Arduino is an open-source electronics platform that makes it easy to prototype and build your own projects. It consists of a single-board microcontroller, a programming language based on C/C++ and a development environment. Arduino enables you to quickly and easily build projects using basic electronic components such as switches, LEDs, motion sensors and more. With Arduino, you can create powerful and interactive robot projects, home automation systems or even wearable technology.

Arduino is an ideal platform for creating embedded devices with a wide variety of sensors that can detect sound, motion and temperature. It also provides the flexibility to control servos for robotic movements or control relay switches for remote operation of lights, motors or other devices. Arduino allows you to harness the power of computers in small embedded form factors at low cost.

What is a fingerprint door lock

A fingerprint door lock is a security device utilizing biological characteristics to identify authorized personnel. Rather than relying on a combination of pins, keys, or passwords, these locks verify identity using biometric information, such as the prints of a person’s fingertips. Fingerprint locks are becoming increasingly popular due to their convenience and enhanced security features; they are used by homeowners, businesses and government organizations.

Due to advances in technology, it is now possible to build your own fingerprint door lock with an Arduino development board and basic hardware components. To build your own system you will need some knowledge about electronics and programming for the Arduino board. The use of an open source project is recommended if you are just starting out in building automated systems with microcontrollers like the Arduino Uno or Mega boards. In this article we’ll provide instructions on how to make a fingerprint door lock with an Arduino board that uses either SPI (to connect the sensor) or I2C (to connect multiple sensors) communication protocol.

Gather Materials

Making a fingerprint door lock with Arduino requires a few supplies. You will need an Arduino-compatible microcontroller, a fingerprint scanner, a relay, and some other electrical components. Additionally, you will also need some tools such as wire cutters and a soldering iron. Gather all the necessary materials and make sure you have everything you need before you begin the project.

Arduino Uno

The Arduino Uno is a microcontroller platform for hobbyists and advanced makers. It’s a great way to program your own electronics, as well as learn about how to build circuits and use servos, sensors, LCD screens, relays and more. The Uno offers excellent computing power in an easy-to-use package. It’s compatible with a wide range of shields (attachable boards) that allow you to customize even further. In order to make the fingerprint door lock, the following materials are needed:
-Arduino Uno microcontroller
-11.5″ x 9″ base plate
-Fingerprint scanning module
-Servo motor
-Jumper wires (2)
-9 Volt battery clip
-NPN transistor

Fingerprint Sensor

Fingerprint sensors are an essential component of your fingerprint door lock and can be used to read and recognize someone’s fingerprint. It is important to choose the right one as sometimes this will cause issues. When buying a fingerprint sensor, check the specifications such as the resolution, any false rejects or misses, image size, and speed. Ensure that it is compatible with Arduino boards and also that it can store sufficient fingerprints for various users. Some sensors may also request additional components like USB cables and power supply boxes so they are all ready before beginning your project.

Servo Motor

A servo motor is a motor used in robotics and automation systems. It allows precise control of motors by sending an electronic signal to adjust the position of the motor’s arm or rotating shaft. When considering making a Fingerprint Door Lock with Arduino, it is important to include a servo motor in the system ingredients. The servo motor should have an integrated shaft to allow movement in both clockwise and anticlockwise directions.

The servo motor can be connected directly to the Board through its 4 pin connection cable and driven using pulse width modulation (PWM) signals generated using Arduino code written especially for controlling the fingerprint door lock. With PWM, the width of individual pulses can be controlled, resulting in rapid switching between two states using high frequency operations that can control movement of the door lock.

Using additional components such as power sources, detection sensors and microcontrollers, further customization of this project is possible in order to better suit different needs specific requirements for certain applications. Ultimately, including a servo motor as part of this Fingerprint Door Lock with Arduino project will provide efficient movement control along with convenience and security of access control with features such as scan-to-unlock & emergency-open functions.

Jumper Wires

Creating a fingerprint door lock with Arduino is a fun and easy project for homeowners and hobbyists alike! To get started, you’ll need to gather the necessary supplies, including jumper wires which allow you to connect components easily. There are several types of jumper wires available: male-male, male-female, and male-pinhead. When selecting jumper wires, consider the size and length that best fits your needs – shorter wires are better when connecting pins on tight spaces while longer ones make it easier to connect components that are further away from each other. Be sure to choose quality wiring that is rated for the voltage that you’re working with and also consider a key blank if needed.

9V Battery

A 9V battery is necessary to power the whole circuit. The Arduino board requires a minimum of 7V and the fingerprint sensor module requires 4.5V to 6V, so the 9V battery should be more than enough to run both at once. The battery also has (or can easily be fitted with) both a positive and negative terminal for wiring into the circuit. Be sure not to get anything hooked up backwards as this could damage your equipment and/or create an electrical risk. Once you have obtained your 9V battery, it will need to be connected securely in order for your Fingerprint Door Lock with Arduino project to function properly.

Connect the Components

Making a fingerprint door lock with Arduino is an easy and useful project. To get started, you will need to connect the components together. This includes connecting the Arduino to the fingerprint scanner and the servo motor. Depending on the model of Arduino you use, you may also need a breadboard to connect the components. Once everything is connected, you can then start writing the code to make the door lock function.

Connect the Arduino to the Fingerprint Sensor

To connect the Arduino to the fingerprint sensor, start by connecting the power, which is 5V and ground pins on the sensor. Make sure that these connections are secure before moving on. Then connect pin 2 (RX) from the Arduino and pin RX from the fingerprint sensor to each other. Finally, connect pin 3 (TX) from the Arduino and pin TX from the fingerprint sensor. All of these connections should be checked for a secure connection before continuing.

Once you’ve connected all of the pins, download and install a suitable library for your system. This will allow you to communicate with your fingerprint sensor easily in an intuitive manner by providing functions that allow you to read fingerprint data, register new fingerprints, delete existing fingerprints and more! After downloading this library it will need to be included into your program in order for it to be used in your project. After this step is complete you should have successfully connected your components to make a working finger print door lock system using Arduino!

Connect the Servo Motor to the Arduino

It’s time to connect the servo motor to the Arduino. This can be a bit tricky, so it’s best to lay out all the components you’re going to use first and make sure everything is correctly connected.

The servo motor should be connected to one of the dedicated headers on your Arduino, and there are three sets of pins that will need wiring up – VCC (power), GND (ground) and Signal, which is used to tell the motor when power needs applied. Note that you can also connect a potentiometer in order to regulate and control the speed at which your servo motor rotates.

Next, connect 4-5 jumper wires into the breadboard row closest to where you have connected your servo motor. Connect those same wires into pins set aside for digital I/O – typically pins 2 through 6 or 9 through 13 on an Arduino Uno board. Once this is done, if everything has been done correctly when you apply power from 5V and GND on your breadboard, your servo should start rotating whenever power is applied by each pin received by Digital I/O!

Connect the 9V Battery to the Arduino

The next step in building your fingerprint door lock with Arduino is to connect the 9-volt battery to the Arduino board. The 9-volt battery will provide the power needed for the Arduino to do its work and will also allow you to power other components connected to it.

Before connecting, make sure you understand which pins on the Arduino correspond to what kind of output or input. Generally speaking, 5V pins supply power while GND pins are used for grounding. Additionally, some of the Digital I/O pins are meant solely for input while others are meant exclusively for output. Be sure you understand which type of pin each component needs before connecting it.

Once you know what kind of pin each component needs, connect them following the schematic diagram provided with this project. Then connect one red lead from the battery clip directly into one of the 5V slots on breadboard and then connect a long black lead from the same clip into either one of two ground slots on breadboard respectively labeled as GND (or ground). Push down firmly until each connection is secure and your 9V Battery is connected properly!

Program the Arduino

In order to make a fingerprint door lock with Arduino, you will need to program the Arduino with the code required to read fingerprints and unlock the door. Programming an Arduino is not difficult, but it does take some time and requires knowledge of the Arduino language. In this section, we will go over the basics of the Arduino language and show you the steps you need to take to program the Arduino for your fingerprint door lock.

Set up the Fingerprint Sensor

Now that you have the necessary parts to build your Arduino Fingerprint Door Lock, it’s time to set up the fingerprint sensor. The following steps describe how to connect the fingerprint sensor component and program your Arduino so that it is ready for use.

First, you need to connect the fingerprint reader component with your Arduino using four cables as follows:
– Connect cable 1 from ground GND of the power supply to GND on the Arduino board.
– Connect cable 2 from VCC of the power supply to 5V on the Arduino board.
– Connect cable 3 from RX pin of the fingerprint module to digital pin #2 (RX)on the Board.
– Connect cable 4 from TX pin of the fingerprint module to digital pin #3 (TX)on Board.

If all is connected correctly (and securely) then your setup should look like Figure 1. Now it’s time to start programming! This tutorial will use an example code found in a library which contains useful ready made functions required for each operation like enrolling, searching, deleting and more that can be applied when interfacing with a fingerprint reader module attached with an arduino board. To access this library visit Github and download Adafruit FPM Library files folders on your computer and open it in an Arduino IDE window if you haven’t yet installed them then follow these steps :
1. Install Adafruit FPM Library using “Tools > Library manager” in Arduino IDE>
2. In Libraries window search for “adafruit fpm” or “Adafruit Fingerprint Sensor library” > clickInstall button> wait until complete installation > Close Libraries windows> restarted arduino software if required
3. Make sure “Adafruit_Fingerprint” & “sw_uart” folders were successfully found inside “Libraries” folder in arduino installation directory C:\Program Files (x86)\Arduino\libraries . If Yes then it has been successfully installed; otherwise do Follow previous step again

Once installing FPM Library as above , open example sketch found inside example12_gatherID folder located under Example Tab >> Adafruit Fingerprint Sensor Examples section And upload this sketch into your board remember always press reset button before uploading any code into Arduino otherwise some errors appear while uploading Codes today here we are using Serial monitor at 9600 baud rate because we set uart speed at 9600 baud rate while importing library but if you changed Baudrate while linkurd code in lbrary file then accordingly change Serial Monitor Baud rate also

Now disconnect 5v/vcc terminal connected VCC of Fingerprint Module after upload finished so Module won’t draw electricity every time even when attached power Supply Turn ON/OFF by mistake; once program finished disconnected with 5volts and again connect whenever use sensitivity purposes Now Your project setup With finger print Reader about complete . Follow upcoming steps create loop Functionality which Triggers particular Action According To user demands Good Luck Happy Programming !

Create a function to open the door

Once the hardware components are assembled and tested, it’s time to program the Arduino. The main functionality of the system is the door lock, i.e., opening and closing of the door by verifying a valid fingerprint. To do this, we will create a function called openDoor that can be called whenever we need to open the door. This function will include code to control our servo and unlock/lock our latch.

The servo must be attached to a digital output pin on the Arduino in order for us to program it accurately. For example, if we wanted to attach it to pin 9, then we could write:
“`servo1.attach(9);“`
Once that is done, we can write code within our openDoor() function for how this pin (and thus our servo) should behave when we call this function from other parts of our program. We can use “`servo1.write(x)“` to set where our servo should turn relatively (from 0-180). By setting two values which correspond with how wide apart from each other our latch and unlock positions should be (e.g., latch = 0, unlock = 180), then all that needs doing is sending these corresponding values when required (latch when locking or unlocking depending on current status). Note that due to accuracy differences between different servos of even exact same model and brand ,variable such as above may need slight calibration in-situ before they can be correctly used as parameters within functions such as openDoor().
Finally remember not forget that after locking/unlocking we should also make sure to reset position motors back into known resting state so they’re not left in ambiguous/unclear state externally after operation is finished which keeps one side enabled and another locked which could potentially cause them grind against each other due consistent course load over time unintentionally – leading eventual damage or need replacement even before their normal lifespan has expired due unforseen exessive usage!

Create a function to close the door

Before you create the function to close the door, there are a few key considerations to take into account. Once you set up your Arduino board and add the necessary hardware components, write a loop in which your program will check for when someone enters an incorrect fingerprint. When an incorrect fingerprint is detected, create a function to trigger the lock mechanism to close the door.

Once the closing of the door is triggered, use an electronic lock or servo motor to actually drive two cylinders together and close the door. Use digital pins from your Arduino board to control each cylinder – these usually come in pairs and should be connected properly in order for them to function properly. Also think about how much time it should take each cylinder to move – this can vary depending on your choice of device or material used for closing down the door.

Finally, once all of these components have been programmed and connected properly ensure that all mechanical locking mechanisms are functioning correctly and that any security systems are in place (e.g., alarm sensors). Thereafter, test out your code using environment simulations and ensuring that it functions as expected – if successful, you have now created a function to close the door!

Test the Door Lock

Testing your fingerprint door lock is an important step to make sure that it is working properly. Testing it manually is the best way to ensure that the lock opens and closes when it needs to. To test the lock, you will need access to the Arduino board, a power source, and the door lock. Let’s go through the steps for testing the door lock before you move onto the assembly.

Test the Fingerprint Sensor

Now that the fingerprint sensor is connected, it’s time to start programming. The objective of this program is to test the connection between the sensor and Arduino, and create a basic lock system. Start by creating an instance of the fingerprint class, called myFingerprint:

Fingerprint myFingerprint;

In order to make sure the connection is working correctly, let’s run a few commands. First, we’ll call begin method:

myFingerprint.begin(DEVICE_ID);

The DEVICE_ID argument should be set to the Arduino serial port. Next, let’s check that we can read fingerprints via serial communication by running this command:

myFingerprint.checkEnrollment();

This command will return “ACCEPTED” if a finger is enrolled into this device at the specified index (fingerIndex). Finally, we’ll check that our door lock system works correctly by calling usePassword() method in a loop:

while (true) { // continuously looking for correct password int password = myFingerprint.getPassword(); if (password == MY_PASSWORD) doSomething(); }

Test the Servo Motor

Testing the servo motor is a critical step in ensuring that your fingerprint door lock works properly. The servo motor will be used to control the latch on the door and must be tested for accuracy before installing it in the system. Here’s how to test your servo motor:

1. Firstly, connect the GND and +5V pins of the servo on one side of your breadboard to two ports on an Arduino Uno. Then, from port 3 of the Arduino to one of three control pins at the other side of your breadboard.

2. Next, upload a program written to test and control a servomotor into the Arduino by connecting it with a USB cable.

3. After uploading, you’ll need to open up Serial Monitor in order to view results during testing, such as what angle it’s rotating at, etc..

4. Finally, observe how smoothly and accurately the servomotor rotates its arm around when given different commands through Serial Monitor- this is key for ensuring that your system locks/unlocks successfully each time! Ensure that there are no obstructions hindering its movement as well during this part of testing.

Test the Door Lock

Testing the door lock is an important step in any Arduino project that involves a locking mechanism. A secure and reliable lock should be able to recognize fingerprints with a high degree of accuracy, while denying access to unregistered users. Before letting any kind of system loose on your security regime, it’s essential to thoroughly test the Arduino-powered door lock prior to installation.

To begin testing, connect the Arduino board to a power supply and open up your code editor. Begin uploading the program you’ve written for controlling the door lock to the board. This will require some time for compilation, depending on how many lines of code have been written. After successfully uploading your code, start testing its various components by using various valid and invalid inputs. Check that all components are functioning as expected-from user recognition through fingerprint identification, motors turning and locking/unlocking mechanisms working properly or notifying you of unauthorized attempts-and take notes as you go along for later comparison and evaluation.

Once all components have been tested and re-tested independently, move onto rechecking combinations of these components together-by activating them at different points in time according to their order in your program chronological flow chart-until they work perfectly together in synchronization with each other like a well-oiled machine! After this step has been completed successfully, you can trust that your door lock will function reliably when installed in its rightful place before real users attempt to use it!

Conclusion

In this project, you have learned how to create a door lock using Arduino and a fingerprint reader. You have created an simple circuit that connects the Arduino board, fingerprint reader module, and servo motor. Additionally, you adapted the basic code example provided with your fingerprint sensor to add another operation into the library code.

By combining all the steps together, you were able to successfully build your own fingerprint door lock. We hope that this project has taught you how to use various Arduino modules together and helped build your understanding of both hardware and software components of building projects with the Arduino platform.

With some practice, it is highly likely that your understanding of these systems will grow – congratulations on completing this project!

How to Make a Fingerprint Door Lock with ArduinoCheckout this video:

Share this Article