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

    Pressure Advance Calibration

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    52
    187
    60.5k
    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.
    • DigitalVisionundefined
      DigitalVision
      last edited by DigitalVision

      (My first post here.) I feel printer tuning is still to a large extent a black art that we should be able to turn into a systematic process. As an experiment, I wanted to see if there was an easy way to calibrate the pressure advance coefficient and hacked together a short python script that generates a sequence of fast and slow linear extrusions.

      In this case I did a rather extreme version where print speed changed between 5 mm/s to 100 mm/s, and the pressure advance setting changed from 0 to 0.2s over 10 mm z height.

      0_1535925110977_IMG_1079.JPG

      In this case the optimal setting looks to be 0.074s. (Extruder is direct driven Titan Aero.)

      I've attached the script advance_cal.py and sample test.gcode if anyone else wants to try. The gcode assumed the bed center is (0,0) and likely requires a preamble (heaters, cooling fan etc). I pasted those from another file.

      Is this generally a valid approach, or am I missing something?

      edit: Updated script to support a bed center parameter, proper print height for z0, and python3 compatibility.

      deckingmanundefined wilrikerundefined garyd9undefined 3 Replies Last reply Reply Quote 9
      • dc42undefined
        dc42 administrators
        last edited by

        Yes that's a valid approach. It's on our list to add a generator of pressure advance tests scripts to reprapfirmware.org, but it hasn't happened yet.

        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

        tmitch205undefined 1 Reply Last reply Reply Quote 4
        • deckingmanundefined
          deckingman @DigitalVision
          last edited by

          @digitalvision Did you really mean extrusion rate between 5 and 100mm/s or did you mean print speed? I suspect the latter as an extrusion rate of 100mm/sec is nowhere near attainable and would relate to a print speed in the order of 5,000 mm/sec.

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

          DigitalVisionundefined 1 Reply Last reply Reply Quote 0
          • wilrikerundefined
            wilriker @DigitalVision
            last edited by

            @digitalvision Might be relevant to other trying to test: this is python2 syntax and won't run with python3.

            Manuel
            Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
            with probably always latest firmware/DWC (incl. betas or self-compiled)
            My Tool Collection

            1 Reply Last reply Reply Quote 2
            • OBELIKSundefined
              OBELIKS
              last edited by

              So if I want to have gcode for printer with 0,0 on the corner I need to change to this?
              curr_x = 110
              curr_y = 110

              P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
              Original Prusa i3 MK3S

              wilrikerundefined 1 Reply Last reply Reply Quote 0
              • token47undefined
                token47
                last edited by

                Very very nice approach. I helped writing the marlin test generator, and I think it is useful here also, but that test generates a bunch of side-by-side lines, and the visual results are not as pleasing as this one.

                Just for reference, the marlin test is this one:

                http://marlinfw.org/tools/lin_advance/k-factor.html

                1 Reply Last reply Reply Quote 1
                • wilrikerundefined
                  wilriker @OBELIKS
                  last edited by wilriker

                  @obeliks said in Pressure Advance Calibration:

                  So if I want to have gcode for printer with 0,0 on the corner I need to change to this?
                  curr_x = 110
                  curr_y = 110

                  Plus the one hardcoded G1 line at line 32. Not strictly necessary but this would have better been parameterized also.

                  Instead I just switched my printer to having 0,0 in the bed center. I wanted to do this for a while now. 😁 Now I need to find all places to adjust macros. 😂

                  Manuel
                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                  My Tool Collection

                  1 Reply Last reply Reply Quote 0
                  • OBELIKSundefined
                    OBELIKS
                    last edited by

                    Hah. Well I'll probably do the same for this test.

                    P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
                    Original Prusa i3 MK3S

                    1 Reply Last reply Reply Quote 0
                    • brunofportoundefined
                      brunofporto
                      last edited by

                      oh thanks!!!!

                      Thet is jut great 😄

                      1 Reply Last reply Reply Quote 0
                      • wilrikerundefined
                        wilriker
                        last edited by wilriker

                        Just ran the test and found a value of 0.144 best for me. But then a question formed: is PA set for the extruder or the filament? I mean do I put it into config.g or the filament's config? I think the latter but I am not sure.

                        Manuel
                        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                        with probably always latest firmware/DWC (incl. betas or self-compiled)
                        My Tool Collection

                        deckingmanundefined token47undefined 2 Replies Last reply Reply Quote 0
                        • deckingmanundefined
                          deckingman @wilriker
                          last edited by

                          @wilriker It's up to you. If you find you need different values for different filaments, put it in a macro or even the start gcode. If you always use the same value, put it in config.g.

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

                          1 Reply Last reply Reply Quote 0
                          • DigitalVisionundefined
                            DigitalVision @deckingman
                            last edited by

                            Here's another example on a different printer with a different extruder. Holding the print up to the light clearly shows the inverted color gradients showing differences in extrusion volumes.
                            0_1535998086477_IMG_6349.JPG

                            @deckingman said in Pressure Advance Calibration:

                            @digitalvision Did you really mean extrusion rate between 5 and 100mm/s or did you mean print speed? I suspect the latter as an extrusion rate of 100mm/sec is nowhere near attainable and would relate to a print speed in the order of 5,000 mm/sec.

                            Yes, I meant print speed – thanks for pointing that out. The theory being that with proper pressure advance the extrusion width should remain constant independent of print speed and acceleration/deceleration.

                            @wilriker said in Pressure Advance Calibration:

                            @digitalvision Might be relevant to other trying to test: this is python2 syntax and won't run with python3.

                            Thanks – updated the script to be python 2/3 compatible. Apologies for the messy script too – this was literally a 15 minute hack.

                            @obeliks said in Pressure Advance Calibration:

                            So if I want to have gcode for printer with 0,0 on the corner I need to change to this?
                            curr_x = 110
                            curr_y = 110

                            I updated the script to allow a bed center setting.

                            OBELIKSundefined 1 Reply Last reply Reply Quote 2
                            • OBELIKSundefined
                              OBELIKS @DigitalVision
                              last edited by

                              @digitalvision Thanks.
                              Now can someone explain my stupid ass how to output the result to a file? 😊

                              P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
                              Original Prusa i3 MK3S

                              DigitalVisionundefined 1 Reply Last reply Reply Quote 2
                              • DigitalVisionundefined
                                DigitalVision @OBELIKS
                                last edited by

                                @obeliks said in Pressure Advance Calibration:

                                @digitalvision Thanks.
                                Now can someone explain my stupid ass how to output the result to a file? 😊

                                Try:

                                python advance_cal.py > advance_cal.gcode
                                
                                1 Reply Last reply Reply Quote 2
                                • token47undefined
                                  token47 @wilriker
                                  last edited by

                                  @wilriker said in Pressure Advance Calibration:

                                  Just ran the test and found a value of 0.144 best for me. But then a question formed: is PA set for the extruder or the filament? I mean do I put it into config.g or the filament's config? I think the latter but I am not sure.

                                  It will vary a lot for different materials (i.e. PLA vs ABS) and may vary between different brands of the same materials even. I consider the value valid for the specific filment the test was made on and created macros to change the value when changing the filament.

                                  deckingmanundefined 1 Reply Last reply Reply Quote 0
                                  • OBELIKSundefined
                                    OBELIKS
                                    last edited by

                                    I will be putting it in to the filament gcode. I will also split it per nozzle, since I have "quickchange" print head.

                                    P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
                                    Original Prusa i3 MK3S

                                    1 Reply Last reply Reply Quote 0
                                    • wilrikerundefined
                                      wilriker
                                      last edited by

                                      Thanks to everyone, I decided to put it in the filament's config. 🙂

                                      Manuel
                                      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                      with probably always latest firmware/DWC (incl. betas or self-compiled)
                                      My Tool Collection

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

                                        @token47 said in Pressure Advance Calibration:

                                        It will vary a lot for different materials (i.e. PLA vs ABS) and may vary between different brands of the same materials even. I consider the value valid for the specific filment the test was made on and created macros to change the value when changing the filament.

                                        Thinking about the mechanisms at work which cause pressure to build up, it's likely to depend on the viscosity of the filament if everything else (Bowden tube length, melt chamber size and nozzle diameter) remain the same. In my own experiments, I've found that print temperature can have a small effect as it changes the viscosity but I can't say that I've noticed any difference between brands of the same filament. In fact, I can't say that I've notice any difference between PETG at 220 and PLA at 195. Maybe the difference in temperature cancels out the different viscosity characteristics of the materials. I can't print ABS so cannot say if that behaves differently.

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

                                        1 Reply Last reply Reply Quote 0
                                        • wilrikerundefined
                                          wilriker
                                          last edited by

                                          This is not completely on-topic but still fits here I hope:
                                          Linear Advance and Non-Linear Extrusion. Are they mutual exclusive or can they be used complementary? If the latter what would need to be tuned first?

                                          Manuel
                                          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                                          with probably always latest firmware/DWC (incl. betas or self-compiled)
                                          My Tool Collection

                                          dc42undefined 1 Reply Last reply Reply Quote 2
                                          • dc42undefined
                                            dc42 administrators @wilriker
                                            last edited by

                                            @wilriker said in Pressure Advance Calibration:

                                            This is not completely on-topic but still fits here I hope:
                                            Linear Advance and Non-Linear Extrusion. Are they mutual exclusive or can they be used complementary? If the latter what would need to be tuned first?

                                            They can both be used together. I don't think they should interact much, but if in doubt I suggest you tune nonlinear extrusion first.

                                            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
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA