Ditch your keys with our Deadbolt Hack Kit!
A convenient and impressive way to make an entranceBy Ryan Winters
Description: RFID Deadbolt Hack Kit
Assembly Time: 2+ hours
Skill Level: Intermediate
Wave your wand (or key fob) and your deadbolt opens like magic. Use your existing deadbolt and this kit, which combines a high-quality servo, a low-profile pushbutton switch, an RGB LED (for status indication), a serial RFID reader kit (with four unique tags), some resistors and transistors, a prototyping board (to assemble the circuit) and a Pro Mini microcontroller (to tell everything what to do) and you'll be the envy of the neighborhood in no time.
There is also a 6VDC slim power adapter (to power the circuit) and Jameco's moldable plastic, ProtoDough (to make the custom bracket that will connect to your deadbolt pin to the servo).
The deadbolt is not included and it's important to note that you should make sure you are able to modify your deadbolt setup to work with the servo. The project box will fit the serial RFID reader module and servo as long as the knob that actuates the deadbolt is decorative and can be removed. The example in the instructions had a plate that held the lock in place and a flat pin that was easily accessible. Find sample sketches to download in the "Additional Files" archive.
USB/FTDI adapter to program the Pro Mini
Soldering iron & solder
Hot water for molding the ProtoDough (+136°F)
Ceramic or metal bowl for melting/mixing ProtoDough
1/2" OD tubing or similar (to make cylinder of ProtoDough to mold the lock pin)
Hook-up wire (to reach from the power adapter to the project box)
Drill and drill bits (1/4" and 5/8" bit or a little bigger and 2" hole saw)
You will also need to make sure your deadbolt setup can be modified.
Parts you will need:
|Part Description||Manufacturer Part No.|
|1.6" x 2.7" prototying board||G/S(PCB228)-R|
|Carbon black anti-vandal metal pushbutton switch||TEM12123B|
|Clear RGB LED - Common Anode||MSL-504RGB-4P+|
|Transistor, 2N2222A, TO-18||2N2222A|
|1/4 watt resistor, 10kΩ||CF1/4W103JRC|
|1/4 watt resistor, 1kΩ||CF1/4W102JRC|
|Single row 20-position male pin header (break apart what you need)||7000-1X20SG-R|
|Heavy-duty servo, HS-322HD||33322|
|ABS plastic project box, 6" x 3.5" x 1.87"||H2851-R|
|ProtoDough, 250g bag of moldable plastic||PROTO DOUGH-250G|
|DFRobot Pro Mini microcontroller, 5V||DFR0159|
|Circuit board mounting hardware kit||00106551|
|Serial RFID reader kit with 4 sample tags||32390|
|6VDC 500mA wall adapter with 2.1mm plug||MGT-6500SPS|
Step 1: Review Components, Schematic and DeadboltRead all instructions completely before starting and be sure to look at the deadbolt setup used in the example. This will give you an idea of the task at hand and how you may need to make tweaks to the steps to accommodate your lock setup. Notice the knob comes off after removing the screws, but the deadbolt is still securely fastened to the door. This setup is ideal since the plate can be removed and reinstalled to hold the project box firmly to the door with no additional hardware.
The RFID reader module can be press-fit in the bottom of the project box and should be biased to one side (top). The bottom half of the project box will be reserved for the deadbolt and servo assembly. A piece of 1/2" OD plastic tubing that fit around the lock-pin was used to mold the custom bracket.
Make sure you have all the components and review the schematic below.
Step 2: Assemble the CircuitTips:
Step 3: Mold the ProtoDoughCAUTION: You can be burned when using hot or boiling water to melt the ProtoDough. Use proper caution and utensils when handling the melted plastic. Metal utensils are a good option since the compound has the tendency to stick to plastic.
Bring water to a boil. Using a ceramic dish (avoid plastic) add a tablespoon or two of the ProtoDough to the water. The pellets will turn clear when they are moldable. Use a metal spoon and press the pellets in order to form a mass.
You will need to roll the ProtoDough (shape it like a snake) to make inserting it into the tube easier. It will stick in the tube right away, so make the inside is slightly wet (this will buy you some time). Fully pack the tube with ProtoDough and form a disc-like base perpendicular to the shaft.
Don't worry if you can't get all of the shaping done in one pass. You can reheat the water to make it pliable again until you achieve the desired shape. To speed up the hardening process put it in the refrigerator.
When forming the material inside the tube for the lock pin of the deadbolt, the ProtoDough in the tube needs to be moldable. While the ProtoDough is in the shaping state, push it onto the lock pin and slightly into the lock unit. Keep the base parallel to the door to allow the smoothest operation for the servo. The center of the servo horn will need to be on center with the deadbolt pin for it to work correctly. If it is off-center, the rotation will wave off balance.
The bracket can be removed once it has fully cooled. Use your key from the other side of the door to toggle the lock to mark center. A marker or dot sticker will help. When the dot doesn't change position while turning the lock, you've found center. You can use some of the screws included with the servo to mount it to the servo horn. Use clippers to cut excess screw so it doesn't interfere with the lock mechanism.
Step 4: Prepare the Enclosure
Step 5: Connect the Board
Step 6: Attach the Servo
Step 7: Attach the RFID
Step 8: Final Assembly
Upload SketchYou will need to make sure the RFID Reader is not connected to the circuit board, or at a minimum, the wire connection to D0 needs to be open. This must be done to ensure the code is successfully uploaded.
Use the MotorSetup sketch to set your servo motor to the center position (or whatever position you need). Use GetTags to find out the unique ID for your specific RFID tags. Record the value for use in the final sketch. RFID_Deadbolt_rev2 is the complete program. You will need to change the variables in the final sketch to match your RFID tags, motor lock and unlock positions (shown below, the highlighted part needs to be changed to your tag ID and motor positions).
Make sure your deadbolt is in the lock position when you upload the final code. It is best to upload the code and test the function before final attachment to the deadbolt. All sketches can be found in the "Additional Files" ZIP archive on the RFID Deadbolt Hack Kit Product Page.
20 int lock = 135; //servo position for locked (value from 0 to 180)
21 int unlock = 45; //servo position for unlocked (value from 0 to 180)
22 int pos = 135; //starting position, locked
23 boolean locked = false;
25 int val = 0;
26 char code;
27 int bytesread = 0;
28 char tag1 = "84003408F0"; // RFID Tag 1 (change to your tag number)
29 char tag2 = "70006F6E79"; // RFID Tag 2 (change to your tag number)
30 char tag3 = "360065DE91"; // RFID Tag 3 (keyfob)
The RFID Deadbolt Hack Kit is a fun and impressive way to show off your electronics skills. Whether you're carrying handfuls of groceries, escaping weather or impressing your neighbors, we bet you'll find keyless entry so convenient, you won't want to live without it.
Ryan Winters is a Product Manager at Jameco Electronics and a Bay Area, California native. He is mostly self-taught and his hobbies include working on cars and computers, fiddling with electronic gadgets and experimenting with robotics.