Skip to main content

Limit Switch Related

Microswitch Limit Switch

Three-Wire Microswitch Precautions

Note
  • FLY Mainboard Users Please Note: Three-wire microswitch limit switches cannot be directly connected to the FLY mainboard, as the limit switch interface on the mainboard already provides 5V power. Direct connection will cause a 5V short circuit, damaging the mainboard, host computer, drivers, and other devices!
  • Solution
    • Cut the 5V wire: Cut the 5V wire (usually red, please confirm based on actual color) corresponding to the XH2.54 terminal of the three-wire limit switch and wrap it with insulating tape to prevent short circuits.
Loading...

Microswitch Wiring Method

Notes
  • Strongly Recommended: Use Normally Closed (NC) terminal (prevents crash accidents in case of wire breakage)
  • Connection Requirements:
Mainboard TerminalFunctionConnection Requirements
5VPower🔌 Leave Unconnected
GNDGround✅ Must Connect
SSignal✅ Must Connect
  • Testing Steps:
  1. Set multimeter to continuity test mode (buzzer icon)

  2. Test the microswitch:

    • Not Pressed: NC terminal and Common terminal should be continuous (buzzer sounds)
    • Pressed: NC terminal and Common terminal should be disconnected (silent)
  3. If the result is opposite:

    • Check if the Normally Open (NO) terminal was mistakenly used
    • Check for poor contact
    Loading...

Configuration Instructions

  • Pull-up Resistor Requirement:

    • Most printers require enabling the pull-up resistor, which must be done by adding the ^ symbol before the pin
  • Normally Closed Limit Configuration:

    • When using a Normally Closed (NC) limit switch, you must also add the ! symbol
  • Below is a reference configuration

    [stepper_x]
    endstop_pin: ^!PD9

TAP

Wiring Instructions

Note
  • This tutorial uses the BL-Touch interface of SHT36-V2 for demonstration
  • Some TAP modules support 12V or 24V, but 5V power supply is recommended (safe)
  • The middle signal port of BL-Touch cannot be used as a limit switch port!!!
Mainboard TerminalFunctionConnection Requirements
5VPower✅ Must Connect
GNDGround✅ Must Connect
SSignal✅ Must Connect
Loading...

Reference Configuration

  • Pull-up Resistor Requirement:
  • Most printers require enabling the pull-up resistor, which must be done by adding the ^ symbol before the pin
[stepper_z]
endstop_pin: probe:z_virtual_endstop
# 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 # Probing Speed
lift_speed: 5 # Probe Lifting Speed
samples: 3 # Number of Samples
samples_result: median # Result Method (default median)
sample_retract_dist: 3.0 # Probing Retract Distance
samples_tolerance: 0.075 # Sampling Tolerance (Setting too small may increase sample count)
samples_tolerance_retries: 3 # Number of retries for tolerance exceeded
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 %}

Photoelectric Limit Switch

Note
  • This tutorial uses EE-SX670WR
  • Sensor Type: NPN Normally Closed Switch
  • Photoelectric switch uses 5V power supply
  • For voltages exceeding 5V, use 12V or 24V; see the proximity switch tutorial below

Wiring Instructions

Mainboard TerminalFunctionConnection Requirements
5VPower✅ Must Connect
GNDGround✅ Must Connect
SSignal✅ Must Connect
  • EE-SX670WR Wiring Instructions

  • It is recommended to connect the Normally Closed wire to the blue wire (GND)!

    Photoelectric SwitchFunctionConnection Requirements
    BrownPower✅ Must Connect
    BlueGround✅ Must Connect
    BlackSignal✅ Must Connect
    PinkNormally ClosedConnect to GND for NC use
    Loading...

Configuration Instructions

  • Pull-up Resistor Requirement:

  • Most printers require enabling the pull-up resistor, which must be done by adding the ^ symbol before the pin

  • Below is a reference configuration

[stepper_x]
endstop_pin: ^PD9

Proximity Switch

Important Notes
  • Using Omron proximity switch TL-Q5MC2-Z as an example, please note before operation:
  • Sensor Type: NPN Normally Closed Switch
  • Required Material: You need to purchase a BAT85 model diode

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 mainboard signal interface
  1. Insulation Treatment
  • It is strongly recommended to use heat shrink tubing or electrical tape to wrap exposed wire ends to prevent short circuits from contact with other devices
    Loading...

Reference Configuration

  • Pull-up Resistor Requirement:
  • Most printers require enabling the pull-up resistor, which must be done by adding the ^ symbol before the pin
  • Below is a reference configuration
[probe]
pin: ^PC0
x_offset: 0
y_offset: 25.0
z_offset: 0

Limit Switch Status Check

Preparation

  • Preparation and Initial Check
  • With the power safely disconnected, slowly move the print head to the center of the machine, then power on.
  • Open the web console and enter the following command to verify the limit switch status:
QUERY_ENDSTOPS
  • If the wiring and configuration are correct, all limit switches should show the open state.
    Loading...

Testing

  • Press and hold one of the limit switches (do not release it), then execute the following command again:
QUERY_ENDSTOPS
  • The state of the pressed limit should change to TRIGGERED (e.g., if you press the Y limit, its state should change from OPEN to TRIGGERED).
    Loading...

Result Diagnosis

  • State not changed: Check the wiring of the limit switch and ensure the Pin defined in the configuration is correct.
  • Insensitive Trigger: Check if the ^ symbol is present before the Pin in the configuration (e.g., ^PC0). This symbol is for the pull-up resistor; its absence may cause trigger issues.
  • Reversed State: Check if the ! symbol is present before the Pin in the configuration.
    • If present, delete the symbol (e.g., change ^!PD9 to ^PD9).
    • If absent, try adding the symbol (e.g., change ^PD9 to ^!PD9).
Extended Features

If your printer does not use physical limit switches, please refer to the Guidelines for Using Without Limit Switches

Loading...