Living in the age of affordable microcontrollers and dirt-cheap single board computers is a wonderful thing, but sometimes writing all of that complex code can be tiresome. Once in a while it’s nice to drop the software side and explore what can be done with simple logic chips, and this custom combination electronic safe project will do just that. In this project we’ll use comparators, AND gates, simple woodworking skills, and hardware-store cleverness to create a three-dial safe that can only be opened with your secret combination.
Before we get into the actual construction of the device, it’s a good idea to walk through the components and basic design of the circuit.
Comparators are devices that compare an input voltage with a reference voltage, and change their output voltage if the input is higher than the reference. In our circuit, we’ll be using multiple comparators in an arrangement that’s called a window comparator.
Window comparators are used to compare an input voltage with two different reference voltages, and change its output if the input is between the reference voltages. In essence, the two reference voltages create a “voltage window,” and the window comparator tells us if the input is within that window.
For this project, the input voltage for the window comparator will come from a variable voltage divider that is controlled by the dial on the front of the safe. Our reference voltages will come from two additional variable voltage dividers that are inside the safe. Since the reference voltages can’t be changed without access to the inside of the safe, they can be set to a “secret” voltage window that is based on a chosen dial position.
Since our safe will have three dials, we’ll need three window comparators, and a way to determine if all three of their outputs are HIGH. This is where our AND gates comes in.
An AND gate will only output a digital HIGH voltage if all of its input voltages are HIGH. Our circuit will feed the outputs of the window comparators into a chain of AND gates that will result in a single HIGH voltage only if all three of the window comparator outputs are HIGH. This resulting HIGH voltage will turn on a power transistor that controls a geared DC motor, which will unlock the door to the safe.
Our safe door lock mechanism starts with a cam on the shaft of a geared DC motor. When this cam rotates, a spring-loaded latch that rests on top of it will angle downward, releasing the latch from a catch hook on the inside of the safe door.
This complex project does require some experience with basic woodworking and simple electronics, but at the end you’ll have a custom-built, electro-mechanical project that you’ll be proud to put on your shelf.
NOTE: While it may go without saying, this project is not meant to safeguard valuable objects.