prusa3d / Prusa-Firmware

Firmware for Original Prusa i3 3D printer by PrusaResearch
GNU General Public License v3.0
2k stars 1.05k forks source link

Prevent oozing after filament load #4534

Closed sarusani closed 7 months ago

sarusani commented 8 months ago

This is my attempt to fix leaking filament issues like it's described in #4531.

After a filament load & canceled/ended prints, the filament tends to leak extensively, which will mess up the first layer of a new print if not properly cleaned.

By retracting the filament by 10mm & then extracting 2mm (to make sure it's close enough to do a successful "prime line"). I eliminated this problem on my printer completely. I use this modification for at least a year and never had any issues. (It tends to still leak a bit when I just do a single 8mm retraction...)

This results in the same behaviour like leaving the printer preheated for about 10min. after loading filament. -> The "prime line" is not printed 100% but it starts after about 1/3 of the total distance.

I did't touch M600, so filament change during print is not affected.

This change combined with adding

G1 E-10
G1 E2

to the start of my "end G-code" in the slicer, fixed the issue for me and I don't have to hover over my printer with tweezers at the beginning of every print anymore.

github-actions[bot] commented 8 months ago

All values in bytes. Δ Delta to base

Target ΔFlash ΔSRAM Used Flash Used SRAM Free Flash Free SRAM
MK3S_MULTILANG 0 0 247088 5656 6864 2536
MK3_MULTILANG 0 0 246370 5663 7582 2529
3d-gussner commented 7 months ago

@sarusani Thanks for the PR. Please provide some more information how we could test this. As far I see you retract quite a bit and the purge line isn't extruding completely, which makes me nervous that we may end-up with some under extrusions. "Loosing" 8 mm during filament changes needs some good arguments before considering the change.

sarusani commented 7 months ago

I found the easiest way to test this is to:

  1. increase the nozzle temp to 5 degrees more than you would normally use for that filament. (To "simulate" the worst case oozing).
  2. Load some filament (wait a couple of minutes to check for oozing)
  3. Start any print, then cancel/stop it
  4. Restart print.

Check if enough of the "intro/prime line" is printed to build up proper nozzle pressure in both cases.
You can also change the retraction/extrude params in the variants config file to check if lower values give you similar results with lower impact on the intro line.

In my experience only the first part of the intro line is not extruding in full. The second part, that actually builds up the nozzle pressure, always prints without problem. (This also makes sense, since it's extruding two times 9mm, so the second part should always be fine)

If I'm using the original code (without my modification) and just let the printer ooze for a couple of minutes I also loose about 5-8mm of filament to oozing. (Depends on the filament) So I think my code is not changing the outcome of the intro line too much.

I've been using this with PLA, PETG, PVB, ASA, ABS, PC Blend, PC Blend CF, Woodfill (LayWood) & Stonefill (Laybrick) filaments.

sarusani commented 7 months ago

I did a lot more testing during the last few days and I get almost identical results by retracting 10mm and then extruding 4mm. Retracting less than 10mm always gives me worse results and by extruding more than 4mm, it immediately starts to ooze again.

In my opinion 4mm is a good compromise between ooze prevention and not compromising the "intro line".

I updated the variants configs accordingly.

3d-gussner commented 7 months ago

@sarusani Thanks for the update. I will discuss this PR internally and try to get some answer from our PrusaSlicer profile gurus.

3d-gussner commented 7 months ago

@sarusani I got some feedback:

No one can tell with certainty if it will possibly break something. Also, I guess he only played with 0.4mm nozzle. The missing 8mm will create different scenario with different nozzle diameters. There is also some non-zero possibility of clogging the hotend, loads are often performed with much higher temps than target temps (for example if you unload high temp material and then load low temp material immediately).

Maybe as a compromise create a //#define COMMUNITY_PREVENT_OOZE in the variants and encapsulate your changes with #idef COMMUNITY_PREVENT_OOZE and #endif //End COMMUNITY_PREVENT_OOZE.

This would allow us to merge it while keeping on "Stock" printers the known settings and more experienced users can compile the firmware with this change. With more community tests and different nozzle sizes we may consider again to make it default in the future.

sarusani commented 7 months ago

I totally agree. I only have a very limited test set. (nozzle sizes/materials, filament types/brands).

I added #ifdef with the latest commit.

3d-gussner commented 7 months ago

With #define COMMUNITY_PREVENT_OOZE

All values in bytes. Δ Delta to base

Target ΔFlash ΔSRAM Used Flash Used SRAM Free Flash Free SRAM
MK3S_MULTILANG 104 0 247192 5656 6760 2536

Cmake compiling off all variants also works. Didn't test it but I fine to approve it so the community can use it.