CraftMistress & Drex
Hey Drex, I've been building a kinetic sculpture that also acts as a puzzle lock—think gears, light, and a hidden code. Would love to see if you can help me add a stealthy encryption layer to it. What do you think?
Sounds like a good playground for a little subterfuge. Lock the gear sequence to a simple keyword, then embed that keyword in the light pattern—maybe a pulsing LED that reveals a binary string only when the gears line up correctly. Or hide a QR‑style code in the shadow of the moving parts, readable only from a specific angle. Pick a cipher that’s hard to spot but easy to brute‑force for the right eye, and you’ll have a lock that feels both mechanical and cryptographic. Need more specifics? Just point me to the gear layout and the light sources.
Nice hooks. Tell me your gear mesh, the number of teeth per stage, and where you plan to place the LEDs. Then we can decide whether to go with a simple substitution mapped to a pulse rhythm or a tiny QR‑style dot pattern that the camera can decode. I’ll sketch a wiring plan that keeps the light hidden in the gear shadows but shows up in the right angle. Shoot the layout and we’ll make it tick.
Okay, lock it down with a two‑stage system. First gear 12 teeth, second 18. That gives a 36‑step cycle before it repeats. Place an LED on the 12th tooth of the first gear and a second on the 18th tooth of the second. When the gears line up the LEDs sit in each other's shadow – invisible until the angle’s right.
If you want a pulse rhythm, map each 12‑step interval to a letter via a simple Caesar shift. The LED pulses in sync with that interval; only when the correct letter aligns with the gear you get a glow. For a QR‑style, use a tiny dot matrix on the top surface of the second gear, only exposed when the first gear clears the shadow. A phone camera can read it from a fixed distance. Sketch the wiring so the LED wires snake along the gear teeth and stay hidden behind the gear body. Keep the supply low‑voltage, maybe a 3.7 V coin cell, and you’re good.
Alright, so picture the first gear mounted on a short shaft, the second gear offset so its 18‑tooth side sits just behind the first. Run a thin flexible PCB along the rim of the first gear to the 12th tooth where the LED sits; tuck the track behind the gear body so the cable is invisible. Do the same on the second gear but cross the track over the first gear’s shaft so when the 18th tooth lines up the second LED is in the shadow of the first. Power the whole thing from a 3.7 V coin cell, feed the LEDs through a small series resistor and a micro‑controller that does the 12‑step Caesar map. For the QR‑style, carve a 5×5 dot pattern into the top of the second gear; the pattern is only visible when the first gear’s tooth blocks the shadow. Add a tiny photodiode on the second gear to trigger the camera readout when the pattern’s exposed. That keeps the wiring low‑profile and the whole lock mechanically in sync. What kind of micro will you use?
A tiny ESP‑32 or a 32‑bit SAMD21 will do—both cheap, low power, 3.3 V, and you can cram the Caesar routine and a QR read into the flash. If you want ultra‑small, an ATtiny84 with a little 0.1 µF capacitor and a 3.7 V boost regulator will keep the size in check. Program it in Arduino IDE or PlatformIO, use a simple timer to step the gears, and output the LED pulses or drive the photodiode when the pattern’s exposed. Keep the code tight; you only need a lookup table for the 12‑step shift and a quick I²C read for the camera. Done.
Nice options, but watch that ESP‑32’s 3.3 V pin can’t handle a 3.7 V coin cell directly; you’ll need a tiny buck‑to‑buck or a 3.3‑V LDO to keep the regulator happy. If you use the ATtiny84, the 0.1 µF is fine for the reset line, but you’ll need a decent decoupling cap on the Vcc pin too, maybe 10 µF, otherwise the clock hiccups when the gear moves. For the LED trace, keep the track width tight – 40 µm on a 1.5 mm thick board and you’re still under 50 mA total. The Caesar table is only 12 entries; just store it in PROGMEM. When the second gear exposes the QR matrix, you can flash the photodiode for a couple of milliseconds and let the camera pick up the pattern. Add a 4.7 k pull‑up on the I²C bus and the whole thing should be a tight, quiet lock. What gear material are you planning, and do you need a spacer to keep the shadow just right?