tobbelobb / hangprinter

A RepRap hanging from the ceiling
GNU General Public License v2.0
467 stars 97 forks source link

longer power outage while printing #22

Closed potdian closed 6 years ago

potdian commented 6 years ago

Hi there,

today I was in the Lab of disasterhack.org in Katmandu, Nepal and they are using your hangprinter to share knowledge about 3d-printing and to enable the locals to create innovative ideas.

Unfortunately there are a lot of power outages in Kathmandu and sometimes the UPS are not big enough to handle that interrupts and to keep the printing process alive.

So they are searching for a kind of restart the printing process at exact the last printed point. Is there a kind of write-ahead-log to log the last known position to sdcard, to re-read it a reboot and start printing at the last known position?

Any hints would be great!

Best regards potdian

tobbelobb commented 6 years ago

Hi potdian, Cool that disasterhack has got their Hangprinter up!

You could connect 12V car/motorcycle battery if you increase your PSU voltage to ca 13.4V. See this video for details about how to increase PSU voltage: https://www.youtube.com/watch?v=3U8ymhArTL4 and this thread for more discussion about using batteries: forums.reprap.org/read.php?4,543092,543112

Some safetety features do exist in Marlin. I use this firmware: https://github.com/tobbelobb/Marlin/tree/bugfix-1.1.x_hangprinter

The following procedure is very manual, but I have executed it a few times. I recommend reprap.org/wiki/Gcode if some of the gcodes are new to you.

The firmware linked above prints out current position (M114) at a quite high frequency during print. If there's a power outage I have at least some idea about where the printer was when it died. I can then search through the gcode text, and find the exact G1 command corresponding to that position. Putting that gcode into a gcode visualizer program, and comparing to the last lines that were actually printed, I can settle on exactly how much of the gcode was remaining when power was lost. I delete all the "used" gcode from the file, and save as "remaining.gcode" or something similar.

To restart print, I get to position using G6-moves, and use G92 to specify where the printer should think it is. Then I bring up hot end temperature manually. Then I load "remainin.gcode" and press print. I sometimes also create "remaining_no_extrusion.gcode", by removing all E-parameters from G1-commands. This lets me do some final G6-adjustments to make sure new layers end up exactly on top of the ones printed before the power outage.

Resuming SD prints manually is similar, except pronterface shows the last printed byte instead of the M114 position. You might get away with not creating "remaining.gcode". You can instead select SD file and select SD byte with special gcode commands before pressing print.

Many developers are currently focusing on creating more automated recoveries. RepRapFirmware (which has untested support for Hangprinter geometry) has M911 and M916. Also see M929: Start/stop event logging to SD card.

Anyway, since the Prusa MK3 has made a very good open source power outage recovery system, we will soon see something similar develop in Marlin. See for example discussion here: https://github.com/MarlinFirmware/Marlin/issues/9185 and here: https://github.com/MarlinFirmware/Marlin/issues/2085

Best regards

potdian commented 6 years ago

Thank you for your answer! I'll share it with diseasterhack and hopefully they can manage that.