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.
Remove these ads by
Signing UpStep 1: Parts Needed
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)










































Visit Our Store »
Go Pro Today »




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.
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.
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.
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.
This is nice if you lose power or something goes wrong with the lock. In my garage I also use it to unlock the door if I keep going in and out.
You can also get other types of door handles. They have some just for apartment buildings that can be locked from the outside but the inside can simply twist to open the door and it will remain locked. This lets you leave without using RFID or unlocking the door.
If you want RFID only you can use a different type of door knob or use an electric deadbolt etc.
Have a look at different concept of door security system with image capturing
Thank You for the instructable.
Thanks for the guide :)
SO,
The only problem I am having trouble understanding is what I need to program the chip?
Can anyone give me links or suggestions as to where I can find a programmer/chip that will work with the provided code (Not really interested in typing own code even though I probably could).
I am an electrical engineer at school and this is my first project on my own. I am open to stand alone chips or a arduino board with the programmer built in.
Any help at all would be appreciated, thanks!
I cannot buy the ATmega168 because it is outdated but there is a ATmega328 will thiswork?
Also if the power is turned off will it have memory loss or not
Thank You
change #include to this
#include
its the first line of the code
#include alligator eats EEPROM.h alligator leaves
alligator eats is <
alligator leaves is >
Many thanks!
Russ
For the FTDI Programmer, do I need a 3.3v o 5v? I have bought the ATmega328 as this is newer than the 168 which appears to be outdated now. Is this correct/still compatible?
Ftdi choices (i hope its one of these :)
3.3v - http://uk.rs-online.com/web/p/communication/0429307/
5v - http://uk.rs-online.com/web/p/communication/6877770/
The are many other choices on the site, what are the differences???
http://uk.rs-online.com/web/c/?searchTerm=Usb+to+ttl&sort-by=P_breakPrice1&sort-order=asc&view-type=List&sort-option=Price
P.s. im UK based in case of tips for other shops.
Thanks,
Russell
Sorry for all the questions, but i want o go out and buy these today so I can start on the project tonight.
Thanks in advance!
Russell
Thnx for your effort
Faceuino team
I am doing this for a college project and have never used arduino before we are building it to interface it with computer help would really be appreciated is there part of the code i am missing?
#include // Needed to write to EEPROM storage
this .
Now look like this.
#include // Needed to write to EEPROM storage.
Sorry for my english.
Also I hope you have this hooked up to back up power!
many thanks
Jamie!
Regards
Mikkel
thanks