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

    Duet 3 StealthChop 2 Tuning for Nema23

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    7
    44
    4.7k
    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.
    • evan38109undefined
      evan38109
      last edited by evan38109

      I've been able to get some nice, big Moons MS23HA8L4360 NEMA23 steppers working well this weekend. I've tested them up to 400mm/sec with acceleration at 4000mm/sec², and suspect they could go higher if I drop microstepping down to x16.

      Config looks like:

      ; Drives
      M569 P0.1 S1 D3                              ; Y / Front    0.1 goes forwards   0.9° Moons MS23HA8L4360*
      M569 P0.2 S0 D3                              ; X / Rear     0.2 goes backwards  0.9° Moons MS23HA8L4360*
      ...
      M350 X32 Y32 Z32 E32 I1                      ; configure microstepping with interpolation
      
      ; Steps on X & Y
      ;   = steps per rotation / (pulley teeth * belt spacing) * microstep multiplier
      ;     0.9° degree stepper has 400 steps per rotation, 1.8° stepper has 200
      M92 X{400 / (18 * 2) * 32} Y{400 / (18 * 2) * 32} Z6400.00 E1674.00  ; set steps per mm
      
      ; Motor current
      ;   = Max stepper rating in milliamps * 0.8
      ;     Adjust multiplier as desired. Lower is quieter, while higher means more torque, noise, and heat.
      ;     ...but never over 1.0! (and even over 0.8 may lead to excess heat)
      M906 X{3600 * 0.8} Y{3600 * 0.8} Z{2000 * 0.8} E1100 I30           ; set motor currents (mA) and motor idle factor in per cent
      M84 S30                                                            ; Set idle timeout
      
      ; Speeds
      M203 X24000.00 Y24000.00 Z480.00 E3600.00    ; set maximum speeds (mm/min)
      M201 X4000.00  Y4000.00  Z80.00  E1500.00    ; set accelerations (mm/s^2)
      
      ; Jerk and accelerations
      ; M566 X500.00   Y500.00   Z20.00  E1500.00    ; set maximum jerk (instantaneous speed changes) (mm/min)
      M566 X300.00   Y300.00   Z20.00  E1500.00   ; set maximum jerk (instantaneous speed changes) (mm/min)
      M204 1000 T2000                              ; use 1000mm/s² acceleration for print moves and 2000mm/s² for travel moves
      
      ; Trinamic Drive Tuning
      ; Tune tpwmthrs (V) so stealthchop runs at appropriate speeds
      ; and tune thigh (H) to avoid shifting into fullstep mode
      M569 P0.1 V40   H5                                    ; X            - Set tpwmthrs so StealthChop runs up to 105.5mm/sec
      M569 P0.2 V40   H5                                    ; Y            - Set tpwmthrs so StealthChop runs up to 105.5mm/sec
      ...
      M915 X Y T20000                                       ; Set CoolStep threshold super low
      

      One thing I've noticed is that using M915 T... with low values to disable CoolStep leads to some nasty, loud noises. I suspect the current reduction that CoolStep does is beneficial in reducing back EMF.

      1 Reply Last reply Reply Quote 1
      • fractalengineerundefined
        fractalengineer
        last edited by

        @evan38109 Yo Evan

        Thanks a lot for this; very clever config file.

        Looks like increasing Coolstep did help with speeds; I can go up to about 300mm/s before it stalls,

        However Stealthchop doesn't seem to be running at any speed; it's all SpreadCycle now

        Railcore II ZL

        dc42undefined 1 Reply Last reply Reply Quote 0
        • fractalengineerundefined
          fractalengineer
          last edited by

          Okay looks like lowering the M915 T value to the 50s reenables Stealthchop

          Now the Stealthchop seizure speed is up to just below 100mm/s

          I'm still confused as to how to setup the switch from StealthC to SpredC; looks like it's always choppy and noisy around the transition speed

          Railcore II ZL

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

            @fractalengineer said in Duet 3 StealthChop 2 Tuning for Nema23:

            StealthC to SpredC; looks like it's always choppy and noisy around the transition speed

            the datasheet mentions that the transition between the two should be set to a speed that manages the Jerk caused by phase shift. Higher speed transition = more noticeable transition.

            https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC5160A_Datasheet_Rev1.14.pdf

            see page 65

            www.duet3d.com

            fractalengineerundefined 1 Reply Last reply Reply Quote 0
            • fractalengineerundefined
              fractalengineer @T3P3Tony
              last edited by

              @T3P3Tony Hi Tony,

              Yep I do remember reading that in the datasheet and I can reproduce this specific "caklonk" jerk when switching from M569 D3 to D2 or by changing M915 T value

              What I'm referring to is more of a crackling sound around the transition speed

              Here's how it runs currently; fastest speed is only 240mm/s

              https://youtu.be/JcHISSwKVD8

              Railcore II ZL

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

                @fractalengineer said in Duet 3 StealthChop 2 Tuning for Nema23:

                Looks like increasing Coolstep did help with speeds; I can go up to about 300mm/s before it stalls,
                However Stealthchop doesn't seem to be running at any speed; it's all SpreadCycle now

                Coolstep and spreadCycle are not compatible. In some ways, coolStep is a more primitive version of stealthChop.

                It sounds to me that the motor back EMF may still be too high for the supply voltage you are using. This can be a problem when using 0.9deg motors.

                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

                fractalengineerundefined 1 Reply Last reply Reply Quote 0
                • fractalengineerundefined
                  fractalengineer @dc42
                  last edited by

                  @dc42 But the EMF calculator says back EMF is green (17.6V out of the near 30V supplied) and these steppers can still go at least twice faster than the speed they are currently running...

                  Would plugging capacitors in parallel to VIN help with absorbing some of that back EMF?

                  Railcore II ZL

                  1 Reply Last reply Reply Quote 0
                  • evan38109undefined
                    evan38109
                    last edited by

                    For posterity --

                    I was misunderstanding how CoolStep interacted with the other modes. Thank you for clarifying.

                    I've now gotten in the habit of just effectively disabling CoolStep with M915 X Y Z E T1. I've not been able to find any situations on either of my printers where CoolStep works materially better than SpreadCycle. (That's not to say they don't exist, I just haven't found them!)

                    1 Reply Last reply Reply Quote 1
                    • SputnikOC3dundefined
                      SputnikOC3d
                      last edited by

                      I was pointed to this thread from another by DC42 - where it indicated the OP solved an issue by making some changes. I see a lot of hchanges et al ... but it caps out at 42 posts and I dont see the OP indicating a resolution ?

                      Almost all these StealthChop to Spreadcycle motor banging threads - Have No Resolution defined in the threads ... Troublesome.

                      Is there a resolution?

                      ibashundefined 1 Reply Last reply Reply Quote 0
                      • ibashundefined
                        ibash @SputnikOC3d
                        last edited by

                        So for folks trying to understand how tpwmthrs is calculated, and especially how to convert it to mm/s...

                        1. 12,000,000 / (256 * tpwmthrs) = steps / second
                        2. You need steps per mm from M92... be careful with units...
                        3. Then multiply mm/step * step/second

                        Using evan38109's config as an example:

                        M350 X32 Y32 Z32 E32 I1                      ; configure microstepping with interpolation
                        M92 X{400 / (18 * 2) * 32} Y{400 / (18 * 2) * 32} Z6400.00 E1674.00  ; set steps per mm
                        

                        They're using 32 microstep units, and M92 gives microsteps per mm.

                        1. 400 / (18 * 2) * 32 = 355.55 microsteps / mm
                        2. 355.55 / 32 = 11.11 steps / mm

                        So for 40 tpwmthrs...

                        (1 mm / 11.11 steps) * (12,000,000 / (256 * 40)) = 105.5mm/s


                        1. The 12,000,000 comes from the clock frequency, tpwmthrs is in units of clock period
                        2. Check out the datasheet: https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2160A-datasheet_Rev1.06.pdf
                        1 Reply Last reply Reply Quote 1
                        • fractalengineerundefined fractalengineer referenced this topic
                        • NeoDueundefined NeoDue referenced this topic
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA