Skip to main content

Endstop Related

Formal endstop check and independent input test

This page uses the formally configured QUERY_ENDSTOPS; to isolate ports, you can use the quick test tool to generate gcode_button, and follow Input Port Test to use QUERY_BUTTON. The two configurations cannot occupy the same pin at the same time. After completing temporary tests, restore the formal configuration, confirm the endstop status is correct, and then home.

This page explains the wiring, configuration, and status check methods for common endstop types. Before homing for the first time, please complete the endstop status check first to confirm the trigger logic is correct.

Safety Reminder
  • Endstop wiring operations must be performed with power off.
  • Before homing, move the print head to the middle of the machine and prepare for emergency stop or power-off.
  • Do not execute G28 when the endstop status is incorrect, otherwise the machine may crash.

Micro Switch Endstop​

Precautions for Three-Wire Micro Switch Endstops​

Danger

FLY motherboard users please note: three-wire micro switch endstops cannot be directly connected to the FLY motherboard. The motherboard endstop interface already provides 5V power. If the three-wire micro switch is wired incorrectly, it may cause a 5V short circuit and burn out the motherboard, host computer, or driver.

Solution:

  • Cut the corresponding 5V wire in the XH2.54 terminal of the three-wire endstop switch, usually the red wire; please refer to the actual wire order.
  • After cutting, wrap it with insulating tape or heat shrink tubing to avoid short circuits.
Loading...

Micro Switch Endstop Wiring Method​

Caution

It is strongly recommended to use the normally closed NC terminal. The normally closed wiring makes it easier to expose abnormalities when the wire breaks, reducing the risk of machine crashes.

Motherboard TerminalFunctionConnection Requirement
5VPowerLeave unconnected
GNDGroundMust be connected
SSignalMust be connected

Detection steps:

  1. Set the multimeter to continuity test mode.
  2. Test the normally closed terminal and common terminal of the micro switch endstop.
  3. When not pressed, it should conduct and the buzzer should sound.
  4. When pressed, it should disconnect and there should be no buzzer sound.
  5. If the result is reversed, check whether the normally open terminal NO was mistakenly used, or whether the terminal contact is poor.
Loading...

Micro Switch Endstop Reference Configuration​

Most endstops require enabling the pull-up resistor, so ^ needs to be added before the pin. When using normally closed NC endstops, ! is usually also needed to invert the state.

printer.cfg
[stepper_x]
endstop_pin: ^!PD9

TAP​

Wiring Instructions​

Danger
  • This tutorial uses the BL-Touch interface of FLY-SHT36 V2 as an example.
  • Some TAPs support 12V or 24V, but it is recommended to prioritize 5V power supply.
  • The middle signal port of BL-Touch cannot be used as an endstop port.
Motherboard TerminalFunctionConnection Requirement
5VPowerMust be connected
GNDGroundMust be connected
SSignalMust be connected
Loading...

TAP Reference Configuration​

printer.cfg
[stepper_z]
endstop_pin: probe:z_virtual_endstop
# position_endstop: -0.5

[probe]
pin: ^sht36:PC15
x_offset: 0
y_offset: 0
# z_offset: 0
speed: 3.0
lift_speed: 5
samples: 3
samples_result: median
sample_retract_dist: 3.0
samples_tolerance: 0.075
samples_tolerance_retries: 3
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 %}
{% 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​

Danger
  • This tutorial uses EE-SX670WR as an example.
  • The sensor type is an NPN normally closed switch.
  • The optical switch uses 5V power supply.
  • If 12V or 24V power supply is needed, please refer to the proximity switch wiring method below.

Wiring Instructions​

Motherboard TerminalFunctionConnection Requirement
5VPowerMust be connected
GNDGroundMust be connected
SSignalMust be connected

EE-SX670WR Wiring suggestions:

Optical SwitchFunctionConnection Requirement
BrownPowerMust be connected
BlueGroundMust be connected
BlackSignalMust be connected
PinkNormally ClosedConnect to GND to use normally closed
Loading...

Optical Endstop Reference Configuration​

printer.cfg
[stepper_x]
endstop_pin: ^PD9

Proximity Switch​

Danger

Using the Omron proximity switch TL-Q5MC2-Z as an example, please note before operation:

  • The sensor type is an NPN normally closed switch.
  • You need to prepare a BAT85 diode yourself.
  • Exposed wire ends must be properly insulated to avoid short circuits.

Wiring Steps​

  1. Connect the black end of the diode, i.e., the negative terminal, to the sensor signal wire.
  2. Connect the other end of the diode, i.e., the positive terminal, to the motherboard signal interface.
  3. Wrap exposed wire ends with heat shrink tubing or electrical tape.
Loading...

Proximity Switch Reference Configuration​

printer.cfg
[probe]
pin: ^PC0
x_offset: 0
y_offset: 25.0
z_offset: 0

Endstop Status Check​

Preparation​

  1. After powering off, manually move the print head to the middle of the machine.
  2. Power on and open the web console.
  3. Enter the following command to check the endstop status:
QUERY_ENDSTOPS

When wiring and configuration are correct, untriggered endstops should display as open.

Loading...

Trigger Test​

Press and hold one of the endstop switches without releasing, and execute again:

QUERY_ENDSTOPS

The status of the pressed endstop should change to TRIGGERED. For example, when the Y endstop is pressed, the Y status should change from open to TRIGGERED.

Loading...

Result Interpretation​

PhenomenonSolution
Status unchangedCheck whether the endstop switch wiring and the pin in the configuration are correct
Insensitive triggeringCheck whether the pull-up symbol ^ is added before pin, e.g., ^PC0
Status reversedCheck whether the inversion symbol ! needs to be added or removed before pin

When the status is reversed:

  • If it is currently ^!PD9, try changing it to ^PD9.
  • If it is currently ^PD9, try changing it to ^!PD9.
Extended Function

If the printer does not use physical endstop switches, please refer to the Sensorless Usage Guide.

Loading...