Introduction: DIY RFID Door Lock

Picture of DIY RFID Door Lock

Instructions to build your own do it yourself RFID door lock for your home, garage, etc.

Also, if you have a 3D printer you can also use my case designs or change my designs to make your own. They are not quite perfect as i am pretty new to 3d printing, however they are pretty close. You will probably need to use a dremel tool to get the holes just right.

If you don't have a 3D printer, you can have a service print out my designs or buy some enclosures online. You can buy one for a couple bucks on eBay and make some mods also. you can also leave this on the prototype boards if you really want to.

This is a good project for a beginner. I am also just getting started with electronics, microcontrollers, 3D printing, and programming. This was a great learning experience for me and i hope you will have as much fun as i did. I will break this project down step by step.

If you follow all the steps in this project you will be: 3D Printing, Programming an Arduino, Wiring and Soldering a PCB (Printed Circuit Board), and Connecting the 2 main boxes with ribbon cable.

Thanks for Checking out my Project!! :)

Step 1: Get the Materials

Picture of Get the Materials

It can be pretty frustrating to start a project, and keep finding out you don't have all the parts. So to get us started out lets get all the parts. This is the parts with approximate prices. You can find all of these online or at an electronics store. I personally don't have an electronics store within driving distance, so i ordered everything online. For the prototyping stage, you will also want a solderless breadboard and some solderless breadboard wires. For the microcontroller i used an Arduino Uno.

Step 2: Setup the Prototype

Picture of Setup the Prototype

When i was started building this project, it looked far less complicated than these pictures do. I encourage you to break the circuit down into chunks. Look at my wiring diagrams and set up your circuit on a solderless breadboard. Use the pictures as a reference point.

When you are prototyping, Don't worry about using the IDC connectors in the diagram. Those are for the final wiring. Instead use them as a way to unite the two separate diagrams.

The pictures are labeled Inside and Outside. Take your time and get the wiring and components hooked up to the Arduino.

Outside Circuit:

This is really a simple circuit, although it may look slightly complicated if you don't know electronics. The wire coming from D2 on the microcontroller has a very weak signal and cannot control the door strike directly. To boost the power on this wire, we run it through a transistor so it has enough juice to close the relay. The relay then sends a strong signal straight from the power source to the door strike.

Inside Circuit:

This consists of 2 parts: The RFID sensor and the LED to tell us if we are approved or denied access. Just hook up the wires.

Now that you have it all hooked up Lets move on to Programming.

Step 3: Programming the Arduino

You should have a basic understanding of the Arduino IDE for this step. I have enclosed the file i made with comments. If you are anything beyond a beginner at C++, I am almost certain you will find a better way to program this, however i have tested this code and everything works well so far.

Use MiguelBalboas RFID library located here:

https://github.com/miguelbalboa/rfid

Use his library to find out the UID number for your card. It is a 4 part array consisting of numbers in hex.

Once you found your cards UID number. Plug that number into the approvedA[] array in my sketch.

Once that is done hook up your Arduino to your computer and flash the file.

Then test it out and make sure everything works. Once you are done with that we are ready to build the final circuit on a blank PCB.

Step 4: Build the Final Circuit

Picture of Build the Final Circuit

Use the Diagrams from Step 2 and build the circuit on a PCB. This is the part where you will need the IDC connectors and Ribbon cable to hook up the inside and outside circuits. Use my pictures as a reference to build. Once you are all done it should look something like mine in the first picture. Test it out again and make sure everthing works and then we will move on the making the enclosures.

Step 5: Make the Enclosures

Picture of Make the Enclosures

I have included my 3 files for the enclosures above here ready to print out. If you are familiar with 3D printing, i would recommend making your own enclosures to better fit how your PCB's are set up. I spent a bit a couple hours creating the inside enclosure with the slide in cover, but the outside enclosure is a pretty simple and the cover will have to be glued on. Also i would recommend spraying the outdoor PCB with Electrocoat or a rubberized coating to help seal out moisture and keep the circuits from corroding. I would also seal off the holes in the cover with some clear silicone.

Step 6: Installation Time

Now all thats left to do is cut out your door frame and install the door strike. The measurements will be included with the door strike you bought. now mount the outdoor box outside and the indoor box inside, and hook up the ribbon cable and the door strike before hooking up power to the Arduino. Once everything is hooked up and powered up you can leave your door handle locked as the strike will open and allow you to just simply push the door open once you get the green light.

Keep in mind that everything your do is at your own risk. If something goes wrong, it is not my fault. That being said I wish you the best of luck building and installing yours and thanks for checking out my project.

Comments

ferypro (author)2016-07-28

hello... how can i open that door from the inside ? can you make tutorial for that ? thanks

THDS (author)ferypro2016-08-17

good question. if you dont have one of the "bump" resistant handles, you would end up unlocking the handle everytime. that would be annoying. I would wire a button on the inside box to use as a bypass. take 12v+ from incoming power to a pushbutton then to doorstrike V+ would be the quick answer. I would prefer to alter the code to accept the button input as an alternative to a card scan. Thanks for pointing that out. ill get to work on it when i get some time

theredbryophyte (author)2015-12-22

Please could you give us a link for the RFID sensor - there seem to be lots of different types. Thanks.

THDS (author)theredbryophyte2016-01-21

Sorry about the late response, but this one is a pretty good deal -->http://pages.ebay.com/link/?nav=item.view&id=370881368831&alt=web

DIY Hacks and How Tos (author)2015-12-05

This would be great for a storage cabinet in shared workshop.

Thats a great idea!! Since the RFID sensor is able to read through non-metallic objects, you could even put both PCB's on the inside of the cabinet and make the whole thing hidden.

About This Instructable

17,238views

312favorites

License:

More by THDS:DIY RFID Door Lock
Add instructable to: