Intro: Wooden Safe
As a project at NBCC Moncton, I designed and built an arduino/genuino based wooden safe. It features a 3D printed locking mechanism of my own design, a touch sensor to simulate a fingerprint scanner (as I am cheap), and a nice velvet liner to keep your goodies safe.
Step 1: The Code
The code is very simple and brutish in its approach. I have two main areas of interest set, the dials, which are the integers imputed when locked, and the combo, which is the actual combination that can be set when unlocked. When the box is locked, the program checks and sees if the adjustable dials match the now locked in combination, and upon matching unlocks the box by rotating the servo motor 45°, and displaying a welcome message on the LCD. All dial integers are then set to 1 throughout, and the ability to change the combination allowed.
The separation of adjusting the combo and adjusting the dial are very brutish as mentioned before. It is done by a long if, which in combo, compares it to 45°(unlocked), and when in dial, compares it to 0-12°(locked, depending on range of servo motor). Other comparisons it makes when adjusting is the switchstate, cursPos on the LCD screen, and the sensorState (for the touch sensor). Lastly, the touch sensor is set so that it must be HIGH in order to adjust the dials/combo.
The code is attached
Step 2: The Parts and Components
Apart from the 3D printed mechanism, all parts are relatively cheap and are included with the Arduino/Genuino starter kit, with exception of the Touch Sensor and four press buttons. The Touch sensor and press buttons can be purchased on amazon in the Kuman Project Super Starter Kit (http://a.co/1RgE6sd).
Additional parts are:
The following parts are required to build this device:
· 1x Arduino/Genuino Uno board
· 1x Alphanumeric LCD (16x2 characters)
· 5x Pushbuttons
· 5x 10 kilohm Resistors
· 1x 10 kilohm Potentiometer
· 1x Small Servo Motor
· 1x 3D Printed Locking Mechanism
· 1x Solid Wooden Box
· 1x Touch sensor
· 1x Breadboard
· 1x 2.0 USB A-B Cord
· Sheet metal for servo bracket & guard
· 2.3mm screws, various lengths
· 2.3mm nuts (used to mount the LCD screen & touch sensor
· Various M-F, M-M wires
The locking mechanism was created using a Tinkerine Ditto Pro 3D printer, and designed on tinkerCAD. It features two beams, two brackets, two latches, and one wheel. The beams push and pull on the latches as the wheel turns, allowing similar rotations between the two. The brackets support the beams and ensures they don't pop off during motion. The latches, made in two slightly different methods(Top and Bottom pegs), rotate using the beams to grasp the nails. Lastly, the wheel attaches to a servo motor and uses its two pegs(top and bottom) to push and pull everything else. The 3D printed parts are displayed above.
Step 3: The Schematic
The wiring is as displayed in this multi sim schematic.
Step 4: The Build
Once everything is wired up and working, you can begin drilling holes into whatever container you create. I drilled multiple holes for the buttons, touch sensor, and one long row for the LCD screen. If you use the right size drill bits and don't want to solder, you can force the Female to Male wires in and the tension will hold the pieces in place, as I did with the LCDs' potentiometer.
Then the little additions can be completed.
Personally, I had a few mishaps where the wires would fall out of the bread board when the lid was closed, so I created, out of sheet metal, a guard plate that could be opened and closed and support the wires. I also made a mounting bracket for the servo motor out of sheet metal, as all my 3D printed attempts failed due to being too weak.
Lastly, to class things up, I added a nice "velvet" liner to keep my "gold" safe from being scratched on the wooden walls.
Step 5: The Final Product
Everything finished and looking good, with a little bit of wood stein on it, you can have your own wooden safe, to keep your valuables or delicious goodies out of reach.