Thoughts and projects from Tyler "T.D." Smith, a Minnesota-based writer and software engineer.
Saturday, January 24, 2026
How to Build a Steel Puzzle Safe
Or, three different ways to destroy an Arduino.
My friend Ryan and I recently assembled a steel puzzle box styled to look like a Minecraft block of gold ore and protected by several layers of deception and protection. In this post I’ll describe the design and assembly process, as well as how we destroyed several Arduinos along the way.
If you don’t want to know how to solve this puzzle, STOP and don’t read this blog post.
Fig 1: The Puzzle Safe
Design
Our goal was to make a working (i.e. legitimately secure) safe that had an unexpected form of “password.” As the construction of the safe was to be sturdy, it was critical that we included backup mechanisms, especially early in the design process, to avoid locking ourselves out. We decided to use the physical orientation of the safe as the primary “password entry” mechanism, with a light sensor as a backup.
The largest square sections of scrap steel I could find at Coremark were about 10” on a side. I picked up several options at various thicknesses ranging from about ⅛” to 1/16”. I opted to use two thicker plates for the top and the bottom so that most welds would include a thick piece (and thus have a lower chance of accidentally cutting through the metal).
Fig 4: Design Notes for the External Chassis
I considered adding triangular braces to increase shear strength, but instead opted to get some thick L-shaped pieces. I assembled the frame using my Hobart MIG welder and (if I recall correctly) 0.30 feed steel wire.
I opted to weld the hinge into place, rather than attempting to find a way to bolt it on, as the latter would have required externally-visible screws or very thick sides.
Painting (Destroyed Arduinos: 0)
I applied a layer of gray primer and left it under a heat lamp for many hours to attempt to counteract the cold weather. Then I used templates to add gold and yellow paint to attempt to match the appearance of a gold ore block.
Fig 5: Gray Primer Applied
Fig 6: Painting Gold Ore with Stencils
Finally, I added a layer of spray-on urethane to seal the paint and resist scratches.
Electrical Design (Destroyed Arduinos: 1)
The Arduino Redboard can work on 5-12 volts. The solenoid lock can operate on approximately 9-12 volts. I first tried actuating the solenoid lock from a GPIO pin on the Arduino, but it did not have enough power. I attempted to use a single 9v battery to power both the Arduino and the solenoid lock. However, I forgot that when a solenoid changes state it can induce a large voltage spike. This happened, killing one of the Arduinos.
Fig 7: Destruction of an Arduino via Induced Voltage
In my revised electrical design I opted to both split the power supplies entirely and add a flyback diode to help bleed off voltage spikes from the solenoid.
Fig 8: Revised Electrical Design
Electrical Enclosure (Destroyed Arduinos: 0)
Fig 9: Enclosure Design
I opted for slotted friction fittings rather than using mounting holes because it makes it easier to fit lots of boards in a small space.
One tricky element was making sure the light sensor was exposed such that a bright light through a hole in the exterior chassis would actually be able to reach it. It took several test prints to get the size right for each board with enough friction to hold it firm but not so much that it would risk breaking either the board or the chassis.
I created several internal mounting slots for the Arduino, relay, and a prototyping board. Then I added two external slots for the accelerometer and light sensor.
Fig 10: Electrical Enclosure Mounted
We also learned that the physical size of the RedBoard has changed over the last few years. In particular, the soldering holes have been removed from recent versions of the board, changing its width.
Software (Destroyed Arduinos: 1)
We started writing the software assuming that we would need to write a discrete integral to detect rotations of the safe using the gyroscope (recall, the accelerometer was actually a combined accelerometer/gyroscope).
However, as sometimes happens on all projects, during testing of the rotation software one of our Arduinos just stopped connecting to any computers. This is an important lesson: sometimes things just fail.
However, as Ryan and I looked at the logging output from his phone’s gyroscope and accelerometer, we realized we could get a 80% solution using just the accelerometer!
An accelerometer at rest will always report a vector with magnitude 1g directly down due to gravity. This means that at any time the safe is at rest, the magnitude of its acceleration vector will be 1. If we mounted the accelerometer at a 90 or 180 angle to the sides of the cube, exactly 1 of the vectors reported by the accelerometer (X,Y,Z) will have an absolute value of 1 since the safe is a cube! You can find all of the software on github here.
Fig 11: Acceleration Measurement Description
This realization dramatically simplified our software needs. It meant we could not detect some movements (spinning the safe without changing which of its faces is down), but that still gave us enough flexibility to implement a compelling puzzle.
Testing (Destroyed Arduinos: 1)
Fig 12: Testing the Light-based Backup Software (Photo by August Schwerdfeger)
We included two mechanisms for opening the safe in the software. The primary system, discussed at length, was via measurement of box position via accelerometer. However, we did not start there.
The first thing we installed and tested was the emergency bypass cable that would allow opening the lock manually with a 9v battery in the event of a software failure.
Next, we tested the light-based opening system. This was intended to be a secondary “key” to be used in the event of a sensor failure in the accelerometer. This took some work to tune to the right amount of light to be usable, without tripping accidentally and ruining the fun.
Finally, we tested the accelerometer based system. During this testing Ryan accidentally rotated the cube with a USB cable still attached to the Arduino, tearing off its USB port and making the code, as Ryan put it, “extremely frozen.”
Fig 13: That's not supposed to come off
Deployment (Destroyed Arduinos: 0)
We gave our friend the safe, along with some other puzzles, just a few hours after making the final software changes and completing final testing. It worked as desired! He reported, “Got it open without using any explosives or angle grinders.”
This was one of the most fun projects I’ve worked on because it included multiple engineering disciplines, puzzles, a time crunch, and the joy of giving away a unique invention. We gave our friend the safe and after several days of anxious waiting received the wonderful news:
“Got it open without using any explosives or angle grinders”
No comments:
Post a Comment