Pressure Advance: How does S values compare to K values?
-
Thank you for the replies! Obviously I cannot use the exact same settings between my direct drive Prusa and my bowden Hypercube. But, I did want to use the K Factor Test.gcode described on Matt's Hub as a guide to calibrate my S code. I will do some experiments when I get time and report back in a few days.
-
The difference is this. RepRapFirmware calculates:
So the connection should be:marlin_K = extruder_steps_per_mm * rrf_K
[[math]] 25 = 98.75 * rrf_K 25 / 98.75 = 0.253164557
OK, so according to my K Factor Test.gcode results, somewhere between 20-30 appears to be ideal with this PLA filament. Applying dc42's formula, I rounded my K value to 0.25. I have added the following code to my slicer's starting script.
[[gcode]] M572 D0 S0.25
As I write this my printer is 75% through my test cube and it is looking just as good as the previous print done at 0.15. I feel like this has have given 3D Printing an evolutionary step forward! Finally we have a way to get rid of those disappointing line change blobs!
P.S. For my current printer – since my extruder's steps per mm is nearly 100 -- the math ends up being as simple as moving the decimal point. For anyone that happens upon this post in the future though, please calibrate your extruder's steps per minute before attempting this math.
-
It just occured to me that if RepRapFirmware doesn't support M900, then any results I get by printing K Factor Test.gcode are invalid! The gcode simply draws lines back and forth, with each new parallel line increasing the K value… except using M900 instead of M572. Would it be wise to adjust the gcode for RRF, replacing M900 K10 with M572 S0.10 for example? Or does M900 work?
[[gcode]] M900 K10 G1 X80 Y30 E0.37418 F1200 ;Travel to next testline G1 X60 Y30 E0.74835 F1200 ;Slow part G1 X30 Y30 E1.12253 F4200 ;Accelerate - cruise - decelerate G1 X10 Y30 E0.74835 F1200 ;Slow part M900 K20 G1 X10 Y40 E0.37418 F1200 ;Travel to next testline G1 X30 Y40 E0.74835 F1200 ;Slow part G1 X60 Y40 E1.12253 F4200 ;Accelerate - cruise - decelerate G1 X80 Y40 E0.74835 F1200 ;Slow part
Full source: https://gist.github.com/anonymous/988a04f4454cbcdec78ae7342894fdd6
-
My understanding is that pressure advance is applied to the acceleration and deceleration phases of the extruder move. So whatever gcode file you print will have pressure advance applied if it is enabled. You can even change the M572 value "on the fly" during a print to evaluate the effect of any changes. M900 commands that are embedded in the gcode file will just be ignored.
-
RRF doesn't currently support M900. Sadly the Marlin devs did their own thing (as they often do) instead of using a gcode that already existed to configure pressure advance. So re-running the code using M572 would be wise.
However, a word of warning. In RRF, changes to pressure advance do not take place exactly at the point in the gcode file where you specify them. In fact they may happen a few moves earlier. The same is likely to be the case in Marlin. So I suggest you either print several zigzags at each setting, or use M400 immediately before or after M572. M400 will cause the machine to come to a standstill briefly, so ignore the print quality at that point.
PS - one problem with implementing M900 in RRF is that M900 doesn't have the facility to specify which extruder(s) you want to change. If you are printing with 2 different filaments, you may need different values of pressure advance for each of them.
-
The difference is this. RepRapFirmware calculates:
advance_distance = rrf_K * extrusion_speed
Marlin calculates:
advance_steps = K * extrusion_speed
So the connection should be:
marlin_K = extruder_steps_per_mm * rrf_K
In RRF the value of K needed is independent of the extruder steps/mm, unlike Marlin. The optimum value of K will depend on the filament, extrusion temperature, and even to a small extent on the extruder stepper motor current.
It should be more like
marlin_K = extruder_steps_per_mm * rrf_K / 10
To calculate your RepRap K factor from a known Marlin K factor it is
rrf_K = marlin_K / 1000
-
Be advised that a significant change to Marlin Linear Advance is in the works. Once that is released, these comparison between Marlin K values and RRF PA S values will change.
-
Hi
After reading this post it becomes clear to me that a great feature on the wiki is a list of features that the senior members of this forum recommend us less senior to implement. This is a great feature I never heard of before.Thanks!
-
Be advised that a significant change to Marlin Linear Advance is in the works. Once that is released, these comparison between Marlin K values and RRF PA S values will change.
So Marlin will behave as RRF has always done!
-
Be advised that a significant change to Marlin Linear Advance is in the works. Once that is released, these comparison between Marlin K values and RRF PA S values will change.
So Marlin will behave as RRF has always done!
That is what I thought I was reading in that PR - thanks for confirming!