Random MCU disconnects driving me crazy

Basic Information:

Printer Model:Neptune 3 Pro

MCU / Printerboard: ZNP Robin Nano
Host / SBC: Raspberry pi 3
klippy.log

klippy 9:14.log.zip (1.0 MB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

Been using Klipper for the past few months and having pretty good success. Recently I have been getting a ton of disconnects, mostly on longer prints (4 hours and up). Really frustrating the amount of 90% completed multiboard panels and gridfinity bases.

I have switched out the USB cable to a beefier one with ferrites. Upgraded to a 5.2v power block. Added a cooling fan and enclosure to the raspberry pi. Added a powered usb hub for the webcam.

Any help would be greatly appreciated

Do you have “Undervoltage” or “Throttling” warnings for your Pi?

Try disconnecting your webcam and running several long prints without it. If the crashes won’t repeat then webcam is likely the reason.

Try capturing dmesg logs, they may contain some useful information about USB issues.

UPD: after reading your logs I found that the MCU is not actually “disconnected”, it times out: Timeout with MCU ‘mcu’. This likely means that the MCU hangs — i.e. the USB connection is okay, but the MCU itself hangs and stops responding.

Check your printer’s PSU voltage. Check the wires from PSU to the board — the board power is likely unstable. If nothing else helps, consider replacing PSU and/or printerboard — but I would first replace the wires connecting them.

Some useful information can be found e.g. here: Timeout with MCU 'mcu' · Issue #1919 · Klipper3d/klipper · GitHub

That’s probably the most hard and annoying thing to debug with the printer, because it really can be anything. I spend months changing, cables, power supplies, hosts, improving common ground, and all typical stuff that people recommends, but noting helped.

Until one day, when i upgraded my printer, and changed the XY steppers… My theory is that I pushed them to hard, and it had created so much back emf, that it caused big enough noise on the power line to glitch the mcu.

That doesn’t mean that it will help in you case at all, but if nothing helps, reducing accelerations and top speed may be a thing to try.

1 Like

Your log file shows quite a high number of re-transmits and invalid bytes, this is an indication of a comms issue with your setup - See this Knowledge base article for an explanation as to why those values are bad

I would guess this is a hardware issue, you mentioned replacing the cable already. Have you considered your cable routing?
Making sure the usb cable is not running over sources of interference like power supplies or stepper motors may help.

The Knowledge base here has a few suggestions of things to try