Sensorless Homing
Sensorless homing uses the DIAG signal from a TMC driver to detect motor stall, thereby replacing physical limit switches.
All of the following conditions must be met simultaneously:
- The motherboard supports the
DIAGfunction. - The driver supports
DIAGsignal output. - No device should be connected to the corresponding endstop port.
- The machine structure is suitable for sensorless homing, and moving parts will not be damaged when hitting the end stops.
Motherboard Compatibility Check
| Type | Support | Representative Models | Operation Requirements |
|---|---|---|---|
| Type A | Default direct connection | Super / Gemini / CDY / E3 series | Use the corresponding endstop interface directly |
| Type B | Jumper required to enable | D / C / Pro-X10 / Micro series | Must install the DIAG jumper cap |
| Type C | Not supported | Fly-F407ZG | Cannot use sensorless homing |
Confirmation method:
- Check if the motherboard has a jumper header labeled
DIAG. - Consult the schematic to confirm if the
DIAGsignal from the driver interface is connected to the endstop port. - On most motherboards,
Drive0corresponds toio0,Drive1corresponds toio1, and so on.
Type A motherboards: No DIAG jumper, the signal is directly connected to the corresponding endstop port by default.
Type B motherboards: Require using the DIAG jumper.
Driver Compatibility Check
TMC5160, TMC2240, and TMC2130 typically have two DIAG pins. Please refer to the corresponding product documentation or consult customer service to confirm which pin to use.
| Driver Model | Compatibility | DIAG Pin | Configuration Requirements | Sensitivity Range |
|---|---|---|---|---|
| TMC2209 | Supported | Single pin | Use diag_pin directly | 0-255, 255 most sensitive, 0 least sensitive |
| TMC5160 | Supported | Dual pins | Select diag0_pin or diag1_pin | -64-63, -64 most sensitive, 63 least sensitive |
| TMC2240 | Supported | Dual pins | Select diag0_pin or diag1_pin | -64-63, -64 most sensitive, 63 least sensitive |
| TMC2130 | Supported | Dual pins | Select diag0_pin or diag1_pin | -64-63, -64 most sensitive, 63 least sensitive |
| TMC2208 | Not supported | - | Cannot use sensorless homing | - |
| TMC2660 | Not supported | - | Cannot use sensorless homing | - |
| LV8729 | Not supported | - | Cannot use sensorless homing | - |
Configuration Notes
- The configuration needs to be modified according to the actual driver model and axis name.
tmc2209intmc2209_stepper_xneeds to be changed to the corresponding driver model.xinstepper_xrepresents the X-axis. If configuring the Y-axis, it needs to be changed tostepper_y.- On some machines, retraction during sensorless homing can cause homing failure.
homing_retract_distshould be set to0in this case.
Reference Configuration
- TMC2209 Reference Configuration
- TMC5160 Reference Configuration
- TMC2130 Reference Configuration
- TMC2240 Reference Configuration
Notes:
- The pins below are for reference only and need to be modified according to the actual motherboard.
diag_pinusually needs to be prefixed with^, otherwise it may cause homing failure.driver_SGTHRSneeds to be tested in practice; 255 is the most sensitive, 0 is the least sensitive.
[stepper_x]
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 0
homing_retract_dist: 0
[tmc2209 stepper_x]
diag_pin: ^PD9
driver_SGTHRS: 100
Notes:
- The pins below are for reference only and need to be modified according to the actual motherboard.
- Check the product manual to confirm whether to use
diag0_pinordiag1_pin. driver_SGTneeds to be tested in practice; -64 is the most sensitive, 63 is the least sensitive.
[stepper_y]
endstop_pin: tmc5160_stepper_y:virtual_endstop
position_endstop: 0
homing_retract_dist: 0
[tmc5160 stepper_y]
diag1_pin: ^!PD9
driver_SGT: 1
Notes:
- The pins below are for reference only and need to be modified according to the actual motherboard.
- Check the product manual to confirm whether to use
diag0_pinordiag1_pin. driver_SGTneeds to be tested in practice; -64 is the most sensitive, 63 is the least sensitive.
[stepper_y]
endstop_pin: tmc2130_stepper_y:virtual_endstop
position_endstop: 0
homing_retract_dist: 0
[tmc2130 stepper_y]
diag1_pin: ^!PD9
driver_SGT: 1
Notes:
- The pins below are for reference only and need to be modified according to the actual motherboard.
- Check the product manual to confirm whether to use
diag0_pinordiag1_pin. driver_SGTneeds to be tested in practice; -64 is the most sensitive, 63 is the least sensitive.
[stepper_x]
endstop_pin: tmc2240_stepper_x:virtual_endstop
position_endstop: 0
homing_retract_dist: 0
[tmc2240 stepper_x]
diag1_pin: ^!PD9
driver_SGT: 1
Sensitivity Test
When testing sensorless homing, the print head must be moved to the center of the machine, and you must be ready to execute M112 emergency stop at any time. Do not test at high speed or unattended.
Step 1: Set Maximum Sensitivity
TMC2209:
SET_TMC_FIELD STEPPER=stepper_x FIELD=SGTHRS VALUE=255
TMC5160 / TMC2240 / TMC2130:
SET_TMC_FIELD STEPPER=stepper_x FIELD=sgt VALUE=-64
Step 2: Perform Single Axis Homing
G28 X
If the axis does not start moving, moves abnormally, or cannot stop, execute immediately:
M112
In this case, check the corresponding DIAG pin wiring, jumper cap, and configuration.
Step 3: Gradually Decrease Sensitivity
- TMC2209: Gradually decrease
SGTHRS. - TMC5160 / TMC2240 / TMC2130: Gradually increase
sgt. - After each adjustment, re-execute
SET_TMC_FIELDand the single-axis homing test.
The goal is to find the highest reliable sensitivity that allows the carriage to move stably to the end stop and stop.
Step 4: Write Back to Configuration
After finding a suitable value through testing, write this value back to the corresponding driver configuration in printer.cfg.
If there are still noticeable impact sounds, clicking noises, or inconsistent triggering at maximum sensitivity, it usually indicates that the homing speed is too low, the driver current is too low, there is abnormal mechanical resistance, or the axis is not suitable for sensorless homing.