Electric Door Lock With Fingerprint Scanner and RFID Reader

3,176

59

6

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: https://www.segurancajato.com.br/fecho-eletrico-hdl-fec-91-ca

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: https://github.com/andreocunha/Esquematico_Tranca .

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:

https://github.com/andreocunha/PET_Tranca_EngComp

  • 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.

Be the First to Share

    Recommendations

    • Make it Fly Challenge

      Make it Fly Challenge
    • Metal Contest

      Metal Contest
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge

    6 Comments

    0
    jellyleankaihang
    jellyleankaihang

    Question 10 months ago

    Where should the leds connected to ?

    FBAHZ2YK8G23LG6.jpg
    0
    Pet EngComp
    Pet EngComp

    Reply 9 months ago

    Hi! I'm sorry we forgot to connect it on the schematic. But the red LED is connected on the pin 5 and the green LED is connected on the pin 6.

    0
    thecosmotm
    thecosmotm

    Question 11 months ago

    First of all, I congratulate you on the great project I have done.

    I would like to do it at home, I have never used an arduino, I already bought the materials.

    From what I can see in the file that I download there are several files of arduino code, I don't know which one to load to the microcontroller.

    If you can tell me it would be great what I have to do first.

    Thank you

    0
    Pet EngComp
    Pet EngComp

    Reply 11 months ago

    Hi, thanks!

    If you are beginner with Arduino, I recommend you to practice with others simples projects first, to understand how Arduino works.

    Anyway, for this project when you download the zip with codes and extract, you gona see 3 diferente pastes and 2 other zips. You have to add this two zip in librares in the Arduino IDE.

    Now, you go to "Cadastro_Biometria" paste and double click in the "Cadastro_Biometria.ino" file. When the Arduino IDE open, you gona see that all the others codes in this paste opened too. Don't worry, the others ".ino" that opened has the functions for this project, so don't close them. Next, load the "Cadastro_Biometria.ino" to Arduino for you register a new fingerprint in your sensor.

    Repet this action for "Cadastro_RFID" to register your tags RFID. Só after register your fingerprint, upload the Cadastro_RFID.ino to your Arduino.

    To finish, open the "Leitura_Cartao_e_Biometria" paste and double click in "Leitura_Cartao_e_Biometria.ino" and upload to your Arduino. But if have any problem, you can see the step by step in this instructables.

    In the images that I sent, you can see the paste and what happen when I double click in "Cadastro_Biometria.ino" file.

    paste.pngcode.png
    0
    thecosmotm
    thecosmotm

    Reply 11 months ago

    Thank you very much, I hope your project can work for me.

    I'll let you know if I can make it work.

    regards.