Skip to main content

Endstop Related

Microswitch Endstop

Three-wire Microswitch Endstop Notes

Note
  • FLY motherboard users please note: Three-wire microswitch endstop cannot be directly connected to the FLY motherboard, because the endstop interface on the motherboard already provides 5V power. Direct connection will cause a 5V short circuit, burning out the motherboard, host computer, and driver devices!
  • Solution
    • Cut the 5V wire: Cut the 5V wire (usually red wire, subject to actual color) in the XH2.54 terminal of the three-wire endstop switch and wrap it with insulating tape to prevent short circuits.

Microswitch Endstop Wiring Method

Notes
  • Strongly recommended: Use the normally closed (NC) contact (to prevent collision accidents caused by broken wires)
  • Wiring requirements:
Motherboard TerminalFunctionConnection Requirements
5VPower🔌 Left unconnected
GNDGround✅ Must be connected
SSignal✅ Must be connected
  • Testing steps:
  1. Set multimeter to continuity test mode (with buzzer icon)

  2. Test the microswitch:

    • Not pressed: Continuity between NC and common terminal should exist (buzzer sounds)
    • Pressed: Continuity between NC and common terminal should be interrupted (no sound)
  3. If results are reversed:

    • Check if normally open (NO) contact was mistakenly used
    • Check for poor contact

Configuration Notes

  • Pull-up resistor requirement:

    • Most printers require enabling the pull-up resistor, ^ symbol must be added before the pin
  • Normally closed (NC) endstop configuration:

    • When using NC endstop, ! symbol must be added
  • Below is a reference configuration

    [stepper_x]
    ndstop_pin: ^!PD9

TAP

Wiring Instructions

Note
  • This tutorial uses the BL-Touch interface of SHT36-V2 for demonstration
  • Some TAP devices support 12V or 24V, but 5V is recommended for safety
  • The middle signal pin of BL-Touch cannot be used as an endstop pin!!!

::|

Motherboard TerminalFunctionConnection Requirements
5VPower✅ Must be connected
GNDGround✅ Must be connected
SSignal✅ Must be connected

Reference Configuration

  • Pull-up resistor requirement:
  • Most printers require enabling the pull-up resistor, must add ^ symbol before the pin
[stepper_z]
endstop_pin: probe:z_virtual_endstop
# endstop_pin: ^sht36:PA1
# position_endstop: -0.5

[probe]
pin: ^sht36:PC15 # Signal interface
x_offset: 0 # X-axis - sensor offset relative to nozzle
y_offset: 0 # Y-axis - sensor offset relative to nozzle
#z_offset: 0 # Z-axis - sensor offset relative to nozzle
speed: 3.0 # Leveling speed
lift_speed: 5 # Probe lifting speed
samples: 3 # Sampling count
samples_result: median # Value selection method (default median)
sample_retract_dist: 3.0 # Leveling retraction distance
samples_tolerance: 0.075 # Sampling tolerance (note that too small a value may increase sampling count)
samples_tolerance_retries: 3 # Over-tolerance retry count
activate_gcode:
{% set PROBE_TEMP = 150 %}
{% set MAX_TEMP = PROBE_TEMP + 5 %}
{% set ACTUAL_TEMP = printer.extruder.temperature %}
{% set TARGET_TEMP = printer.extruder.target %}

{% if TARGET_TEMP > PROBE_TEMP %}
{ action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) }
M106 S255
M109 S{ PROBE_TEMP }
M106 S26
{% else %}
# Temperature target is already low enough, but nozzle may still be too hot.
{% if ACTUAL_TEMP > MAX_TEMP %}
{ action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) }
TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP }
{% endif %}
{% endif %}

Optical Endstop

Note
  • This tutorial uses 5V to power the optical endstop
  • For voltages exceeding 5V, use 12V or 24V, refer to the proximity switch tutorial below

Wiring Instructions

Motherboard TerminalFunctionConnection Requirements
5VPower✅ Must be connected
GNDGround✅ Must be connected
SSignal✅ Must be connected

Configuration Notes

  • Pull-up resistor requirement:

  • Most printers require enabling the pull-up resistor, must add ^ symbol before the pin

  • Below is a reference configuration

[stepper_x]
ndstop_pin: ^PD9

Proximity Switch

Important Note
  • Taking Omron proximity switch TL-Q5MC2-Z as example, please note before operation:
  • Sensor type: PNP normally closed switch
  • Required component: Must purchase BAT85 diode separately

Wiring Steps

  1. Diode Installation
  • Connect the black end (cathode) of the diode to the sensor signal wire
  • Connect the other end (anode) to the motherboard signal interface
  1. Insulation Treatment
  • Strongly recommend using heat shrink tubing or electrical tape to wrap exposed wire ends to prevent short circuits caused by contact with other devices

Reference Configuration

  • Pull-up resistor requirement:
  • Most printers require enabling the pull-up resistor, must add ^ symbol before the pin
  • Below is a reference configuration
[probe]
pin: ^PC0
x_offset: 0
y_offset: 25.0
z_offset: 0

klicky

  • Updating

Sensorless Endstop Setup

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

Motherboard Compatibility Check

Fly Motherboard Support Classification:

TypeSupport StatusRepresentative ModelsOperation Requirements
A-typeDirect connection by defaultSuper/Gemini/CDY/E3 series✅ Use endstop interface directly
B-typeRequires jumper to enableD/C/Pro-X10/Micro series⚡ Must install DIAG jumper cap
C-typeNot supported at allFly-F407ZG❌ Cannot use sensorless endstop function

Identification method:

  1. Check motherboard markings: Look for a DIAG jumper seat
  2. Refer to the schematic: Confirm DIAG signal connection of the driver interface
  3. On most motherboards, sensorless endstop corresponds drive0 to io0, drive1 to io1, and so on
  • A-type motherboard
    • No DIAG jumper, directly connected to the corresponding endstop port by default
  • B-type motherboard
    • Requires use of DIAG jumper

Driver Compatibility Check

Tip
  • TMC5160, TMC2240 and TMC2130 have two DIAG pins
  • Product documentation or customer service must be consulted to confirm
Driver ModelCompatibilityDIAG PinConfiguration RequirementsSensitivity Requirements
TMC2209✅ SupportedSingle pinDirect use0-255 # 255 is the most sensitive value, 0 is the least sensitive
TMC5160✅ SupportedDual pinsNeed to select diag pin-64-255 # -64 is the most sensitive value, 63 is the least sensitive
TMC2240✅ SupportedDual pinsNeed to select diag pin-64-255 # -64 is the most sensitive value, 63 is the least sensitive
TMC2130✅ SupportedDual pinsNeed to select diag pin-64-255 # -64 is the most sensitive value, 63 is the least sensitive
TMC2208❌ Not supported-Cannot use sensorless endstop functionCannot use sensorless endstop function
TMC2660❌ Not supported-Cannot use sensorless endstop functionCannot use sensorless endstop function
LV8729❌ Not supported-Cannot use sensorless endstop functionCannot use sensorless endstop function

Identification Points:

  1. Dual-pin drivers must consult the corresponding manual to confirm function pins
  2. Some drivers themselves support the DIAG function, but cannot be used if the corresponding pin header is not soldered

Configuration Notes

  • The corresponding driver model and axis need to be modified
  • Some machines using sensorless homing may fail to home due to retraction, set homing_retract_dist: to 0

Reference Configuration

  • In tmc2209_stepper_x, TMC2209 needs to be changed to the corresponding driver model
  • In stepper_x, the x indicates this is the x axis. If it's the y axis, change to stepper_y
  • Note that the pins in the configuration below are only for reference, actual usage may vary
  • diag_pin: must include ^, otherwise homing will fail
  • The value in driver_SGTHRS: needs to be tested and set, 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

Test Sensitivity

  • Step 1

    • Enter the following command in the web console

    • Slowly move the print head to the center of the machine. Use the SET_TMC_FIELD command to set 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 following command in the web console
      G28 X
    • Confirm that the X-axis does not move at all or stops moving quickly.
    • If no movement notification is received, immediately issue the following command
      M112
    • Check that the wiring or configuration of the corresponding DIAG PIN pin may be incorrect and must be corrected before proceeding.
  • Step 3

    • Next, continuously reduce the sensitivity setting of VALUE and rerun the SET_TMC_FIELD and G28 X0 commands
    • Find the highest sensitivity value that allows the carriage to successfully move all the way to the end point and stop
    • For TMC2209 drivers, the adjustment is to reduce SGTHRS, for other drivers, the adjustment is to increase sgt
  • Step 4

    • After testing to the appropriate value, remember the current value when it stops immediately after homing
    • If there is a collision or clicking sound at maximum sensitivity, the homing speed may be too low, the driver current may be too low, or the axis may not be suitable for sensorless homing.
    • Open printer.cfg and update the corresponding sensitivity configuration

Endstop Status Check

  • Updating
Loading...
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -