Pi shuts down mid print

Hi all, I am encountering an issue that I haven’t been able to resolve by myself so far, I hope you guys can help me out. Recently, I have had a few prints fail due to the Pi shutting down mid-print. I have tried to resolve this myself, but no success so far. I have been looking around, but couldn’t find a topic that addressed the same issue. Hopefully the information below helps to point someone more knowledgeable in the right direction.

Basic Information:

Printer Model: Ender 3 (the ‘original’ model)
MCU / Printerboard: BigTreeTech SKR V1.3
Host / SBC: Raspberry Pi 3 model B V1.2 (1GB RAM, if I recall correctly)
klippy.log: klippy.log (967.8 KB)

Additional Information:

The Pi is powered by an original 2.5A RPi adapter.
I suspected a faulty SD card, so recently migrated to an SSD.
The SSD is connected using the original RPi USB hub, powered through another original RPi adapter.
The printerboard is directly connected to the Pi. On the board, there is a header which allows to select the MCU 5V supply. I selected the external PSU to provide this (so not the 5V line on the Pi). I’m using the USB-cable that was shipped with the printerboard.
The Pi controls a 4-channel relay to control the mains power to the PSU, enclosure lights, tool light and extraction fan. The 4-channel relay is powered by the Pi.

Describe your issue:

The print starts fine, no issues at all. At some random point in the print, the whole printer just shuts down. The Pi becomes completely unresponsive, I cannot access it through a webbrowser or SSH. Even pinging the Pi’s IP-address or scanning the network does not provide any response, it’s just completely unresponsive. Power-cycling the Pi brings it back alive, and everything works completely normal again. There are also prints which are completed without any issue at all, it seems to be a completely random event.

I hope someone can be of help, please let me know if I can provide any additional info, thanks very much in advance!

Update 1:

Just after posting this message I started a short print (30 minutes), during which the printer also failed, to my own surprise. The last two failures were on +5 hour prints, not during prints this short. I started listing for myself what I changed recently, and figured that the new Nebula camera could be something to rule out. Even though it’s powered by the external USB hub and adapter, I was concerned that maybe processing and sending all the footage would cause the Pi to go bad. I ran the processing script on Graph Klipper Stats and noticed that the klippy.log shows very high bandwidth usage (see screenshot below). Not sure if that’s what causing the issues, but worth ruling out. I removed the camera, made sure to update all firmware on the Pi, and re-started the 30 minute print, which finished perfectly. I now started a longer print (6’ish hours) which failed earlier, again without camera, and will report back once it finishes or crashes again…

I fear that causes your problem. Full HD resolution gives a LOT of data for your RPi 3B.
Might be interesting to have a look at the Pi’s temperature. You could adding something like this to your printer.cfg to track the temperature in the klippy.log:

[temperature_sensor raspberry_pi_3B]
sensor_type temperature_host
min_temp 10
max_temp 100

Thanks! Unfortunately, the Pi crashed again last night without the Nebula connected or Crowsnest running. I will add the temperature tracking to printer.cfg, I am also curious to see these numbers.

I just did a quick temperature tower print with the configuration changes as suggested above. Temperature rises to about 48 degrees Celsius with 17.5 degrees Celsius ambient. Nothing exotic, but also no printer crash. I am still curious as to why the bandwith usage ramps up every now and then without Crowsnest streaming any footage?

h

Mysterious, I have no clue.

Okay so ever since I removed the Nebula, I had one more crash (as reported two days ago). However, I suspect that the last crash, without the Nebula, had nothing to do with the ‘original problem’, but was caused by a poor connection of the USB-hub to the Pi. It was still installed in a semi-permanent manner, now it’s properly fixed and everything works smoothly so far, I have been happily printing without any issues.

As soon as I have some time I will plug the Nebula back in and see if that will start the crashes again, that would make it pretty obvious that that’s indeed the issue. Will report back soon!

Things were running pretty smoothly these past few days. I had connected the Nebula again and no issues ever since, both on long and short prints. Just to be sure, I added a fan to the Pi, which made the temperature drop quite a bit. However, just now I had a crash on a really small print. Find the klippy.log attached. Again, I don’t really see anything that’s off, apart from the system load which seems to be high’ish? Hope something can help! Find the fresh logs below…

klippy (4).log (515.2 KB)

Tonight I added some more monitoring options by adding MQTT-based system sensors. At 20:14, I started to print a calibration cube. At 20:32, it was finished. At 20:34, I started Crowsnest and the Nebula camera, a slight increase in memory load can be observed, after which I started the same calibration cube to print. Nothing spectacular to witness, see below. The apparent randomness of the issue makes it difficult to find, anyone has some ideas about what to do next?