Zero filament extrusion directly after retraction

Hello *,
I have used a lot of time in tracking the following issue, but had no success. Maybe you have an idea. After each retract, there is a short time, where no filament is extruded. It feels like the extruder has no time to complete the unretraction. I did several experiments for tracking the problem.
All experiments have been made on an RPI 4 with the latest klipper version:

git describe --tags
v0.10.0-320-g7e654aed


You can see some of my results on the Picture. Rightclick and open in new tab if you have trouble to see the details. The Issue is not that relevant on the calibration cube.

Default values:

[extruder]
pressure_advance: 0.39
pressure_advance_smooth_time: 0.040
max_extrude_only_distance: 100
max_extrude_only_velocity: 120
max_extrude_only_accel: 4500
max_extrude_cross_section: 120
[firmware_retraction]
retract_length: 2.5
retract_speed: 45
unretract_extra_length: 0.02
unretract_speed: 10

1: retract: 3mm, PA: 0.39 Smoothtime: 0.16
2: retract: 1mm, PA: 0.39 Smoothtime: 0.16
3: retract: 1mm, PA 0.39 Smoothtime: 0.04
4: retract: 3mm, PA: 0.39 Smoothtime: 0.04
Started using fimware retract.
5: FW retract: 2.5 mm, PA: 0.39 Smoothtime: 0.04
6: FW retract: 2.5 mm, PA: 0.39 Smoothtime: 0.04, max_extrude_only_accel: 2000

3 has no visible issue, but I can not use a retraction of 1 mm, so this is no solution. The minimum needed retraction to avoid stringing is 2.5mm.

This is the movement at the specified position:

And this should be the position in the GCODE:

G1 X108.706 Y117.105 E1106.17443
G1 X108.706 Y119.018 E1106.25078
G10
G0 F12000 X108.406 Y119.018
G0 X117.223 Y119.614
G0 X117.223 Y121.69
G0 X121.9 Y121.9
;TYPE:WALL-INNER
G11
G1 F3000 X103.1 Y121.9 E1107.00113
G1 X103.1 Y103.1 E1107.75148

I did a lot of other experiments that are not that well documented. But here are my results

  • Printing slower makes the issue proportionally smaller.
  • Disable PA will solve the issue on some retractions but not on all
  • Changing the PA value will not cause big changes.


A print where I live adjusted some values. As I said no PA only helped after some retractions, there are other positions of retractions where it did not help much.

image
Speed settings in cura (sorry graphics are always broken in cura after hibernate)

What experiments I did else:

  • Another nozzle
  • Another tube
  • Another heatbreak
  • Modified heatbreak to be perfect smooth

My first thought had been that, I have too much resistance on the last part of the extruder-bowden-hotend setup and some pressure is needed to start overcome that resistance. But that lowering the speed makes things better disproves this. Additionally, I changed all parts, and they have at least ok quality.

I can upload my config if this helps. Or Log. Just ask! Or whatever you want ^^ As long it helps ^^

The target is to understand the Problem for solving it in long term, not to find a workaround.
I’m not sure the issue is klipper related, but I’m running out of ideas, and maybe it appeared first time after changing from marlin to Klipper, even this is hard to decide as there was other more relevant issues that already could be solved.

Thanks for reading!

I found a workaround for now. At least it gives more information about the issue:

[gcode_macro G11]
rename_existing: G11.1
gcode:
  G11.1
  G4 P30

This modifies the unretract gcode to unretract and then wait 30ms.

Possibly this is not optimal, as the Time to wait should depend on the retraction duration and the amount of retract and should be combined with the movement. I have too little information about how a retraction should work in best case. For some simple test it worked perfect. Fell free to reuse this little hack.
As this works, it is proved that this is a timing issue.
The next thing I will try is another nozzle from higher quality, possibly the delay is needed because the filament is not melting fast enough in the Nozzle. This could be a standard issue.
If I can confirm it, there possible should be started, a feature request for solving this issue directly in klipper. This would allow solving this more professional.

Additionally, it would be nice to hear, the thought of somebody who has better knowledge referring to the timing issue. As I would assume, this issue would be addressed directly by the Firmware. And possibly it is already handled by firmware.

Regards!

If there would be timing issue WRT retraction, this forum would be full of such issues, so very unlikely.
Most likely: Some mechanical issues with your Extruder, e.g. high backlash, low quality, worn / loose gears, loose bowden coupling etc.

Yes, this was my first thought too. But I checked and changed everything. But I will continue with testing, both nozzle I tried was cheap, maybe there is some space for problems, but still waiting for delivery of a better one.
As I triple checked all point you did mention. Do you have more ideas what else could be wrong?
My theory is that the filament will be cooled down a bit and get more solid if retracted and the 30ms are needed for meld it again and pass the nozzle head. This could happen because the surface contact of nozzle and filament is not optimal after retraction and the pressure is minimal, as it should.
Even if 30 ms are a lot of time, I think there is always needed time to go through this process.

I agree to, that it is still likely that something not optimal on the Hardwareside. But please also note that the issue will be less significant with lower speeds.

It could still be nice to know how this is handled in klipper, even if the time of 30ms that is needed for going back to normal operation seems to be high. I expect there is always needed a short time for going back to normal operation after retraction. The fact that the pressure is very low at this moment, will slow down the progress a lot.

I will continue with tracking down possible hardware issues.

Thanks for reading

Klipper needs to carefully synchronize the moves in X/Y with the needed extrusion. Adding arbitrary delays in there is is probably a good way to unwanted results.

With a properly tuned Pressure Advance and proper hardware you should not need more than 2mm retract. With ~2mm you are safely within the heated zone of your extruder.

Well this is exactly the “core competency” of a firmware: Synchronizing and queuing different moves so that the result matches. If you want to have details you need to read the code or find a developer willing to explain how this works.
Some details here: Kinematics - Klipper documentation

Thank you Sineos! This was a very helpful hint. I changed the strategy for fighting the issue and started to optimize the retraction amount. With a bit less flow it was possible to minimize the retraction to a minimum of 1.25 mm. I think the printer is minimal under extruding now, but as the results are still excellent this is no concern.
Do you think if the minimum measured retraction is 1.25 mm to set the retraction to 1.5 mm also for other PLA filaments?
This printer is used by many people, and it is a very hard task to communicate that they need to change settings on every filament change. So I need to use universal settings even if it means that the quality will be slightly decreased.

Yes, reading and understanding the code and the math taking time, which I actually don’t have. But I there will be no way around this in long term. I’m a good low level programmer and did write some very efficient stepper driver using DMA and perfect timing with minimal CPU usage for some architectures. But I think understanding the Python and Math in klipper will be a bigger deal for me.

I did a lot of prints in the meantime and I had no problems or unexpected side effects. Maybe a slightly slower print. So for the current version, klipper has handled the delay fine, it seems to be safe to use or at least to test my little hack, if somebody has a similar issue.
Of course, I stopped using it now.

Thank you for your help and time, it helped me out by tracking the issue.

Retraction is mainly needed to avoid stringing / oozing and generally should be as low as possible. According to my experience and depending on the material / printing temperature / nozzle size, you can get away with 0.75 mm to 2.5 mm. You have to find the sweet spot between retraction acceleration / speed and retraction length.
For me values around 40 mm/s have proven quite good.

For showing the final result:
image

This is the same STL as showed at top, reprinted with the new settings. We have printed this STL on many printers and this it is definitely the best result we ever got.
So I’m very satisfied with the setup.

Really nice!

2 Likes