How to Build Your Own RFID Door Lock
A person's home is his castle. While most of us can't equip our castles with the traditional means of security like moats, turrets, and iron maidens, you still can spruce up and secure your place with the use of some more modern technology. This high-tech option might not be as visually imposing as an alligator-filled moat, but it still can be an effective means of keeping out invading hordes. No, I'm not talking about lasers or anything else quite so complicated (or dangerous, for that matter). What you need is an RFID door lock.
RFID technology already is used as a means of security in many different forums, so it isn't a big leap to bring this technology into home applications. You can set up an RFID door lock several different ways, but I'll cover the simplest way here. One big thing to remember is that you absolutely want to set up this system with a backup, so that you can gain entry if you experience a power outage. Getting locked out is bad enough, but getting locked out when you had an alternative method to get in is worse, so plan ahead.
This system for setting up an RFID lock is a standalone method, meaning it doesn't need to be hooked up to a computer to work. While the idea of having everything in your house wired to your computer might sound cool, and heck, might actually be cool too, this is a much more versatile system that will save you some wiring hassles to connect your computer to the door (unless you want to keep your computer right by the door, then by all means hook them up.) You can find instructions on how to hook up that kind of system here.
Materials and Tools
In order to start you're going to need to get your hands on a few basic electronic components as well as some RFID-specific ones. You will need:
- Your run of the mill circuit board
- +5VDC voltage regulator
- 5V, 20 mA reed relay
- A low power switching diode
- A 24 pin IC socket
- A microprocessor
- RFID reader
- Electronic Deadbolt
- 2 project boxes, one 4x3x1.6 and one 3x2x1
- Connecting wire
- Wood screws for mounting purposes
- Hot glue gun and glue sticks
- Soldering iron and solder
- Screw Driver
- Pliers
Step 1: Install the Deadbolt and RFID Reader
Once you have your materials handy it's time to start getting your system hooked up. For simplicity's sake, I'm going to assume that the door you're installing this lock on already has a deadbolt that you're replacing with the RFID deadbolt. If it doesn't, I won't go into how to put in a deadbolt, but any deadbolt you purchase should come complete with detailed instructions on how to install it. You also can consult the ever-knowledgeable Internet [Video/Audio]. I'm going to assume that if you're able to build an RFID door lock that you'll be able install a deadbolt.
Providing you've got the door prepared to put the deadbolt in, you'll need to get all the parts of it together. You'll replace the old deadbolt by putting the power deadbolt in its place. Once you've got the deadbolt and faceplate in the place you want it, you'll need to figure out a good orientation for your RFID reader. Ideally, you'll want to place it as close to the deadbolt as you can, as wires will need to run between the RFID reader and the deadbolt. You can place the reader either on the side or to the bottom of the deadbolt faceplate, but make sure that your wiring connectors are facing out towards the deadbolt, or you'll see some ugly wiring hanging out. Don't screw anything down just yet, as you'll need to lift it up in a minute.
Now you need to make room for the wires to go under the faceplate. Break out your trusty pliers and use them to bend up the edge of the faceplate just a tad where the wiring connectors meet it. Place a piece of cloth between the faceplate and the pliers to avoid scratching up your shiny new faceplate. Check the wires to make sure they fit under the slight bend.
Step 2: Wire the RFID Reader
Your RFID reader now needs to be wired to the electronic deadbolt. You should see four pins standing out on the edge of the reader, and those four pins correspond to 4 different functions: Common Collector Voltage (VCC), Enable, Serial Out (SOUT), and Ground (GND). First, tie the Enable pin to the Ground pin by soldering a cable between them. You'll want to do this on the back of the jumper block so that the wire connecting the two doesn't muck up your other wires.
Next, you'll need to solder a wire to each of the VCC, SOUT, and GND pins. Make sure the wires have a little extra length to them, as you don't want to come up short later. After the wires are soldered, trim the pins back so there won't be anything to keep your reader from butting up against the faceplate.
Next, you'll run the wires through the deadbolt hole along with the wiring for the electronic deadbolt. Make sure your reader wires are under the part of the faceplate you pulled up so they won't crimp. You also want to make sure the wires are out of the way of the deadbolt mechanism. Then, you can finally screw the deadbolt and the reader onto the door.
To finish this part of the project, you'll need the cover for your large plastic project box. Sit the cover over the reader and mark the spot where the wires exit. Trim the plastic off at this spot, much like you did for the faceplate, to keep your wires from getting smashed. Then, you can screw this onto your door as well. Again, make sure this is as close to the faceplate as possible. You want the wires to be covered as much to protect them from the elements and from any other sources of damage.
Step 3: Install the Deadbolt Control Box
Now you'll need to connect your deadbolt control box to the keypad. First, pull your RFID wiring through the hole in the back of the keypad towards the front. Then you can connect the keypad connector block to the pins provided (this should be pretty self explanatory, there's only one place these wires can go). Make sure your wires are clear of all the moving parts and screw the control box into the door.
If you're using the Powerbolt deadbolt as recommended, it should be easy to rig up to use RFID. There should be two very clearly marked 'Open' and 'Close' contacts on the circuit board. You'll want to solder two wires (again, make sure they're extra long) to the left side of the 'Open' contacts. Now, if you've done this right, you should be able to test the lock. Insert some batteries into the deadbolt and touch the ends of the two wires together. This should cause the system to spring to life and unlock the deadbolt. If it works, give yourself a little pat on the back. If not, perhaps a little smack on the forehead would be appropriate.
Now you can put the faceplate back on the system, but make sure you pull the two 'Open' wires either out through the side or through the notch provided, it's up to you.
Step 4: Build the BASIC Stamp Carrier Board
Now to the fun part! This is where you'll get to put together all your little electronic components. This can be a bit confusing as it's the most complicated step, so make sure you take it slow and step by step to avoid any mistakes.
- First, you'll need to solder the 24 pin IC Socket (make sure the notched side is at the top) and the reed relay to the carrier board.
- Add the voltage regulator to the mix.
- Solder the input lead on the voltage regulator to the VIN pin on the stamp (pin 24 on the IC socket) and then ground pin on the regulator to the VSS pin on the stamp (pin 23 on the IC socket).
- Finally, solder some DC capable wires to the VIN and VSS pins on the regulator (every pin, with the exception of the output pin, on the voltage regulator should have something attached to it at this point).
- To connect this to your RFID reader, solder the VCC lead wire from the reader to the output pin on the voltage regulator.
- Next, solder the SOUT wire to pin 18 on the IC Socket (I/O pin 13 on the stamp). Then take the remaining wire from the reader, the GRD wire, and attach it to the GRD pin on the voltage regulator.
Next you'll connect the deadbolt control box to the mix. Solder the 'Open' switch wires to the two switched pins on the reed relay. It doesn't matter which you solder where, so take your pick, you can't mess it up (well, I guess you technically could, but you'd really have to try hard).
Now, you've need power going to the reed relay. Solder one of the coil leads to pin 14 on the IC socket (I/O pin 0 on the stamp) and the other to pin 4 on the IC socket (the second VSS pin on the stamp and the GRD). Once these leads are connected you can solder your protection diode over the leads. This isn't just for the fun of soldering something else. You must have this part to keep the electric current from damaging your components when you cut the power to the relay.
Take the diode and solder the end with the colored band to the coil that is connected to pin 14. Then solder the side opposite the colored band to the lead that's connected to GRD. All you need now is to finish up!
Step 5: Finish Up
Only a few more things to do and you'll be done. You'll need to program your BASIC microprocessor. The easiest way to do this is to buy a microprocessor that can be hooked up to your computer for easy programming. Then, with the use of a battery, you can simply download the programming needed from the web [BS2 file] and make a few minor tweaks. You'll need to input the number of tags you have authorized to open the door, as well as load in the IDs for each of those tags to make sure they can open the door.
Once it's programmed you'll need to insert it into the carrier board. Make sure to line up pin 1 on the microprocessor with pin 1 on the IC socket. Then, power it up by connecting the 9V power to the DC power leads attached to the VIN and VSS on your stamp.
Now, before you finish up, give it a test run. Wave an authorized tag over the reader. It should unlock the deadbolt.
You can now finish up by putting the carrier board in your remaining project box. Again, you'll need to cut a tiny notch to let the cords through without getting pinched. Hot glue the carrier board to the project board cover, then put the lid on and screw it shut. Attach the box to the door using screws or glue.
Finally, you'll need to find a way to support the power supply. Wire gutters or even tape can work to run the wires along the door and to the adapter. And that's it! Simply plug it in and you're finished.
RFID doesn't need to be limited to commercial security measures, as it can be a great project for your home as well as a spiffy bit of technology. So, while you may not have had the glory of installing a castle-grade security measure, you can at least impress your friends with your soldering skills and your ability to open your door with a wave of a hand.