So, I decided to take my cheap Walmart keypad safe (~$50 IIRC), and convert it to HF RFID/NFC. I decided to do this as cheaply as possible, with the goal being to spend $0 on it if I could. I have a plethora of Arduino components from over the years, so I figured I could make it happen. This is why I chose the name, the all-compromises build. The opposite of a no-compromises build, I was willing to cut as many corners as necessary to get it working for “free”. My only goals were to have it work well enough to use daily or for demo use, as well as providing enough security to still use it as a dorm safe. If you were buying every component from China via eBay or Aliexpress (not counting the safe), it would cost less than $8-9 in total. Of course, you would already need to own a soldering iron.
I also had to do everything in a dorm room, so I was a bit limited on resources. Mainly, I was limited on tools (couldn’t use my hot air station, too much of a fire hazard). I got away with using my soldering iron by making a crappy solder fume extractor, via a T-shirt over the back of a large fan. I also only had one color of solid core wire, which made things much more annoying.
I ripped open the back, and found that the safe simply had a solenoid activated by the original microcontroller, which had a ribbon cable going through a small slot, connecting it to the keypad. The keypad was just held on with strong adhesive, and popped off rather easily by pushing through the ribbon cable slot.
I decided to go with a $2 chinese Arduino Uno with a PN532 as the core of the build, attaching it to the safe solenoid via an N-channel MOSFET that I harvested from a cheap USB rechargeable blender. I needed a way to drive the solenoid somehow, and the Uno itself couldn’t provide enough current (plus the solenoid wanted 6 volts). Since I couldn’t use my hot air reflow station and the back of the MOSFET was soldered on, I decided to just cut the blender board around it. I also added a 210 ohm resistor to the gate connection to stop it from drawing too much current from the Arduino.
Thankfully the battery holder for the safe has 4 AAs in series, and an Uno can handle 6V just fine.
The PN532 I got cheaply from eBay years ago, and it had been abused a lot at hackathons. The SCL pad was ripped right off, so I had to bypass the trace. This is why there’s a single wire in the center.
Here are some photos from the project, and a video of it in operation.
It’s hard to tell, but the PN532 actually sits nice and flush here. At some point I’ll probably print out a sticker or something to cover the reader, but I kind of like the barebones look. The reader is on the other side of the metal, with only a small slot to run wires through. Shouldn’t compromise security a ton, besides giving someone access to the I2C pins. Again, for a dorm safe, should be just fine.
This project had some of the worst soldering jobs I’ve ever done (all covered in electrical tape now though, no one can see…).
Here’s the poor remains of the blender that sacrificed its life for the safe. It was a pretty bad blender though, no real loss.
YouTube Video of unlocking it. I set it to lock after 3 seconds, plenty of time to open the door before it relocks.
Future goals:
-
Biggest one, replace the cruddy backup wafer lock on the front. That’s the biggest weakness right now, I’ve picked it myself pretty easily. The way it’s integrated into the safe should make it pretty easy to replace when I get around to it, though.
-
Potentially add an SD card to allow me to store and program UIDs without having to actually reprogram the Arduino itself.
-
Find some way to cover the front for looks and for making it slightly harder to actually access the wiring. Again, all you would have access to would be the I2C pins (along with voltage and ground) since the front panel is separated from the inside by a thick metal sheet, with only a small gap for wired. Still, I’m sure some people could open it that way if given enough time.
-
Next time I go home, maybe 3D print a better mount for the Uno . Currently just held with blue tac. I would do it now but I don’t have room in my dorm for my printer.
-
Figure out how bad the battery drain is. The safe now has 2 LEDs constantly on, one on the Arduino and one on the PN532 board. I imagine it’ll still last plenty of time.
Source code link:
GitHub project
The code is super simple, mostly just from examples in the Adafruit PN532 library. Still, figured it could help some people who don’t know where to start on their own project. It was written quickly, as I did the whole project in one evening. Yes, I changed the UIDs in the uploaded version to keep my hand UIDs secret. Eventually I’ll throw a simple wiring diagram on the same GitHub project.
Thanks for reading my long write-up, and apologies for any mistakes (it’s my first project write-up haha). Hopefully I didn’t forget any info