close-circle
Close
0%
0%

A Door Lock with RFID and Mobile App Access

Door Lock which can be controlled using RFID tags and Mobile Application using REST API backend Developed on a Raspberry Pi zero(W)

Similar projects worth following
close
After Having 5 cups of coffee on a weekend while working and watching my mother run to the door every time to open the door for some one visiting us.The thought crossed my mind that what if she never had to run to the Door and she could just open the door with her mobile or when she goes out for some shopping and comes back what if she could just enter the home as we do in office with our RFID Access.

I thought of Making a Door Lock which could be operated using a Mobile Application, RFID key fobs and buttons too. Having no Experience with hardware i looked up the internet how to do that and found this hardware called as Raspberry Pi got them ordered and started working on it and after 2 months after a lot of hickups by amazon and my busy work schedule i have the lock ready which works but still needs some work to make it perfect!
The Circuit Diagram and Code is available in this Article. The code is available on GitHub

1. Bring up the Raspberry Pi with Raspbian OS

2.Change the ssh password from default for Security Reasons.

3. Do a apt-get update

4. Install Flask for python follow the Below Link


https://www.jeremymorgan.com/tutorials/python-tutorials/how-to-rest-api-python/

5. Install the MFRC522 Drivers and libraries you can follow the below Link

http://www.instructables.com/id/Raspberry-Pi-3-Model-B-MIFARE-RC522-RFID-Tag-Readi/

6. Create the Circuit using the Circuit Diagram attached and the wiring instructions in the Build Section.

7. Make a Acrylic Box for the lock.

8. Download the software using github link in this project.

JPEG Image - 953.86 kB - 09/16/2017 at 22:46

eye
Preview
download-circle
Download

  • 1 × Raspberry Pi Zero (W)
  • 1 × Servo Motor MGR996
  • 1 × MFRC522 RFID Reader
  • 2 × Push Buttons
  • 20 × Jumper Cables for Connections

View all 10 components

  • Access Log of RFID

    sujay20023 days ago 0 comments

    Detected
    Card read UID: 82,101,194,16,229
    [82, 101, 194, 16, 229]
    White Card
    The Door is Locked!

    The Door is Locked!

    Detected
    Card read UID: 82,101,194,16,229
    [82, 101, 194, 16, 229]
    White Card
    Entering from App or Reader:The Door is Unlocked!

  • Access log of Rest API Access

    sujay20023 days ago 0 comments

    Logs from the Access console when the Device is Access by mobile App

    192.168.86.20 - - [14/Oct/2017 22:53:59] "GET /unlockme HTTP/1.1" 200 -
    The Door is Locked!

    The Door is Locked!

    192.168.86.20 - - [14/Oct/2017 22:54:03] "GET /lockme HTTP/1.1" 200 -
    The Door is Locked!

    The Door is Locked!

    192.168.86.20 - - [14/Oct/2017 22:54:06] "GET /lockme HTTP/1.1" 200 -
    The Door is Locked!

    The Door is Locked!

    192.168.86.20 - - [14/Oct/2017 22:54:10] "GET /lockme HTTP/1.1" 200 -
    The Door is Unlocked!

View all 2 project logs

  • 1
    Based on the Description Below Create the Wiring Connections for the Raspberry Pi and components

    BOARD Mode Configuration for the Raspberry Pi

    RFID RC522

    GPIO  ---------> PIN Type in RC522 & Color

    24                    SDA-Green

    23                    SCK-Blue

    19                     MOS- Violet

    21                     IMI - Gray

    25                    GND- Black

    22                    RST- Brown

    17                     3.3V -Red

    Buttons

    GPIO               Switch PIN

    11                      Switch 1 (+) Jumped with 5V of GPIO 4 Rpi

    13                     Switch 2(+) Jumped with 5V of GPIO 4 Rpi

    14                     GND Jumped to both the switch (-)

    Servo 

    GPIO               Servo PINS

    16                    Servo Yellow Cable for Signal

    2                     Servo Red Cable (5V)

    6                     Servo Ground Brown Cable

  • 2
    Use a Raspberry UPS HAT for Power backup

    <TBD> Images will be attached.

  • 3
    Build a Acrylic Case and Lock Engager Based on the Physical Lock you have at home

    Since i wanted the lock to be customisable and not dependent on any specific lock hardware

    I created a generic Acrylic Base but the lock Engager and position of the Servo is dependent on the type of Lock you are using at home. will give some guidelines to build that below

View all 3 instructions

Enjoy this project?

Share

Discussions

Rolf Junior wrote 09/28/2017 at 12:22 point

That is brilliant! Very good! Congratulations!

  Are you sure? yes | no

sujay2002 wrote 09/29/2017 at 05:38 point

Thanks for your appriciation!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates