RFID Door Lock
Project Background

My college junior-year roommates were Electrical and Civil Engineering students. Consequently, the three of us often searched for ways to make life easier in the apartment, or simply more enjoyable. Our most successful project required both mechanical and electrical components. We had all seen online DIY articles with instructions to create an RFID card reader paired with motors or servos capable of locking and unlocking doors, which inspired us to design our own electronic lock for our apartment’s sliding glass door.

The EE got to work programming an Arduino to recognize an RFID code using the motor to actuate the lock, the reader and RFID keys that I had on hand. Meanwhile, I created a new set of parts in Creo Parametric to act as a housing for the electronics using dimensions that we pulled from our door handle using calipers. We were successfully able to combine our electrical and mechanical education to produce a working electromechanical lock, allowing us to walk in and out of our apartment with ease at low risk for the following year.

Detailed Description

First, I modeled a frame to hold the RFID chip, Arduino, motor controller and the motor from an Arduino kit. I ended up making two versions of the model after running my first design past my roommates and hearing their suggestions for improvements, and once I had actual measurements determining where the motor needed to be located. I then modeled the small piece that would interface between the motor head and the lock on the door. We submitted my designs to the engineering department at the University, and for a small fee they FDM 3D-printed our designs. I mounted the components onto the newly printed frame and we soldered wires between each component and the Arduino, then pulled off the door handle to attach our new mechanism to the door.

We realized that our design had a few flaws right off the bat. The shape of the frame allowed it to fit under the handle like we wanted, but there was no good way to mount it to the door. We tried 3M adhesive tape, combinations of window suction cups, and duct tape, none of which worked well. We were also missing desirable fasteners for mounting the motor which we substituted with wood screws, since that was all that we had readily available. Certain aspects of the printed part didn’t allow it to line up well with the lock, so we reheated the plastic and formed it the way that we had intended for it to be shaped with the motor centered over the lock.

We had some success with this version for a while, but the code would often repeatedly attempt an open or a close action after one had already been performed instead of toggling between the two. Also, having no idea of the position of the motor, the Arduino would make a weak attempt at moving the motor and then stop even if the action had failed. We remodeled the program and frame to improve ease of assembly, provide stronger mounting methods, and to utilize a metal gear servo in place of the motor. Once printed, this model was far easier to mount as I incorporated the door handle into the shape of the frame. We wanted the unit to be mounted to the door handle entirely, sandwiched between the backside of the hand grip and the window, so I added flanges to be installed on either side of the handle to which a sheet of plastic could be applied, which would wrap around the handle and pull the frame flush against it.

After tightening them together and positioning the servo properly over the lock, we heat-shrunk the plastic to make the connection more rigid and permanent. This design required that the lock head itself, which was large compared to the servo, be removed entirely, and to replace it we interfaced the servo to a plastic printed piece that we designed to fit snug over the keyed lock shaft. The plastic interface piece was designed with a hole through its center to allow the original tightening screw, used to hold the original lock head on, pulling it into place.

The extension USB cables that we used to power the unit were so long that the power draw was significantly limited by the resistance of the wires. The solution to this was either to have a portable battery attached to the door, which we did for a while allowing us to shorten the cables, or to use cables with thicker wires, which we eventually acquired. Once the unit had a consistent supply of power, it operated as our RFID door lock for the remainder of the year which saved lots of time.

Being on the ground floor with our own walk-in patio, it was much simpler for us to walk through that door to leave or enter the building, which we did multiple times per day, than to use two keys to unlock the building door and to lock and unlock our own door by hand. This was one of my first truly educational introductions to the applications of Arduino and microcontrollers in general, and I carried on what I learned from the code we used into future Arduino projects, especially my clock and two-axis linear stage mechatronics class project.

  • LinkedIn
  • YouTube
  • Facebook