Seeking advice for speed issues


#1

Hi there,

I have a serious problem with blobs due to the printer halting for a few seconds every now and then. I know that this is an issue that already affects many people and is not (exclusively) caused by octoprint itself. However there are a few things I don't understand - maybe someone familiar with these issues could help me clear things up.

First, here's my setup:

  1. Raspberry 3 B & Wanhao Duplicator i3 v2.1
  2. Raspberry 3B+ (octoprint freshly installed with no plugins) & Wanhao Duplicator D9 MK2
  • Both are running the latest stable release and are connected with 115200 baud
  • I prefer quality over speed, so I usually print at around 30mm/s and 100µm

I never had these kind of issues on Setup #1 although the (slightly slower) RPI also acts as a webcam server (RPi_cam_control - I don't use octoprint webcam support) and runs a CPU-demanding sensor-readout-and-plotting program.

On setup #2 though, there's lots of blobs on my prints with the printer stalling up to 5 sec. CPU-wise there's nothing to complain; it's mostly in the one-digit % area with no notable deviations when the printer pauses.

This even happens when I print the same .stl files with almost the same gcode. However it doesn't seem to happen on very simple files < ~2MB. Most of the time I'm printing gcodes of ~ 10-50MB in size.

So I guess the serial interface somehow is the bottleneck. This is really strange because the D9 is the more modern printer. On the other hand it's CPU seems slower (just judging by their clock speed). The old printer features an ATMEGA1284 (20MHz) while the newer one is driven by the ATMEGA2560 (16MHz).

Workaround for me is to print everything from SD.

Unfortunately I control the printer mostly remote. So uploading a file to SD card takes ~ 1hr/10MB; so I have to have the uploading PC connected to octoprint for 5 hours in case of a 50MB file - when connection drops, I have to start over again.

tl;dr:
Is there a way to first upload the file to the octoprint server and afterwards copy it from there to the printers SD card? Uploading to the server just takes a few seconds; so this would make the process much less painful.

Any other suggestions concerning my actual problem? Printing everything from SD can't be a long-term solution. Do I have to upgrade to a more modern mainboard? If yes - which one is recommended and works flawless with octoprint?


#2

This probably won't be much help, but using S3D 4.01 to slice and a 3B+ pi, hardwired to the network, USB to printer and a completely different printer and manufacture, I have had no such issues and have been using this setup for about 8 months.
First if you have not done so, try a different usb cable. Next make sure you have the proper power supply for the B+. If you can get hold of another PI B+, do a clean install and see if the problems follow.. If so I would be focused on the printer not the PI.
A quick look at my Octoprint and it has the connection speed set to Auto.. are you using Auto or locked in at 115200? If locked try auto.
Good luck!


#3

Thanks for your advice!

s3d produces the smallest gcode files AFAIK, so this should definitely help. However I love cura and OSS and instead of investing 150€ into s3d I'd rather spend the same amount of money into a duet2 mainboard which should be capable of processing any gcode.

I've already tried changing the PSU for the RPI (got plenty lying around) - a new USB cable (short, shielded + with ferrite core) is already ordered and on it's way. The D9's RPI already runs on a clean install (most recent raspbian + octoprint; nothing else) I set up this weekend in hope to mitigate the speed-issue. Baudrate is set manually since yesterday; unfortunately 115200 is the max. speed for this printer. Setting it to manual didn't change anything.

And I also think it's the printer who's to blame. But maybe there are some tricks to mitigate the problem on octoprint's side.


#4

Can you confirm you are on 1.3.10 on both Pis and neither of them are flagging for undervoltage/overheating?


#5

Yes I can confirm both running on 1.3.10.

I've never seen the undervoltage/overheating symbols on the webserver (just had to google for them). Would there be some message in the log? If yes - what to search for? "tempe" and "voltage" at least doesn't give a result.

Generally I've observed them manually for CPU temp lately. The Pi #1 which is naked runs at about 65°C max while the Pi#2 which features a big heatsink usually is below 50°C.

Would enabling the serial.log help?


#6

Those temps are fine. If you bought the power supply with the Pi from a reputable suppler you are probably ok.. I think where the power supply issues come in is when someone tries to use an old PS from a much older PI that does not put out sufficient current to power the new B+.


#7

You'd think that, but a strong minority of Pis that report to the Octoprint mothership show problems with voltage.

@unwohlpol , run vcgencmd get_throttled and post the result.


#8

It says

throttled=0x0

on both Pi's. Looks good to me.

Anyway, I bought the PSU with the Pi 3B+ at RS components and it seems to be the official PSU. Except from an added ferrite core I've left the PSU in it's original state. At first I was suspecting the stuttering to come from EMI and added ferrites on the PSU and a grounded metal case to the RPI; as soon as I receive the better USB-cable I'm quite sure I've done almost everything to minimize EMI-effects.

Just one crazy idea:
In case the pause/stuttering is an effect of a buffer underrun on the serial port or something like that - wouldn't it be possible to add a feature/plugin to octoprint to detect if the buffer is running low and adapting the print speed to that event? This would still be much better than the nozzle stopping for 5sec. and melting my printed object.


#9

that's good.

I'm not sure if you can truly detect an underrun, but certainly we've seen problems when there's a high "gcode to move ratio", e.g., a curve with too many splices, which causes this type of situation.

None of that would take literally seconds to resolve, though.


#10

Update:

Changing the USB cable didn't help either. For now, printing from USB is the solution.

But I made another observation:
The longer a print is taking, the more often it suffers from interruptions. Plus: there are temp-drops in the temp-plot which also occur more often the longer the print takes.

They are very short but visible in the plot - for nozzle AND bed! Sometimes it's even the target temp thats dropping!! And It can't be measured with my parallel temp-measuring setup!!! This happens in USB and SD mode. And there are still no interruptions in the print process when printing from SD; just these "ghost-tempt-drops" as I'd call it.

scrsht_octo

I think I have to check my mainboard for overheating - it's all set up in an enclosure which isn't the best place to have it (although with a stronger fan... but who knows). Strange though - even if it's the printers fault I wouldn't expect octoprint to drop the target temp; and come back again immediately.

BTW: Here's a short log starting from uploading the file to SD until mid-print (after some of said temp-drops): https://pastebin.com/wBJFeRxL

Some of the messages seem like they don't belong there; can someone check that?