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

    Duet 3 Mini 5 Sensorless Homing 0.9 degree motors

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    5
    13
    511
    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.
    • ctilley79undefined
      ctilley79
      last edited by ctilley79

      I'm trying to get sensorless homing to work on a Prusa Bear cartesian printer. I'm using 0.9 motors on X and Y, and it doesn't matter what S parameter or H parameter I use in M915, I cannot get the axis to stall no matter what I do. Is sensorless homing with 0.9 degree motors futile? It was so easy with the 2660 and 5160 drivers.

      I couldn't even get the motor to stall using M915 S-127 H10

      Firmware version is 3.4.5

      Here's some relevent code

      M569 p4 S1 D3
      
      M915 P4:3 R0 F0 S-10 H400 
      M574 X1 S3
      M574 Y1 S3
      

      homex

      G91
      M564 H0 S0
      M569 P4
      M913 X20									
      G1 H2 Z5 F12000   
      M17 X
      G4 P100
      G1 H1 X-250 F4000 
      M400
      G1 H2 Z-5 F12000   
      G90
      M913 X100 ; return current to 100%
      M569 P4 D2
      M564 H1 S1
      
      
      dc42undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @ctilley79
        last edited by

        @ctilley79 please tell us what stepper motors you are using, what current you have set them to in M906, and what VIN voltage you are providing to the Duet.

        Also run the following commands and report the response:

        M569 P4
        M915 P4

        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

        ctilley79undefined 1 Reply Last reply Reply Quote 0
        • ctilley79undefined
          ctilley79 @dc42
          last edited by ctilley79

          @dc42 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:

          @ctilley79 please tell us what stepper motors you are using, what current you have set them to in M906, and what VIN voltage you are providing to the Duet.

          Also run the following commands and report the response:

          M569 P4
          M915 P4

          Vin is 24V

          These are the motors I'm currently using:
          https://www.linengineering.com/products/stepper-motors/hybrid-stepper-motors/4209-series/4209L-01P

          I also have these if it's a better option
          https://www.moonsindustries.com/p/nema-17-high-precision-hybrid-stepper-motors/ms17ha6p4200-000004611110015926

          M906 X1100 Y1100 Z600 E500 I30
          
          

          M569 P4
          Drive 4 runs forwards, active low enable, timing fast, mode stealthChop, ccr 0x00053, toff 3, tblank 0, tpwmthrs 12000 (0.3 mm/sec), pwmScaleSum 97, pwmScaleAuto 10, pwmOfsAuto 255, pwmGradAuto 14, pos 392

          M915 P4
          Driver 0.4: stall threshold -128, steps/sec 390, coolstep 0, action on stall: none

          I set the S parameter very low to try and get it to stall. The H parameter was calculated using the formula in the sensorless homing/stallguard instructions.

          gloomyandyundefined dc42undefined 2 Replies Last reply Reply Quote 0
          • gloomyandyundefined
            gloomyandy @ctilley79
            last edited by

            @ctilley79 With your current settings your motors will be switching to Spreadcycle when they reach a speed of 0.3mm/sec. Stall detection is not supported when operating in spreadcycle with TMC2209 drivers. Try adding something like V40 to your M569 P4 command and check the switch over speed ( tpwmthrs) again with M569 P4. Then try again to see if it stalls.

            ctilley79undefined 1 Reply Last reply Reply Quote 1
            • ctilley79undefined
              ctilley79 @gloomyandy
              last edited by

              @gloomyandy Damn. I forgot that V parameter was counterintuitive. Now that I've gotten it to stall, the motor hits the endstop, then speeds into reverse until it hits X max. Any tips for that? lol

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

                @ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:

                Now that I've gotten it to stall, the motor hits the endstop, then speeds into reverse until it hits X max. Any tips for that? lol

                Is that with the homex posted above?

                Z-Bot CoreXY Build | Thingiverse Profile

                ctilley79undefined 1 Reply Last reply Reply Quote 0
                • ctilley79undefined
                  ctilley79 @Phaedrux
                  last edited by

                  @Phaedrux This is the current one I've been playing with. It semi works. Stealthchop sounds pretty awful after homing. I'm also getting sporadic short to ground with this config

                  G91 ; relative positioning
                  
                  M564 H0 S0
                  M915 P4 R0 F0 S-59 H391
                  M569 P4 D3 V1
                  M569 P4
                  M915 P4
                  M913 X30 ; Lower motor current %
                  M400
                  M201.1 X800
                  G1 H2 Z5 F12000    ; lift Z relative to current position
                  M17 X
                  G4 P100
                  G1 H1 X-250 F4000 
                  M400
                  G1 H2 Z-5 F12000    ; lift Z relative to current position
                  G90 ; absolute positioning
                  M400
                  M913 X100 ; return current to 100%
                  M400
                  M564 H1 S1
                  M201.1 X1500
                  
                  1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators @ctilley79
                    last edited by dc42

                    @ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:

                    M569 P4
                    Drive 4 runs forwards, active low enable, timing fast, mode stealthChop, ccr 0x00053, toff 3, tblank 0, tpwmthrs 12000 (0.3 mm/sec)

                    That's likely the problem. On the TMC2209, stall detection only works when the driver is in stealthChop mode; but you have the driver configured to switch to spreadCycle mode at speeds above 0.3mm/sec. Use the M569 V parameter to select a much higher speed (lower V value) during homing, higher than the speed of the X homing move - which you currently have set (quite reasonably) as 4000mm/min aka 66.7mm/sec.

                    We advise against remaining in stealthChop mode during normal printing, because in that mode the driver doesn't respond well to sudden increases in load.

                    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

                    ctilley79undefined 1 Reply Last reply Reply Quote 0
                    • ctilley79undefined
                      ctilley79 @dc42
                      last edited by

                      @dc42 Gotcha. Now that I've gotten it to stall, do you have a process to find out what current, sensitivity and H parameter to set and in what order I should set those?

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

                        @ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:

                        do you have a process to find out what current, sensitivity and H parameter to set and in what order I should set those?

                        Have you gone through this document? https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection

                        Z-Bot CoreXY Build | Thingiverse Profile

                        ctilley79undefined 1 Reply Last reply Reply Quote 0
                        • ctilley79undefined
                          ctilley79 @Phaedrux
                          last edited by

                          @Phaedrux said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:

                          @ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:

                          do you have a process to find out what current, sensitivity and H parameter to set and in what order I should set those?

                          Have you gone through this document? https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection

                          Absolutely. The document doesn’t really define a clear process. So it feels like I’m just pulling levers and hoping to land on the right combination. It seems like tuning sensorless homing can vary drastically from motor to motor, so it would be nice to have a better troubleshooting process.

                          The 2660 and 5160 were so much easier to tune, but the 2209s just don’t like 0.9 degree motors.

                          moth4017undefined dc42undefined 2 Replies Last reply Reply Quote 0
                          • moth4017undefined
                            moth4017 @ctilley79
                            last edited by

                            @ctilley79 i had similar issues with the 2209s switched too 5160's has been so much easier

                            <

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

                              @ctilley79 said in Duet 3 Mini 5 Sensorless Homing 0.9 degree motors:

                              @dc42 Gotcha. Now that I've gotten it to stall, do you have a process to find out what current, sensitivity and H parameter to set and in what order I should set those?

                              You don't need to adjust the H parameter, it just needs to be low enough so that stall detection can occur at your chosen homing speed.

                              The motor current needs to be high enough to drive the axis reliably towards the endstop. Other than that, lower current makes stall detection easier. A value of 30% or normal current is typical. So try setting 30% in M913 and check that the axis moves reliably at that current. If it doesn't, try 40% or 50%.

                              Having selected the current, you can tune the M915 stall detection threshold. Too high and the stall won't be detected, or the axis will bang into the endstop too hard before the stall is detected. Too low and false stalls will be detected before the axis reaches the endstop.

                              One other parameter you can adjust is the M201.1 acceleration parameter for special moves, especially if you have a high normal acceleration set in M201. If there is a tendency to get a stall as soon as the axis starts moving, setting reduced acceleration in M201.1 may avoid that happening.

                              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