OneTouch - Wireless Biometric Lock

7,541

106

16

Security has always been a concern of paramount importance to human beings. We have gone from protecting valuables in the past by keeping them in dungeons to safeguarding data by layers and layers of cryptographic software. Either way, ensuring the well-being of our personal belongings has always been near the top of our priority list. Our home is the best place where we keep our personal belongings. What about the security of our home? There is no doubt that our door locks play a major role in keeping our home safe.

Thanks to technology, today home security involves a wide range of software and hardware including web-based security services, biometrics and personal devices with integrated security levels. One of the biggest advances of the digital-technical age has been the introduction of biometrics into security.

Biometric door locks are now common with increased security levels and ensure the protection of our door locks. But there are two things that prevent the use of biometric locks. One is the cost of the lock which may start from $300. The other one is the lack of remote access.

So let's add some IOT flavour to make the biometric door lock more spicy.

Step 1: What We Are Going to Build ?

So to ensure the security and remote access we want to think of a new way to connect our door lock to our personal devices. Let's think about our mobile phones, they have the capability to control our smart door locks through MQTT and available protocols. Then why don't we add an additional biometric firewall to that? Yeah, that's what we are gonna do.

Nowadays almost all mobile phones are equipped with fingerprint sensors. We use them to verify the biometric of the authorized person. So it can overcome the disadvantages of now existing smart door locks with an increased security level. In essence, we are going to build a Smart Remote door lock with additional biometric security.

Step 2: How We Are Going to Build It ?

As almost all smartphones are equipped with fingerprint sensors and we are using those sensors to verify the identity. The data read from the fingerprint sensor is compared with the authentic fingerprints stored in the device using a mobile application and determines whether the person is authorized or not. The data after verification is sent from mobile to a suitable cloud database, from where the smart door lock system retrieves the data. If the person authorized the smart door lock will unlock and if the person is not authorized it doesn't unlock.

Step 3: Hardware Components

These are the hardware components we used in building our project,

  1. NodeMCU
  2. Electric Lock Module
  3. Relay
  4. 12V Power Adapter
  5. Power Jack
  6. Connection Wires

Step 4: ​The NodeMCU

NodeMCU is an open source IoT platform. It includes firmware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module. In this project, NodeMCU forms the brain of the smart door lock. The NodeMCU retrieves data from the cloud database and makes the relay ON/OFF according to the data.

Step 5: The Electric Door Lock Module

The electric door lock module operates at 12V which locks when the power is OFF and unlocks when the power is ON. It forms the physical part of the smart door lock.

Step 6: ​The Relay

A relay is a switching device as it works to isolate or change the state of an electric circuit from one state to another. The 12V supply is given to the electric lock module using the Relay according to the data given by the NodeMCU

Step 7: Hardware Integration

Gather all the necessary components. Then solder them properly according to the given connection schema. I used a micro soldering station to control the temperature to avoid damage of NodeMCU while soldering. Be careful not to damage the MCU while soldering as high temperatures may damage the ICs.

Step 8: The Enclosure

We have gathered all the components, connected them properly, and attached code with them. Now it's time to put them all together in an enclosure. The 3D design is made using Fusion 360 and printed at EazyFab. The design files are attached here.

Step 9: Powering Up

We use the 12V 1A power supply to power up the NodeMCU as well the electric lock module. NodeMCU can't afford a direct 12V supply for a long time as it may damage the MCU. I used the 12V power supply just for a prototype. While building the product be sure to use a 5V power supply for the flawless working of the circuit.

Step 10: Software Components

The software components comprise of

  1. A mobile application
  2. Firebase real-time database
  3. NodeMCU code

Step 11: The Mobile Application

A mobile application is used to scan the fingerprint and to verify the fingerprint and authorize the person. Once the fingerprint is verified the key for unlocking is posted to firebase real-time database. The application is made using Kodular. The screenshots of the design and code blocks are attached. Design the application as shown and code block to give it life. If you are not interested in building the app download it from here.

Step 12: Firebase

Firebase is a mobile and web application development platform. Firebase frees developers to focus on crafting fantastic user experiences. You don’t need to manage servers. You don’t need to write APIs. Firebase is your server, your API and your datastore, all written so generically that you can modify it to suit most needs. In our project, we use Firebase real-time database to instantly post and retrieve data so that there is no time delay.

While designing the mobile application we need to fill a thing called Firebase URL.

To find Firebase URL

  1. Go to Firebase
  2. Then go and open your project (If you have no projects create one)
  3. Then move to Real-Time Database in Database
  4. The selected URL in the screenshot is the Firebase URL

To find Firebase Auth

  1. Go to Firebase
  2. Then go to Settings > Project Settings
  3. From there move on to Service accounts
  4. Then under Database secrets tab, you can find firebase auth key

If you want to know more about setting up Firebase read the detailed guide here.

Step 13: NodeMCU - Code

Now its time to give life to the smart lock. The code for NodeMCU is developed in C and is uploaded using Arduino IDE. Download the Firebase extension library for NodeMCU from here and add it in Arduino IDE.

Now go and download the code from this repository and replace Firebase URL and Firebase Auth with yours. Then upload the code using Arduino IDE and verify the working

Step 14: The Working

Now it is time to watch the working. Open the mobile application, click on the lock button, verify your identity and unlock the door.

Step 15: What's Amazing ?

    1. Low Cost

    All the components used in this project are very cheap and the net cost of the product will be less than $10.

    2. Fast Unlocking

    The fingerprint sensors equipped on mobile phones are really fast and since firebase being a real-time database with very high speed of operation the locking-unlocking process will be so fast, like less than 0.5s

    3. Advanced Security

    The Android application provided cryptographic algorithms that ensure the security of transmitting data, thus the lock gets multi-layer security.

    4. Shareable

    By sharing the Android application and the firebase credentials multiple persons can access the same door.

    5. Portability

    This door lock can replace any locks. Just replace the locking mechanism with this and it will become a smart door.

    Step 16: What in Future ?

    In the upcoming updates, we like to include features like

    1. Door Lock break alert
    2. Face detection
    3. Face unlock
    4. Unlock notification

    Step 17: Lend a Helping Hand

    Can you help us out ? Because you small donations will help us to make the project to a product with increased security levels. Your donations are kindly welcomed.

    PayPal ID: http://paypal.me/NekhilR

    PayPal E Mail : nekiary07@gmail.com

    PayPal Phone : +919496876389

    BTC Wallet Address : 3GXeARC9p1E5MWp9GHQZV1ML2Z7fScoBwS

    IoT Challenge

    Participated in the
    IoT Challenge

    Sensors Contest

    This is an entry in the
    Sensors Contest

    Share

      Recommendations

      • Fandom Contest

        Fandom Contest
      • Colors of the Rainbow Contest

        Colors of the Rainbow Contest
      • Growing Beyond Earth Maker Contest

        Growing Beyond Earth Maker Contest

      16 Discussions

      1
      None
      vodkalolz

      7 days ago

      I like this tutorial a lot.

      Good work!

      I just yesterday invented the future of fingerprinting in my head. This guide can help me a lot in building one of my first "do it your self" projects :) A world class invention lol.

      If you had shared a bitcoin wallet I def had donated :)

      1 reply
      0
      None
      CodersCafevodkalolz

      Reply 6 days ago

      I greatly appreciate your kindness in supporting our project. Currently, we are accepting donations through PayPal. If you are still interested in supporting us I here attach the PayPal address.
      PayPal EMAIL : nekiary07@gmail.com
      PayPal PHONE : +919496876389

      2
      None
      agwuafricaagwu

      13 days ago

      Wow. I love this. I just have a simple question. Do I need any in do I need any knowledge of programming to build the application?

      3 replies
      0
      None
      CodersCafeagwuafricaagwu

      Reply 13 days ago

      Absolutely no. You don't have to need any programming knowledge to build an android application using Kodular. Just a basic knowledge about logical flow is only needed.

      0
      None
      agwuafricaagwuCodersCafe

      Reply 8 days ago

      Please can you help me with an app like this that I can tweak to suit my needs or preferably a step by step approach on how I can achieve same. Am really finding it hard to pull it all together. I want to include this in my final year project. Thanks in advance..

      0
      None
      CodersCafeagwuafricaagwu

      Reply 7 days ago

      Sure. I will help you in developing mobile application. Please let me know the deatils via a personal message.

      0
      None
      ChrisWx

      13 days ago on Step 2

      Ok, while I'm all for neat gadgets like this, as far as security is concerned there are a lot of weak points. The weakest is the lock itself, which simply opens via a command over WIFI. That is not biometric, nor is it secure. A knowledgeable person could hack the WIFI signal and mimic the command. The app generator is a potential security issue. The app itself is a potential security issue. The protocol used to communicate to the NodeMCU, the NodeMCU's WIFI connection and the WIFI router it connects to could all be potential security issues.

      Like I said, I'm a big fan of new IoT devices, but the term 'lock' implies a level of security that is simply not here. And that is exacerbated by the author touting the security of the biometric app. Please take care with claims of security when referring to internet connected devices.

      1 reply
      1
      None
      CodersCafeChrisWx

      Reply 8 days ago

      Thanks for your patience in spending time to read the article. As you said IOT devices are massively vulnerable to hacking but you have mistaken by your prejudice or carelessness.
      But in our project, we have given primary importance to ensure the maximum possible security. As you said the lock doesn't unlock over a Wi-Fi command. Rather the Wi-Fi is to ensure the connection between the lock and the firebase.
      Also, the lock doesn't send plain keywords like 'Lock' or 'Unlock' to the firebase. But the keywords are encrypted using a series of encryption algorithms like AES and SHA256 in a preferred order. So it makes difficult to decode the captured data. Also, It is not easier to mimic the capture data over Wi-Fi.
      As you said there are many security issues in the project, but they are not merely ours. They threaten the security of Wi-Fi. But we have ensured the maximum possible security and we are working to elevate the security to a higher level. Also, this is just a beta version of the project and an updated version will be releasing soon. Once again thank you for your vigilance and for reaching out to us! We do often become aware of the possible issues through members like you, so we appreciate your speaking up!

      1
      None
      ThanakritI

      17 days ago

      I want to know about The application. How is it connect to firebase ?
      and if we download your application,it is connect to my firebase or your firebase.if we want it connect to my firebase,What should I do.

      Sorry for my english language because I'm not good at english language.
      thak you

      1 answer
      0
      None
      CodersCafeThanakritI

      Answer 15 days ago

      The application given in the link is connected to my firebase account. If you want connect it to your firebase you should wait for the next update of application releasing next week. Or you can change the firebase URL in Kodular while building the android application.

      1
      None
      Asmodeo

      16 days ago on Step 16

      OK. really nice 'able, but....if You do not have a fingerprint reader in your phone? Could We add an stand-alone fingerprint reader to the Node?

      1 reply
      0
      None
      CodersCafeAsmodeo

      Reply 15 days ago

      In the current version there is no way to add a stand-alone fingerprint. The project is mainly for those who lack a stand-alone fingerprint sensor. In the future updates we will be adding such facilities.

      0
      None
      CodersCafeseamster

      Reply 22 days ago

      Your appreciation is our inspiration.Thank you so much.