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

Working config for sensorless homing on a CoreXY

Scheduled Pinned Locked Moved
Tuning and tweaking
8
22
8.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
    dc42 administrators
    last edited by 31 Dec 2017, 17:11

    You can remove the M574 commands from that homeall.g file and just put the first one in config.g. I had the M574 commands in my example because it was a macro for testing sensorless homing on a machine that normally used endstop switches. Likewise the M915 command can go in config.g.

    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
    • undefined
      SuperJETT
      last edited by 31 Dec 2017, 20:31

      Ah, yeah I was still using the switches to prevent acccidental triggers during a print.

      Thanks David.

      Custom CoreXY at home with Duet Wifi, Hemera

      1 Reply Last reply Reply Quote 0
      • undefined
        rkrammes
        last edited by 16 Feb 2018, 17:36

        (edit: Nevermind, lol) Why is it that this script (SuperJETT's) works for me if I have already homed X and Y but if none have been homed when it gets to the step of moving on the Y axis it moves diagonally in the X+ Y+ direction?

        Here is my Homeall.g:

        ; homeall.g
        ; called to home all axes
        ;
        M400			; make sure everything has stopped before we make changes
        M913 X50 Y50	        ; drop motor currents to 50%
        G91			; use relative positioning
        G1 Z5 F6000		; lower bed for clearance
        G1 S1 X-400  F4000	; move X all the way left and stop at end
        G1 X6			; move to edge of glass
        G92 X0			; set X0 at edge of glass
        G1 S1 Y-400  F4000	; move Y all the way left and stop at end
        G1 Y13			; move to edge of glass
        G92 Y0			; set Y0 at edge of glass
        G1 X150 Y150		; go to back center of bed for measurement
        G30 			; probe bed to set z0
        G1 Z5			; lower bed for clearance
        G29 S1			; load heightmap
        G90			; back to absolute positioning
        M400			; make sure everything has stopped before we reset the motor currents
        M913 X100 Y100 Z100 	; motor currents back to 100%
        G1 X320 Y320            ; move to parking point
        

        Homex.g (and the equivalent for Y) work fine.```
        ; homex.g
        ; called to home the X axis
        ;
        M400 ; make sure everything has stopped before we make changes
        G1 Z1 F6000 ; Lift Z
        M574 X1 Y1 S3 ; set endstops to use motor stall
        M913 X50 ; drop motor currents to 50%
        M915 X Y S3 R0 ; set sensitivity to +3 unfiltered
        G91 ; use relative positioning
        G1 S1 X-400 F4000 ; move X all the way left and stop at end
        G1 X6 ; move to edge of glass
        G92 X0 ; set X0 at edge of glass
        G90 ; absolute positioning

        1 Reply Last reply Reply Quote 0
        • undefined
          rkrammes
          last edited by 16 Feb 2018, 19:43

          Oops, I figured it out. Just seeing those two scripts next to each other made me realize I hadn't removed the M574 command from the individual homing scripts and then when I looked in my config.g I found that I used the X2 parameter for some reason.

          BTW, this is so cool and working well. Thanks to everyone for doing the work!

          1 Reply Last reply Reply Quote 0
          • undefined
            zen
            last edited by 20 May 2018, 21:37

            I'm trying to set up sensorless homing on corexy I run into bit of trouble.
            I use this macro to test:

            M117 S"Start sensorless homing"
            M400			; make sure everything has stopped before we make changes
            M117 S"Set endstops to S3"
            M574 X1 Y1 S3		; set endstops to use motor stall
            M117 S"Reduce current"
            M913 X40 Y40 		; XY motors to 40% current	
            M117 S"Set sensitivity"
            M915 X Y S-6 R0 F0	; set X and Y to sensitivity 0, do nothing when stall, unfiltered
            
            M117 S"Move Z down"
            G91			; use relative positioning
            G1 S2 Z5 F1200		; lift Z
            
            G1 S2 X-325 F5000 	; move left 325mm, stopping at the endstop
            G4 P500			; wait 500msec
            ;G1 X5			; move away from home
            ;G4 P500			; wait 500msec
            M400			; make sure everything has stopped before we make changes
            ; X is homed at this point, now home the other axis
            G1 S2 Y-325 F5000	; move beyond axis minimum 
            G4 P500			; wait 500msec
            ;G1 Y5			; move away from home
            
            G1 S2 Z-5 F1200		; lower Z
            M400			; make sure everything has stopped 
            M913 X100 Y100          ; XY motors to 100% current
            G90			; back to absolute positioning
            M574 X1 Y1 S1		; define active low microswitches
            

            What's happening is that when no axes are homed carriage moves towards 0,0, moving both motors at the same time. It catches the and and then moves again. This corresponds to separeate X and Y homing parts.

            Any hints how to fix that?

            Prusa i3 Alu, Prusa i3 All Metal, HEVO 300^3, DuetWiFi, Smoothieboard, MKS SBase, MKS Gen - obviously too many

            undefined 1 Reply Last reply 21 May 2018, 04:39 Reply Quote 0
            • undefined
              whosrdaddy @zen
              last edited by 21 May 2018, 04:39

              @zen just point both homing files to your macro.

              for example:

              ; homex.g
              ; called to home the X axis
              M98 P"/macros/Sensorless homing"
              

              same thing for homey.g

              1 Reply Last reply Reply Quote 0
              • undefined
                carlosspr @bartolomeus
                last edited by 21 May 2018, 07:06

                @bartolomeus I can see a few reasons that might be causing your behaviour in the code:

                G1 S1 X-320 -> You might want to add a speed to the homing ( G1 S1 X-320 FXXXX). Sensorless homing is very sensitive to speed variations and triying with different speeds will produce different results.

                G1 X-5 Y-5 -> If Y was not pre-homed this will abort the script on that line, because no moves are allowed on the axis unless it is homed, therefore your motors will be left with 30% current add a G1 S1 Y-320 FXXXX before the line.

                I also noticed that sometimes the first homing move fails, probabl because the motor was "off" and the currents have not stabilized, so I runt the command G1 S1 X-320 and in between I wait 300 ms to let the current transients to stabilize (you do this with the command G4 300).

                Hope this helps.

                1 Reply Last reply Reply Quote 0
                • undefined
                  dc42 administrators
                  last edited by 21 May 2018, 07:58

                  The re-home at slower speed bit may not work, because stall detection is unreliable and therefore disabled at low speeds. By default the cutoff speed is 200 full steps/second, so at x16 microstepping and 80 steps/mm that's a speed of 40mm/sec so 2400mm/min. However, for a CoreXY each motor contributes half of the motion, so I think you will find the minimum speed for stall detection is 4800mm/min. You can use the H parameter in the M915 command to try a lower threshold if you like.

                  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
                  • undefined
                    kostasbmw
                    last edited by 5 Aug 2018, 18:20

                    i just finished a hypercube build with ramps+tmc2130 drivers+marlin
                    this is my first cube build and i got confused with the sensorless homing setup..
                    is there a step by step setup to follow ????
                    or a configuration file to compare with mine...
                    i have everything moving but not there yet
                    thanks

                    undefined 1 Reply Last reply 6 Aug 2018, 08:57 Reply Quote 0
                    • undefined
                      dc42 administrators @kostasbmw
                      last edited by 6 Aug 2018, 08:57

                      @kostasbmw said in Working config for sensorless homing on a CoreXY:

                      i just finished a hypercube build with ramps+tmc2130 drivers+marlin
                      this is my first cube build and i got confused with the sensorless homing setup..
                      is there a step by step setup to follow ????
                      or a configuration file to compare with mine...
                      i have everything moving but not there yet
                      thanks

                      I'm sorry, this forum is for Duet with TMC2660 drivers, and other controllers running RepRapFirmware. We can't help you with Marlin+TMC2130. I suggest you check first whether Marlin supports sensorless homing on CoreXY printers at all, because it needs additional code compared to sensorless homing on Cartesian and Delta printers.

                      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
                      • First post
                        Last post
                      Unless otherwise noted, all forum content is licensed under CC-BY-SA