Prologue: Why Did I Do This to Myself

For some background, the lock on my door was an absolute pain to operate properly, and I often found myself struggling outside my door for a good five to ten seconds before being able to push through into my door. So I set out to create a way to unlock the door without all the hassle.

Chapter 1: Where the Story Should Have Ended

I had been working on a school project involving radio frequency (RF) card readers, so that made its way into my plan. Now that I had some form of secure trigger, I needed a way to actually open the door. Now, if the door were mine and I could modify it however I pleased, I would definitely have opted for a solenoid of some sort to add above the deadbolt. However, that was not the case, and I had to find a less invasive method. This proved to be very difficult actually. I took inspiration from other similar projects online, and decided to use a motor attached under the handle by a string (in this case a shoelace):

one of my earliest iterations
one of my earliest iterations

I obtained a stepper motor shield for my Arduino Uno from a friend, and then it was just a matter of connecting wires for my first prototype to work. I did document this prototype, but my phone got bricked and I lost pretty much all of my data from the past year. Oh well. I did document the next prototype and they’re functionally equivalent, just imagine I used the above parts and you’ll get the idea.

I honestly could have stopped here, as the mechanism was working as intended, but I was displeased with the size, and the prototyping wires sticking out all over the place made it look chaotic and unprofessional. So I decided to go down the rabbit hole.

Chapter 2: This Should Be Fine…

In the following prototype, I replace the motor shield with a TB6612 from Adafruit. Also, I have no heat shrink so I’m using electrical tape to wrap my bare wires.

Prototype #2

This is the first display of its function, so let me explain. The bit of red PCB on the black component is the actual RFID reader, the ID-20LA from Sparkfun, which was the longest range reader I could find for relatively cheap (I don’t know if it’s just my poor search engine skills but everything I found with a read range of more than a few inches costs well into the $100 range). That sends read data along a serial channel to the Arduino, which checks whether the code matches the code it knows (my keyfob’s RFID), and if it checks out it turns the stepper motor. Boom. Simple.

Looking back on it now this is actually still pretty clean. There were still a few problems though:

  • the battery box (the large black container to the right of the reader). It takes something like 8 AA batteries and provides a 12V output, but I didn’t like the idea of replacing batteries
  • The Arduino Uno. First of all, it’s pretty big, and also it feels like a waste to sacrifice it for a project that only uses 5 I/O pins (these boards are super expensive)
  • The breadboard. Like the Uno, it’s meant for prototyping, not for use in final products. I mean, I’m not using even half of the real estate on it, and I could just as easily remove it and solder the wires directly onto the driver board’s pins.

Chapter 3: Oh God Make it Stop

My next course of action then was to replace the Uno with an Arduino Nano, sourced on eBay. This was the start of many problems, most of them due to my ineptitude with electronics. I booted the code from the Uno onto the Nano. Scanning the fob triggered the unlock sequence, starting the motor, but before the handle was pulled all the way, the motor releases, snapping the handle back. Turns out that the Nano was suffering a brownout each time the motor came under too much load.

What did Jason do in this time of duress? Find out next time (because I have two other posts queued up and I haven’t uploaded in a while).