Be mindful of what is plugged into the same electrical circuit as your raspberry-pi. Other appliances (such as refrigerators, freezers, and air conditioners) could be causing you grief.
Still reading? More detail.
This is not a request for help, but a variation on this post which I can no longer reply to. Moderators, feel free to move this around if needed.
The problem is simple. A "SerialException"
device reports readiness to read but returned no data occurs in the Octopi logs. I tried everything in here, including swapping USB cables multiple times, trying several different Raspberry Pi power supply's, and even reformatting the SD card. Nothing worked, I continued to get the error on every single print (each print was minimum 4 hours.)
Well, it turns out that I had the Raspberry Pi plugged into the same electrical circuit as some appliances in my house. Namely, a chest freezer. I was eventually able to figure out that when the freezers compressor kicked on, the Raspberry Pi would report the Serial Exception. Why? Perhaps some electrical engineers can help with that, I assume the spike in current temporarily drawn by the appliance caused the Raspberry Pi to be momentarily under-powered, and when communicating over a serial link to the printer the Pi was adversely affected.
I can think of two:
- Move the raspberry pi to a different circuit within your house. This is what I did (I was able to run an extension cord to another outlet on another circuit to test the theory) and I've been printing for over a week now without issue.
- I would think putting the Raspberry Pi on a small UPS would help in this problem. It should help in providing consistent, clean power to the Pi and make your system less susceptible to other appliances that might be causing issues. Haven't tested it, but maybe?
I hope that this helps others. Now that Octoprint is working properly, I absolutely love it.
I'm curious if a ferrite bead around the USB and power cables would have helped in your case?
No, the USB cable I was using has a ferrite bead. For good measure, I even tried 2 different cables. No luck.
But what about the power cord? That's what I would assume would pull the interference from the outlet/same circuit. I wonder if it's similar to the I can kill your pi with a camera flash... lol.
No ferrite bead on the power cable, I suppose that would be an interesting thing to try.
Always a good idea, because:
- For suppressing the switching noise of the PS
- For blocking inducted noise from elsewhere
- The "wall wart" style of DC adapter you're familiar with is squarish in size because it contains a transformer: two coils of wire around iron.
- Its job is to take something big on the left and make it smaller on the right, basically.
- So if the input becomes smaller, the output becomes correspondingly smaller by the same percentage.
- If it's designd to produce, say, 5.2VDC when the input is exactly 120VAC then if the input drops by 10% then the output drops by 0.52VDC.
- 5.2 - 0.52 = 4VDC and well below the 4.64VDC low threshold for power on the Pi.
- There is circuitry on both ends of that serial cable which try to make the determination whether a bit is high or low. Above some threshold (voltage level) it's seen as a logical 1. But then when your voltage reference is too low then ones now look like zeroes. (Game over, credits roll...)
Here's my favorite arrangement for powering a 3D printer.
- Wall outlet
- APC brand UPS Back-UPS ES 550
TP-Link SmartPlug plugged into the correct side of that
IKEA KOPPLA three-outlet strip plugged into that
- 5V @ 2.5A Raspberry Pi power adapter, the brick for the printer and anything else that's part of the setup all plugged into that strip
So I can power-up/down everything from a variety of methods using the TP-Link interface. I don't have to worry about air conditioners or refrigerators "browning out" the wall power nor lightning strikes because of the line conditioning in the UPS.