Sensorless homing not going so great



  • Hey everybody,

    I Been trying to get the sensorless homing to work good, it got it working for the X axis but the Y axis i cant get to work.

    I am using the same code for the two axis:

    [[language]]
    M400            ; make sure everything has stopped before we make changes
    M913 X50 Y50         ; XY motors to 65% current    
    M915 X S1 R0 F0    ; set X and Y to sensitivity 0, do nothing when stall, unfiltered
    M574 X1 Y1 S3        ; set endstops to use motor stall
    G1 S1 X-325 F2400     ; move right/back 325mm, stopping at the endstop
    G4 P500            ; wait 500msec
    G1 X1            ; move away from home
    G4 P500            ; wait 500msec
    M400            ; make sure everything has stopped before we make changes
    
    

    https://www.youtube.com/watch?v=qj459IFUCGI&feature=youtu.be

    This is the code for Y axis, they are almost the same, but this axis does not move, only a litte bit

    [[language]]
    M400            ; make sure everything has stopped before we make changes
    M915 Y S50 R0 F0    ; set X and Y to sensitivity 0, do nothing when stall, unfiltered
    M574 X1 Y1 S3        ; set endstops to use motor stall
    G1 S1 Y-325 F2400     ; move right/back 325mm, stopping at the endstop
    G4 P500            ; wait 500msec
    G1 Y1            ; move away from home
    G4 P500            ; wait 500msec
    M400            ; make sure everything has stopped before we make changes
    
    

    https://youtu.be/aPMjiQzARCc

    As you can see in the two videos that axis Y just is not moving. Also the Stall detection threshold is very high but that does not changes a thing. Any ideas what I am doing wrong here!?


  • administrators

    Is it a CoreXY machine? If so then a stall on either the X or the Y motor will stop an X or Y homing move. So you need to configure the stall thresholds of both motors with M915.



  • Well after a few hours i made the following code:

    [[language]]
    M400                  ; make sure everything has stopped before we make changes
    M574 X2 Y2 S3         ; set endstops to use motor stall
    M913 X50 Y50          ; drop motor currents to 50%
    M915 X Y S2 R0 F0     ; set X and Y to sensitivity 2, do nothing when stall, unfiltered
    
    G91                   ; use relative positioning
    G1 S1 X-500 F3600     ;move right/back 325mm, stopping at the endstop
    G4 P500		      ; wait 500msec
    G92 X0		      ;
    G1 X5 F200 	      ;
    M400		      ; make sure everything has stopped before we make changes
    M913 X100 Y100        ; drop motor currents to 50%
    
    M400                  ; make sure everything has stopped before we make changes
    M574 X2 Y2 S3         ; set endstops to use motor stall
    M913 X50 Y50          ; drop motor currents to 50%
    M915 X Y S2 R0 F0     ; set X and Y to sensitivity 2, do nothing when stall, unfiltered
    
    G91                   ; use relative positioning
    G1 S1 Y-500 F3600     ;move right/back 325mm, stopping at the endstop
    G4 P500		      ; wait 500msec
    G92 Y0		      ;
    G1 Y5 F200 	      ;
    M400		      ; make sure everything has stopped before we make changes
    M913 X100 Y100        ; drop motor currents to 50%
    
    

    Works great! but I need to use a G92 to set the Axis at 0.0 mm , not sure if that is the best way yet.


  • administrators

    You should not need those G92 commands. What happens without them?



  • Well when the axis are at 200mm and i do the homing. The axis end up at 300mm insteed of 0mm. But maybe it did not works because i was running the code in a macro insteed of the home x and home y files.

    I will try iT without the G92 in the home x and home y files.

    I also have the feeling that the homeall file dus something else than i have typed. The homeall file is just the combined program of the home Y and X file.

    So have Some more thing to find out. But i will het there



  • I been thinking a bit, but is this possible that the printers is homing to the maximum length of the axis!?

    I have set the maximum length of the axis at 300mm and every time i home the machine the X and Y values are 300mm

    That why I need a G92 in the home cycle.
    But how do I change that!? homing to min!?


  • administrators

    Your M574 commands say that you are homing to high end endstops (X2, Y2) but you are homing to the low end so it should be X1, Y1.



  • @dc42:

    Your M574 commands say that you are homing to high end endstops (X2, Y2) but you are homing to the low end so it should be X1, Y1.

    Yes you are right! now homing great, now just getting the Bltouch to work as Z axis homing!


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.