Skip to main content

RFID door


--- A demo of how the RFID door mechanism works. Normally the RFID reader is facing outward so you can wave your ID on the outside of the door to unlock it.


Last semester I was lucky enough to get an order through during Sparkfun's Free Day - $100 of free electronics - awesome! Among the things I got for free was the ID-12 RFID reader, a cute little RFID module that outputs the tag ID over a 9600 baud serial line. Naturally I needed to put it to good use, so when I was bored one night (avoiding psets) I set out to make my door unlock/open via RFID.

The biggest obstacle was the mechanical actuation of unlocking the door. My door doesn't have a deadbolt, which means the knob itself has the locking mechanism built in. Ideally I would have installed an electric strike, but unfortunately the cutout in the steel door frame was too small to install one. I also briefly considered sticking some sort of motor inside the door frame that would push the latch open (since the interlock mechanism that normally prevents this wasn't working), but that would require too much torque in a small space to be practical.

Since I couldn't figure out a way to easily release the latch itself, I decided to go for the brute force approach instead - hook up a motor to turn the actual doorknob from the inside. At first this too seemed nearly impossible; there was no good way to mechanically grip the knob, and even if you could it still requires a huge amount of torque to rotate. Of course the obvious solution, as always, was duct tape! One of my friends pointed out that the knob only has to turn about 45 degrees, so I could just wrap duct tape around the knob giving me a kind of "rope" to pull.



Next I needed a high-torque motor to act as a winch and pull down on the duct tape "rope." Conveniently I had a bunch of LEGO left over from competing in MIT's 6.270 Autonomous Robot Design Competition, so I made a nice gearbox out of lego and attached this to the duct tape. The gearbox let me use a cheap high-rpm DC motor to power the "winch" instead of having to buy an expensive high-torque motor. I mounted the gearbox/winch to the door with 3 strips of Command adhesive (one of the greatest inventions ever), which theoretically provide ~9lb of holding force.



This design also had the nice feature that the knob is still fully functional even if everything fails, so it's impossible to get trapped in my room :)


To control the motor, I hooked up an ATMega328 (Arduino) with a TA7291P motor driver. However, I needed a way for the Arduino to know how far to turn the knob and how far to turn it back afterward. I added a simple microswitch to the gearbox that could count revolutions (see picture above). The Arduino just has to turn on the motor and wait for a certain number of revolution "clicks" in order to turn the perfect amount every time. This worked great, but since I planned to use this door opener every day, I made sure to design for failure. I programmed a timeout in case something failed and the switch wasn't activated, which would leave the motor forever trying to turn the knob and eventually burn it out or blow out some other component. As it turned out, this was absolutely necessary, since the LEGO gearbox tended to jam up over time (the gears would "wander" back and forth on the axle).

Next I hooked up the ID-12 RFID reader. This was extremely simple since the package just needs 5V and ground and outputs TTL serial. Instead of hooking the serial output directly to the Arduino, I decided to feed it to my room automation server for authentication. When you swipe an ID card, the tag ID goes to the computer for verification, and if it passes the computer sends a signal to the Arduino telling it to unlock the door. This made it easier for me to update access-control since I didn't need to reprogram the Arduino all the time, and it allowed me to integrate it into my room automation system and provide a web interface so I can unlock my door from anywhere (in case I need to let someone in when I'm not around).


--- The electronics - main components: ATMega328 microcontroller, FTDI USB serial interface, TA7291P motor driver, and ID-12 RFID reader.

It's amazing how productive you can be in one night if you really don't want to do school work :)

Comments

Popular posts from this blog

OpenSCAD Rendering Tricks, Part 3: Web viewer

This is my sixth post in a series about the  open source split-flap display  I’ve been designing in my free time. Check out a  video of the prototype . Posts in the series: Scripting KiCad Pcbnew exports Automated KiCad, OpenSCAD rendering using Travis CI Using UI automation to export KiCad schematics OpenSCAD Rendering Tricks, Part 1: Animated GIF OpenSCAD Rendering Tricks, Part 2: Laser Cutting OpenSCAD Rendering Tricks, Part 3: Web viewer One of my goals when building the split-flap display was to make sure it was easy to visualize the end product and look at the design in detail without having to download the full source or install any programs. It’s hard to get excited about a project you find online if you need to invest time and effort before you even know how it works or what it looks like. I’ve previously blogged about automatically exporting the schematics, PCB layout , and even an animated gif of the 3D model to make it easier to understand the proj...

OpenSCAD Rendering Tricks, Part 1: Animated GIF

This is my fourth post in a series about the open source split-flap display I’ve been designing in my free time. Check out a video of the prototype . Posts in the series: Scripting KiCad Pcbnew exports Automated KiCad, OpenSCAD rendering using Travis CI Using UI automation to export KiCad schematics OpenSCAD Rendering Tricks, Part 1: Animated GIF OpenSCAD Rendering Tricks, Part 2: Laser Cutting OpenSCAD Rendering Tricks, Part 3: Web viewer Early when designing the split flap 3D model using OpenSCAD I wanted to include a visualization in the project’s README so others could see what it looked like. It’s possible to capture an image manually (File→Export→Export as Image), but that’s an extra thing to remember to do after every change and it’s also not very consistent. The image that’s exported is basically a snapshot of the current preview window, so the image dimensions and camera angle would be different each time. Plus, a single static image doesn’t fully convey the 3D mo...

Scripting KiCad Pcbnew exports

This is my first post in a series about the  open source split-flap display  I’ve been designing in my free time. Check out a  video of the prototype . Posts in the series: Scripting KiCad Pcbnew exports Automated KiCad, OpenSCAD rendering using Travis CI Using UI automation to export KiCad schematics OpenSCAD Rendering Tricks, Part 1: Animated GIF OpenSCAD Rendering Tricks, Part 2: Laser Cutting OpenSCAD Rendering Tricks, Part 3: Web viewer For the past few months I’ve been designing an open source split-flap display in my free time — the kind of retro electromechanical display that used to be in airports and train stations before LEDs and LCDs took over and makes that distinctive “tick tick tick tick” sound as the letters and numbers flip into place. I designed the electronics in KiCad, and one of the things I wanted to do was include a nice picture of the current state of the custom PCB design in the project’s README file. Of course, I could generate a sn...