Maker.io main logo

How to Capture Time-lapse Videos for 3D Printing

2024-05-07 | By Zach Hipps

License: See Original Project 3D Printing

Over the years of 3D printing, I've become more interested in capturing time-lapse ‎videos of my 3D prints. I want to show you a way to capture time-lapse videos for FDM ‎and SLA resin printers.‎

create_1

Whether you have a smartphone or a DSLR camera, the easiest way to create a time-‎lapse video is to use the time-lapse function built into the camera. In your camera ‎settings, you can turn on the time lapse mode and it will take a picture at some set ‎interval, whether that's 30 seconds or a minute. Then, at the very end, you can stitch all ‎those pictures together into a time-lapse video. The problem with this approach is that ‎the video is often motion-blurred, and you can't see your 3D print clearly. This is ‎especially true when you're using a bed slinger type printer. It's like trying to take family ‎pictures with a toddler. If only the printer would just hold still while you take the picture! ‎If I can figure out how to get the print bed and the extruder to hold still while the photo ‎is being taken, then the problem will be solved. Fortunately, this is easier than it ‎sounds. In the settings of most 3D printer slicer software, you can insert some custom ‎G-code that executes at the end of every layer. All I need to do is tell the extruder to go ‎to a specific spot after each layer, pause for a certain amount of time, and then resume ‎the print. It’s like telling the printer to stop and pose for a picture at the end of each ‎layer! I’ve had better luck setting the exposure and focus manually on the camera ‎because I don't want those things changing from picture to picture. With that part out of ‎the way, next, I need to figure out how to trigger my Canon DSLR camera.‎

camera_2

ultimaker_3

Most DSLR cameras, like my Canon, have a remote trigger port on the side. I can take ‎an ⅛” (3.5mm) TRS cable and plug it into that port. TRS describes the three conductors ‎in the cable, the tip, ring, and sleeve. If you connect the tip and the sleeve signals, ‎that's the same as pressing the shutter button on the camera. Other brands of cameras ‎may have a different triggering method, so check your camera’s manual for specifics. ‎So how can I get the 3D printer to connect those two signals? The answer is a limit ‎switch. To make this work, I'm going to use a female ⅛” TRS connector and a small limit ‎switch. I’ll connect the normally open and common terminals from the switch to the tip ‎and the sleeve pins on the TRS connector. Once I solder these two components ‎together, I'll be able to push the limit switch to trigger the shutter.‎

shutter_4

connect_5

connect_6

solder_7

On my FDM printer, I know that the X-axis does its homing sequence on the left-hand ‎side of the gantry. I'm going to put the camera trigger limit switch on the right-hand side ‎so that I don't interfere with that homing cycle. To help me do that, I designed and ‎printed a little 3D-printed bracket. The limit switch slides right into it and sticks out the ‎other side, and I can plug the TRS cable into the connector. The bracket will mount to ‎the aluminum extrusion using a t-nut. In my printer’s slicer software, I can edit the ‎custom G-code settings from earlier and adjust the pause position as well as the ‎position of the limit switch so that the wheels on the print head just touch that limit ‎switch. Now that everything is set up on the printer and in the slicer, I can take pictures ‎using the limit switch and create a time-lapse video! I need to use video editing ‎software to stitch together all of the still images into a video file. There are lots of free ‎options as well as paid options to do this.‎

switch_8

switch_9

print_10

That covers the process for FDM printers, but what about SLA resin printers? They only ‎have a Z-axis that moves the build plate up and down. How can I trigger the shutter on ‎my camera? After a little bit of research, it turns out that there's a clever way to do this. ‎With an SLA resin printer any time there's a new layer, the UV light turns on and ‎exposes the resin for a certain amount of time. If I can use the UV light to trigger the ‎shutter, this will work perfectly. I will use the same TRS connector port on my camera to ‎trigger the shutter. It turns out I don't actually have to close the circuit between the tip ‎and the sleeve. I can just reduce the resistance low enough that it triggers the shutter. ‎Instead of using a limit switch, I will use a photoresistor inside the enclosure of my ‎printer. What I need to do next is find a photoresistor that's the right value so that when ‎the UV light turns on, it lowers the resistance enough to trigger the camera shutter. ‎After digging around, I found a photoresistor that is around 10k Ohms when no light is ‎shining on the sensor, and when it’s exposed to a bright light, it goes down to about ‎‎100 Ohms. This should work. Now, I just need to do the same thing I did before. ‎However, instead of soldering on a limit switch to the TRS port, I'm soldering on a ‎photoresistor. ‎

photo_11

resistor_12

solder_13

I make sure to unplug my machine before I remove the back panel of my SLA resin ‎printer. I need to drill a small hole that will fit the TRS connector. On my first attempt, I ‎soldered the photoresistor directly to the TRS connector, but it didn’t trigger the ‎shutter. I need to position the photoresistor closer to the UV light source, so I’ll use ‎some extension wires and a cable tie to secure the photoresistor next to the light ‎source. Now, I can insert the TRS connector in the hole, thread on the nut, and put the ‎enclosure back together.‎

panel_14

panel_15

panel_16

Now, it’s time to start a print and see if it works! At each new layer, the UV light turns on, ‎which triggers the camera shutter! As I said before, I’ll need to use video editing ‎software to stitch all of these still images together into a video file. With a little bit of ‎extra effort and a few components, you can improve the quality of your time-lapse ‎videos using these tips and tricks.‎

print_17

print_18

print_19

 

制造商零件编号 770-10040-00050
CABLE 3.5MM MALE-MALE 0.5M
CNC Tech
¥18.88
Details
制造商零件编号 4832.2300
CONN JACK STEREO 3.5MM PNL MNT
SCHURTER Inc.
¥22.22
Details
制造商零件编号 SAJ101XHL0N74SDTPTQ
SWITCH SNAP ACTION SPDT 0.1A 30V
TE Connectivity ALCOSWITCH Switches
¥6.11
Details
制造商零件编号 161
PHOTO CELL (CDS PHOTORESISTOR)
Adafruit Industries LLC
¥8.00
Details
制造商零件编号 1157
HDWR T-NUT ALUM M4 20X20 50PK
Adafruit Industries LLC
¥104.10
Details
制造商零件编号 RM-PL0374
POLYMAKER POLYLITE PLA FILAMENT
LulzBot
¥210.56
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum