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

    Extruder Linearity

    Scheduled Pinned Locked Moved
    General Discussion
    7
    40
    6.0k
    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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by

      I just came across this from Prusa Research about calibrating the extruder motor for linearity using a feature of the Trinamic drivers they use on the MK3. They claim to be able to reduce step variation and consequently the moire pattern that can sometimes show up. I've been trying to get rid of it at low layer heights myself, which is how I came upon it.

      Found here: https://github.com/prusa3d/Prusa-Firmware/wiki/Extruder-linearity-correction-calibration
      and here: https://github.com/prusa3d/Prusa3D-Test-Objects/tree/master/MK3/ECOR_TOWER
      and the gcode file here: https://raw.githubusercontent.com/Prusa3D/Prusa3D-Test-Objects/master/MK3/ECOR_TOWER/PLA_MK3_ECOR_TOWER.gcode

      So my question is, do the Trinamic drivers on the Duet support the same command they use?

      TMC_SET_STEP_E#

      Z-Bot CoreXY Build | Thingiverse Profile

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

        @phaedrux From the very vague description of what they are doing I can only assume that they are playing with TBL value in the CHOPCONF register. You can use my chopconf-generator to modify the value and get the appropriate M569 Cnnn parameter.

        In Parameterization of spreadCycle Trinamic recommends to increase TBL to improve the waveform but note that Duet already runs at the second highest value for this paramter so you also might want to try the two below (there are only four different settings in total for this parameter).

        EDIT: I only now looked into the GCode file and saw they are using custom commands in there. Will have a look in the source code what they do in detail.

        EDIT2: So, after looking into the source code of their Marlin fork it seems to me that they are using a feature that is not present in TMC2660 as used on the Duet. I looks to me as if it is possible to manipulate the internal sine wave table of TMC2130

        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

        Phaedruxundefined 1 Reply Last reply Reply Quote 1
        • Phaedruxundefined
          Phaedrux Moderator @wilriker
          last edited by

          @wilriker Thanks for digging into this. Drivers sure have come a long way from the A4988s.

          Z-Bot CoreXY Build | Thingiverse Profile

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

            I can believe that linearity could be an issue with ungeared extruders, but I've never encountered a problem that I can put down to motor linearity when using 3:1 geared extruders, even though all my printers use 1.8deg extruder stepper motors not 0.9deg. However, I rarely print with nozzles smaller than 0.2mm or layer heights below 0.2mm (occasionally 0.1mm).

            Any linearity correction applied to the motor would probably need to be varied according to the filament, extrusion temperature and extrusion speed, because it will be affected by the amount of back pressure.

            So if you think you have a problem with linearity of extrusion, I suggest you look at changing from a 1.8deg to a 0.9deg motor first, and higher extruder gearing second. You may also need to increase extruder microstepping.

            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

            wilrikerundefined deckingmanundefined 2 Replies Last reply Reply Quote 0
            • wilrikerundefined
              wilriker @dc42
              last edited by

              @dc42 said in Extruder Linearity:

              I can believe that linearity could be an issue with ungeared extruders [...]

              This would at least explain why Prusa is looking into this kind of stuff as the MK3 uses an ungeared Bondtech extruder.

              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 @dc42
                last edited by

                @dc42 said in Extruder Linearity:

                So if you think you have a problem with linearity of extrusion, I suggest you look at changing from a 1.8deg to a 0.9deg motor first, and higher extruder gearing second. You may also need to increase extruder microstepping.

                I would add increase nozzle diameter if you possibly can. The difference between a 0.4mm nozzle and a 0.5mm nozzle is about 50% greater area so much reduced pressure for not too much loss of resolution (IMO).

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

                1 Reply Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator
                  last edited by

                  Well I was originally looking into this because I was seeing some tiger stripe like surface finish on lower layer heights below 0.2 when the layer lines are less dominant of a surface feature. However, I think that is resolved now after replacing some bad v wheel bearings.

                  0_1531945070554_IMG_1960.jpeg
                  Left is the issue I was seeing. Right is after replacing the wheel bearings.

                  I'm already using a Titan Aero (3:1) with a 0.9 stepper. And I will be giving 256 microsteps a try, though I'm a little concerned about 12883 e steps. So far so good though.

                  Z-Bot CoreXY Build | Thingiverse Profile

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

                    @phaedrux said in Extruder Linearity:

                    Well I was originally looking into this because I was seeing some tiger stripe like surface finish on lower layer heights below 0.2 when the layer lines are less dominant of a surface feature. However, I think that is resolved now after replacing some bad v wheel bearings.

                    0_1531945070554_IMG_1960.jpeg
                    Left is the issue I was seeing. Right is after replacing the wheel bearings.

                    I'm already using a Titan Aero (3:1) with a 0.9 stepper. And I will be giving 256 microsteps a try, though I'm a little concerned about 12883 e steps. So far so good though.

                    The thing to watch out for with 256 micro stepping of the extruders is how fast you can retract before running into problems. My Bondtech BMGs have the same gearing and roughly the same steps per mm as the E3D Titans and the best I can get is about 1800 mm/min (30 mm/sec) with 1.8 degree motors so I'd guess with 0.9 degree motors you'd be looking at half that (or use 128x instead).

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

                    Phaedruxundefined 1 Reply Last reply Reply Quote 0
                    • Phaedruxundefined
                      Phaedrux Moderator @deckingman
                      last edited by

                      @deckingman Thanks for the tips.

                      I haven't noticed any retraction issues yes in the limited testing I've done so far (it's 3 hours through a 4 hour print) and I'm retracting 0.8mm @ 7200mm/min.

                      Just checking M122:

                      Slowest loop: 121.14ms; fastest: 0.08ms
                      === Move ===
                      Hiccups: 3995951, StepErrors: 0, LaErrors: 0, FreeDm: 152, MinFreeDm: 120, MaxWait: 139866ms, Underruns: 0, 0
                      Scheduled moves: 143654, completed moves: 143624
                      

                      I'm not sure if that's a lot of hiccups and missed moves or not. @dc42?

                      Z-Bot CoreXY Build | Thingiverse Profile

                      Phaedruxundefined 1 Reply Last reply Reply Quote 0
                      • Phaedruxundefined
                        Phaedrux Moderator @Phaedrux
                        last edited by

                        And by the end of the print

                        Slowest loop: 156.84ms; fastest: 0.08ms
                        === Move ===
                        Hiccups: 1478554, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm: 150, MaxWait: 172ms, Underruns: 0, 1
                        Scheduled moves: 3, completed moves: 3
                        

                        Z-Bot CoreXY Build | Thingiverse Profile

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

                          Yes that is a lot of hiccups, which are caused by the step pulse generator being unable to generate steps fast enough. When hiccups occur, step pulses are no longer generated at uniform intervals, making missed steps more likely. I suggest you reduce microstepping or maximum speed.

                          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

                          Phaedruxundefined 1 Reply Last reply Reply Quote 0
                          • Phaedruxundefined
                            Phaedrux Moderator @dc42
                            last edited by

                            @dc42 thanks. I'll go back to 16 with interpolation. I wasn't able to notice any difference in print quality one way or the other.

                            Z-Bot CoreXY Build | Thingiverse Profile

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

                              You may find that reducing extruder microstepping to 128 is sufficient.

                              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

                              Phaedruxundefined 1 Reply Last reply Reply Quote 0
                              • Phaedruxundefined
                                Phaedrux Moderator @dc42
                                last edited by

                                @dc42 thanks. I'll give that a try first.

                                I understand from some of the work shown by @deckingman that higher microstepping can actually give better extrusion accuracy in certain situations. And if any axis could benefit from it, I would think it the extruder.

                                Z-Bot CoreXY Build | Thingiverse Profile

                                deckingmanundefined 1 Reply Last reply Reply Quote 0
                                • T3P3Tonyundefined
                                  T3P3Tony administrators
                                  last edited by

                                  If noise is not a consideration I assume that "real" microstepping is preferable to interpolation?

                                  www.duet3d.com

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

                                    @phaedrux said in Extruder Linearity:

                                    @dc42 thanks. I'll give that a try first.

                                    I understand from some of the work shown by @deckingman that higher microstepping can actually give better extrusion accuracy in certain situations. And if any axis could benefit from it, I would think it the extruder.

                                    Only if you are using a mixing hot end where one filament could be extruding as little as 1% of the total. I wouldn't imagine there would be all that much to gain by using higher than (say) x32 micro-stepping or 0.9 degree motors and 16x. It's easy enough to check. Just look at the extrusion amount you get for small segments in mm, then divide your steps per mm that to see how many micro-steps you get. IIRC the numbers I was looking at for a small 0.5mm segment gave an extrusion amount of around 0.025mm. Which at 415 micro-steps per mm (16x for a 3:1 geared extruder like Bondtech BMG or E3D Titan) is about 10 micro-steps which ought to be fine. But if you want to extrude 1% of that with a mixing hot end, then it's only 0.1 micro-step and ain't gonna work.

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

                                    Phaedruxundefined 1 Reply Last reply Reply Quote 1
                                    • Phaedruxundefined
                                      Phaedrux Moderator @deckingman
                                      last edited by

                                      @deckingman yes those are the specific circumstances I eluded to, thank you for summerizing then far more accurately and concisely than I could have.

                                      I guess another way to think about it isn't that microstepping is providing more accuracy, but rather that in this instance there aren't enough steps to capture the movement slices. Higher stepping means more step pulses and each step can capture a smaller movement slice so nothing gets lost to rounding.

                                      In my case with a single extruder I don't think this applies to me.

                                      Z-Bot CoreXY Build | Thingiverse Profile

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

                                        @phaedrux said in Extruder Linearity:

                                        @deckingman yes those are the specific circumstances I eluded to, thank you for summerizing then far more accurately and concisely than I could have.

                                        I guess another way to think about it isn't that microstepping is providing more accuracy, but rather that in this instance there aren't enough steps to capture the movement slices. Higher stepping means more step pulses and each step can capture a smaller movement slice so nothing gets lost to rounding.

                                        In my case with a single extruder I don't think this applies to me.

                                        Exactly so. But do the maths. My typical usage case is with 0.3mm layer height and 0.5mm nozzle diameter. With smaller layer heights and nozzle widths, the extrusion amount for a given segment length will be less, and there may be a case for using say 32x or 64x micro-stepping in order to capture those small movements. Bear in mind that 0.9 degree motors @ 16x micro-stepping will give the same steps per mm as 1.8 degree motors @32x micro-stepping. But 1/16th micro-step will have more torque than a 1/32 micro-step all other things being equal (like the torque rating of the motors).

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

                                        1 Reply Last reply Reply Quote 0
                                        • Phaedruxundefined
                                          Phaedrux Moderator
                                          last edited by

                                          @deckingman Yes I'll have to dig into it a little deeper. I do print at low layer heights down to 0.05 at 0.4 extrusion width.

                                          Z-Bot CoreXY Build | Thingiverse Profile

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

                                            Reading all of this forms the question in me: is there a desirable minimum number of steps/mm for the extruder? Or even better have a calculator that can provide a recommendation based on layer height and nozzle size/extrusion width.

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