[Q] BTT 24v UPS, Pi UPS Hat, and Octoprint

What is the problem?

I got an Ender 3 the other day... It was printing.. I tripped over the power cord, cutting the power to the printer. AARRGGHH. Wait. It has power loss recovery. Yes! Plugged it back in and it finished the job! (ok, there was a blob of plastic where the hotend sat) I was pretty amazed.

How can I accomplish a powerloss, save stuff and shutdown, with other printers I have with SKR boards and Octoprint? I have a UPS hat for my Pi.. Has anyone experimented with this?

What did you already try to solve it?

Live with it.

Have you tried running in safe mode?

Naw

Did running in safe mode solve the problem?

Not likely.

The short version is: you don't.

OctoPrint streams the gcode to the printer, which has an internal buffer. Even if OctoPrint is tracking exactly which line was last sent, it doesn't know what line the printer was actually on when the power failed.

Firmware on the printer can do this when printing directly from the sdcard because it does know exactly what line of gcode was last read off the card and then executed, albeit at the cost of additional wear on the card. (it performs a write for every line of gcode executed)

In theory, you could write a plugin that would monitor the UPS, and pause the print when it was detected to be on battery and then hope that it was 'close enough' to work when the print was manually resumed once power was restored. But you'd get mixed results for sure and you'd also have to manually take care of temperatures, homing x/y, etc.

And, all of this hinges on an assumption that the Z axis doesn't move at all once the power goes off. You may get lucky and it doesn't and it works. Or you won't. :man_shrugging:

Another approach would be to put a UPS on both the pi and the printer and simply pause the print and turn off the hotend heater, etc to try to keep the printer on with the UPS and then resume the print when the power comes back on, but that would require a more substantial UPS for anything more than just a minor 'blip.'

2 Likes

ah a real UPS would probably be the best solution, short of tripping over the power cord to the printer..
Thanks for the time typing that up.

2 Likes

To give you an idea of what you'll get out of a fairly decent spec UPS...

I run my machine on a dedicated APC Smart UPS 1500. Runtime during a print (after heaters are at their set temp) is roughly 30-60 minutes. With all heaters off the runtime estimate is 247min though I suspect it's much longer.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.