This is a step by step procedure to create a lockbox with arduino. The arduino stores a modifiable password and when it is inputted will rotate the servo mechanism.
Things you will need:
Arduino Mega 2560 (or uno)
Membrane Switch Module (keypad)
Extended Power Cable
M-M wires (Male to Male jumper wires)
Box of your choosing
Wire Plug for Power Cord
Drill & Various Bit sizes
Step 1: Cut the Box, Position Lock Bracket
Cut a hole in the center of the top of the box. Position the lock bracket on the inside near the lip of the bottom portion (shown in picture).
Step 2: Connect the Components
The diagram included is how to connect the keypad and servo to the arduino. The pin order for the keypad from right to left is (2,3,4,5,9,6,7,8). The servo takes three inputs. For this particular one the red wire is power, connect to 5V, brown is ground, and yellow is the input, connect to pin 11. Make sure you check your servo for exact pin layout. Its easier to feed the keypad through the hole in the box before connecting it the the arduino. Once the keypad is through the hole, peel the adhesive sticker off of the keypad and place it in desired position.
Step 3: Feed the Power Cord
Drill a hole in the back of the box. Feed enough cord to the inside before putting the plug in place so that you can open the box without pulling on the arduino. Place wire plug over cord and push it into the hole.
Step 4: Fasten Components
I decided to fasten all the components in the lid to allow for maximum space in the box. Place the arduino in the corner of the box and fasten with screws. Make sure you are not tightening the screws to an appropriate tightness as to not damage the board. Fasten the servo to the lip of the box as shown, or some have tiny holes for screws, I found this was the easiest and most secure way. The wires can be taped or held in place by any method you choose. Connect to power.
Step 5: Code
This is the code necessary to operate the lockbox.
We have a be nice policy.
Please be positive and constructive.