Aller au contenu principal

Limit Switches

Microswitch Limit

Important Notes for Three-Wire Microswitch Limit

Information
  • FLY motherboard users please note: Three-wire microswitch limit switches cannot be directly connected to the FLY motherboard, as the limit switch interface on the motherboard already provides a 5V power supply. Direct connection will cause a 5V short circuit, potentially damaging the motherboard, host computer, and drivers!
  • Solution
    • Cut the 5V wire: Cut the 5V wire (usually red, but verify by actual color) in the XH2.54 connector of the three-wire limit switch and insulate it with electrical tape to prevent short circuits.

Wiring Method for Microswitch Limit

Note
  • Highly recommended: Use the normally closed (NC) contact (to prevent collisions in case of a broken wire)
  • Wiring requirements:
Motherboard TerminalFunctionConnection Requirement
5VPower🔌 Not connected
GNDGround✅ Must be connected
SSignal✅ Must be connected
  • Testing steps:
  1. Set the multimeter to continuity test mode (beeper icon)

  2. Test the microswitch:

    • Not pressed: Continuity between NC and common terminal (beeper sounds)
    • Pressed: No continuity between NC and common terminal (no sound)
  3. If the result is reversed:

    • Check if the normally open (NO) contact was mistakenly used
    • Check for poor contact

Configuration Instructions

  • Pull-up resistor requirement:

    • Most printers require enabling the pull-up resistor; the ^ symbol must be added before the pin
  • Normally closed (NC) limit configuration:

    • When using a NC limit switch, the ! symbol must be added
  • Below is a sample configuration

    [stepper_x]
    endstop_pin: ^!PD9

TAP

Wiring Instructions

Information
  • This tutorial uses the BL-Touch interface of SHT36-V2 for demonstration
  • Some TAP devices support 12V or 24V, but using 5V is recommended (for safety)
  • The middle signal pin of the BL-Touch cannot be used as a limit switch input!!!
Motherboard TerminalFunctionConnection Requirement
5VPower✅ Must be connected
GNDGround✅ Must be connected
SSignal✅ Must be connected

Sample Configuration

  • Pull-up resistor requirement:
  • Most printers require enabling the pull-up resistor; the ^ symbol must be added before the pin
[stepper_z]
endstop_pin: probe:z_virtual_endstop
# endstop_pin: ^sht36:PA1
# 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 # Leveling speed
lift_speed: 5 # Probe lift speed
samples: 3 # Number of samples
samples_result: median # Value selection method (default: median)
sample_retract_dist: 3.0 # Retraction distance during leveling
samples_tolerance: 0.075 # Sampling tolerance (note: too small a value may increase sampling attempts)
samples_tolerance_retries: 3 # Number of retries when exceeding tolerance
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 %}

Optical Limit Switch

Information
  • This tutorial uses 5V to power the optical limit switch
  • For voltages exceeding 5V, use 12V or 24V; refer to the proximity switch tutorial below

Wiring Instructions

Motherboard TerminalFunctionConnection Requirement
5VPower✅ Must be connected
GNDGround✅ Must be connected
SSignal✅ Must be connected

Configuration Instructions

  • Pull-up resistor requirement:

  • Most printers require enabling the pull-up resistor; the ^ symbol must be added before the pin

  • Below is a sample configuration

[stepper_x]
endstop_pin: ^PD9

Proximity Switch

Important Information
  • Using Omron proximity switch TL-Q5MC2-Z as an example, please note before operating:
  • Sensor type: PNP Normally Closed Switch
  • Required component: You must purchase a BAT85 diode

Wiring Steps

  1. Diode Installation
  • Connect the black end of the diode (cathode) to the sensor signal wire
  • Connect the other end (anode) to the motherboard signal interface
  1. Insulation
  • It is highly recommended to cover exposed wire ends with heat shrink tubing or electrical tape to prevent short circuits with other devices

Sample Configuration

  • Pull-up resistor requirement:
  • Most printers require enabling the pull-up resistor; the ^ symbol must be added before the pin
  • Below is a sample configuration
[probe]
pin: ^PC0
x_offset: 0
y_offset: 25.0
z_offset: 0

klicky

  • Updating in progress

Sensorless Homing

Prerequisites
  • All of the following must be satisfied:
  1. The motherboard supports DIAG functionality
  2. The driver supports DIAG signal output
  3. No device must be connected to the corresponding limit switch port!

Motherboard Compatibility Check

Classification of Fly Motherboards:

TypeSupport StatusRepresentative ModelsOperation Requirements
ADirectly supported by defaultSuper/Gemini/CDY/E3 Series✅ Use the limit switch interface directly
BRequires jumper to enableD/C/Pro-X10/Micro Series⚡ Must install DIAG jumper
CNot supported at allFly-F407ZG❌ Cannot use sensorless homing

How to confirm:

  1. Check motherboard markings: Look for a jumper labeled DIAG
  2. Review the schematic: Confirm the DIAG signal connection on the driver interface
  3. On most motherboards, sensorless homing uses Drive0 for io0, Drive1 for io1, and so on
  • Type A Motherboard
    • No DIAG jumper, directly connected to the limit switch port by default
  • Type B Motherboard
    • Requires using the DIAG jumper

Driver Compatibility Check

Tip
  • TMC5160, TMC2240, and TMC2130 have two DIAG pins
  • Refer to the product documentation or contact customer service to confirm the correct pin
Driver ModelCompatibilityDIAG PinsConfiguration RequirementsSensitivity Range
TMC2209✅ SupportedSingle pinDirectly usable0-255 # 255 is the most sensitive, 0 is the least
TMC5160✅ SupportedDual pinsMust select the diag pin-64-255 # -64 is the most sensitive, 63 is the least
TMC2240✅ SupportedDual pinsMust select the diag pin-64-255 # -64 is the most sensitive, 63 is the least
TMC2130✅ SupportedDual pinsMust select the diag pin-64-255 # -64 is the most sensitive, 63 is the least
TMC2208❌ Not supported-Sensorless homing not availableSensorless homing not available
TMC2660❌ Not supported-Sensorless homing not availableSensorless homing not available
LV8729❌ Not supported-Sensorless homing not availableSensorless homing not available

Identification Tips:

  1. Dual-pin drivers must refer to the manual to confirm the function of each pin
  2. Some drivers support DIAG but may not be usable if the corresponding pin header is not soldered

Configuration Instructions

  • The corresponding driver model and axis must be modified
  • Some machines may fail to home when retracting during sensorless homing; set homing_retract_dist: to 0

Sample Configurations

  • The TMC2209 in tmc2209_stepper_x must be changed to the actual driver model
  • The x in stepper_x indicates this is the x axis; for the y axis, change to stepper_y
  • Note: The pins in the configuration below are examples only; use actual pins
  • diag_pin: must include ^, or homing will fail
  • The value in driver_SGTHRS: must be tested and set manually; 255 is the most sensitive, 0 is the least
    [stepper_x]
    endstop_pin: tmc2209_stepper_x:virtual_endstop
    position_endstop: 0


    [tmc2209 stepper_x]
    diag_pin: ^PD9
    driver_SGTHRS: 100

Testing Sensitivity

  • Step 1

    • Enter the following command in the web console

    • Slowly move the print head to the center of the machine. Use the SET_TMC_FIELD command to set the sensitivity

    • For TMC2209, use the command below and change the axis being tested

      SET_TMC_FIELD STEPPER=stepper_x FIELD=SGTHRS VALUE=255
    • For TMC5160, TMC2240, and TMC2130, use the command below and change the axis being tested

      SET_TMC_FIELD STEPPER=stepper_x FIELD=sgt VALUE=-64
  • Step 2

    • Enter the following command in the web console
      G28 X
    • Ensure the X-axis does not move at all or stops moving immediately.
    • If no movement is detected, immediately issue the following command
      M112
    • Check the wiring or configuration of the corresponding DIAG PIN as there may be an error; correct it before proceeding.
  • Step 3

    • Next, gradually decrease the VALUE sensitivity setting and run the SET_TMC_FIELD and G28 X0 commands again
    • Find the highest sensitivity at which the carriage successfully moves all the way to the end and stops
    • For TMC2209 drivers, decrease SGTHRS; for other drivers, increase sgt
  • Step 4

    • Once a suitable value is found, remember the value when the carriage stops immediately after homing
    • If there is impact or clicking sound at maximum sensitivity, the homing speed might be too low, the driver current might be too low, or the axis may not be suitable for sensorless homing.
    • Open printer.cfg and update the sensitivity setting accordingly

Limit Switch Status Check

  • Updating in progress
Loading...
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -