Sensorless X and Y homing on a Cartesian printer

  • I'm installing the DUET on a Creality Ender 3 and making videos as I do it:

    I've gotten to to the firmware part, and using the web configurator I've got an install working except that I want to play around with the senosorless homing but I'm not having any luck.

    Here is what I've done:
    -In the online confiturator I've enabled the feature by selecting "Motor Stall detect" as my endstop type for X and Y. This has generated the requisite M574 X1 Y1 S3 line in the config.g file.
    -Then I manually ran the following G-code: M915 X Y S-9 R2

    When I attempt a "home all" G28 the bed and print head move to the correct spot, and are physically prevented from moving any further, but instead of triggering the stall detection they just skip the stepper motors (a horrible sound) until the DUET thinks the axis have overrun their limits, and then I get the error: G0/G1: insufficient axes homed

    So, what am I missing? Thanks in advance for your help.

  • My config.G

    ; Endstops
    M574 X1 Y1 S3 ; Set active high endstops, use sensorless homing
    M915 X Y S30 R2 F1 ; set X and Y to sensitivity 30, pause when stall, filtered

    And home all
    ; homeall.g

    G91 ; relative positioning
    G1 S2 X0.2 Y0.2 Z0.2 ; Move all axis 0.2 mm, clear stall status
    G29 S2 ; to clear the height map before Z homing
    M561 ;reset bed compensation

    ; x and y Sensor less homing
    M400 ; make sure everything has stopped before we make changes
    M913 X40 Y50 ; XY motors % current
    M915 X S2 Y S3 R0 F0 ; set X and Y sensitivity, do nothing when stall, unfiltered
    M574 X1 Y1 S3 ; set endstops to use motor stall
    G1 S2 Z10 F1200 ; lift Z
    G1 S1 X-265 Y-245 F5000 ; move X and Y back, stopping at the end stop

    M400 ; make sure everything has stopped
    M913 X100 Y100 ; XY motors to 100% current
    G90 ; back to absolute mode
    G1 X127 Y134 S2 F6000 ; go to first bed probe point and home Z
    G30 ; home Z by probing the bed
    M915 X S30 Y S30 R2 F1 ; set X and Y sensitivity high, pause when stall, filtered

    you will need to spend some time tweaking both axis to get this working correctly

  • administrators

    @punamenon said in Sensorless X and Y homing on a Cartesian printer:

    So, what am I missing?

    You need to tune the stall detection threshold and motor current setting during homing to suit your motors. Specifically, S-9 in your M915 command is much to low for most motors, and you will probably need to use M913 to temporarily reduce motor current in order to get a gentle stall.

  • Stall detection still is not working during a print.

    Thanks you Boldnuts for your macro! It was instrumental in getting sensorless homing to work on my machine, but I can't get stall detection during a print to work. In my config.g I have these two lines.
    M574 X1 Y1 S3
    M915 X S2 Y S3 R3 F1

    After I have successfully run a G29 I can run M915 D0 and it returns the following:
    Driver 0: stall threshold 2, filter off, steps/sec 200, coolstep 0, action: none
    Driver 1: stall threshold 2, filter off, steps/sec 200, coolstep 0, action: none
    Driver 2: stall threshold 1, filter off, steps/sec 200, coolstep 0, action: none
    Driver 3: sta

    When I send a print an then force the X-carriage (skipping the motor) nothing happens. It just continues printing in the new position.

    Any ideas how to get stall detection during a print working?

  • Moderator

    I believe you'll need to tune stall detection values seperately for homing and printing.

  • @phaedrux I have tried to dial up the sensitivity risking false readings. Then I sent a print. It repeatedly gave false readings while printing. However, when I would attempt to block the print head by hand and cause the motor to audibly skip, it would continue printing. Then a few seconds later, a false reading would trigger the "R3" variable thus running the rehome.g macro. So, false readings work, but real readings don't work.

  • I made you guys a video to show the problem:

Log in to reply