Inspired by the numerous door openers out there, I decided I’d give it a shot (ok, really, I was just looking for something to do with my spiffy Parallax RFID reader). At first I was hoping I could use the RFID tag that opens the entrances to my apartment building; however, those turned out to be on the 13.56MHz frequency for which there is very little hobby-level gear out there – certainly nothing in the price range that would be acceptable for a basic door opener. So I settled on using 125KHz and having to carry two tags on my keychain (or possibly a credit-card tag in my wallet).
Thinking this out from the beginning, there are several parts that make up this system:
1) Controller. I’ll be using the Arduino platform – quit moaning, I can hear you. Honestly, for something so simple (take serial characters from reader, activate servo), it’s not worth prototyping a little AVR board and programming through an FTDI cable. Plus the Arduino environment already has a Servo library and there is code written for the Parallax RFID module – if you’ve read the title of this blog, you might know why this appeals to me.
2) RFID reader. The Parallax module does all the work of generating a 125KHz signal and measuring the response, and converting that to a string of characters which it sends down by a serial connection. It requires a 5V supply which can be borrowed from the Arduino and there is a pin to enable the reader – HIGH is off, LOW is on. The state of the reader is reflected in the color of the LED; oddly, red is on/ready while green is disabled.
3) Servo. A standard, continuous rotation hobby servo will be used. Since the handle is rather hard to pull, I’ll want to use the maximum voltage the servo is rated for (6V) in order to get the most torque out of it. Another thing to keep in mind is that these servos can use a lot of current, especially when fighting against a load. A 1A power supply is probably recommended, although I wasn’t able to find anything other than rough estimates for the maximum current under load.
4) Door/Servo interface. For turning the handle of my door I’ve decided to mount a small spool on the continuous servo – it will spool up wire connected to the handle, pulling the handle down. The opening of the door is the aspect I’m most worried about – I’m no mechanical engineer and this method could fail depending on the amount of torque needed and how good my spool scheme is. A linear actuator might be called for but would probably be overkill.
So far I’ve hooked up the RFID reader and used the sample code to read the values off some tags. Only tags that have their unique code programmed into the Arduino will initiate a response. I’ve used the LED conveniently located on Pin 13 to signal that a valid code has been read by the unit (instead of, and eventually in addition to, activating the servo). Also, the enable pin on the reader will be brought HIGH to turn the LED on the unit green to give a visual response that the code has been identified.
My sample code uses Pin 12 to indicate denied tags – readings that have a valid 10-character RFID code but do not match the list of allowed codes. I doubt anyone else in the building has any 125KHz rfid tags and will be waving them around my door, but this will prevent all but the most dedicated of hackers from accessing our apartment, mainly because they would have to either try to brute-force crack the unique ID or be within inches of our keyrings to read the tags.
Right now I’m waiting on some drill bits and screws to attach the spool to the servo, a 6V supply for the servo, and an Arduino Pro to build into the device so I won’t have to permanently leave in my Duemilanove that I use for prototyping. I’m also thinking of adding a buzzer to indicate that the door is opening, or perhaps a dual-color LED inside of the peephole so you can see from the outside whether your tag has been accepted or not. Stay tuned.