Endstop Related
This page explains the wiring, configuration, and status checking methods for common endstop types. Before the first homing, please complete the endstop status check to confirm the trigger logic is correct.
- Endstop wiring operations must be performed with power disconnected.
- Before homing, move the print head to the center of the machine and prepare an emergency stop or power disconnect.
- Do not execute
G28if the endstop status is incorrect, as it may cause a crash.
Microswitch Endstop
Three-Wire Microswitch Precautions
Attention FLY motherboard users: Three-wire microswitch endstops cannot be directly connected to FLY motherboards. The motherboard endstop interface already provides 5V power. Incorrect wiring of a three-wire microswitch may cause a 5V short circuit, damaging the motherboard, host computer, or driver.
Solution:
- Cut the 5V wire, typically the red one, in the
XH2.54connector of the three-wire endstop. Confirm the wire order in practice. - Wrap the cut end with insulating tape or heat shrink tubing to prevent short circuits.
Microswitch Endstop Wiring Method
The use of Normally Closed (NC) contacts is strongly recommended. NC wiring makes anomalies more apparent when a wire breaks, reducing the risk of a crash.
| Motherboard Terminal | Function | Connection Requirement |
|---|---|---|
5V | Power | Leave unconnected |
GND | Ground | Must be connected |
S | Signal | Must be connected |
Testing Steps:
- Set the multimeter to continuity test mode.
- Test the normally closed terminal and common terminal of the microswitch.
- When not pressed, it should be conductive, and the buzzer should sound.
- When pressed, it should be open circuit, with no buzzer sound.
- If the result is opposite, check if the normally open (NO) terminal was used by mistake, or if there is poor contact.
Microswitch Endstop Reference Configuration
Most endstops require a pull-up resistor, so add ^ before the pin. When using NC endstops, you typically also need to add ! to invert the state.
[stepper_x]
endstop_pin: ^!PD9
TAP
Wiring Instructions
- This tutorial uses the
BL-Touchinterface of theSHT36-V2as an example. - Some TAPs support 12V or 24V, but 5V power supply is recommended as a priority.
- The middle signal port of the
BL-Touchcannot be used as an endstop port.
| Motherboard Terminal | Function | Connection Requirement |
|---|---|---|
5V | Power | Must be connected |
GND | Ground | Must be connected |
S | Signal | Must be connected |
TAP Reference Configuration
[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
- This tutorial uses the
EE-SX670WRas an example. - The sensor type is NPN Normally Closed.
- The optical switch uses 5V power.
- If 12V or 24V power is required, refer to the proximity switch wiring method below.
Wiring Instructions
| Motherboard Terminal | Function | Connection Requirement |
|---|---|---|
5V | Power | Must be connected |
GND | Ground | Must be connected |
S | Signal | Must be connected |
EE-SX670WR Wiring Recommendations:
| Optical Switch | Function | Connection Requirement |
|---|---|---|
| Brown | Power | Must be connected |
| Blue | Ground | Must be connected |
| Black | Signal | Must be connected |
| Pink | Normally Closed | Connect to GND to use NC function |
Optical Endstop Reference Configuration
[stepper_x]
endstop_pin: ^PD9
Proximity Switch
Using the Omron proximity switch TL-Q5MC2-Z as an example, please note before operation:
- The sensor type is NPN Normally Closed.
- A
BAT85diode is required. - Exposed wire ends must be properly insulated to prevent short circuits.
Wiring Steps
- Connect the black end (cathode) of the diode to the sensor signal wire.
- Connect the other end (anode) of the diode to the motherboard signal interface.
- Wrap the exposed wire ends with heat shrink tubing or electrical tape.
Proximity Switch Reference Configuration
[probe]
pin: ^PC0
x_offset: 0
y_offset: 25.0
z_offset: 0
Endstop Status Check
Preparation
- After powering off, manually move the print head to the center of the machine.
- Power on and open the web console.
- Enter the following command to check endstop status:
QUERY_ENDSTOPS
When wiring and configuration are correct, untriggered endstops should show as open.
Trigger Test
Press and hold one of the endstop switches without releasing it, then execute again:
QUERY_ENDSTOPS
The status of the pressed endstop should change to TRIGGERED. For example, when pressing the Y endstop, the Y status should change from OPEN to TRIGGERED.
Result Diagnosis
| Symptom | Action |
|---|---|
| Status unchanged | Check the endstop switch wiring and the pin in the configuration |
| Trigger insensitive | Check if the pull-up symbol ^ is added before the pin, e.g., ^PC0 |
| Status inverted | Check if the invert symbol ! needs to be added or removed before the pin |
When the status is inverted:
- If currently
^!PD9, try changing to^PD9. - If currently
^PD9, try changing to^!PD9.
If the printer does not use physical endstop switches, please refer to Using Without Endstops Guide.