Claude Ran My 3D Printer
Claude ran my 3D printer all night.
Remember
Let Claude write the toolpath. Keep your hand on the power switch.
Context
A hobby FDM 3D printer (Marlin firmware, auto bed-levelling probe) on USB serial at 115200 baud, driven by Claude Code on a spare laptop whose built-in webcam watches the bed. Evidence: the owner's real prints on 2026-10-16/17 (private repo, used as reference only) plus a fresh demo generator for this video. See claude-3d-printer.eval.md.
Architecture
| Component | Role | Notes |
|---|---|---|
| You | Ask, approve, load filament, power-cycle, take the part off | Human gate before anything heats or moves |
| Claude Code (laptop) | Writes generator scripts, runs tools, reads replies, keeps logs | |
| Memory file (CLAUDE.md) | Hardware facts, safety rules, gotchas learned the hard way | Read every session |
| Generator script (Python) | Shape maths → one ring per layer → G-code lines | No drawing, no slicing |
| USB serial streamer | Sends a line, waits for ok, sends the next; cuts heaters if USB drops | One process owns the port |
| Webcam | Snapshot → Claude describes the bed in text → photo deleted | Photos never committed |
| Print history | Every run logged: duration, layers, status, result | Failures too |
Trade-offs
- No slicer means no automatic supports, infill tuning or preview: the shape must be designed to print (overhang limits).
- An agent can't see well through one webcam snapshot or touch the printer: power-cycles and first-layer checks stay human.
- Hot hardware: the rules (ask before heat or motion, heaters off when idle) matter more than the code.
Numbers worth knowing
- 508 layers, 478,802 G-code lines, 232 min, 0.2 mm layers (owner's print history, 2026-10-17).
- 20 mm test box: 25 layers, ~7 min. Demo pebble for this video: 200 layers, 29,610 lines.
- Terminal lines in the video are illustrative recreations in the same format.