Nonlinear extrusion
-
@yoshimitsuspeed
If you use the Magnetic FIlament Monitor from Duet3d you can try to use my improved automatic calibration macro for NLE by @AndyE3D
https://forum.duet3d.com/post/347692the public version of mine is only working in the latest firmware 3.6 in standalone mode / and not working in SBC mode.
-
@yoshimitsuspeed A calculator and a standardized test of some sort would be great. I eventually got it to work with my pellet extruder. It's not perfect, but it helps. I recommend starting at your lowest possible speed, calibrate your esteps with your favorite method, then repeat that test at your fastest speed, and a few in between to plot a trendline. I was not able to get it to work with my esteps calibrated at max speed and going backwards.
Here's my thread where I was trying to figure it out: https://forum.duet3d.com/topic/37013/speed-affects-extrusion-rate-with-pellet-extruder -
LOL I was so proud of myself for updating to a stable release from an RC I had been running and now I might be jumping straight back to a new RC.
I have been meaning to install my filament monitor for ages so maybe this will finally be the inspiration to do so.
I will check out your thread.I would still love to see information consolidated here on how this feature is supposed to be used without that. I think it would be much more popular if it was made easy to use.
Thanks for your option though. I will look into it more.
-
Thanks for the info and especially thanks for confirming my experience in that the esteps need to be changed massively to have any hope of making this work.
My extruder is supposed to be set around 680 steps/mm but as soon as I apply any NLE it will massively over extrude at lower speeds so I end up reducing steps/mm down to like 625 to avoid low speed over extrusion but then end up needing massive multipliers to get the high end back to where it needs to be and that seems to result in some unpredictable outcomes.This is part of what makes me think that this has never actually been implemented properly on the back end. I don't know whether this is in the Duet implementation or Rep Rap, or whether any effort has gotten the concept working properly.
But if without NLE I am getting proper extrusion at super low speed at say 670steps/mm, then I should be able to start there with my NLE. The fact that I need to lower it to 625 means either the implementation or my calculator isn't working properly.On that topic I have modified the calculator I am using to go to the volumetric flow rates I need so maybe that messed something up, even though if the formula I am using is correct it should calculate for any flow rate.
I also read something last night in a thread that said you need to start the graph where you see flow deviate from 100.
In my graph I have been starting my graph at close to zero. WIth say 0.1mm/s at 100% then scaling down as flow rate increases. So it might be an interesting test to start at say 2mm/s at 100 then curve up from there. But I also read something that it will mess up the calculator if you move the range.Either way it still suggests that either NLE isn't implemented properly, or that the calculator isn't working properly. Because if I have 0.1mm/s at 100 and 4mm/s at 99.5 then I should still be getting correct extrusion at low rates +- 0.5% not +5%.
This is why I think we really need some guidance from Duet on how this is supposed to be used and I think an official calculator with instructions on how to use it would be huge.
-
As an update in my calculator I changed it from starting at 0.1mm/s at 100% with very small changes in value on the low end, to starting at 4mm/S at 100% with larger changes in value up to the same numbers at the top and the A and B numbers are virtually identical so I don't think this would change anything.
-
@yoshimitsuspeed I don't know if I would say that it's not implemented properly because I did eventually get it to work. But it took me a lot of reading forum posts and mistakes to get it to work.
I would recommend testing at a wide range of speeds, especially speeds slower and faster than you ever plan to use. I noticed my trendline was rather linear after I threw out the data at both extremes of the inverted bell curve. At extremely low speeds, the nozzle oozes more than it extrudes, and while I didn't test it, I would imagine at extremely high speeds, extruder motor torque becomes an issue.
At least with a pellet extruder, the screw is the most efficient at its slowest (useful) speed.
Here's how I did it: I had a test model that was exactly two beads wide, and large enough to give the extruder screw time to spin up and pressurize. At the slowest speed I measured and adjusted the esteps until the beads had the same width as the slicer says it should be, using a simple linear ratio. Note this estep value will be different than it was before. Don't forget to change it back if you turn off non-linear extrusion.
I then increased the speed in increments, and printed the same test model for each speed, and measured the widths. Note that they should be decreasing as the speed increases. With the esteps calibrated at the slowest speed, divide it by the measured widths at different speeds. This gives you the new required multiplier at each increased speed.
Example with fake numbers:
Speed | width | correction factor
100 | 8 | (8/8) = 1
200 | 7 | (8/7) = 1.14
300 | 6 | (8/6) = 1.33
400 | 5 | (8/5) = 1.6
Graph the correction factor vs the speed in Excel and plot a trendline. Mine was pretty linear so I excluded the squared coefficient (B). On my trendline, the A coefficient was about 0.005 and the y-intercept was ALMOST 1 - which is correct.
Now you can go back and verify your work by comparing your old linear extrusion esteps at a medium speed to the non-linear esteps by multiplying them:
(non-linear esteps) * Bv^2 + Av + 1
They should be close to the same. -
@p8blr
I say it doesn't seem to be implemented properly because the estep values that work without it are not remotely close to the estep values to work with it.To highlight a big problem with this. If I am getting good enough results with a specific filament to run without NLE I should be able to do so. Then if say I am running TPU and need to run an aggressive NLE I should be able to add that to my TPU Gcode to enable NLE.
But when NLE esteps doesn't work properly at low volumetric extrusion until I get down to 625 steps/mm but I need 670 steps/mm to print without NLE enabled then it IMO isn't implemented properly.
I have found the "slippage" rate to be more of an increasing rate curve which mathematically it should be. The amount of resistance being squared or cubed, or something as you try to push more filament through.
So for example this is one of my most aggressive TPU curves which up to 4mm/s doesn't require much correction but up at 12 it requires much more correction per mm/s increase. Which would be expected by fluid dynamics and all that.With that said it shouldn't be 64%/ If I tried to do a static extrusion test it would be much higher but I think what we are seeing is the compounding of NLE and whatever is causing me to need to reduce the esteps.
At the 680 steps/mm my extruder is specced at I would get much closer to nominal extrusion at 12mm/s but with NLE active I would then get massive over extrusion at 1mm/s. So then I turn esteps down to 625 and get acceptable extrusion at 1mm/s, but then need to crank the multiplier up massively at 12mm/s.I have also found that around and below 70% things seem to go real weird too. So trying to get a good result across the full range is very hard. Especially when I need to turn my esteps down so much just to get it to work at all.
-
I'm not quite sure I follow the excel you show as you seem to have a 4th order polynomial and an exponential plot, but no 2nd order polynomial (quadratic) which is what NLE actually uses.
However, one thing that is clear is that you need ~1.56x more extrusion at your max speed than min speed you tested (100/64). First question: is that really true?
Second, what NLE command do you actually have, and have you specified an L parameter? NLE is limited to a maximum factor of 1+L, and L defaults to 0.2. If you haven't specified one, you won't be getting anywhere near the amount of NLE you need at higher speeds (1.2 is a lot less than 1.56). My guess is this is why you are having issues with your e-steps as anything above ~7mm/s would not get enough NLE based on your excel.
Link to the docs for ref, but I guess you've already been there!
https://docs.duet3d.com/User_manual/Reference/Gcodes#m592-configure-nonlinear-extrusion -
@engikeneer
This math is beyond me.
This is a calculator someone or some people developed I got off this forum. There is at least one other but this one seemed to be the most commonly used and most developed so it is what I have been using.These are the values to be entered for A and B
"However, one thing that is clear is that you need ~1.56x more extrusion at your max speed than min speed you tested (100/64). First question: is that really true?"
I never had much luck with the static extrusion test. Plus it isn't super accurate since the restriction during printing is different.
So I have just started adjusting the curve based on over/under extrusion at various flow rates while printing.
As I explained above the math on this curve isn't accurate to actual rates because we have to lower Esteps just to get it remotely working properly.
So as I said above to get my low extrusion rates not over extruding I need to adjust Esteps from around 680 to 625, then to prevent under extrusion at higher flow rates I need to make that up.
So 680/625 is 8.8% Add that to the 64 = 73 and that is probably pretty close to what the "slippage" would be.
Also this goes past what I would be printing at. So I might actually be printing at like 10mm/s and going to 12 just to continue the curve past what I need and likely past what would print well although I haven't dialed this filament too much.So realistically more like 10mm/s and "slippage" probably being more like 20%.
-
Oh yeah and yes I did learn a long time ago to use L.
I assume 1 is the highest value but it doesn't exactly clarify in the documentation. I have tried higher values like 10 and it seems to accept them but I never noticed any difference with values higher than 1.