Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
94 views

Arduino RFID Door Lock

This document provides instructions for building an Arduino-based RFID door lock. It consists of an RFID reader and an Arduino controller. The RFID reader is mounted outside the door and reads RFID tags, sending the data to the Arduino controller inside via a serial connection. The Arduino controller verifies the tag data and triggers a door lock if authentication is successful. It includes parts lists, circuit diagrams, code downloads and building instructions across 5 steps. The goal is to create a simple and secure RFID-controlled door lock that can be expanded further.

Uploaded by

Dawit Birhanu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views

Arduino RFID Door Lock

This document provides instructions for building an Arduino-based RFID door lock. It consists of an RFID reader and an Arduino controller. The RFID reader is mounted outside the door and reads RFID tags, sending the data to the Arduino controller inside via a serial connection. The Arduino controller verifies the tag data and triggers a door lock if authentication is successful. It includes parts lists, circuit diagrams, code downloads and building instructions across 5 steps. The goal is to create a simple and secure RFID-controlled door lock that can be expanded further.

Uploaded by

Dawit Birhanu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Home Sign Up!

Browse Community Submit


All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech

Arduino RFID Door Lock


by pcmofo on November 13, 2009

Table of Contents

Arduino RFID Door Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Arduino RFID Door Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Parts Needed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 2: Build the Arduino controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 3: Build the RFID Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Step 4: Program! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Step 5: Expand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
Author:pcmofo author's website
I like to take things apart, sometimes they go back together sometimes they end up as something entirely different then where they started.

Intro: Arduino RFID Door Lock


***Updated 8/9/2010***

I wanted to make an easy and secure way to enter my garage. RFID was the best way to unlock my door, even with my hands full I can unlock the door and push it open!
I built a simple circuit with a basic ATMega 168 arduino chip and a ID-20 RFID reader to control an electronic door lock.

The circuit consists of 3 separate parts, a Reader to read RFID tags, a Controller to accept data from the reader and control the output of the RGB LED and the Electric
door lock. The door lock is first installed in a door and tested with a 9v battery to ensure correct installation. In most cases you want a Normally Open circuit on the door
lock, or Fail Secure. This means the door stays locked when no current passes through it. When 12vDC is passed through the electromagnet in the door lock, a plate in
the lock gives way and allows the door to be pushed open freely.

The reader is placed on the outside of the door and is separate from the controller on the inside so that no one can circumvent the security by breaking open the Reader
and trying to short circuit the reader. The controller receives serial data from the Reader and controls the RGB led and the Door lock. In this case I have put both on
separate bread boards for testing. Here is a video overview of the system in action Read on to see how to build one for your self!

**Update**
All of the code, schematics, and PCB designs have been tested and refined. They are all posted here as of 8/9/2010

Updated video of the final system installed and working.

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
Image Notes
1. Reader portion of the circuit
2. Controller portion of circuit
3. RFID keychain tag
4. RFID card tag
5. Master programming card
6. 12vDC connection to Door Lock
7. 12vDC power input
Image Notes
1. Reader mounted outside door, RGB LED is blue showing its on and ready.

Image Notes
1. 12v DC power
2. 12v output to door lock
3. TIP31A transistor to trigger door lock
4. Reset button for micro controller
5. Power on LED
6. Programing Header
7. ATMega168
8. 6 pin header going to reader
9. Jumper to switch between programing and reading serial data from the
RFID module

Image Notes
1. 6 Pin header to Controller
2. 2N2222 transistor for buzzer
3. Resistors for Buzzer
4. ID-12 RFID reader glued to front inside of project box
5. Spark Fun break out board
6. Jumper wires used to mount RFID reader 90deg away from the main board.
http://www.instructables.com/id/Arduino-RFID-Door-Lock/
Can also be mounted on the PCB without the SF break out board shown (green)
7. RGB LED with hole cut in front
8. PCB cut to slot into groves on project box

Step 1: Parts Needed


Here are a list of parts and links to SparkFun.com where I bought them. This is the basic set of parts you need to build and arduino and a circuit to read RFID tags into
the arduino. I am assuming you have a breadboard, power supply and hookup wires already.

Arduino Stuff

ATmega168 with Arduino Bootloader $4.95

Crystal 16MHz $1.50

Capacitor Ceramic 22pF $0.25 (x2)

Resistor 10k Ohm 1/6th Watt PTH $0.25

