Has issues with slow USB/UART been solved so I can use OctoPrint?
 
Notifiche
Cancella tutti

Has issues with slow USB/UART been solved so I can use OctoPrint?  

  RSS
RandomDude
(@randomdude-2)
Active Member
Has issues with slow USB/UART been solved so I can use OctoPrint?

A few years ago there was a major issues with using OctoPrint with a Prusa i3 as the USB port could not handle more than ca 80 commands per second. But PrusaSlicer easily gives you gcode files with 100+ commands per second (at least for parts with a lot of curves). This generally causes many micro-pauses during prints, which causes blobs at best, and shifting layer-lines in worst cases.

This made OctoPrint almost unusable unless you specifically told the slicer to reduce resolution to give smaller gcodes, or simply slow down prints by 50 % or so.

The new fancy updates in PrusaSlicer also does not seem to help, for example the Pressure Equalizer functions seems to make the gcode even more bloated. Also, the linear advance does not work if the you have micro-pauses every second due to slow USB speeds.

 

I found a plugin to OctoPrint that tries to solve this issue: https://github.com/chendo/BufferBuddy

But the Prusa Firmware does not seem to be compatible with it, so I assume the issues might have been fixed in some other way? 

I guess my question is: Is OctoPrint the go-to solution if you don't want handle SD cards every 5 minutes, or are there other better solutions today?

Do I still need custom settings in my slicer to make the files compatible?

 

Postato : 12/03/2023 5:54 pm
Crab
 Crab
(@crab)
Reputable Member
RE:

I’m running Pi4 with OctoPrint on MK3+ 3.11 and for a year I’ve had zero issues.. It has been rock solid. I would think there would be some type of flow control built into the Printer USB firmware.. similar to software flow control of XON/XOFF.  The PI will just buffer all your GCODE until the Printer can handle it.  Maybe they had no flow control years ago and added it to the firmware at some point. But I’ve printed hundreds of models with PSlicer and never had a communication error between Pi and Printer. I absolutely cannot imagine running my Prusa without OctoPrint. I have not come across a better solution. I was going to build a new service for a friends printer, but he changed brands.. was going to use a 1G Orange Pi Zero 2. (Not zero).. about $40US on Ali.

Postato : 13/03/2023 2:32 am
Netpackrat
(@netpackrat)
Reputable Member
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

 

Posted by: @crab

I’m running Pi4 with OctoPrint on MK3+ 3.11 and for a year I’ve had zero issues.. It has been rock solid.

What he said, since the middle of last summer on both a factory Prusa and a scratch-built Bear upgraded version built with stock electronics (other than power supply).

https://www.printables.com/@Netpackrat/models
Postato : 13/03/2023 9:34 am
RandomDude
(@randomdude-2)
Active Member
Topic starter answered:
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

I did some tests with Prusa i3 MK3S with firmware 3.12.2, and Octoprint 1.8.7 connected via the USB port, and by printing a pure cylinder as it has curved perimeters everywhere.

If you use standard slicing parameters, some curved paths start to stutter during prints because the USB to serial port communication is slow enough that it does not manage to keep up with the number of G-codes being sent (about 50-100 gcodes per second in some areas).

This is even more obvious i if you use "Pressure Equalizer" or other parameters that increases the number of G-codes being exported.

 

The stutters are quite short so it might not be obvious to a new user. Also it is not possible to see in any logs if problems have happened or not, but others have made custom firmware's that does notify the user when problems occur: https://chen.do/adding-buffer-monitoring-to-marlin/

 

You can however detect problems manually:

If you turn the knob on the printer to increase/decrease the speed you will notice that the speed does not go up if you increase it to lets say 200 % (if there is a lot of curves in the print), it just stutters more. If you decrease the speed you will see that the speed does not decrease initially, but the movements become smoother and stutters disappear. If you decrease it far enough so that the USB does has time to spare for the g-codes beeng sent only then do you notice a decrease in speed.

 

There are products out there that tries to solve this issue by injecting the printing code directly via the SD-card port instead of via the USB port, as it seems to be much faster: https://fiber-punk.com/products/node-pro-by-fiberpunk-prusa-mk3s-edition

I have not tried this one, but it seems it does indeed solve the print speed and stuttering issues, but it is not as fancy as Octoprint in other ways.

Perhaps using the UART header on on the printer pcb is faster than using the USB port? But as I understand the baud is the same so it should not make a difference?

 

I personally solved most of the these issues by keeping Octoprint but adjusting my PrusaSlicer settings:

  • Increased "G-code resolution" from 0.0125 to 0.025 mm under Advanced print settings.
    • It decreases the number of G-codes in the output file, at least when there is a lot of curved lines
    • As far as I can tell it does not visible decrease the quality.
  • Changed infill from Gyroid to Triangles
    • Gyroid has a lot of curves and it seems to be bugged in that it is not affected by the g-code resolution, it always generates a huge amount of g-codes no matter what resolution you select.
    • Gyroid does look pretty, but triangles has about the same functionality/strength so I'm ok with it.

 

 

 

 

 

Postato : 15/03/2023 4:11 pm
Crab
 Crab
(@crab)
Reputable Member
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

If true, this is a huge engineering flaw in the MK3 .. The USB port seems to be 1980's UART (I was designing serial interfaces then)  technology wrapped in a USB physical layer. . Thanks for your suggestions about the resolution and infill. Although that changes the resolution by 1/2, which seems pretty dramatic. I think there are some Octoprint plugins that change many x/y deltas to a gcode arc command .. not sure if that would help, but I suspect it should as it would take multiple x/y movements and combine them in fewer gcode instructions. I don't know much about this.. just something I read. 

