Enhancing pressure advance
-
After waking up today and thinking more about this, I want to change my declaration from "this is definitely slicer territory" to "we should be doing this in firmware."
G-Code from a slicer should represent the least information possible. Both to reduce file size, but also to allow each machine to adjust parameters of Wet Noodle Syndrome (WNS) itself.
So, I think this feature should be added to firmware retraction.
I have seen recently people question the use of firmware retraction over slicer retraction (outside of testing different retraction settings). I think this feature would make firmware retraction a feature very much worth using over slicer retraction, and it would allow the sliced G-code to be more portable (as compared to making this a slicer feature).
@dc42 do you have any thoughts as to why this should or should not be in the hands of the firmware? Not asking you to code this into 2.05.1 or anything. You could implement into 3.0 going forward, though, I suppose.
-
Have you looked into how kisslicer handles nozzle pressure?
-
@Phaedrux I'm embarassed to say no, not yet. I had that on a list to do. In fact, I tried to install it a few weeks back but I could not get past the setup process.
User interface is a very important feature for me. I'm not just trying to achieve really good prints at high-resolution, I'm trying to develop a workflow that I can easily teach other people to replicate with ease. User Interface is important, and Kiss provided me a small enough stumbling block to allow me to fall back to what I know.
I'm not happy with my current slicer. They shall remain unnamed, but they were supposed to have released 5.0 by now!
I will definitely check out Kiss. Do they have this feature, or something like it?
The problem for me with this is the time investment into learning a new slicer and developing new profiles. Extensive testing has already gone into my not 5.0 unnamed slicer profiles, which are now giving me good speed:performance outcomes.
I'll check it out. But adding this to firmware retraction would make the use of any slicer possible while retaining this feature (so long as the slicer can be made to work with FW retraction).
-
Kiss uses a calibrated preload setup. It seems to work well, but I, like you, found it very difficult to get past the ocular migraine they're trying to pass as a GUI, and was never able to get it all dialed in.
I've been using the Smartavionics/burtoogle Cura build for quite some time now. It fixes most of my gripes with Cura and has enough knobs to twiddle to get me what I need. It doesn't have the clever tuning procedure wizards that kiss has, but I do like the ability to fine tune speed/accel/jerk/flow for all move types. When you add in the post processing features, change parameters at Z height, modifier meshes, and fine grained control over things like overhangs, supports, bridging settings, and it's quite powerful.
But I digress.
-
@bot I'm testing something on my side. Would you share a test gcode that demonstrates your use case, preferably with many layers. I sorta implemented what you suggested, but it's not that simple in the grand scheme of the firmware, so I would like to make sure I got it right before sharing code and firmware file.
Basically, I took your formula and added some averaging to the computations, since the whole thing has to be time-based to accommodate both long and short moves. Maybe I'm thinking too far, anyways, here are my test results:
Before:
After:
And I'm using a constant value of 0.5 - 0.4 (plus some other time constants because I think I had to).
On the side note: 2.05.1 is so much smoother when running near max step rate and high PA. Good work!
-
@Edgars-Batna Nice work. Are you modifying only the unretract move or are you injecting movement somewhere else? The results look promising!
I can definitely share a gcode file that I am using to troubleshoot this. It's the top part of a real-world print I'm attempting. The problem occurs at the very first move after the skirt (which made it convenient for testing), but it also happens at other spots in the file where a slow perimeter is preceded by a fast print move like support or infill, namely on layers form about 94 and up, where the tops of the letters are being formed as individual islands.
-
@deckingman said in Enhancing pressure advance:
In theory, PA should mean that one move finishes with zero residual pressure and the next one starts at that same residual pressure of zero.
Only if extrusion stops completely between moves.
Essentially, pressure advance is a filament extrusion distance advance, such that the extra extrusion distance is a function of the current extrusion speed. That distance is currently proportional to extrusion speed; but I think it needs to be a nonlinear function.
Does anyone have the time to do the pressure advance vs speed tests that I outlined in my earlier post? https://forum.duet3d.com/post/138461
-
@dc42 I'll perform those tests today. I think people have performed similar tests in the past. @deckingman has previously determined that linearity is acceptable, but I'll see what I can set up to test again to see if we can reproduce similar findings.
-
I can't help but notice the words non-newtonian haven't come up yet.
-
@bot said in Enhancing pressure advance:
@Edgars-Batna Nice work. Are you modifying only the unretract move or are you injecting movement somewhere else? The results look promising!
The unretract move acts as you described it, but the extrusion rate of last move and the created underextrusion were also a factor that required some more implementation or it ended up ugly. I think I implemented it this way:
- The average extrusion rate of last 5 seconds is stored.
- Unretraction move applies your formula.
- The remainder of extrusion is stored for later.
- The next moves are adjusted by the remainder, factored by move time. 5 second moves get the most of the extrusion remainder. Remainder is passed on from move to move.
Result is a small fixed amount of total underextrusion. There you see the time constants that could also be adjustable.
I can definitely share a gcode file that I am using to troubleshoot this. It's the top part of a real-world print I'm attempting. The problem occurs at the very first move after the skirt (which made it convenient for testing), but it also happens at other spots in the file where a slow perimeter is preceded by a fast print move like support or infill, namely on layers form about 94 and up, where the tops of the letters are being formed as individual islands.
I'll try it as soon as my other test is finished.
@Phaedrux said in Enhancing pressure advance:
I can't help but notice the words non-newtonian haven't come up yet.
You mean we'll need a GUI to plot a graph when tuning filament by hand? Jokes aside, you mean that there might be no PA required up to a certain pressure or from a certain pressure depending on material and such? Honestly, I'm as good as Google on this topic, because I have to Google it all.
-
@dc42 Print 1 of 20 is underway of the test. I will be printing a single wall cube with sudden speed changes in the middle of the faces, with no speed changes at the corners, and the speed change going from V1 to V2 then V2 to V1.
XY Accel: 300 mm/s/s
XY Jerk: 1.5 mm/s4 mm/s to 40 mm/s and vice versa
8 mm/s to 40 mm/s and vice versa
16 mm/s to 40 mm/s and vice versa
32 mm/s to 40 mm/s and vice versaThe 4 different prints will each have the following PA variations:
S0.0
S0.1
S0.2
S0.3
S0.4Total 20 prints.
Results tonight or tomorrow (Pacific Time).
-
@bot My printer chirps like a bird when I print this file. Is it supposed to go super fast?
-
@Edgars-Batna Hmm the 100 mm/s parts go fast and the 6 mm/s parts go slow! There are only those two feedrates. Also, I think I have the retraction speed and the travel speed ten times higher than normal so I can scale down the speed of the print without slowing those moves down.
Check the gcode and adjust the speeds as needed or whatever! Its a 0.2 mm line width and a 0.04 layer height (after the first layer) so I'm not sure if you'll be able to print it anyway.
-
I'm changing the test prints to be one layer only. This makes observations easier. I will simply photograph the result from the top and then move on to the next. This will be faster.
-
@dc42 said in Enhancing pressure advance:
@deckingman said in Enhancing pressure advance:
In theory, PA should mean that one move finishes with zero residual pressure and the next one starts at that same residual pressure of zero.
Only if extrusion stops completely between moves.
I know. That's why, I went on to say (quote)...... "But what might balls that up is "jerk", because the print head doesn't come to a standstill between print moves, and so neither does the extruder."
-
@bot said in Enhancing pressure advance:
@Edgars-Batna Hmm the 100 mm/s parts go fast and the 6 mm/s parts go slow! There are only those two feedrates. Also, I think I have the retraction speed and the travel speed ten times higher than normal so I can scale down the speed of the print without slowing those moves down.
Check the gcode and adjust the speeds as needed or whatever! Its a 0.2 mm line width and a 0.04 layer height (after the first layer) so I'm not sure if you'll be able to print it anyway.
Unable to print with 2.05.1 official at all. Getting just loud extruder motor chirps. My other, normal, test print went fine, tho.
If you feel adventurous, here's modified firmware (rename to .zip): Duet2CombinedFirmware.txt
Usage: M207 C[your constant]. For multiple extruders specify a list: A:B:C...
M207 reports the values as "compensation".
Only tried on 2 extruder mixing CoreXY setup.
Only works with firmware retraction (G10/G11).Looking at your GCode, steps with E0.0000x just plain won't work and steps with E0.000x will have tons of error because the computations in the firmware are not this precise. Maybe you are chasing a completely different beast... Could you create a test with reasonable extrusion rate?
I'd post source code but git is getting on my nerves regarding newlines, so this will need to wait until tomorrow.
-
@Edgars-Batna Unfortunately, this is a reasonable extrusion rate and the areas I need to tune. Low resolution prints don't really need the extra attention, at least for my uses.
But, I suggest you generate a g-code yourself that just uses the top print speed you can achieve with a move that comes after that is the slowest speed you can achieve.
Also, what do you mean by the firmware doesn't compute that precise? AFAIK, the firmware uses 6 digits of precision. No?
-
@bot said in Enhancing pressure advance:
Also, what do you mean by the firmware doesn't compute that precise? AFAIK, the firmware uses 6 digits of precision. No?
Don't get me wrong. I want this to work too! But, the chirping on my printer are lost extruder steps. I'm talking from experience from digging around for weeks in the firmware a year ago.
Excerpt from your file:
G1 X20.514 Y12.885 E0.0004
G1 X20.514 Y12.767 E0.0004
G1 X20.627 Y12.767 E0.0004
G1 X22.028 Y14.168 E0.0066
G1 X22.036 Y14.168 E0.0000
G1 X22.036 Y14.104 E0.0002
G1 X22.106 Y14.104 E0.0002
G1 X22.124 Y14.026 E0.0003So, just at a basic glance, there is like nan% up to inf% of compensation required. KABOOM the computations go.
-
@Edgars-Batna Nah dude. It works fine. Trust me, it's been tested thoroughly.
My extruder microstep resolution is about 0.00025 mm
[Edit: I mean, everything else works fine and there are no hugely obvious errors. For PA, I dunno maybe this messes it up but it doesnt seem like it.]
-
@bot said in Enhancing pressure advance:
@Edgars-Batna Nah dude. It works fine. Trust me, it's been tested thoroughly.
My extruder microstep resolution is about 0.00025 mm
[Edit: I mean, everything else works fine and there are no hugely obvious errors. For PA, I dunno maybe this messes it up but it doesnt seem like it.]
Alright, my extruders go at 0.00236 mm, but be warned. I also didn't understand why S3D only outputs 4 digits after comma...
I'd also be interested to see if my implementation does anything for you. For me it greatly reduced blobbing/stringing at the start of a move with C0.4, but I only ran two tests.