Mini Push Button Switch $0.35

Triple Output LED RGB - Diffused $1.95

RFID stuff

Either one of these, 20 has better range, 12 is smaller


RFID Reader ID-12 $29.95
RFID Reader ID-20 $34.95

RFID Reader Breakout $0.95

Break Away Headers - Straight $2.50

RFID Tag - 125kHz $1.95

Other

TIP31A transistor (radio shack/local electronics store $1.50)

Door Lock is from ebay.


Door Fail Secure access control Electric Strike v5 NO $17.50 (kawamall, bay)

Image Notes
1. Reader portion of the circuit
2. Controller portion of circuit
3. RFID keychain tag
4. RFID card tag
5. Master programming card
6. 12vDC connection to Door Lock
7. 12vDC power input

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
Step 2: Build the Arduino controller
The first step to building a RFID door lock with a basic Arduino is to bread board out a basic working arduino. Most Arduino pre-flashed ATMega 168 chips come with the
default blink program pre installed. Connect a LED to digital output 13 and verify that everything is working.

The hardware portion of this RFID reader would be too simple if we used a regular arduino with built in USB programmer. Since I plan on putting this into the wall and not
touching it again I dont want to use a big bulky $30 arduino board when I can buy a $5 ATMega 168 and make a much smaller custom PCB.

Because I chose to make a basic Arduino circuit myself I need an external USB->Serial FDIT programmer. I have included Eagle schematics of the controller with a
power supply built from a 7805 voltage regulator. In testing I used a bread board power supply.

To get an arduino up and running all you really need is the ATMega168 with the arduino software flashed on it, 2x 22pF capacitors, 16mhz crystal, 10k ohm resistor, push
button and a breadboard. The hookup for this is well known but I have included the entire schematic for the circuit.

The arduino is going to trigger 4 outputs, 1 each for Red/Green/Blue LEDs, and 1 to trigger the TIP31A to send 12vDC to the door lock. The arduino receives serial data
in on its Rx line from the ID-20 RFID reader.

Image Notes
1. Breadboard Powersupply
2. TIP31A Transistor
3. ATMega168 Arduino
4. Reset Button
5. 16mhz Crystal
6. 10ohm Resistor Image Notes
7. 22pF Capacitors 1. TIP31A Transistor
8. Connection to Door Lock 2. ATMega168 Arduino
9. RGB outputs to reader 3. Reset Button
10. Serial input to arduino 4. 10k ohm Resistor (for reset)
11. 5v/ground to reader 5. 16mhz Crystal
12. Serial input 6. 22pF capacitors
7. Serial Data in from ID-20
8. Output to open door lock via TIP31A
9. RGB LED outputs

Image Notes
1. Breadboard Powersupply
2. 12vDC
3. 12vDC to door lock
4. Ground output from TIP31A
5. 12vDC from power supply
6. RGB LED outputs
7. Serial data input

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
8. Serial input to arduino
9. RGB outputs from arduino

File Downloads

Controller_PCB.pdf ((612x792) 12 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Controller_PCB.pdf']
Step 3: Build the RFID Reader
Now that you have your arduino bread boarded and working you can put together the RFID reader portion of the circuit that will contain the ID-10 or ID-20 and RGB LED
to indicate the status of the circuit. Remember that the reader will be outside and separate from the controller inside so that someone cannot easily break in.

To build this, we are going to send 5v/Ground over from the primary bread board to a secondary bread board we are building the Reader on. Also send over 3 wires from
3 of the arduino output pins to control the RGB LED, one for each color. One more wire, Brown in the pictures, will be a serial connection for the ID-20 to talk to the
arduino's Rx serial input. This is a very simple circuit to connect. LED's get resistors and a few points on the ID-20 are tied to ground/5v to set the correct status.

To make it easier to breadboard the ID-10/ID-20 Sparkfun sells a Breakout board that allows you to attach longer pin headers that are spaced to fit a bread board. This
part and the pinheaders and listed in the parts list.

The schematic should be strait forward and easy to follow.

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
Image Notes
1. ID-20 reader, (ID-10 is smaller). Soldered to the Sparkfun break out board and
pin headers. It allows me to Plug it into the bread board easily.
2. RGB LED
3. Resistors for LEDs
4. RGB LED wires connected to Arduino output pins, Guess which one is which??
5. Serial out of ID-20 and into arduino Rx
6. Optional Resistor/transistor that I was playing with to connect a buzzer
7. Serial coming out of ID-20, hidden under the chip
8. 5v/Ground to power the reader from the main Controller power supply
9. Common ground for the RGB LED

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
File Downloads

reader_PCB.pdf ((612x792) 8 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'reader_PCB.pdf']

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
Step 4: Program!
Time to program your arduino. This can be a bit tricky using a basic arduino, you may have to press the reset button multiple times before and during the first part of the
upload. A very important thing to remember, you WILL get an upload error if you do no temporarily disconnect the ID-20 serial line to the arduino's Rx line. The
ATMega168 only has 1 Rx input and it uses it to upload code to talk to the programmer. Disconnect the ID-20 while programming then plug it back in when your done.
I used a FTDI programmer which allows you to program the arduino via USB with only 4 wires. The Controller schematic shows a pin header connection to allow you to
plug one in directly. Sparkfun also sells this part but many may already have it.

You can easily upload my code to your arduino and never look back but whats the fun in that? Let me explain the basic idea of how it works.

First of all, I did not want any external buttons/switches/etc and I did not want to reprogram the arduino every time I wanted to add a new card. Therefore I wanted to use
only RFID to control the operation of the circuit as well as control over the door lock.

The program turns on the Blue LED to indicate it is ready to read a new card. When the card is read it decides if it is a valid card or not by comparing what it read in to a
list of valid cards. If the user is valid, the arduino turns OFF the Blue LED and turns on the Green LED for 5 seconds. It also turns on another output high for 5 seconds.
This output is connected to the TIP31A transistor and allows the tiny arduino to control a much larger 12v 300mA door lock without being damaged. After 5 seconds the
door lock re-locks and the LED turns back to blue to wait for another card to be read. If the card is invalid then the LED changes to RED for a few seconds and back to
Blue to wait for another card.

It is important that the door lock still work even if the arduino loses power overnight or is reset. Therefore all valid card ID's are stored in EEPROM memory. The
ATMega168 has 512 Bytes of EEPROM memory. Each RFID card has a 5 Hex Byte serial number and a 1 Hex Byte Check sum that we can use to verify there were no
errors in the transmission between the ID-20 and the arduino.

Valid cards are stored in the EEPROM by using the first Byte as a counter. For example, if there are 3 valid cards stored the first Byte in the EEPROM would be 3.
EEPROM.read(0); = 3. Knowing this, and the fact that each ID is 5 Bytes long we know that 1-5 is card one, 6-10 is card 2 and 11-15 is card 3. We can make a loop that
looks through the EEPROM 5 bytes at a time and tries to find the card that was read in by the reader.

But how can we add new cards to the EEPROM after the circuit is installed?? I have read in one of the RFID cards I have and hard coded it to be the Master RFID card.
So even if the entire EEPROM is wiped the master card will still function. Whenever a card is read, it checks first to see if it is the Master card, if not, then it continues to
see if it is a valid card or not. If the card is the master card we have the arduino go into a "programming mode" where it flashes RGB and waits for another valid tag to be
read. The next tag that is read is added to the next free spot in the EEPROM and the counter is incremented 1 if the card does not already exist in the EEPROM memory.
The reader then returns to normal mode and waits for a new card to be read.

Currently I have not programmed a way to delete a card as the reasons for deleting a card would most likely be it was lost or stolen. As this would most likely be used
with 1-10 people the easiest thing to do would be to hard program a Master Erase card that will wipe all cards from the EEPROM then re add them all, which only takes a
few seconds. I have added code to wipe the EEPROM but I have not implemented this feature yet. .

The code is attached in a text file along with a copy of the parts list.

File Downloads

RFIDLock.txt (16 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'RFIDLock.txt']

Updated_Code.txt (22 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Updated_Code.txt']
Step 5: Expand
This is only some of the cool stuff you can do with RFID. You could expand this much further with a LCD output, logging of who enters and when, network/twitter
connection etc. I plan on making a finished PCB version of this circuit. I have never made a PCB before so I am still working on the design and layout of the parts. Once
I have them complete I will post them as well. I encourage anyone to take the code I have written and modify it to do even more cool things!

Related Instructables

Control a RFID pet feeder Create a new


Schlage by landmanr keypad for a
A Universal RFID cat door electronic Very Simple Weiser
RFID Key by by landmanr deadbolt with Arduino Electric Electronic Lock
drj113 an arduino! by Lock by RKlenka by OldGrover
quadmasta

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
Comments
50 comments Add Comment view all 224 comments

pingywon says: May 23, 2010. 8:52 PM REPLY


I own a pizzeria and the delivery drivers come in and out of the back door all the time. I have taken your schematic and the modified version of your code
(including the eraser card) and modded it myself a little further. I am currently installing this as a system on my back door. I have currently finished all the
wiring and am just waiting for a few more parts from spark fun. I have made some changes to fit my actual wants and needs of the location, but overall it is
the same lay-out. The whole project has proven REALLY fun so far and I hope to have it all wrapped up with in a week or so.

pcmofo says: May 24, 2010. 8:52 AM REPLY


Thats awesome! Glad to see you are getting some practical use out of my project. I am etching some prototype boards this week and hope
to permanently install it on my garage brewery this week.

pingywon says: May 30, 2010. 10:05 PM REPLY


So like I said it should be a week later and my project is all done. I have some pics and am uploading a "demo" video to you tube right now. I used
RJ45 to run everything and with the 8pins there was one short coming of my version of the project. I will let all of you be the judge to see if you can
figure it out. The whole system performs flawlessly....so far anyway.

If there is anyone who decides to do anything else with this code I would really love to see it or even help you test it.

The vid link doesnt show up as a reply. I'll make another post with it.

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
pcmofo says: May 31, 2010. 7:04 AM REPLY
Wow, I am impressed. You did a really nice job of throwing that together without using a PCB. I like the eraser card code as well. I cant wait to
get mine up and running as well. I hope you had fun building this. It looks like it turned out really nice.

pingywon says: Jun 1, 2010. 5:48 AM REPLY


Thanks man. I really appreciate that. I havent soldered anything this "complicated" in about 2 years, so my soldering started out terrible and
by the time I was done it was looking great. I wanted to go back and resolder the whole thing, but I decided to leave good enough alone.

The "outside board" with the rfid reader... I enclosed it in a water proof box, but I also took the time to "paint" all the connection with "Liquid
Electrical tape" to help water/moisture proof the whole thing.

Like I had said before if anyone had an additions to the code or design, I would love to see it. Maybe even impliment some of it.

pcmofo says: Jun 1, 2010. 7:32 AM REPLY


Nice! someone here made a PCB design to get the boards printed... I am going to print and etch my own reader board to fit a small
electronic enclosure and mount it outside like you have done. It's under a patto so it should not be too exposed. For now I am going to
leave the breadboard inside so I can play with the code more.

I designed the circuit diagram so you can still connect a programmer and reprogram it. I really like the idea of a master erase card. One
idea I thought of is to have a "programming" master card... then a function card, like... "Add" "Erase" "Erase All" etc. which would allow
more customized programming. I'm thinking stuff like one-time-access, access at a specific time of day or span of days.... say someone is
coming to do electrical work.. they can go in and out all day but the card wont work the next day etc....

Also planning on using a networked RFID system to track and identify customers/beers we are brewing in the brewery.... so planning on
using the same readers and tags for everything.... such that anyone carrying a empty keg into the brewery gets access via the keg
because clearly they are helping carry heavy things and dont have time to mess with keys.... or the same tag for a friend may allow them
to pour as much beer as they want and pay later but not access into the brewery unless I authorize it etc....

So basically I have lots of plans for RFID and this door reader is only the beginning.

Working on an arduino remote car starter next... may or may not have RFID... but I expect to be playing around with both sets of code
regardless soon.

pingywon says: Jun 1, 2010. 8:07 PM REPLY


I like the idea of one time use cards or "day pass" cards. In order for this system to meet my needs perfectly it would need to have an
hours of operation type feature. So that my workers would not be able to enter the door in the middle of the night (11pm-7am) but at
the same time I would like my card to work.
That is a feature I would like.
I also think im going to put a simple switch push button on the Arduino RX line so that I can push the button and break the connection
between the ardunio and the ID-12 so that I can just jack in to the black box inside housing the ardunio to change the code. instead of
having to curently open the box and disconnect the wire.
I was going to use software serial, but I just wanted to get the project done.

Please let me know as you make any new code. I would love you review it and possibly even help test it.

pcmofo says: Aug 9, 2010. 11:05 AM REPLY


After a couple prototypes and attempts I have worked out all of the bugs and published the updated PCB designs and schematics. I also
embeded a video on the main page showing the new boards and the system working in action. Im looking into getting boards made somewhere
incase others would like to order them.

joshnosh says: Mar 15, 2011. 10:51 AM REPLY


hey
im getting a
"eeprom was not declared in this scope" error
any way to fix this im stuck
it refrences the "EEPROM.write(i, 0);" line about a 5th off the way down

markp912 says: Mar 13, 2011. 9:30 PM REPLY


On the RFID schematic from header pin number 2 to the id-20 board pin 9 what is that connection? Is that 16 from the arduino board? Also what are your
values for R4 and R5 in the RFID schematic? Please help! And thank you.

ducktape3618 says: Feb 26, 2011. 5:05 AM REPLY


i think it isn't safe. you have made a hole in the wall. and placed that black box thing over it. i think you can rip the black box from the wall, and can unlock
the door with a stick or anything.

and is it waterproof?

sorry for my very very bad english, i am only 14 years old -.-'

fostersfriend says: Mar 11, 2011. 4:11 PM REPLY


Um yeah I'm fOurtten to but He said he just had the "black box" connection to the diffused led and through a serial port to the arduino so if you "stuck a
stick through the hole the only thing that would happen is the Pcb board might break causing damage but not unlocking the door

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
Jessecar96 says: Jun 26, 2010. 8:14 AM REPLY
The code comes up with an error for me: In function 'void setup()': error: redefinition of 'void setup()' In function 'void loop()': what do i do?

Jessecar96 says: Jun 26, 2010. 8:16 AM REPLY


I am using an Atmega 328 instead of a 128. That might be the problem? I so, what do i do?

gregt says: Mar 4, 2011. 2:48 PM REPLY


I tried using an Arduino Pro, which has a ATMega328 processor, and it would not read anything from the ID-20. I then built a homebrew Arduino
using a ATMega168, and it worked perfectly. I thought the chip wouldn't make any difference either, but those were my results.

Techno Dancer says: Jun 26, 2010. 7:07 PM REPLY


The 328 is v. likely to not be the problem. In the Arduino environment, if there is more than one tab, under the compile etc. buttons, close all except
the one that contains the door lock code. Otherwise, in that same piece of code, you may have defined the setup void twice. To fix this, all you have
to do is just locate the second void setup() and rename or delete it, just be careful, as it may ruin your code, so also update any references to it in the
code. Hope this helps!

devondo says: Feb 10, 2011. 9:06 PM REPLY


I have a premade Arduino Duemilanove and i need to know if you know what i need to do to modify the code to make this work. i have been stuggling to get
this project done for a week straight! any help would be amazing!!!

pcmofo says: Feb 11, 2011. 7:45 AM REPLY


It is difficult for me to explain to everyone who asks how to adapt my project to their RFID reader/ controller/ MCU etc and make everything work. The
board I built is simply a solid way to connect parts to the arduino ATMega chip. If you have any arduino board just look at the schematic and code and do
everything on a bread board, in some of the pictures you can see my bread board prototype. For example, serial from the RFID reader is connected to
pin 2 or something like that in the code, find pin 2 serial in on the arduino board you have and connect it to the RFID reader.

My project is a complete project, ie, you follow the instructions and you can achieve the same result. If you deviate from those instructions you are on
your own to some degree. This project is very simple in terms of what you need to understand to make it work. If you can build a circuit on a bread board,
and read the first 10 or so lines of code that explains the pinout, then you can make my project work for you.

Good Luck.

devondo says: Feb 11, 2011. 9:05 AM REPLY


Thanks, i've been trying to get this all to work but something is wrong with the wiring or something if this all should work.
I appreciate the help.

Bawitdaba1337 says: Feb 5, 2011. 11:34 PM REPLY


Being that i'm a novice to Arduino (I do networking and programming for a living though) in general would it be easier for someone like me to buy a prebuilt
Arduino? If so what would you suggest for this project?

Also would it be possible to modify this to allow the controller to use more then 1 RFID reader and door lock? So the board could control 2 or 3 readers and
locks?

In my garage I have a utility room where I keep some high priced electronics and networking stuff and I would like to put a lock and reader on this door
aswell as a lock and reader into the entrance to my house from the garage. Maybe a third would be a stretch, but if there was a reader with a long enough
range maybe it could read an RFID card mounted on the windshield of my car and open my garage door. (They do this at the parking garage where I work,
it's pretty cool)

Great project, who wouldn't want to build one of these?

javajunkie1976 says: Jan 31, 2011. 11:25 AM REPLY


This would make an interesting part in a haunted maze for Halloween. Imagine what it would be like if the ToT's had to wear a spider-shaped RFID ring to
pass through a door... Ooooh, the possibilities!!

joshnosh says: Oct 8, 2010. 5:12 AM REPLY


hey im going to build one for my collage project and it looks AWSUM
but i cant figger out how to program the chip
you said somthing about only needing 4 wires
where can i get an "ftdi programer"?
and wher do i connect it?
iv got plenty of skill with electronics but this is my first audrino project and im strugleing a bit
thanks guys

KadenP says: Dec 5, 2010. 2:22 PM REPLY


He WAS helping. If you learn to spell properly, Google will help you. Try searching for "ftdi programmer" and you'll be flooded with information. "ftdi
programer"... eh.. not so much.

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
joshnosh says: Jan 26, 2011. 8:23 AM REPLY
well im sorry for being dyslexic
i already searched for "ftdi programmer"
and i was flooded with information but not much off it was relevant
im going to buy a audrino board with removable chip and use the board to program it
thanks anyway!

blister75 says: Nov 3, 2010. 2:22 PM REPLY


the best place i have found to purchase a ftdi cable/board is Sparkfun.com.

pcmofo says: Oct 8, 2010. 6:09 AM REPLY


Please tell me your taking "English" as one of tour college courses.

joshnosh says: Oct 9, 2010. 3:16 AM REPLY


if your not going to help why even comment?
there is a "be nice" policy remeber

stef757 says: Jan 23, 2011. 10:41 AM REPLY


What are the possibilities of somebody being able to hack their way into a device like this? how secure is rfid?

pcmofo says: Jan 23, 2011. 1:05 PM REPLY


Please read the project again. This has been discussed in the comments multiple times. This is no more secure than a regular lock, if you want security
dont use RFID.

Instructables-guru says: Jan 16, 2011. 9:03 AM REPLY


So, if anyone rips off that box on the outside, they won't be able to get in, but neither will you, exept trough another door. maybe you could do something
about that. but that's just a detail.

Great work, and maybe I'll use it one day

robotmaker123 says: Jan 12, 2011. 4:26 AM REPLY


pcmofo, does the door strike when locked magnetically hold the piece of metal that goes in the door frame yes i know that there is a metal thingy that holds it
in place when locked with a piece of metal on a axis that locks please reply!!!

pcmofo says: Jan 12, 2011. 7:44 AM REPLY


The strike you connect to the arduino can vary. So buy whatever one works for you. The one I use has a solonid that moves a small bar that allows the
latch to move or not move.

dijjital says: Dec 20, 2010. 1:54 PM REPLY


I have my hardware all built with the supplied v.2 code on the chip. I'm wondering how to set the master cards initially, how do I tell my arduino that I want a
particular card to be the master write card and another to be the master erase card?

Thanks
Robb

pcmofo says: Dec 21, 2010. 6:59 AM REPLY


I think I left some comments in there to display the ID of each card out to the serial port as it is read in.... Pick a card to be the master, read it, copy and
paste the ID into the code, load the updated code and it should work fine.

randomkid88 says: Nov 14, 2010. 2:17 PM REPLY


Where did you get/make the programming interface? I can't find one to save my life.

pcmofo says: Nov 15, 2010. 10:44 AM REPLY


Everything you need is at Sparkfun.com If you are not familiar with a programmer and arduino being separated then you should start with a Arduino Uno
which is USB plug and play.

Stereosage says: Nov 9, 2010. 2:19 PM REPLY


In terms of operation, could this be adapted for multiple users, even as many as for an apartment building? If so, you would have to be able to cancel the
permission in a case where a tag/card was lost and had to be replaced. It this possible?

Great project!

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
brent_750 says: Nov 7, 2010. 1:41 AM REPLY
Hello, I wanted to tell you how much I enjoyed your instructable over the RFID door lock. I ordered the parts and am a little worried though about not knowing
how to hook it up. I am a computer science major but have always programmed and have never actually assembled electronics.

One idea that I was had for it was to give the Arduino the ability to connect to wireless network in my house so it could access the internet and from there
allow it to somehow host it's own webpage or gather it's settings (such as valid RFIDs) from an external webpage that way RFIDs can be added/removed or
enabled/disabled from an external site. Like I said I know nothing about electronics but from what I had been reading I was thinking that this may be possible
using an Arduino WiShield 2.0. I didn't know how one would go about hooking that into your PCB though.

Another though I was having was that it would be nice to be able to set up a schedule allowing certain cards to only work during certain hours and be able to
change that from the webpage.

I'm pretty sure I could code the webpage pretty easily and I might even be able to code the schedule with a little work. The part that I'm stumped on for now
is how to get it connected to the internet and make it communicate with the web page. I guess I could have the webpage store it's settings in a text file on the
server and have the Arduino parse settings from the text file but it's still that initial wiring of the WiShield 2.0 to your board and programming it to work that's
got me stumped for the time being.

I would love to hear your thoughts on the matter.

Thanks

xillwillx says: Sep 3, 2010. 7:01 PM REPLY


My local Radio Shack only had the TIP31 not 31A looking at a datasheet the The collector-base and collector-emitter voltage value is 80 instead of 100.
Would it make alot of difference if I used it?

MrkTrussell says: Nov 4, 2010. 10:33 AM REPLY


Use a 2N3904.

aarnis says: Oct 28, 2010. 6:30 AM REPLY


I get card id: 40 00 86 CA FD. But when i try upload code with id code, it says error:

sketch_oct28a.cpp: In function 'boolean isMaster(byte*)':


sketch_oct28a:357: error: expected ',' or ';' before numeric constant

Can you help me, thanks.

pcmofo says: Oct 28, 2010. 8:10 AM REPLY


Sounds like you are missing a ; somewhere or have something not formatted correctly.

chieffancypants says: Oct 26, 2010. 9:49 PM REPLY


Why is readCard / storedCard 6 bytes, when according to the datasheet, it only needs 5. 4 bytes used for the ID, and one byte for the checksum.

Thanks! Great post!

aarnis says: Oct 17, 2010. 7:24 AM REPLY


Hi

can i use this http://cgi.ebay.com/Electric-Strike-Lock-wood-Metal-Door-Fail-Secure-NO-/160448507525?pt=LH_DefaultDomain_0&hash=item255b79ee85


lock instead of this http://cgi.ebay.com/Door-Fail-Secure-access-control-Electric-Strike-v5-
NO_W0QQitemZ350230332833QQcmdZViewItemQQptZLH_DefaultDomain_0?hash=item518b5ac5a1#ht_3787wt_1167

thanks for help.

pcmofo says: Oct 17, 2010. 1:35 PM REPLY


That should work fine.

Scythium says: Oct 15, 2010. 3:05 AM REPLY


Where did you get the 12V DC Breadboard Power Supply?

pcmofo says: Oct 15, 2010. 10:22 AM REPLY


Not sure what you are asking for here.

If you are looking to go from AC to 12v DC then you just need a standard wall wart adaptor thats 12v DC. Like this one.

http://www.sparkfun.com/commerce/product_info.php?products_id=9442

But many times you can find one of these on an old piece of electronics for free.

On my bread board I step down the 12v to 5v using a bread board power supply. This plugs right into the bread board to make things easier but still
requires the 12v adaptor mentioned above.

http://www.instructables.com/id/Arduino-RFID-Door-Lock/
http://www.adafruit.com/index.php?main_page=product_info&cPath=38&products_id=184

http://www.sparkfun.com/commerce/product_info.php?products_id=9319

SailHammer says: Sep 26, 2010. 7:56 PM REPLY


This project sounds really cool, but I'm a little lost (and totally new to RFID DIYs). If I order all the parts, how do I know where to plug them in? Also, does the
Arduino come pre-loaded with software? If not, how do I load your custom software on there? Thanks for your time and help.

bl3nd3r says: Nov 19, 2009. 11:58 AM REPLY


Great tutorial and implementation!

If you have an arduino already, would it be possible to program the chip (ATMega168) and then put it onto the custom board? Would this save you from
needing an external USB->Serial FDIT programmer?

Thanks.

pcmofo says: Nov 19, 2009. 12:23 PM REPLY


Yes you could do this. You still need all the parts listed in the pictures but the programing could be done with a working arduino of the same type with a
removable chip.

view all 224 comments

http://www.instructables.com/id/Arduino-RFID-Door-Lock/

You might also like