Friday, September 28, 2018

3D Print Time Lapse from a Smartphone

Time lapse videos of 3D prints are a great way to show off not only the finished product, but part of the process that goes into making it. There are a few options for doing time lapses, but they all involve either a webcam and a raspberry pi running Octoprint, or an expensive camera with a remote shutter option. Since I have a smartphone with a better camera than a webcam, and didn't want to buy an expensive camera just yet, I figured I could build something to make it work.

You can watch my video I did on the process below.



I'll give a little more info here but won't go into full details as I figure the video should cover the overall summary of the process.

Here is the schematic for the circuit I designed.

It's quite simple and could probably be simplified even more. As I stated in the video, I learned after I had built the thing that the 3 pins attached to Servo 3 were not as advertised and was missing the +5v that I was expecting. If I had to do it again, I would check that before going all in on the device. It was a quick fix in the end though. I just added a jumper from the nearby pin that did have +5v and it was all good.


Once I got the hardware figured out, it took me a while to accept that Cura didn't have the ability to insert gcode on layer change easily. There were tricks to make it possible, but I just wanted it to work.

I gave up and went to Slic3r since it did have the option and got the process working. I have not been happy with the results from Slic3r on this printer after I found Cura, so I decided to look into what it would take in order to make this possible in Cura.

I created a simple script for the PostProcessing plugin that comes shipped with Cura that allows you to insert gcode on layer change:

InsertAtLayerChange.py

This was pretty simple and did the job. I realized that I could make the script more user friendly and specific to the task, but I realized that this has it's own uses outside of what I was trying to do so I created a second script just for time lapses:

TimeLapse.py

For anyone wanting to use these, you can download them from the links and then add them using the steps laid out here.

I'm happy with the result of this process and learned so much along the way. I have found some issues that need some attention though. Since this only works with gcode files that are saved, I'm working on building an actual plugin to make this work when saving or printing directly from the program. I've also found that retraction on layer change doesn't quite work as expected and hope to be able to address that with a dedicated plugin.

No comments:

Post a Comment