Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Pressure Advance: How does S values compare to K values?

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    7
    13
    4.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BrianHanifinundefined
      BrianHanifin
      last edited by

      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.


      Source: https://mattshub.com/2017/10/02/linear-advance/

      1 Reply Last reply Reply Quote 0
      • BrianHanifinundefined
        BrianHanifin
        last edited by

        @dc42:

        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. 😉

        1 Reply Last reply Reply Quote 0
        • BrianHanifinundefined
          BrianHanifin
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • deckingmanundefined
            deckingman
            last edited by

            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.

            Ian
            https://somei3deas.wordpress.com/
            https://www.youtube.com/@deckingman

            1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators
              last edited by

              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.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • GaRv3undefined
                GaRv3
                last edited by

                @dc42:

                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

                1 Reply Last reply Reply Quote 0
                • JohnOCFIIundefined
                  JohnOCFII
                  last edited by

                  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.

                  https://github.com/MarlinFirmware/Marlin/pull/9700

                  Sebastianv650 opened this pull request in MarlinFirmware/Marlin

                  closed [1.1.x] LIN_ADVANCE v1.5 #9700

                  1 Reply Last reply Reply Quote 0
                  • Perplexedundefined
                    Perplexed
                    last edited by

                    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!

                    1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators
                      last edited by

                      @JohnOCFII:

                      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.

                      https://github.com/MarlinFirmware/Marlin/pull/9700

                      So Marlin will behave as RRF has always done!

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 1
                      • JohnOCFIIundefined
                        JohnOCFII
                        last edited by

                        @dc42:

                        @JohnOCFII:

                        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.

                        https://github.com/MarlinFirmware/Marlin/pull/9700

                        So Marlin will behave as RRF has always done!

                        That is what I thought I was reading in that PR - thanks for confirming!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA