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

    Sensorless Homing problems on Duet 3 Mini 5+

    Scheduled Pinned Locked Moved Solved
    General Discussion
    4
    12
    547
    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.
    • emi100undefined
      emi100
      last edited by

      Hello, I have been working on a Prusa MK3S upgrade based on the open5x repository on github, but I am having problems with sensorless homing of xyz axes. The difference to the repository is that I am using Duet 3 Mini 5+ board. I tried a number of different parameter combinations, but I cannot get it work. The motor hits the edge and just keeps on going, it doesn't recognize the edge of the printer. I tried changing current, speed, sensitivity, acceleration, jerk, the StealthChop settings. Where can I find some additional guidance regarding the parameters which enable sensorless homing?

      jay_s_ukundefined droftartsundefined dc42undefined 3 Replies Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @emi100
        last edited by

        @emi100 you probably need to put the drivers in stealthchop mode with M569 PX D3.
        best post your firmware version, config file and homing files

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

        1 Reply Last reply Reply Quote 0
        • droftartsundefined
          droftarts administrators @emi100
          last edited by

          @emi100 See https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection
          Please post your config.g and homeall.g.

          Are your stepper motors 0.9° or 1.8°? If 0.9 (400 full steps per revolution), see the M915 H parameter: https://docs.duet3d.com/en/User_manual/Connecting_hardware/Sensors_stall_detection#minimum-recommended-speed-for-stall-detection

          Ian

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

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

            @emi100 to get sensorless homing working on TMC2209 drivers (as used on the Mini5+) you need t get several things right:

            1. Configure the driver and select the speed of the homing move so that stall detection is possible. In particular you need to put the driver in stealthChop mode and enable stealthChop at the speed of the homing move, These are not the recommended settings for use when printing or the default settings, so you would normally do this near the start of the homing file concerned and revert the settings at the end.
            2. Configure RRF to use sensorless homing.
            3. Find a combination of motor current percentage during homing, homing move speed, homing move acceleration and stall sensitivity that detects the homing position reliably.

            To make #1 easier, in RRF 3.6beta4 before executing the homing move, RRF checks whether stall detection is possible and reports an error (which includes the reason) if it is not. So you may wish to upgrade to RRF 3.6beta4. After getting sensorless homing working, you can revert to firmware 3.5.4 if you wish because the same parameters should work.

            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

            emi100undefined 1 Reply Last reply Reply Quote 0
            • emi100undefined
              emi100 @dc42
              last edited by

              @dc42

              Hello,

              I have tried updating to beta version, but I get a warning about incompatibility. About the stealthchop mode, I put the settings in config. Wouldn't changing driver settings at the beginning and end of home files require restarting?

              These are my files.
              config:

              ; General
              G90 ; absolute coordinates
              M83 ; relative extruder moves
              M550 P"open5x" ; set hostname
              
              ; Kinematics
              M669 K0 ; configure Cartesian kinematics
              
              ; Network
              M552 P0.0.0.0 S1 ; configure Ethernet adapter 
              M586 P0 S1 ; configure HTTP
              
              ; Smart Drivers
              M569 P0.0 S0 D3 V2000                  
              M569 P0.1 S0 D3 V2000                 
              M569 P0.2 S0 D3 V2000                   
              M569 P0.3 S0 D3 V2000 
              M569 P0.4 S1 D3 V2000            
              M569 P0.5 S0 D3 V2000      
              M569 P0.6 S0 D3 V2000    
              
              ; Motor Idle Current Reduction
              M906 I30 
              M84 S30
              
              ; Axes
              M584 X0.0 Y0.1 Z0.2:0.3 E0.4 A0.5 B0.6                                       
              M350 X16 Y16 Z16 E32 A16 B16 I1                                          
              M906 X620.00 Y620.00 Z560.00 E700.00 A1300.00 B1300.00 I10           
              M92 X100.00 Y100.00 Z400.00 E280.00 
              M92 A26.667 
              M92 B35.556 
              
              M566 X240.00 Y240.00 Z12.00 E270.00 A480.00 B480.00 P1 
              M203 X12000.00 Y12000.00 Z750.00 E1500.00 A5000.00 B12000.00  	  
              M201 X1000.00 Y1000.00 Z1000.00 E1000.00 A1000.00 B1000.00   	
              
              M208 X0:250   Y-92.3:50  Z-125:1 A-200:200 B-12000:12000    
              M564 H0
              
              ; Endstops
              M574 X1 S3
              M574 Y1 S3
              M574 Z1 S3
              
              M915 X S3 F0 H200 R1		           
              M915 Y S3 F0 H200 R1		         
              M915 Z S3 F0 H200 R1		          
              
              ; Z-Probe (manual)
              M558 P0 H15 F120 T6000      
              
              M140 H-1 ; Disable heated bed
              
              ; Filament Sensor Port and Loading Feature ON
              M950 J1 C"io1.in"
              M581 P1 T2 S0 R0
              
              ; HotEnd Heaters and Thermistor HotEnd           
              M308 S1 P"temp2" Y"thermistor" T100000 B4725 R4700 
              
              M950 H1 C"out1" T1					
              M307 H1 A306.9 C115.4 D4.0 V23.8 B0		
              M143 H1 S285                         
              M302 S185 R185
              
              ; Fans
              M950 F1 C"io2.out" Q250			
              M106 P1 T85 S0 H1                
              M950 F0 C"io3.out" Q250
              M106 P0 S0 H-1          
              
              ; Tools
              M563 P0 D0 H1 F0                        
              G10 P0 X0 Y0 Z0            
              G10 P0 R0 S0
              

              homeall:

              M915 X S10 F0 H200 R1		           
              M915 Y S10 F0 H200 R1		       
              M913 X50 Y50 Z50 
              
              G91     ;relative
              
              G1 H2 Z10 F800   ;move Z up    
              G1 H1 X-255 F2400   ;move X to endstop
              G1 H1 Y-215 F2400   ;move Y to endstop
              
              G1 H1 Z205 F1800    ;move Z to endstop
              
              G90     ;absolute
              
              M913 X100 Y100 Z100     ;restore
              M915 X S3 F0 H200 R1		               
              M915 Y S3 F0 H200 R1
              
              jay_s_ukundefined 1 Reply Last reply Reply Quote 0
              • jay_s_ukundefined
                jay_s_uk @emi100
                last edited by

                @emi100 you probably have only updated the firmware on the board and not DWC which is why you get messages about incompatibility.
                You don't need to restart anything when making changes to homing files etc as they are only read when they are commanded to

                Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                emi100undefined 1 Reply Last reply Reply Quote 0
                • emi100undefined
                  emi100 @jay_s_uk
                  last edited by

                  @jay_s_uk @dc42

                  That is right about the firmware, I corrected that. I tried testing the new version, just moving the motors around a little bit through the console with G1 command, and homing X axis alone. The error messages report that the moves are either too slow, or too fast for driver x to detect stall ( full error text: Error: G1: move is too slow for driver 0 to detect stall (increase speed or Tcoolthrs , or Error: G1: move is too fast for driver 0 to detect stall (reduce speed or Tpwmthrs) ). For example, I get too slow for feed rate 2000, but too fast for just a slight change such as 2100.

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

                    @emi100 to avoid the "too fast" error you need to reduce the Tpwmthrs value as suggested by the error message. This parameter is controlled by the V parameter of the M569 command. If you send command M569 P# where # is the driver number then it will report the existing value and the speed that it corresponds to.

                    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

                    emi100undefined 1 Reply Last reply Reply Quote 0
                    • emi100undefined
                      emi100 @dc42
                      last edited by

                      @dc42

                      Hello,

                      I have tried changing the V parameter from 500 to 2000. Any value for feed-rate returns the same errors, either too slow or too fast.

                      I have also attached a video of the issue. This was an experiment I did using previous firmware but with the same type of setup. Changing parameter values didn't change the output.

                      video_homing.mp4

                      dc42undefined droftartsundefined 2 Replies Last reply Reply Quote 0
                      • T3P3Tonyundefined T3P3Tony referenced this topic
                      • dc42undefined
                        dc42 administrators @emi100
                        last edited by

                        @emi100 you need to reduce V, not increase it. Try V10. It's best to reduce V only in the homing file and then restore it to the default value later in the homing file, because maintaining stealthChop mode at high travel speeds is problematic.

                        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 0
                        • droftartsundefined
                          droftarts administrators @emi100
                          last edited by

                          @emi100 said in Sensorless Homing problems on Duet 3 Mini 5+:

                          I have tried changing the V parameter from 500 to 2000. Any value for feed-rate returns the same errors, either too slow or too fast.

                          The homing speed needs to be faster than that set by the M915 H parameter, and slower than the speed set by the M596 V parameter. I have a 0.9° motor on X, and as you're using a Prusa Mk3 or 4, I expect you are too. For example, if I send:

                          M569 P0.0 S0 D3 V10
                          M569 P0.0
                          Drive 0 runs in reverse, active low enable, timing fast, mode stealthChop, ccr 0x00053, toff 3, tblank 0, tpwmthrs 10 (468.8 mm/sec), tcoolthrs 117 (40.1 mm/sec), pwmScaleSum 21, pwmScaleAuto 2, pwmOfsAuto 205, pwmGradAuto 28, pos 632
                          M915 X H400 S3 R0 F0
                          M915 X
                          Driver 0.0: stall threshold 3, full steps/sec 420, coolstep 0, action on stall: none
                          

                          In M569, the changeover speed from stealthChop (which we need to use for stall homing) is 468.8mm/s, or 28,128mm/minute. Any speed below this for homing is fine.
                          In M915, H400 sets the minimum speed to 420 full steps/sec (I think it adds 5% to the H parameter value, not sure why). I have x16 microstepping, and 160 steps per mm, so (420 x 16) / 160 = 42mm per second, or 2,520mm/min as the lowest speed.

                          Here's my configuration for stall homing, on a Mini 5+. It will depend on your M92 steps per mm and M906 current setting,

                          in config.g

                          M569 P0.0 S0 D3 V9    ; x0 - low V for high changeover speed
                          M574 X1 S3            ; define endstop for stall detection
                          

                          My axis speeds, accelerations, steps per mm etc:

                          ; Axes
                          M584 X0.0 Y0.1 Z0.2:0.4                                             ; set drive mapping
                          M906 X1000 Y1000 Z800                                               ; set motor currents (mA) and motor idle factor in per cent
                          M350 X16 Y16 Z16 I1                                                 ; configure microstepping with interpolation
                          M92 X160 Y160 Z800                                                  ; set steps per mm
                          M566 X300 Y300 Z12                                                  ; set maximum instantaneous speed changes (mm/min)
                          M203 X9000 Y9000 Z600                                               ; set maximum speeds (mm/min)
                          M201 X2000 Y2000 Z20                                                ; set accelerations (mm/s^2)
                          

                          in homex.g

                          M915 X H400 S3 R0 F0  ; stall detection
                          M400                  ; Wait for current moves to finish
                          M913 X50              ; drop motor current to 50%
                          M400                  ; Wait for current moves to finish
                          G91                   ; relative positioning
                          G1 H1 X-250 F4000     ; move quickly to X axis endstop and stop there (first pass)
                          G4 S1                 ; pause for 1 second
                          G1 X25                ; move +25mm
                          G90                   ; absolute positioning
                          M400                  ; Wait for current moves to finish
                          M913 Z100             ; return current to 100%
                          M400                  ; Wait for current moves to finish
                          M569 P0.0 S0 D3 V2000 ; x0 - high V for low changeover speed
                          

                          It probably doesn't need all the M400 commands, it's just what I ended up with.

                          Ian

                          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                          1 Reply Last reply Reply Quote 0
                          • emi100undefined
                            emi100
                            last edited by

                            @dc42 @droftarts

                            Hello,
                            I have taken your advice and reduced V to 100. I also had to change other parameters in some way, namely the current and the M915 command. I find that S12 and H300 works best for me on x and y axis. Thank you very much for all your help.

                            1 Reply Last reply Reply Quote 0
                            • dc42undefined dc42 marked this topic as a question
                            • dc42undefined dc42 has marked this topic as solved
                            • First post
                              Last post
                            Unless otherwise noted, all forum content is licensed under CC-BY-SA