Circuit Box
A birthday gift for a friend who likes puzzles. A box, locked, with no visible keyhole. On top: a grid of touch pads and LED indicators. Solve the circuit routing puzzle inside (displayed on the LEDs), the solenoid releases, the box opens.
Hardware
- Microcontroller: Arduino Nano 33 IoT (overkill, but I had one, and the WiFi was useful for debugging)
- Touch sensing: Capacitive pads via TTP223 chips—reliable, no moving parts
- LED matrix: Charlieplexed, 20 LEDs from 5 pins
- Lock mechanism: 12V solenoid, powered via MOSFET, protected with flyback diode
- Power: 18650 Li-ion with TP4056 charging module and boost converter
The puzzle
I wanted something that felt like actual circuit design, not just “press the right buttons.” The game: route power from a source to a target by rotating junction pieces. Each junction is a 2x2 grid that can be in one of four states. The LEDs show the current flow. You rotate pieces by tapping them. When the circuit completes, the box unlocks.
There are 5 levels, increasing in complexity. The final level requires understanding that junctions can be wired in series.
Mistakes made
- First revision: Used copper tape for touch pads. Looked great, oxidized within a month, became unreliable. Replaced with PCB touch buttons.
- Power management: Forgot to put the Arduino to sleep. Battery died in 3 days. Now it sleeps after 5 minutes of inactivity, wakes on any touch. Lasts 3 weeks.
- Solenoid heat: First unlock, the solenoid got hot enough to soften the PLA bracket. Added a timeout—solenoid only powered for 500ms, then latches mechanically.