3D Printed Safebox With Arduino Nano V2

by DragosC13 in Circuits > Arduino

714 Views, 14 Favorites, 0 Comments

3D Printed Safebox With Arduino Nano V2

IMG_0815.jpg
IMG_0817.jpg
IMG_0820.jpg
IMG_0822.jpg
IMG_0828.jpg

The original model I got my inspiration from is a laser cut wood model listed on this page: https://www.instructables.com/Crack-the-Code-Game-Arduino-Based-Puzzle-Box/


This is an updated version to my previously posted “Safebox with Arduino”. I have added a removable battery, and fixed and reinforced some of the wall.

All the components are placed behiding the cover, except for the on/off switch and batter that are on the wall behind.

The safebox is operated using the front wheel, which controlls a rotary encoder. Rotate the wheel to the left or right to chose each of the 4 PIN digits. If the correct PIN code is to open the door. Turn the wheel left for the digit to go down, turn it to the right for the digit to go up. When the PIN code is input, press in the wheel. If the pin code is correct the door will open and the leds will turn green and “UNLOCKED" is displayed on the screen.

When the safebox is open you can lock the door or change the pin by turning the wheel to the left or right. By pressing in the wheel when the display shows “LOCK” you can lock the door and the LEDs turn red.

All the controls are done with an Arduino Nano.


Supplies

All 3D printed parts can be found here: https://makerworld.com/en/models/1073650#profileId-1064045


Tools:

  1. 3D printer
  2. Soldering iron + solder
  3. Flush cutters/Wire cutters
  4. Wire strippers
  5. Screwdriver
  6. Hot glue gun (not mandatory)


Materials:

  1. PLA filament (Two colours)
  2. Primary Colour: Bambu PLA Basic Blue Gray
  3. Secondary Colour: Bambu PLA Matte Ice Blue


Additional suppplies necessary:

  1. Arduino Uno (or anything similar)
  2. I2C OLED Display – AZDelivery 0,96 In OLED Display I2C SSD1306 Chip 128 x 64 Pixels
  3. Pushbutton Encoder – AZDelivery KY-040 Angle Rotary Encoder Module
  4. 4 x 5mm Red LEDs
  5. 4 x 5mm Green LEDs
  6. 8 x 220Ω Resistors
  7. Micro Servo – Miuzei SG 9G Micro Servo Motor
  8. Power Switch diameter 12mm

Print the Parts

IMG_0812.jpg
IMG_0813.jpg
IMG_0818.jpg

The first step is to print all the parts.


You can find all the print files for free on Makerworld.

Connect All Pins and Components

IMG_0807.jpg

This image is very cluttered, and visibility is pretty reduced, so I can list here which pins connect to what.


There are several components that need a positive and negative, so I connect all components ground together. I did the same for the positive.


The battery positive goes to VIN on the Arduino board, and the negative to the ground pin.

The rotary encoder connects to pins D2 (CLK) D3 (DT) and D4 (SW)

The red leds are controlled with pins D6, D8, D10, D12, and the green ones with pins D5, D7, D9, D11.

The servo motor is controlled with pin D13.

The display conencts to pins A5 and A4.


Programming the Arduino

The code uses the libraries SPI for the display, wire, servo for controlling the motor, and EEPROM for storing the PIN code.