Make your own electronic lock with which you can open your garage door thanks to your fingerprint

garage door equipped with electronic lock

We are in a time when it seems that the safest or fastest thing is to use your fingerprint to, for example, unlock your mobile phone and even to go to work, in this case everything goes through the security required or imposed to carry carry out some other project.

Far from this, the truth is that, as a project in which learning how this type of digital device works can be more than interesting, because of this today I want to explain to you how to mount an electronic lock for your garage door that can be unlocked using your fingerprint.


Electronic lock

Build your own electronic lock for your garage door step by step that you can unlock with your fingerprint

Going into a little more detail, tell you that for this project we are going to use a fingerprint scanner like SparkFun GT-511C1R. As is usual in this type of tutorials, it must be borne in mind that basically all these types of products have a very similar operation, so it is not necessary that it be exactly this model.

If you dare to carry out this project but have certain differences, such as that the fingerprint scanner used is different from the one in the tutorial or that your garage door simply uses other systems, something that will happen almost with total probability, no you must why fear, you can follow the tutorial but not as it is since you will have to make some other modification both in the wiring and in the code itself to adapt it to your hardware.

necessary elements

Steps necessary to build your own fingerprint reader with which to open your garage door

Step 1: Wiring and Soldering the Entire System

To be able to open your garage door thanks to the fingerprint of your finger, you will need two different components. On the one hand, we need manufacture our own control panel, which we will install outside our home. Inside this control panel will be where we will install the fingerprint scanner, a small information screen and some additional buttons.

Second we will need install a second box inside the garage itself. This will be in charge of verifying that the fingerprint entered in the control panel is accepted or not by the system and, in the event of a correct verification, proceed to create a signal recognizable by the motor that will open the door of our garage.

To carry this out we will need an ATMega328p microcontroller which will be in charge of giving life to the control panel that we will install outside of our own house while, for the interior panel we will bet on an ATTiny. The two boards will communicate with each other through a serial connection. To increase the security of the entire system, we will install a polarized transmitter so that the ATTiny card can close the connection, so that if a vandal starts the external control panel, they cannot open our garage door by crossing a couple of cables.

If this project convinces you and you are interested in carrying out this project, this is the list of components you will need:

project diagram

At this point, it is time to connect all the hardware on the list. The idea, as you are surely imagining, goes through follow the diagram that is located just above these lines, same in which you can see the layout of both the control panel and the interior module. One piece of advice I can give you is to give the cables of both the current converter and the LCD a certain length so that you can hang them and fix them in the most correct position you think is inside the outer waterproof box.

If at this point we examine for a moment the code that the controller will finally execute, you will realize that the buttons are connected to pins 12, 13 and 14, which fulfill the functions of 'arriba','OK'Y'down'respectively. This means that it may be a very good idea to place them in this way in order to maintain a visual logic much more in line with their function.

To supply current to the entire system we will use, as the list of necessary elements said, a phone charger with any microUSB connector. The idea of ​​using this type of charger basically responds to the fact that they are very cheap and above all easy to find.. Another different idea is to be able to power the controllers through the use of batteries, although at this point it may be best to use an alternating current transformer to direct current since the fingerprint sensor usually consumes a lot of current and, feeding the entire system with batteries that you have to change them every day.

Arduino IDE

Step 2: Coding and running on the controllers

At this point in particular tell you that both the code to be executed by the ATMega328p and the ATTiny85 have been written and compiled with the Arduino IDE. In this specific case we must execute the garagefinger.ino file in the ATMega328p and the tiny_switch.ino file in the ATTiny85. On the other hand, the NokiaLCD.cpp and NokiaLCD.h libraries are two libraries for the LCD screen, these have been compiled from examples taken from the Arduino site and, like almost all libraries, they should be placed in the folder 'libraries'for your Arduino IDE to find them. This folder is usually located from the root where you have the IDE installed, in Windiows it is usually "% HOMEPATH" \ Documents \ Arduino \ libraries. I leave you the files for download just below these lines:

In addition to this you will also need the libraries so that the fingerprint scanner can work. At this point it must be borne in mind that unfortunately The libraries linked to the SparkFun site will not work as they have been developed for the GT-511C3 model, much more expensive, and not for the version we are using, perhaps something more difficult to find but much cheaper. The working libraries for GT-511C1R can be found at github.

If after downloading all the files and looking at the code you want provide greater security to the system I encourage you, for example, to find and replace all instances a 'secrectstring'by your own password. Another very interesting detail that can help make your system more secure is changing the buf variable in the tiny_switch.ino file so that it is the same length as the password you want to use.

The variable overrydeCode, defined in the garagefinger.ino file, has an 8-bit representation of the up / down button press sequence that can be used to open your garage door and upload new fingerprints to the system without having to use a known fingerprint. This is useful for the first time the device is used as the scanner memory will be empty. It may be interesting to change this initial value.

external control

Step 3: We assemble the entire project

Once we have tested the entire project, it is time for the final assembly. For this we must mount the entire control panel inside our watertight box. As you can see in the images, so that nobody can access the controller, in addition to the watertight box, an acrylic box has been used on which we will install only the LCD screen and the access buttons, the rest of the system will be installed in the inside of this box.

This box must be mounted outside your home and connected directly to the box where we will install the ATTiny. In this point, remind you that in ATTiny you must connect cables to communicate the signals to the motor that opens your garage door. In my case, it was easy for me since inside the garage itself I had a button on the wall that performed this same function.

mounted system

Step 4. Using the system

Once we have the entire system installed, we just have to press any of the three buttons so that both the LCD screen and the fingerprint scanner light up. At this point, the device waits until you put a finger on the scanner. If the finger you placed on the scanner is recognized, the door will open and a menu will be displayed on the screen to open / close the door again, add / delete fingerprints, change the screen brightness ... The device turns off about 8 seconds after the last key pressed. To change the duration of the waiting time, you must modify the function waitForButton in the garagefinger.ino file.

As we mentioned in previous paragraphs, you can use an override sequence by using the up / down cores followed by 'OK'to gain access to the system. This is useful the first time you activate the device as, at this point, the scanner will not have fingerprints in its memory. The initial sequence is given by the 8-bit binary representation of the number that is stored in the variable overrideCode in the garagefinger.ino file where '1' is represented by the 'up' button and '0' is represented by the 'down' button.

One point to keep in mind is that, in the event that you change the override sequence and later forget it without adding fingerprints to the device, it will be effectively locked and you will have to reprogram the ATMega328p and force an EEPROM erase to erase the device. code.

Further information: instructables


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.