Endstop Related
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.
- 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
G28when the endstop status is incorrect, otherwise the machine may crash.
Micro Switch Endstop
Precautions for Three-Wire Micro Switch Endstops
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.54terminal 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.
Micro Switch Endstop Wiring Method
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 Terminal | Function | Connection Requirement |
|---|---|---|
5V | Power | Leave unconnected |
GND | Ground | Must be connected |
S | Signal | Must be connected |
Detection steps:
- Set the multimeter to continuity test mode.
- Test the normally closed terminal and common terminal of the micro switch endstop.
- When not pressed, it should conduct and the buzzer should sound.
- When pressed, it should disconnect and there should be no buzzer sound.
- If the result is reversed, check whether the normally open terminal NO was mistakenly used, or whether the terminal contact is poor.
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.
[stepper_x]
endstop_pin: ^!PD9
TAP
Wiring Instructions
- This tutorial uses the
BL-Touchinterface ofFLY-SHT36 V2as an example. - Some TAPs support 12V or 24V, but it is recommended to prioritize 5V power supply.
- The middle signal port of
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
EE-SX670WRas 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 Terminal | Function | Connection Requirement |
|---|---|---|
5V | Power | Must be connected |
GND | Ground | Must be connected |
S | Signal | Must be connected |
EE-SX670WR Wiring suggestions:
| 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 normally closed |
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 an NPN normally closed switch.
- You need to prepare a
BAT85diode yourself. - Exposed wire ends must be properly insulated to avoid short circuits.
Wiring Steps
- Connect the black end of the diode, i.e., the negative terminal, to the sensor signal wire.
- Connect the other end of the diode, i.e., the positive terminal, to the motherboard signal interface.
- Wrap 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 middle of the machine.
- Power on and open the web console.
- Enter the following command to check the endstop status:
QUERY_ENDSTOPS
When wiring and configuration are correct, untriggered endstops should display as open.
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.
Result Interpretation
| Phenomenon | Solution |
|---|---|
| Status unchanged | Check whether the endstop switch wiring and the pin in the configuration are correct |
| Insensitive triggering | Check whether the pull-up symbol ^ is added before pin, e.g., ^PC0 |
| Status reversed | Check 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.
If the printer does not use physical endstop switches, please refer to the Sensorless Usage Guide.