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

    sensorless homing random wrong direction

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    4
    31
    1.6k
    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.
    • moth4017undefined
      moth4017
      last edited by moth4017

      @droftarts
      "Homing issue"= going randomly to the incorrect side

      S1 current 200mA issue homing
      S1 current 400mA issue homing
      S1 current 500mA homing ok ( have my doubts on this value being ok)
      S1 current 600mA issue homing

      S5 current 200mA issue homing
      S5 current 400mA homing ok ( have my doubts on this value being ok)
      S5 current 500mA issue homing

      S10 current 200mA issue homing
      S10 current 400mA homing ok ( have my doubts on this value being ok)
      S10 current 500mA issue homing

      S15 current 200mA issue homing
      S15 current 400mA homing ok ( have my doubts on this value being ok)
      S15 current 500mA issue homing

      s20 current 200mA issue homing
      s20 current 400mA homing ok ( have my doubts on this value being ok)
      s20 current 500mA issue homing
      s20 current 600mA issue homing

      s30 current 200mA issue homing
      s30 current 400mA homing ok
      s30 current 500mA issue homing
      s30 current 1000mA homing ok

      spent most of the Day testing values above, i still have the issue that the "emergency stop " button seems to toggle the homing direction, also tried changing Jerk to see if that would make any difference (800 and 400)

      @dc42
      another observation if i Home X and it goes in the correct direction , then the stepper motors time out, (M84 X Y S20) and i home X again it also goes in the wrong direction.

      <

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

        @moth4017 I can think of are three possible reasons why the motor may go in the wrong direction:

        1. The driver is signalling a stall at the start of the G1 H1 X-350 homing move, so it skips that and proceeds directly to the G1 X150 move. This is the most likely explanation.

        2. If the motor currrent is set very low and the motor is under load, it may move in the wrong direction.

        3. If only one motor phase is connected then the motor will either vibrate or move in a random direction.

        From your homex.g file:

        @moth4017 said in sensorless homing random wrong direction:

        M906 X600 Y600 ; Lower motor current

        We recommend that you use M906 only in config.g. When you need to reduce motor current temporarily, use M913 instead to set a percentage of the current set by M906. Also, don't reduce the motor current until you want to do the stall homing. StealthChop calibration should be done at normal motor current.

        G1 H1 X-0.2 F3000                               ; move a  little  for cal of sensorless homing / not stalled
        G1 H1 Y-0.2 F3000    							; move a  little  for cal of sensorless homing / not stalled
        M400											; make sure everything has stopped before we make changes                    
        

        That's not a valid stealthChop tuning sequence. Use something like this instead (at normal motor current):

        M17 X Y  ; enable X and Y motor drivers
        G1 P140  ; pause to allow the drivers to characterise the motor                                                                                                                                                   
        

        You can then reduce motor current (using M913) and do the stall homing move. 30% motor current is usually good.

        However, there is the possibility that the motor may already be signalling a stall. So I recommend that after homing an axis, you back off a few mm and repeat the homing move. For example:

        M913 X30  ; use X30 Y30 if the machine is CoreXY
        G91
        G1 H1 X-350                                     ; Home X-Axis
        G1 H2 X10  ; back off a little (on a CoreXY machine use X10 Y10)
        G1 H1 X-350                                     ; Home X-Axis again
        M913 X100 ; restore motor current (use X100 Y100 is the machine is CoreXY)
        

        HTH David

        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

        moth4017undefined pro3dundefined 2 Replies Last reply Reply Quote 0
        • moth4017undefined
          moth4017 @dc42
          last edited by moth4017

          @dc42
          im still getting the wrong direct alternating after pressing the
          "emergency stop" button.
          new homex.g

          ; homex.g
          echo "start"
          M569 P0.0										; Check status in console
          M569 P0.1										; Check status in console
          G91                                             ; relative positioning
          M569 P0.0 S1 D3 V10                             ; set to stelth chop
          M569 P0.1 S1 D3 V10								; set to stelth chop
          M915 P0.0:0.1 S20 F0 R1 H200                    ; Configure Z-Axis Stall Detection
          
          echo "stall detection setup"
          M17 X										; Check status in console
          M17 Y										; Check status in console
          G1 P140
          G1 H1 X-0.2 F3000                               ; move a  little  for cal of sensorless homing / not stalled
          G1 H1 Y-0.2 F3000    							; move a  little  for cal of sensorless homing / not stalle							
          
          echo "lower motor current"
          M913 X50 Y50									; Lower motor current %
          G4 P150											; wait 150ms
          M574 X1 Y2 S4									; Configure Z-Axis stall detection homing
          M569 P0.0										; Check status in console
          M569 P0.1										; Check status in console
          		
          echo "home x"
          G1 H1 X-350 F6000								; Home Z-Axis actuators independently
          M569 P0.0										; Check status in console
          M569 P0.1										; Check status in console
          G90 											; absolute positioning
          G1 X150 F6000									; move to center of bed
          
          ;revert back 
          echo "after revert back"
          M913 X100  Y100                               	; Reset motor current %
          M569 P0.0 S1 D2                                 ; reset motors back to spread cycle,
          M569 P0.1 S1 D2									; reset motors back to spread cycle,
          M569 P0.0										; Check status in console
          M569 P0.1										; Check status in console
          

          <

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

            @moth4017 you haven't done the double homing move that I recommended. Assuming your machine is CoreXY, try this.

            ; homex.g
            echo "start" 
            M569 P0.0					; Check status in console
            M569 P0.1					; Check status in console 
            G91                                             ; relative positioning   
            M569 P0.0 S1 D3 V10                             ; set to stealth chop  
            M569 P0.1 S1 D3 V10								; set to stealth chop  
            M915 P0.0:0.1 S20 F0 R1 H200                    ; Configure Stall Detection   
            echo "stall detection setup"
            M17 X Y 
            G1 P140 
            echo "lower motor current"  
            M913 X50 Y50									; Lower motor current %   
            M574 X1 Y2 S4									; Configure Z-Axis stall detection homing     
            M569 P0.0										; Check status in console    
            M569 P0.1										; Check status in console  
            echo "home x"  
            G1 H1 X-350 F6000
            G1 H2 X20 Y20     
            G1 H1 X-350 F6000
            M569 P0.0										; Check status in console        
            M569 P0.1										; Check status in console     
            G90 											; absolute positioning 
            G1 X150 F6000									; move to center of bed
            
            ;revert back   
            echo "after revert back"   
            M913 X100  Y100                               	; Reset motor current %      
            M569 P0.0 S1 D2                                 ; reset motors back to spread cycle,    
            M569 P0.1 S1 D2									; reset motors back to spread cycle,   
            M569 P0.0										; Check status in console     
            M569 P0.1										; Check status in console                                     
            

            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

            moth4017undefined 1 Reply Last reply Reply Quote 0
            • pro3dundefined
              pro3d @dc42
              last edited by

              @dc42

              Regarding M906/913 - You recommend using 913 in the homing file. 913 is a function of 906 and 913 is not an exact number so it does not make sense to use 913 as it does not tell you what current is being used unless you pull out a calculator. Why is it bad practice to use 906 in the homing file when this is what sets the motor current and then you know what currents will work?

              PS! I have the same machine as @moth and a fully working stallguard homing on all 5 axes (XYZUV) but I run a Duet wifi 2 with a Duex5 so different drivers. I have how ever experienced the same problems as @moth4017 before I started moving my printhead between homing X and Y. After I made the change of moving my printhead between homex an homey it has been working 100%

              ; homex.g
              ; called to home the X axis
              M400                                                   ; make sure everything has stopped before we make changes
              G91                                  ; relative positioning
              M915 P0:1 S4 F0 R0                            ; Configure Stall Detection
              M906 X750 Y750                                      ; Lower motor current
              G1 F9000
              G1 H1 X350                           ; Home Z-Axis independently
              M400                                                   ; make sure everything has stopped before we make changes
              M906 X1000 Y1000                                    ; Reset motor current
              G90                                  ; absolute positioning
              G1 F12000 X155
              
              ; homey.g
              ; called to home the Y axis
              ;
              M400                                                   ; make sure everything has stopped before we make changes
              G91                                  ; relative positioning
              M915 P0:1 S4 F0 R0                            ; Configure Z-Axis Stall Detection
              M906 X750 Y750                                      ; Lower motor current by 50%
              G1 F9000
              G1 H1 Y-350                           ; Home Z-Axis actuators independently
              M400                                                   ; make sure everything has stopped before we make changes
              M906 X1000 Y1000                                    ; Reset motor current
              G90                                  ; absolute positioning
              G1 Y160	; move to probe position midle bed (x155 y150)
              
              ; homeall.g
              ; called to home all axes
              M400
              M98 P/sys/homey.g  ;P define the parameter and is not part of the name
              M98 P/sys/homex.g  ;P define the parameter and is not part of the name
              M98 P/sys/homez.g  ;P define the parameter and is not part of the name
              

              Valkyrie DIY High Temp 3D Printer

              R&D - Engineering Designer - Viking 3D Printers
              https://vkingprinter.com/

              1 Reply Last reply Reply Quote 0
              • moth4017undefined
                moth4017 @dc42
                last edited by

                @dc42

                hi did try double homing worked on X axis but not so good on Y , the Y axis seems to move in the x direction
                x home
                G1 H1 X-350 F6000
                G1 H2 X10 Y10
                G1 H1 X-350 F6000

                y home
                G1 H1 Y350 F6000
                G1 H2 X-10 Y-10
                G1 H1 Y350 F6000

                <

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

                  @moth4017 said in sensorless homing random wrong direction:

                  G1 H2 X-10 Y-10

                  That line in homey.g needs to be changed because as it stands it will back off in the -X direction. I think the correct combination to back off in the -Y direction is: G1 H2 X-10 Y10

                  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

                  moth4017undefined 1 Reply Last reply Reply Quote 0
                  • moth4017undefined
                    moth4017 @dc42
                    last edited by moth4017

                    @dc42
                    did some tests tonight with the "double bump" on homing , sometimes there was only a single bump , i did see it go 10mm in the wrong direction though, so didnt do the "G1 H1 X-350 F6000" , is this now down to tuning the "S" parameter and current?

                    echo "home x"
                    G1 H1 X-350 F6000
                    G1 H2 X10 Y10
                    G1 H1 X-350 F6000

                    echo "Home Y"
                    G1 H1 Y350 F6000
                    G1 H2 X-10 Y10
                    G1 H1 Y350 F6000

                    <

                    1 Reply Last reply Reply Quote 0
                    • moth4017undefined
                      moth4017
                      last edited by

                      So , im still getting a random wrong direction now and then but ill put that down to tuning the "S" parameter and current.

                      if i switch the machine on and do a home X it always goes in the wrong direction can not remember it doing this in the previous version.

                      <

                      1 Reply Last reply Reply Quote 0
                      • moth4017undefined
                        moth4017
                        last edited by

                        solution and files here :- https://forum.duet3d.com/topic/28653/3-4-1-rc2-g30-turns-off-z-motors/14?_=1653704200634

                        <

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA