Time Lapses with your smartphone with any 3D printer

This is my way to perform timelapse with an old android phone on any printer.

I have developed a choreography of movements that allows to minimize the stringing during the timelapse with the help of Cura’s gcode post processing timelapse and the search and replace plugins.

Print orientation

STL: https://www.printables.com/es/model/553504-time-lapses-with-your-smartphone-with-any-3d-print

Print only one model, whichever one you need

Parts list

Bluetooth button:  https://s.click.aliexpress.com/e/_Dl2mn7v
Limit switch: https://s.click.aliexpress.com/e/_DkDL54F
Two-wire cable

Instructions

  • Add timelapse post processing Script
  • Set the “Pause length” to the miliseconds your phone needs to take a picture. 
  • Set the Park Print Head (trigger position) X and Y to the maximum values of your printer.
  • Set the Z-Hop and retraction, I use 1.4mm and 2mm of retraction for the Kobra2 and PET filament.
  • Add search and replace post processing Script
  • Search text:
.+\n(.+) ;Retract filament\n.+\n.+\n(.+) ;Z-Hop\n.+\n(.+)\n.+\n.+\n(.+) ;Wait for camera\n(.+)(Z.+); Restore position.+\n.+\n.+\n(.+) ;Retract filament\n.+\n
  • Replace text:
;TimeLapse Begin\nM83 ;Extrude Relative\n\1 ;Retract filament\nM400 ;Wait for moves to finish\n\2 ;Z-Hop\nM400 ;Wait for moves to finish\n\3\nM400 ;Wait for moves to finish\nG1 F15000 X215 ;Realease trigger\nM400 ;Wait for moves to finish\n\4; Wait for camera\n\5 ; Restore position\nM400 ;Wait for moves to finish\n\7 \6 ;UnZ-Hop and Unretract filament\nM82 ;Extrude Absolute\n;TimeLapse End\n
  • Ajust the X215 in the replace text above to the maximum X position of you printer minus 5. This is the position where the carriege wait for the shoot before return to the print. This small movement from the park position is necessary after pressing the limit switch to prevent a burst of photos from being taken instead of just one. Example: If maximum X position is 230, use X225.
  • Check “Use Regular Expresions”

Bonus

You can deactivate the timelapse movements without deleting the post processing scripts, unchecking the “use regular expression” in the “search and replace” script and adding another “search and replace” like the previous one but with the replacement text empty and the “use regular expression” checked. To reactivate the timelapse check the “Use regular expressions” checkbox of the first script “Search and replace”.

Timelapse with a gcode macro in klipper

If you have the klipper firmware running on your printer you can still use the above instructions but you can also use a macro like this one:

[gcode_macro TIMELAPSE_TAKE_FRAME]
description: Timelapse Take Frame
gcode:
  {% set zhop = params.ZHOP|default(1.4)|float %}
  {% set retraction = params.RETRACTION|default(6)|float %}
  {% set wait = params.WAIT|default(300)|int %}
  G91 ;Relative Positioning including extruder
  G1 F1800 E-{retraction} ;Retract filament
  M400 ;Wait for moves to finish
  G1 F1800 Z{zhop} ;Z-Hop
  M400 ;Wait for moves to finish
  G90 ;Absolute Positioning including extruder  
  {% set toolhead = printer.toolhead %}
  {% set x = toolhead.position.x %}
  {% set y = toolhead.position.y %}
  {% set z = toolhead.position.z %}
  G1 F15000 X{printer.toolhead.axis_maximum.x} Y{printer.toolhead.axis_maximum.y} ;Park
  M400 ;Wait for moves to finish
  G1 F15000 X{printer.toolhead.axis_maximum.x-1} ;Realease trigger
  M400 ;Wait for moves to finish
  G4 P{wait}; Wait for camera
  G1 F15000 X{x} Y{y}
  M400 ;Wait for moves to finish
  G91 ;Relative Positioning including extruder
  G1 F1800 E{retraction} Z-{zhop} ;UnZ-Hop and Unretract filament
  G90 ;Absolute Positioning including extruder

And from Cura add a Search and Replace post processing script:

Search:

;LAYER:

Replace (without parameters):

TIMELAPSE_TAKE_FRAME\n;LAYER:

Replace (with parameters, ZHOP and RETRACTION in mm, WAIT in ms):

TIMELAPSE_TAKE_FRAME ZHOP=2 RETRACTION=2 WAIT=500\n;LAYER:

To deactivate or reactivate the timelapse add or remove for example an underscore to the search text.

If you have any questions or comments you can leave them in the comments section of this video 3D printing timelapse using a smartphone

Similar Posts