Stall detection during Z homing with bltouch?

  • My printer uses stall based X,Y homing and bltouch based Z homing. Is it possible, during the G30 of the Z homing to also detect Z motor stall, in case the bltouch malfunctions and the bed hits the nozzle?

    My goal is to minimize damage to the printer if the bltouch fails to detect the bed for some reason.

    This is for a DWF with the configuration below. Comments may not reflect the latest gcode.


    ; Axis Limits
    M208 X-5 Y-15 Z-3 S1                         ; Set axis minima (home at min X,Y)
    M208 X300 Y300 Z285 S0                       ; Set axis maxima
    ; Endstops
    M574 X1 Y1 S3                                ; X min, Y min, stall style endstops
    ; Z-Probe
    M574 Z1 S2                                   ; Set endstops controlled by probe
    M307 H3 A-1 C-1 D-1                          ; Disable heater on PWM channel for BLTouch
    M558 P9 H3 F120 T6000                        ; Set Z probe type to bltouch and the dive height + speeds
    G31 P500 X20.5 Y12.9 Z1.00                    ; Set Z probe trigger value, offset and trigger height


    ; Home Z
    G90               ; absolute positioning
    G1 X5 Y29 F6000   ; go to probing point (close to edge, for better support if bltouch fails)
    M913 Z50          ; Z motors to 50% current, in case something goes wrong with bltouch
    M558 A1 F800      ; Set for probing at fast speed, single probe
    G30               ; Probe and home Z (pass 1)
    M913 Z100         ; Z motors to 100% current
    M558 A5 F100      ; Set for probing at slow speed, allow multiple trys
    G30               ; Probe and home Z

  • Moderator

    You can only have one probe type at a time active, but I think stall detection as configured for detecting collisions during a print should work.

    However, you can probably just get around the whole issue by reducing the z motor current to the bare minimum during homing so that if it does contact the bed it will just stall the motor anyway. Then restore the current after homing.

    And for what it's worth the BLTouch is pretty reliable once you have it configured. I've homed thousands of times without issue. Knock on wood.

  • @phaedrux, this is what I am doing, reducing the Z current to 50% but without stall detection, it will keep pushing against the nozzle for some time. Will stall detection it will stop immediately.

    but I think stall detection as configured for detecting collisions during a print should work

    Do I need to enable it explicitly? (that is, stall detection during general movements, not just homing).

  • Moderator

    50% may still be too much. If you really want it to stall out you should find the lowest possible current that still allows the motors to move. You might also need to reduce acceleration during homing as well.

    Stall detection on the Z axis is honestly just as hard to get working as sensorless homing on the Z axis. Since the moves for homing are typically slow it makes it hard to really trigger. But you can test it by tuning your M915 parameters.

    I'm not 100% sure it's even active during a G30 probe. @dc42 would have to answer that.

    It's easy enough to test though. Have you tried to make the Z axis stall by hand with stall detection configured?

Log in to reply