Note September 3, 2026
A firmware rewrite and an enclosure that snaps shut
Bringing up production PCBs, rewriting the infinity mirror's STM8 firmware from scratch, and iterating on a 3D-printed enclosure that actually snaps shut.
The STM8 firmware for the Reflections mirror has been broken for a while in a quiet way: it compiled and flashed but had some real bugs hiding in it from the Arduino port. I finally rewrote it from scratch as a bare-metal project and found three issues I wasn’t expecting. The debounce threshold was dividing down to zero via integer truncation, so the button was effectively unfiltered. The long-press handler was writing EEPROM on every loop iteration while the button was held. And the ADC clock was running at 8 MHz against a 4 MHz spec limit. None of these would have caused obvious failures immediately, but the EEPROM one especially would have burned through write cycles fast. Fixed all three, confirmed it flashing and running on hardware, landed at 3517 bytes out of 8192 flash. That’s a comfortable margin.
Meanwhile the ESP32-C3 boards came back from JLCPCB. Powering up board #1 was straightforward, power LED confirmed, and all three boards flashed without drama. The main discovery during bring-up was a rev-1 power issue that needs addressing before any production run: there’s a +5V fault scenario that requires a clamp the current design doesn’t have. I spent a session picking a new buck converter and an eFuse clamp for the production board, then ran the design through a multi-agent review panel I have set up in the homelab. It caught a feedback-tap error in the clamp write-up that would have made the protection circuit generate the overvoltage it was meant to prevent. Glad the review caught it before it became a board spin.
On the enclosure side: I’ve been iterating on the 3D-printed housing for the two PCBs that mount inside the mirror frame. The big change this round was replacing screw mounts entirely with a bead-and-groove snap fit along the lid spines. The screws were fine functionally but annoying to assemble, and the snap system is cleaner for a finished product. I also moved the mounting flange for inside-frame insertion, added a brace pad under the MODE button (the button feel was mushy with a thin lid there), and trimmed 7mm off the Y dimension after the screw bosses disappeared. One mechanical wrinkle: the vertical corners needed rounding to match a 1/4” router bit I’m using for the frame pocket. The enclosure generator is parametric Python so that change was a single value, but I had to sweep it against both my Voron and the smaller Rook to account for their different print tolerances.
Speaking of the Rook, I set it up properly this period: remote monitoring, and six macro bugs fixed in the Klipper config, including a dangerous absolute-Z park in PRINT_END that would have crashed the head into the bed after a print. The camera was streaming at 2.7 fps when I first connected it remotely, which turned out to be the Pi associating to the wrong access point, a distant one at -75 dBm instead of the one a few meters away at -36 dBm. Pinned it to the right one and went from 1.1 Mbit/s to 10.6 Mbit/s, camera back up to 16 fps.
The two weeks were a bit fragmented overall, so the hardware progress felt slower than the session logs suggest. But the STM8 rewrite and the snap enclosure are both things I’d been putting off, and it’s good to have them actually done rather than “probably fine.”
Next up is getting the enclosure printed in the actual mirror frame material and doing a proper fit test before I commit to the frame pocket dimensions.
Get notified
Leave an email and I'll ping you when a new note goes up. No other mail, ever. Prefer feeds? RSS works too.