• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    BrianHanifin
    last edited by 9 Oct 2017, 22:56

    Prusa Research just released a new Release Candidate firmware that includes Linear Advance. Long story short, I am getting incredible results on my Prusa MK2S with my K value set to 25 or 30, retraction set to 0.8 at 40mm/sec.

    Before that I spent much of last week experimenting with Pressure Advance on my Hypercube with my Duet Wifi. I have gotten some good results with my S value set to 0.6. But what I want to know is, how do Pressure Advance S values relate to Linear Advance K values? Is an S value of 0.25 equal to a K value of 25?

    Also, Prusa recommends changing the K value based on the type of filament used. So, I have placed that GCode in my slicer's Starting Script. Can we also add the M572 command to our slicer's Starting Script?

    According to my K Factor test print, my Hypercube's K value would be similar to Prusa's recommended 25, which is why I'd like to know how to convert between K and S.

    1 Reply Last reply Reply Quote 0
    • undefined
      DjDemonD
      last edited by 10 Oct 2017, 08:57 10 Oct 2017, 08:56

      I only know the answer to some of your questions.

      Yes you can add the M572 in your start gcode. So if you want to set it for a given filament you can. It has to be filament specific as pressure advance is there, to compensate for "elasticity" in the filament which you notice most with flexibles in a bowden tube, and least with for example 3mm PLA with a direct drive extruder.

      You'd have to look at Prusa's code to see how they use their K value to see if you can directly convert to an S value, but you could experiment with it. Print a 1 perimeter thick circular object like a cylinder, (not on vase mode), make sure you have seams aligned not random, print it and observe the effect of changing the S value as you print, see if you start getting a thin area at the start or end of each layer. Too little pressure advance and you get a thin area at the start, too much and you get a thin area at the end. I don't know if Prusa's firmware allows changing the K value as you print, but if it does print the same object and see if you can replicate the same effect. Which it seems you have done.

      Simon. Precision Piezo Z-Probe Technology
      www.precisionpiezo.co.uk
      PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

      1 Reply Last reply Reply Quote 0
      • undefined
        dc42 administrators
        last edited by 10 Oct 2017, 09:47

        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.

        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
        • undefined
          BrianHanifin
          last edited by 10 Dec 2017, 16:30 10 Oct 2017, 14:22

          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
          • undefined
            BrianHanifin
            last edited by 10 Dec 2017, 16:30 12 Oct 2017, 16:29

            @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
            • undefined
              BrianHanifin
              last edited by 10 Dec 2017, 17:04 12 Oct 2017, 17:03

              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
              • undefined
                deckingman
                last edited by 10 Dec 2017, 17:35 12 Oct 2017, 17:33

                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
                • undefined
                  dc42 administrators
                  last edited by 12 Oct 2017, 18:00

                  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
                  • undefined
                    GaRv3
                    last edited by 14 Feb 2018, 21:57

                    @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 26 Feb 2018, 17:10

                      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 18 Feb 2018, 10:42 in MarlinFirmware/Marlin

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

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        Perplexed
                        last edited by 26 Feb 2018, 17:54

                        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
                        • undefined
                          dc42 administrators
                          last edited by 26 Feb 2018, 18:25

                          @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 26 Feb 2018, 23:47

                            @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