Limit Switch Related
This page explains the wiring, configuration, and status check methods for common limit switch types. Before the first homing, please complete the limit switch status check to confirm the trigger logic is correct.
- Limit switch wiring operations must be performed with the power disconnected.
- Before homing, move the print head to the middle of the machine and prepare an emergency stop or power cut-off.
- Do not execute
G28if the limit switch status is incorrect, as this may cause a crash.
Micro Switch Limit
Three-Wire Micro Switch Limit Precautions
FLY motherboard users please note: Three-wire micro switch limit switches cannot be directly connected to FLY motherboards. The motherboard limit switch interface provides 5V power. If the three-wire micro switch is wired incorrectly, it may cause a 5V short circuit, damaging the motherboard, host computer, or drivers.
Solution:
- Cut the 5V wire, usually the red wire, corresponding to the
XH2.54connector on the three-wire limit switch. Refer to the actual wire order if necessary. - After cutting, wrap the exposed end with insulating tape or heat shrink tubing to prevent short circuits.
Micro Switch Limit Wiring Method
The use of the Normally Closed (NC) contact is strongly recommended. The NC wiring method makes it easier to detect faults when wires break, 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 the continuity test mode.
- Test the Normally Closed terminal and the common terminal of the micro switch.
- It should be conductive, and the buzzer should sound, when the switch is not pressed.
- It should be non-conductive, with no buzzer sound, when the switch is pressed.
- If the results are reversed, check if you have mistakenly used the Normally Open (NO) terminal or if there is a poor contact issue.
Micro Switch Limit Reference Configuration
Most limit switches require the pull-up resistor to be enabled, hence the ^ symbol before the pin. When using a Normally Closed (NC) limit switch, the ! symbol is usually also added to invert the state.
[stepper_x]
endstop_pin: ^!PD9
TAP
Wiring Instructions
- This tutorial uses the
BL-Touchinterface on theFLY-SHT36 V2as an example. - Some TAPs support 12V or 24V, but it is recommended to use 5V power first.
- The middle signal pin of the
BL-Touchinterface cannot be used as a limit switch pin.
| 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 %}
Photoelectric Limit Switch
- This tutorial uses the
EE-SX670WRas an example. - The sensor type is an NPN Normally Closed switch.
- The photoelectric switch is powered with 5V.
- If you need to use 12V or 24V power, 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 Recommendations:
| Photoelectric Switch Wire | 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 the Normally Closed function |
Photoelectric Limit Switch Reference Configuration
[stepper_x]
endstop_pin: ^PD9
Proximity Switch
Using the Omron proximity switch TL-Q5MC2-Z as an example, please note before operating:
- The sensor type is an NPN Normally Closed switch.
- You need to provide your own
BAT85diode. - Exposed wire ends must be properly insulated to prevent short circuits.
Wiring Steps
- Connect the black end of the diode, which is the cathode, to the sensor signal wire.
- Connect the other end of the diode, which is the anode, 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
Limit Switch Status Check
Preparation
- With the power off, manually move the print head to the middle of the machine.
- Power on the machine and open the web console.
- Enter the following command to check the limit switch status:
QUERY_ENDSTOPS
When the wiring and configuration are correct, untriggered limit switches should show as open.
Trigger Test
Press and hold one of the limit switches, without releasing it, and execute the command again:
QUERY_ENDSTOPS
The status of the pressed limit switch should change to TRIGGERED. For example, when the Y limit switch is pressed, the Y status should change from OPEN to TRIGGERED.
Result Evaluation
| Symptom | Solution |
|---|---|
| Status does not change | Check the limit switch wiring and the pin configuration |
| Triggering is not sensitive | Check if the pull-up symbol ^ is added before the pin, e.g., ^PC0 |
| Status is reversed | Check if the inversion symbol ! needs to be added or removed before the 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 limit switches, please refer to the Guide for Systems without Limit Switches.