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

Duet 3 Mini 5+ sensorless homing configuration

Scheduled Pinned Locked Moved Solved
Tuning and tweaking
solved
8
42
4.2k
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.
  • undefined
    flobler @dc42
    last edited by flobler 1 Feb 2021, 17:02 2 Jan 2021, 17:00

    @dc42 thanks, I am not sure if I am doing this correct though. So far I am still getting quite mixed results (stalling after power cycle before home point is reached and after that only homing correctly when the extruder is within 10mm of the homing location, and then also not all the time).

    I am trying the following (again only trying X for now):

    1. Set stall detection sensitivity and reduce V+H+T parameter
      0135d6d9-3919-40bc-8d10-ab9b9771a4a1-image.png

    2. Run tuning procedure and reduce motor current
      2b09ec7d-1a51-4134-b9b8-a9e6397cd95d-image.png

    3. Homing move
      1885c967-8d4f-4a26-89b3-f4430893bebf-image.png

    4. Reset sensitivity, V+H+T and return current to 100%
      bcd2f31d-8e06-4732-952d-732755e5aa61-image.png

    The above is all my homex.g contains... Is there still something I am doing obviously wrong?

    1 Reply Last reply Reply Quote 0
    • undefined
      Sindarius
      last edited by 2 Jan 2021, 17:43

      I have been running sensorless homing on my Bear using the Mini5 since it was implemented a few weeks back.

      These are my settings in my config.g for the x axis

      M569 P0.0 S0 D3 V100                                         ; physical drive 0.0 goes forwards (x)
      M574 X1 S3 												; configure sensorless endstop for low end on X  (Sensorless)
      

      My homex.g

      
      M400 						; wait til stuff stops
      M574 X1 S3 			  ; use stall guard for endstops
      M913 X60 Y60  		; drop motor currents to 50% 
      M201 X1000 Y1000	 ; reduce acceleration on X/Y to stop false triggers
      
      M915 X S0 R0 F0 H200	;  Sensitivity 4, don’t take action, don’t filter, 400steps/sec
      G91 											; set relative
      G1 H2 Z5 F1200 
      G1 H1 X-250 F3000			 ; move left 250mm, stopping at the endstop
      G1 X10 F1200							; move away from end
      G1 H2 Z-5 F1200 
      G90 												; back to absolute positioning
      M400										 ; wait again
      M913 X100 Y100 					 ; motor currents back to 100%
      M201 X500 Y500			 ; accel back to original 
      M915 S63 X Y R0					 ; Disable Logging and lower stall detection
      

      Feel free to give it a shot and tweak it as needed. I have not spent a lot of time trying to fine tune it but it works well.

      undefined 1 Reply Last reply 2 Jan 2021, 18:04 Reply Quote 1
      • undefined
        flobler @Sindarius
        last edited by 2 Jan 2021, 18:04

        @Sindarius thank you, I will try that! Are you using Pruse MK3 LDO motors?

        What part in your homex.g is covering the tuning procedure that David described above?

        undefined 1 Reply Last reply 2 Jan 2021, 18:19 Reply Quote 0
        • undefined
          flobler
          last edited by 2 Jan 2021, 18:18

          Ok, so I tried this @Sindarius. It definitely works the best it has so far, thanks for sharing!

          A couple of things are not working yet though:

          1. After a power cycle, when I try to home the axis, it detects a home instantly, before the actual home position and then moves away 10mm. Each homing command moves the axis therefore 10mm further away from its homing position.

          2. After an emergency stop, I can get it to home correctly, that works as many times I want as long as I do not make any other moves in between and as long as I am within 10mm of the actual homing position. As soon as I move e.g. 100mm away from the homing position and I try to re-home then, I get a crash.

          1 Reply Last reply Reply Quote 0
          • undefined
            Sindarius @flobler
            last edited by 2 Jan 2021, 18:19

            @flobler I am using a different set of motors for my bear build. Mine was done with some trial and error and tweaking settings I used on my Duet 2 wifi. I would only use what I have as a start point and incorporate dc42’s recommendations. Don’t trust my comments since the numbers won’t match everywhere.

            1 Reply Last reply Reply Quote 0
            • undefined
              flobler
              last edited by 9 Jan 2021, 15:29

              In-cooperating all the above tips with some trial and error got it running. I simply had my current reduced way too much for it to work consistently, which was the last bit that needed adjusting.

              This is configuration gives good results now homex.g

              Thanks everyone for your help!

              1 Reply Last reply Reply Quote 1
              • undefined
                flobler
                last edited by 23 Jan 2021, 13:08

                I thought I´d post a quick update for anyone reading this later:

                I now realized that the bug described here was also contributing to my issues:
                https://forum.duet3d.com/topic/21108/stall-detection-on-duet-3-mini

                Taking this into account, it was a breeze finding a good value for sensitivity and getting sensorless homing to work smoothly.

                undefined 1 Reply Last reply 23 Jan 2021, 20:17 Reply Quote 4
                • undefined
                  Phaedrux Moderator @flobler
                  last edited by 23 Jan 2021, 20:17

                  @flobler Thanks for letting us know it's working well for you. Can you share the config that worked?

                  Z-Bot CoreXY Build | Thingiverse Profile

                  undefined 1 Reply Last reply 29 Mar 2021, 12:44 Reply Quote 1
                  • undefined
                    flobler @Phaedrux
                    last edited by flobler 29 Mar 2021, 12:44

                    @phaedrux Sure! Sorry I must have missed your message.

                    I have "outsourced" the changes that need applying for homing (motor current, driver tuning, V parameter etc.) from the actual homing moves into a separate macro, so I can tweak this centrally.

                    Here is how I home all axes:

                    ; homeall.g
                    ; called to home all axes
                    
                    M98 P"homing_modifications.g" ; applies necessary modifications for the homing moves
                    
                    ; get Z out of the way
                    G91                    ; relative positioning
                    G1 H2 Z5 F1200         ; lift Z	
                    M400                   ; wait for current moves to finish
                    
                    ; home X
                    G1 H1 X5 F1200    ; move slowly away
                    G1 H1 X-255 F3600 ; move to X axis endstop and stop there (first pass)
                    G1 X5 F1200       ; go back a few mm
                    G1 H1 X-10 F3000  ; move to X axis endstop once more (second pass)
                    G1 X10 F1200      ; go back a few mm
                    M400              ; wait for current moves to finish
                    
                    ; home Y
                    G1 H1 Y5 F1200    ; move slowly away
                    G1 H1 Y-220 F3600 ; move to Y axis endstop and stop there (first pass)
                    G1 Y5 F1200       ; go back a few mm
                    G1 H1 Y-10 F3000  ; move to Y axis endstop once more (second pass)
                    G1 Y10 F1200      ; go back a few mm
                    M400              ; wait for current moves to finish
                    
                    ; home Z
                    G90                 ; absolute positioning
                    G1 X11.5 Y4.5 F6000 ; go to first probe point
                    G30                 ; home Z by probing the bed
                    G1 Z0.6 F500        ; move Z to origin
                    G91                 ; relative positioning
                    G1 Z1 F500          ; lift Z relative to current position
                    M400	     	    ; Wait for current moves to finish
                    
                    M98 P"homing_modifications_reset.g" ; resets all modifications applied for the homing move
                    
                    ; homing_modifications.g
                    ; tune motor drivers, set motor current and V parameter for homing moves
                    
                    ; apply modifications
                    M569 P0.1 V10          ; reduce V to ensure stealthChop is enabled for X
                    M569 P0.2 V10          ; reduce V to ensure stealthChop is enabled for Y
                    M913 X70 Y70           ; drop motor current to 50%
                    G4 P100                ; wait 100ms
                    
                    ; tune drivers
                    G91                      ; relative positioning
                    G1 H2 X0.2 Y0.2 F3000    ; power up motors to ensure they are not stalled
                    G4 P100                  ; wait 100ms
                    M400                     ; wait for current moves to finish
                    
                    ; homing_modifications_reset.g
                    ; reset all homing modifications applied in homing_modifications.g
                    ;
                    M913 X100 Y100          ; return current to 100% for X and Y
                    M569 P0.1 V2000         ; restore default V for X
                    M569 P0.2 V2000         ; restore default V for Y
                    G90                     ; absolute positioning
                    

                    Here is the configuration of the endstops/stallguard sensitivity:

                    ; Endstops
                    M574 X1 S3                                            ; configure sensorless endstop for low end on X
                    M574 Y1 S3                                            ; configure sensorless endstop for low end on Y
                    M915 X S3 F0 H200 R0                                  ; set the X axis sensitivity
                    M915 Y S3 F0 H200 R0                                  ; set the Y axis sensitivity
                    

                    This works very well for me. I might still tweak it here and there but everything will then be released on the Bear Project GitHub repo.

                    Hope that helps someone looking into this thread later down the line 🙂

                    1 Reply Last reply Reply Quote 3
                    • FelixHundefined FelixH referenced this topic 12 Dec 2023, 09:03
                    • FelixHundefined
                      FelixH
                      last edited by 12 Dec 2023, 14:58

                      I am very thankful I found this thread because I was having the very same issue and, after some experimenting with your scripts it works better for me too now.

                      However, I do have a question: why there is no M915 command on these routines? I assume if ignored it assumes a certain value lie S3??

                      I mean, I tried with and without M915 and it works, so... I am confused, somehow

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