Introduction: Electric Door Lock With Fingerprint Scanner and RFID Reader

About: The Tutorial Education Program is an honors program for Brazilian undergraduates, sponsored by the Ministry of Education. Based on philosophical principles of tutorial education in which small groups of academ…

The project was design to avoid the necessity of using keys, to reach our goal we used an optical fingerprint sensor and an Arduino. However there are individuals that have an illegible fingerprint and the sensor won’t recognize it. Then thinking about this situation, a RFID card reader was used with the biometric sensor, allowing the entry with ride cards, RFID keychain tags and cellphones with NFC.

Step 1: Components

The following items will be used for the project:

  • 1 Arduino Nano;
  • 1 FPM10A Optical Fingerprint reader Sensor Modules For Arduino Locks;
  • 1 Leitor RFID Rc522 de 13.56 mhz ;
  • 2 Leds (1 green and 1 red) * 1 Oled Display 128 X 32 Serial i2c Arduino 0,91;
  • 1 Electronic Door Lock HDL FEC-91 CA.

All of this materials can be easily found on the Internet. If the idea is to make this project as fast as possible it is recommended to buy the items on the website Mercado Livre (only if you live in Brazil) since it has a safe and a fast shipping (the products will arrive at the destination in about 1 or 2 weeks). However, if the project doesn’t need to be done in a hurry, it’s a lot cheaper to buy the items abroad on websites like Ebay, AliExpress, etc. But there is no guarantee as when and if the product will arrive at the destination.

Total average purchase cost on Mercado Livre: +/- 200 reais (around 38.62 United States Dollar). Total average purchase cost on international websites: +/- 45 reais (around 8,69 United States Dollar).

Those prices were calculated without the cost of the electronic door lock HDL, which can be found on this link:

The price of the HDL on the day this Instructables was made was R$74,90 ($14,69) + R$6,00 ($1,16) for shipping.

Step 2: Hardware - Setting Up the Circuit

The schematic above shows the electrical circuit connections.

The program Fritzing was used to make the schematic and the file (.fzz) that can be downloaded on: .

The tables shows the connections between the sensors and the Oled display on the Arduino Nano.

Step 3: Software - Downloading the Code

Due to the few available memory on Arduino Nano, the code was divided on 3 different folders that can be downloaded on thefile below or on the link:

  • The first folder is to read the fingerprint and the card. The name of it is: “Leitura_Cartao_e_Biometria”.
  • The second one is to register the fingerprint. And it’s on the folder: “Cadastro_Biometria “.
  • The third file is to read the code of the card. And it’s on the folder: “Cadastro_RFID ”.

Download the Arduino IDE on your computer. Inside of the downloaded file, in addition to the three folders, there are two zip files. Those zip files are the libraries of the sensors (of the RFID and the biometric fingerprint scanner), so include them on the Arduino IDE.

Step 4: Software - Explanation of the Code “Cadastro_Biometria”

Since the memory of the Arduino Nano is very limited, the registration will be apart from the main code (that will be responsible only for the confirmation of a fingerprint already registered).

The biometric sensor already has an internal memory that will record the fingerprints (it can record up to 128 fingerprints). That guarantees the registered data will not be lost after shutting off the circuit.

On the file manager of your computer, go to the downloaded folder "Cadastro_Biometria" and double click the file "Cadastro_Biometria.ino". The Arduino IDE will load the code and it will have 5 tabs, each one represents one function of the code. Load the code on your Arduino, open the serial monitor in 9600 and follow the instructions there to register a new fingerprint, remove one or see each fingerprints are already registered.

Step 5: Software - Explanation of the Code "Cadastro_RFID"

After recording all of the fingerprints it’s time to register the RFID cards or tags. But differently from what was done with the fingerprint scanner, on this part of the code won’t be saved the RFID cards or tags register. And knowing that, open the folder "Cadastro_RFID” and double click the file "Cadastro_RFID.ino". Load the code on the Arduino, open the serial monitor in 9600 and then, bring the card or tag closer to the reader.

An hexadecimal code will be ‪generate‬d and will appear on the screen (for (exemple: "32:80:CD:F2"). Write it down on a notepad on your computer or a paper, because it will be copied to the final code (the one that will only read information).

Step 6: Software - Explanation of the Code "Leitura_Cartao_e_Biometria"

We are now on the last part of the code. Open the folder "Leitura_Cartao_e_Biometria" and double click the “Leitura_Cartao_e_Biometria.ino". The code will be opened on the Arduino IDE and it will have 4 tabs, each one representing on function. Some changes will need to be done so the code can work correctly.

Click on the tab "leituraRfid", and substitute each hexadecimal number inside of the “if” and “else id” parenthesis with the number that you saved on the notepad (exemple: "32:80:CD:F2”). Feel free to add or delete any “else if” from the code.

Now click on the tab "nomeDoUsuario" and replace the names in the parenthesis with the names from the respective users and the ID’s that were chosen for that user. Done!! Now you just need to load the code on the Arduino.

Step 7: Printed Circuit Board (PCB)

If all the steps behind went well until now, make a Printed Circuit Board (usually we use the software EAGLE CAD to do it) and then, weld the components. The circuit will look like the one shown in the video.

Step 8: Make a Little Box to Keep the Circuit

We made a box using a 3D printer in partnership with FindesLab. After that, we finished it, painting it and adding the circuit in.

Step 9: The Project Installation

The box was screwed on the wall and the HDL (responsible for keeping the door locked) was installed on the door. Watch the video of the final demonstration of the project.

Step 10: Finishing Up the Project

Watch how the result of the project was in real application.

Step 11: Project License

Electric Door Lock With Fingerprint Scanner and RFID Reader by PET Engenharia de Computação is licensed under a Creative Commons Attribution 4.0 International License.