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!

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

READ  Make your own 1x1 22 IO pin Ardunio Compatible

Updated video of the final system installed and working.

Step 1: Parts Needed

Here are a list of parts and links to 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 RFID Door Lock

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


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)

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.

READ  How to control LED's with Processing and Arduino

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.

Controller_PCB.pdf(612×792) 12 KB

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.
Schematic Arduino RFID Door Lock
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.

READ  Yet Another Arduino 110v Power Controller

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.

reader_PCB.pdf(612×792) 8 KB


For more detail: Arduino RFID Door Lock

This Post / Project can also be found using search terms:

  • arduino door lock
  • rfid door lock arduino
  • 125khz rfid reader arduino
  • arduino unlock door rfid

Leave a Comment

= 5 + 9

(Spamcheck Enabled)

Read previous post:
Arduino Wireless Altoids Display
Wireless Altoids Display using an Arduino

This Instructable will show you how to modify an Altoids tin for a wireless 2x16 character display. Using an Altoids...

Scroll to top