Changeable 4-Digit Combination Safe With Arduino and Multivibrator

by NChaudry06 in Circuits > Arduino

191 Views, 1 Favorites, 0 Comments

Changeable 4-Digit Combination Safe With Arduino and Multivibrator

61Z22HYHcSL._AC_UF894,1000_QL80_.jpg

This guide will walk you through the process of creating a DIY safe powered by Arduino, featuring a multivibrator changeable 4-digit combination. In simpler terms, you’ll be building a fully operational safe that uses a customizable password or combination for access. The safe utilizes a series of multivibrator circuits to generate the 4-digit combination. It includes an input panel for entering the combination, a magnetic switch for open/closed detection, and several other features. Let’s dive in!

Supplies

Required Components:

Other Items:

  • Cardboard box
  • Popsicle sticks
  • Hot glue gun & hot glue sticks
  • Tape
  • Drill and/or scissors

Wiring 2x NE555 Timers

IMG_0327.jpg

Materials Required:

  • 2x NE555 timers
  • 2x 0.1uf capacitor
  • 2x LED
  • 4x pushbuttons
  • 2x 560 ohm resistors
  • 4x 10k ohm resistors
  • 1x breadboard


In this step, you will wire the first two digits of your combination using bistable mode NE555 timer circuits. These timers act as flip-flop circuits, and you will create two circuits for the first two digits on the main breadboard.

Detailed Steps:

  1. Connect NE555 timers following the provided diagram.
  2. Set up pushbuttons and resistors to control the timers.
  3. Repeat the process for the second NE555 timer.


Wiring Gated SR Latch

IMG_0328.jpg

Materials Required:

  • 1x AND gate
  • 1x NOR gate
  • 2x LED
  • 3x pushbuttons
  • 2x 560 ohm resistors
  • 3x 10k ohm resistors
  • Components from the previous step


Here, you'll wire the next two digits of the combination using a gated SR latch, adding a third input for enable to avoid an "illegal" state. This latch functions similarly to the bistable mode NE555 timers.

Detailed Steps:

  1. Connect AND and NOR gates as indicated in the diagram.
  2. Configure pushbuttons and resistors to control the latch.


Wiring Dip Switch & RGB LED

IMG_0329.jpg

Materials Required:

  • 1x RGB LED
  • 4x 10k ohm resistors
  • 1x 560 ohm resistor
  • 1x Dip Switch
  • 1x Mini breadboard
  • Components from the previous steps


This step involves wiring the dip switch for entering the combination and the RGB LED to indicate the safe's status. These components will be placed on a mini breadboard outside the box.

Detailed Steps:

  1. Connect the dip switch and RGB LED to the mini breadboard.
  2. Use resistors to link the dip switch to power and ground.


Wiring Magnetic Switch & Servo Motor

IMG_0330.jpg

Materials Required:

  • 1x 10k ohm resistor
  • 1x Magnetic switch
  • 1x Mini breadboard
  • 1x Servo Motor
  • Components from the previous steps


Here, you'll wire the servo motor, which controls the locking mechanism, and the magnetic switch for detecting the box's open/closed state.

Detailed Steps:

  1. Connect the servo motor and magnetic switch to a mini breadboard.
  2. Use a resistor for the magnetic switch's connection.


Connecting Breadboards to Arduino

Materials Required:

  • 1x Arduino
  • 1x Cardboard/wooden box
  • Popsicle sticks
  • Hot glue gun & hot glue sticks
  • Tape
  • Drill and/or scissors
  • Components from the previous steps


Connect all the breadboards to the Arduino, integrating the circuits into the box. Ensure proper connections for the RGB LED, multivibrator circuits, magnetic switch, and servo motor.

Detailed Steps:

  1. Connect the dip switch and RGB LED to Arduino pins.
  2. Connect bistable mode NE555 timer circuits to digital pins.
  3. Connect the gated SR latch and magnetic switch to digital pins.
  4. Connect the servo motor to a digital pin.

Building Locking Mechanism

Materials Required:

  • Popsicle sticks/thin plywood
  • Wooden dowels (3 different sizes)
  • Hot Glue gun & hot glue sticks
  • Drill or scissors
  • Components from the previous steps


Construct the locking mechanism controlled by the servo motor. This involves gluing popsicle sticks or thin plywood inside the box to create a sliding dowel system.

Detailed Steps:

  1. Attach a piece of wood inside the box as a guide.
  2. Glue the servo motor and dowel system in place.


Building Input Panel

Materials Required:

  • Popsicle sticks/thin plywood
  • Hot Glue gun & hot glue sticks
  • Drill or scissors
  • Components from the previous steps


Create a cover for the mini breadboard outside the box, housing the dip switch and RGB LED. This adds a protective layer and improves aesthetics.

Detailed Steps:

  1. Glue popsicle sticks to form a rectangle.
  2. Attach the cover to the front of the box using dowels.

Writing Code

Materials Required:

  • Computer with Arduino IDE installed
  • USB cable for connecting Arduino to the computer


Download or copy the provided Arduino code to control the safe. The code initializes variables, sets pins, and includes a startup sequence. It continuously checks the combination and unlocks the safe when the correct code is entered.

Be sure to download the servo library that is linked here and include it in your code


Finished

Materials Required:

  • A sense of accomplishment!


Congratulations on completing your DIY safe! Follow the provided steps to keep your valuables secure and have fun with your unique project. Make sure to share this with your friends!