How to add Emergency Z-endstop in Klipper?

Basic Information:

Printer Model: Sovol SV6+
MCU / Printerboard: orig
Host / SBC Klipper Sovol board

Describe your issue:

Need to add emergency Z-axis endstop limit switch. I phisically added it (and also X,Y endstops) and connect them to board pins, so X,Y works fine but Y limit switch not functioning. Only original induction Z-probe works. But I want avoid emergency situations like start print with removed PEI (already damaged magnet with hot nozzle - Z-probe does not work without PEI).

  • So how to add EMERGENCY Z-stop in Klipper config but probe must work as usual?
    klippy.log (10.6 KB)

Hello @AVP !

Please read: How-To Ask for Help

Without insight to your code, we can’t tell what is going on.

P.S. this printer worked (factory settings) without endstop swithes and searched 0 on X and Y by high current on motors and it was terribly noisy and had not good affect to mechanics, so I installed limit swithes on X and Y and changed dip-switch on MB from current sence to limit swithes. Z-switch connected to connector named Z on MB (I dont know to what port of MCU it connected - so will check it…)

here is printer.cfg secton

#############################################################################################################
#stepper,TMC2209
#############################################################################################################
[stepper_x]
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
microsteps: 64
rotation_distance: 40
endstop_pin: tmc2209_stepper_x: virtual_endstop 
homing_retract_dist: 0
position_endstop: 0
position_min: 0
position_max: 300
homing_speed: 90
step_pulse_duration:0.000002

[tmc2209 stepper_x]
uart_pin:PC1
run_current:1.1  
uart_address:3
interpolate: False
driver_sgthrs: 112
stealthchop_threshold: 0
diag_pin: ^PA5

[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 64
rotation_distance: 40
endstop_pin: tmc2209_stepper_y: virtual_endstop 
homing_retract_dist: 0
position_endstop: 0
position_min: 0
position_max: 305
homing_speed: 60
step_pulse_duration:0.000002

[tmc2209 stepper_y]
uart_pin:PC0
run_current:1.1
uart_address:3
interpolate: False
driver_sgthrs: 120
stealthchop_threshold: 0
diag_pin: ^PA6

[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 4
endstop_pin: probe: z_virtual_endstop
#position_endstop: 0.0
position_max: 350
position_min: -3
homing_speed:6



[extruder]
max_extrude_only_distance: 100.0
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 4.59
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
#control: pid
pressure_advance:0.01
pressure_advance_smooth_time:0.015
#pid_Kp=24.522 
#pid_Ki=1.397 
#pid_Kd=107.590
min_temp: 0
max_temp: 305
min_extrude_temp: 150

[tmc2209 extruder]
uart_pin: PC14
run_current: 0.8
uart_address:3
#hold_current: 0.5
interpolate: True
stealthchop_threshold: 0

[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
#control: pid
# tuned for stock hardware with 50 degree Celsius target
#pid_Kp: 54.027
#pid_Ki: 0.770
#pid_Kd: 948.182
min_temp: 0
max_temp: 105

[probe]
pin:PB1
x_offset:27
y_offset:-20


[safe_z_home]
home_xy_position: 125,171
speed: 100
z_hop: 3                # Move up 5mm
z_hop_speed: 6

[filament_switch_sensor my_sensor]
switch_pin:PA4

As already said: Please stick what is said in How-To Ask for Help

In particular: How-To Ask for Help and How-To Ask for Help

Else we won’t be able to help.

2 Likes

added klippy.log
For now is it normal?
I know English not very well, so all requirements are hard to understand

I’m using a Bl-Touch connected to its dedicated port, so the original Z-endstop didn’t had much use anymore. Why throw the switch when I can make it to an emergency stop? :slight_smile: Here’s how:

[gcode_button ESTOP_BUTTON]
pin: PC6
press_gcode:
    {action_emergency_stop("'Emergency button pressed!'")}
    RESPOND MSG="Button pressed"

Pin PC6 is the Z-endstop pin on my board.

1 Like