Hi, i've been using a raspberry PI 4 with octoprint connected to an ender 3 pro for a few years now with next to no issues. I've easily ran 30+ spools of filament through the machine. Recently however, i've been running into an issue where the PI switches off completely mid print, it's happening near enough every print now. Though sometimes i get lucky and manage a few prints before a failure. I recently had a 33 hour print fail at the 31 hour mark, that one sucked. More recently i'm only getting about an hour into 4 hour prints.
When it turns off, the printer stays on with its current temperature settings with the print head frozen in place until i cancel the print through the screen.
What did you already try to solve it?
I've checked all cables and they're secure, octoprint is up to date, the printer is cleaned, fans are working, i've also taped off the power pin on the USB between the printer and PI to cover the backflow issue as others have suggested.
Have you tried running in safe mode?
Currently attempting a print with safe mode turned on.
Update
Same issue, the current print failed at around 2 hours in (50%) and then 1 hour 50 minutes on the two previous attempts and the raspberry pi shut down, with safemode on it made it about 2 hours 30 minutes before crashing or shutting down.
Actually the logs do not report any throttling issues.
It is more that some hiccup shuts the Pi down:
2023-06-30 17:00:30,063 - octoprint.server - INFO - Shutting down...
2023-06-30 17:00:30,067 - octoprint.server - INFO - Calling on_shutdown on plugins
2023-06-30 17:00:30,068 - octoprint.events - INFO - Processing shutdown event, this will be our last event
2023-06-30 17:00:30,071 - octoprint.events - INFO - Event loop shut down
2023-06-30 17:00:30,085 - octoprint.server - INFO - Goodbye!
Just out of curiosity, on my system I clicked on the power icon in the header and selected "Shutdown system". After restarting I found the following in my octoprint.log:
2023-07-02 05:48:36,961 - octoprint.server - INFO - Shutting down...
2023-07-02 05:48:36,967 - octoprint.server - INFO - Calling on_shutdown on plugins
2023-07-02 05:48:36,973 - octoprint.events - INFO - Processing shutdown event, this will be our last event
2023-07-02 05:48:36,984 - octoprint.events - INFO - Event loop shut down
2023-07-02 05:48:37,642 - octoprint.plugins.tracking - INFO - Sent tracking event shutdown, payload: {}
2023-07-02 05:48:37,651 - octoprint.server - INFO - Goodbye!
This leads me to suggest under OctoPrint Settings, Server, Commands are the shutdown and restart commands. I'd clear both of those or replace them with something benign like echo "shutdown" and see what happens.
I did just manage a successful 8 hour print (a new file) without any hiccups. I'm 50% through another one now.
The file that it shutdown on failed 3 times previously at a similar point in the print, and maybe 1 in 4 prints had issues last week. I'm starting to wonder if perhaps some select gcode uploads got corrupted or something.
Do you know there's a "Power failure" plugin, to help recover a print?
Doesn't help with the actual problem, but might mitigate against it.
I haven't tried it myself yet, so I don't know if it's any good.
I've just wired up some extra cooling to the electronics box and i got a plugin to track the temperature of the PI through octoprint, i'm gonna try a few prints and see if that helps. I doubt it was overheating, but hopefully it'll rule out any weird power issues due to the creality boards terrible motherboard cooling, which forked off the hotend fan.
Routing the Raspberry PI power cable no where near any other cables to cut down on interference.
Wired up the Electronic Box's Cooling (Ender 3 mainboard & PI) to take power directly from the printer PSU via a buck converter and swapped out to two 120mm fans.
Replaced the powerbutton that was hooked up to the GPIO with a momentary switch instead of a toggle switch (had no issues with this for 2 years, but i had a shiny new button so thought i may as well try).
I've managed to print a file which had previously crashed or shut down the PI, three times previously without any problems.
So, i'm thinking it was either electrical intereference or a cooling issue.
I'm gonna keep printing for a few days and see if i run into any more problems.
So, i had to do a bit of maintenance on the printer (swapping out a nozzle, fixing a clog, changing Y axis belt) and then the issue cropped up again with the PI shutting down after about 20 minutes into a print.
It's also extremely hot (weather wise), so i thought maybe it was a heating issue, tried a desk fan directly over the board + creality board, same problem. Though the PI wasn't hitting over 40 degrees. The electronics box has a seperate 120mm fan for both the PI and printer board.
Maybe it was electrical interferance on the power, rerouted it, added ferrite cores, tried new cables, hooked up the entire thing to a UPS. Same problem, PI shut off after ~20-30 minutes in a print.
Was about to give up when the ender 3 screen beeped by itself, so i routed the ribbon cable away from literally every other cable and no issues.
I'm 2 prints in now with the ribbon cable hanging out the front of the print enclosure through a hasitly drilled hole into the electronics box and i've had no issues.
I've got no idea why in the hell interference on a display cable to the printer board caused the PI to shut down, but there we are. I hope this helps other people.