![[Screenshot_20251227_014722_Instagram(1).jpg|750]] 3D print timelapses have a problem: if you just record the print continuously and speed it up, the print head is constantly darting around the frame. The result is chaotic and hard to watch. The solution is to trigger the camera only when the print head is in a consistent position—typically after each layer, with the nozzle parked in the same spot. This creates the illusion that the print is growing organically out of the build plate. Today, this is a standard feature on most consumer 3D printers—Bambu Labs ships it out of the box. But when I built this system, synchronized timelapse wasn't common, and it certainly wasn't something you'd find on a self-built printer running RepRap firmware. <video src="Screen_Recording_20251227_020801_Instagram.mp4" controls width="500"></video> # The Hardware The Voron 2.4's Duet controller can execute macros at layer changes and toggle GPIO pins. But you can't just wire a camera shutter directly to a microcontroller GPIO—the voltage levels are wrong, and you risk frying either the camera or the controller if something goes sideways. ![[Screenshot_20251227_014732_Instagram(1).jpg|500]] I designed an opto-isolated trigger circuit that completely decouples the printer's electronics from the camera. The GPIO signal drives an optocoupler LED, which triggers a phototransistor on the isolated camera side. No electrical connection between the two systems means no ground loops, no noise, and no magic smoke. ## The Software ![[Screenshot_20251227_014742_Instagram(1).jpg|500]] The RepRap macro handles the mechanical choreography: 1. Complete the layer 2. Park the print head at a designated position 3. Retract filament to prevent ooze 4. Toggle the GPIO pin to trigger the camera 5. Wait for shutter actuation 6. Resume printing The timing has to be precise—trigger too early and the head is still moving; too late and you're wasting print time on every layer. ## Result Clean, professional timelapses shot on a full-frame DSLR with complete control over exposure, depth of field, and color grading. The opto-isolation has proven bulletproof across hundreds of hours of printing with zero interference or failures. --- Tags: [[mechatronics]] [[photography]] [[zettelkasten/tags/3d printing|3d printing]] [[electronics]]