Postato : 15/03/2023 8:12 pm
towlerg
(@towlerg)
Noble Member
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

@randomdude JOOQ have you run the same torture test with an SD card?

Postato : 15/03/2023 8:13 pm
Crab
 Crab
(@crab)
Reputable Member
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

The fact that I haven't heard of this complaint before would seem to imply that it might not be as practical a problem as it might seem on the surface. I haven't looked at the schematics of the 8 bit board to see what they are using for a UART.. Certainly in a year of printing RC cars and many projects, I have not noticed something that stood out as a problem with the interface. However, I'm pretty new to the FDM processes and so I might not have noticed issues. And I'm not extremely fussy about flaws in the surface texture. But I can say that OctoPrint is a high performance interface. It is robust and reliable. The plug-ins allow so many features, like bed leveling, region exclusion, etc. All the features that should be in any 3D printer today. But this is why if an MK4 is planned, the entire controller board needs to be engineered. I wonder if Prusa intends to update the MK3 or come out with an entirely new xyz model and then evolve that.

Postato : 16/03/2023 2:14 pm
_rob_
(@_rob_)
Eminent Member
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

I've never had issues. I don't run octoprint on the pi though. I just use the pi to provide serial over wifi and run octoprint on my kubernetes cluster. The same limitations would apply though if it was a usb problem.

Postato : 16/03/2023 7:53 pm
RandomDude
(@randomdude-2)
Active Member
Topic starter answered:
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?
Posted by: @towlerg

@randomdude JOOQ have you run the same torture test with an SD card?

SD card results in smooth prints because it uses much faster communication. That is why you can buy special SD-card emulator hardware that communicates via the SD port instead of the USB port: https://fiber-punk.com/products/node-pro-by-fiberpunk-prusa-mk3s-edition

I think there are some Octoprint plugins that change many x/y deltas to a gcode arc command

You are right, ArcWelder its called, thanks for pointing it out: https://plugins.octoprint.org/plugins/arc_welder/

Postato : 16/03/2023 10:35 pm
RandomDude
(@randomdude-2)
Active Member
Topic starter answered:
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

I just tried the ArcWelder plugin to OctoPrint, it seems to work great!

Assuming there are no issues I have not discovered, I would highly recommend it to anyone using OctoPrint and don't want to bother with other tweaks to get smooth prints without micro-stutters.

 

 

Postato : 16/03/2023 11:07 pm
_rob_
(@_rob_)
Eminent Member
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

 

Posted by: @randomdude-2

SD card results in smooth prints because it uses much faster communication. That is why you can buy special SD-card emulator hardware that communicates via the SD port instead of the USB port: https://fiber-punk.com/products/node-pro-by-fiberpunk-prusa-mk3s-edition

You should also be able to connect to the ICSP header right on the rambo and achieve similar speeds. I haven't tried it myself as I haven't had any issues with the usb to serial performance but it's on my todo list.

Postato : 17/03/2023 11:35 am
RandomDude
(@randomdude-2)
Active Member
Topic starter answered:
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

You should also be able to connect to the ICSP header right on the rambo and achieve similar speeds. I haven't tried it myself as I haven't had any issues with the usb to serial performance but it's on my todo list.

My understanding is that the ICSP header uses the same speed as the USB as it is connected to the same serial interface with the same Baud, however perhaps there is some extra overhead in the USB port that makes it extra slow? The SD port uses a different protocol that allegedly is much faster.

Postato : 19/03/2023 7:11 pm
RandomDude
(@randomdude-2)
Active Member
Topic starter answered:
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

Just an update for anyone finding this post:

This issue is now solved in the new MK4 printer, as it uses a new 32-bit architecture that first buffers the entire file in its own storage, then prints from memory without sending things over UART or USB.

Unfortunately there is no fix for MK3 and older, except the tips mentioned above.

Postato : 01/07/2023 12:20 am
_rob_
(@_rob_)
Eminent Member
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?
Posted by: @randomdude-2

My understanding is that the ICSP header uses the same speed as the USB as it is connected to the same serial interface with the same Baud, however perhaps there is some extra overhead in the USB port that makes it extra slow? The SD port uses a different protocol that allegedly is much faster.

I never saw this reply until just now...

ICSP on all arduinos that i'm aware of, including the rambo, share that interface with SPI. SPI doesn't have a baud rate as it has a dedicated line to carry the clock signal and allows for higher transfer rates.

Postato : 01/07/2023 1:41 am
RandomDude
(@randomdude-2)
Active Member
Topic starter answered:
RE: Has issues with slow USB/UART been solved so I can use OctoPrint?

 

Posted by: @_rob_
Posted by: @randomdude-2

My understanding is that the ICSP header uses the same speed as the USB as it is connected to the same serial interface with the same Baud, however perhaps there is some extra overhead in the USB port that makes it extra slow? The SD port uses a different protocol that allegedly is much faster.

I never saw this reply until just now...

ICSP on all arduinos that i'm aware of, including the rambo, share that interface with SPI. SPI doesn't have a baud rate as it has a dedicated line to carry the clock signal and allows for higher transfer rates.

If that is the case then I assume that one should be able to recompile the firmware to expect a faster speed on the ICSP, and change the baud setting in Octoprint to match this setting?

Has anyone tried this and got it to work?

Postato : 01/07/2023 2:14 am
Condividi: