Skip to main content

Infinite Endstop Usage

Precautions

Prerequisites
  • All of the following must be met:
  1. The motherboard must support the DIAG function
  2. The driver must support DIAG signal output
  3. The corresponding endstop port must not have any device connected!

Motherboard Compatibility Check

Fly Motherboard Support Classification:

TypeSupport StatusRepresentative ModelsOperation Requirements
Class ADirectly Connected by DefaultSuper/Gemini/CDY/E3 Series✅ Directly use the endstop interface
Class BJumper Required to EnableD/C/Pro-X10/Micro Series⚡ Must install DIAG jumper cap
Class CNot Supported at AllFly-F407ZG❌ Cannot use infinite endstop function

Confirmation Method:

  1. Check the motherboard markings: Look for a jumper header labeled DIAG
  2. Refer to the schematic: Confirm the DIAG signal connection on the driver interface
  3. For most motherboards, Drive0 corresponds to io0, Drive1 to io1, and so forth for the infinite endstop.
  • Class A Motherboard
    • No DIAG jumper, directly connected to the corresponding endstop port by default
    Loading...
  • Class B Motherboard
    • Requires the use of DIAG jumper
    Loading...

Driver Compatibility Check

Note
  • TMC5160, TMC2240, and TMC2130 have two DIAG pins
  • You need to check the corresponding product documentation or consult customer service to confirm.
Driver ModelCompatibilityDIAG PinConfiguration RequirementSensitivity Requirement
TMC2209✅ SupportedSingle PinUse Directly0-255 # 255 is most sensitive, 0 is least sensitive
TMC5160✅ SupportedDual PinsMust select diag pin-64 to 63 # -64 is most sensitive, 63 is least sensitive
TMC2240✅ SupportedDual PinsMust select diag pin-64 to 63 # -64 is most sensitive, 63 is least sensitive
TMC2130✅ SupportedDual PinsMust select diag pin-64 to 63 # -64 is most sensitive, 63 is least sensitive
TMC2208❌ Not Supported-Cannot use infinite endstop functionCannot use infinite endstop function
TMC2660❌ Not Supported-Cannot use infinite endstop functionCannot use infinite endstop function
LV8729❌ Not Supported-Cannot use infinite endstop functionCannot use infinite endstop function

Identification Key Points:

  1. For dual-pin drivers, you must consult the corresponding manual to confirm the function pins
  2. Some drivers support the DIAG function, but cannot be used if the corresponding pins are not soldered.

Configuration Explanation

  • The corresponding driver model and axis need to be modified.
  • On some machines, when using infinite endstop homing, the retraction can cause homing failure. In this case, set homing_retract_dist: to 0.

Reference Configuration

  • tmc2209_stepper_x needs to be changed to the corresponding driver model.
  • The x in stepper_x represents it is for the x axis. If it's the y axis, change it to stepper_y.
  • Please note that the pins in the configuration below are just for reference; use the actual ones.
  • ^ must be added to the diag_pin: configuration, otherwise, homing will fail.
  • The value in driver_SGTHRS: needs to be tested and set by yourself. 255 is the most sensitive value, 0 is the least sensitive.
    [stepper_x]
    endstop_pin: tmc2209_stepper_x:virtual_endstop
    position_endstop: 0


    [tmc2209 stepper_x]
    diag_pin: ^PD9
    driver_SGTHRS: 100

Testing Sensitivity

  • Step 1

    • Enter the commands below in the web console.

    • Slowly move the toolhead to the middle of the machine. Use the SET_TMC_FIELD command to set the sensitivity.

    • For TMC2209, use the command below. Modify the axis you are testing.

      SET_TMC_FIELD STEPPER=stepper_x FIELD=SGTHRS VALUE=255
    • For TMC5160, TMC2240, and TMC2130, use the command below. Modify the axis you are testing.

      SET_TMC_FIELD STEPPER=stepper_x FIELD=sgt VALUE=-64
  • Step 2

    • Enter the command below in the web console.
      G28 X
    • Confirm that the X-axis does not move at all or stops moving immediately.
    • If it hasn't started moving, immediately issue the command below.
      M112
    • Check that the wiring or configuration of the corresponding DIAG PIN pin might be incorrect and must be corrected before proceeding.
  • Step 3

    • Next, continuously decrease the sensitivity set by VALUE, and run the SET_TMC_FIELD and G28 X0 commands again.
    • Find the highest sensitivity that allows the carriage to successfully move all the way to the end and stop.
    • For TMC2209 drivers, adjustment involves decreasing SGTHRS. For other drivers, adjustment involves increasing sgt.
  • Step 4

    • Once you have tested a suitable value where it stops on a dime after homing, remember the current value.
    • If there is a bang or click at maximum sensitivity, the homing speed might be too low, the driver current might be too low, or this axis might not be suitable for sensorless homing.
    • Open printer.cfg and update the corresponding sensitivity configuration.
Loading...