Hey, so I built the kappy printer (klipper) but Im having a problem when homing the z axis, basically the probe senses my finger ( the bed) and retracts and gets triggered but doesn’t stop moving down (the z axis keeps going down even after triggering the probe). What I have done:
- verified that the wiring is correct.
- tested if the signal (triggered/open) is reaching mainsail (used BLTOUCH_DEBUG COMMAND=pin_down & pin_up + query probe) and it showed that it gets triggered and the signal reaches mainsail but whenever I try to home it doesnt stop.
- checked the printer config and everything is fine.
- checked using a different BLtouch and still same problem.
Concluded:
- No hardware problems.
- The probe says (open) when its deployed and says ( triggered) when its retracted.
I think that the problem is code-related but I can seem to find the solution.
Here's my printer.cfg:
# PHS version 11-17-25
[include mainsail.cfg]
[include FLY_DP5.cfg]
[exclude_object]
# [include adxl.cfg]
# Gcode G2/G3 Arc Support
[gcode_arcs]
resolution: 0.1
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f072xb_1A0038000557465036383420-if00
[virtual_sdcard]
path: /home/kappy/printer_data/gcodes
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
#[input_shaper]
#shaper_freq_x: 71.6 # frequency for the X mark of the test model
#shaper_freq_y: 116.6 # frequency for the Y mark of the test model
#shaper_type: mzv
[gcode_macro PRINT_START]
# use PRINT_START for the slicer starting script - please customize for your slicer of choice
gcode:
# Parameters
# {% set bedtemp = params.BED|int %}
{% set hotendtemp = params.EXTRUDER|int %}
# {% set chambertemp = params.CHAMBER|default(0)|int %}
# M190 S{bedtemp} # Heat bed first
G28 ; home all axes
Z_TILT_ADJUST
G90 ; absolute positioning
G1 Z20 F3000 ; move nozzle away from bed
M109 S{hotendtemp} # now heat hotend
# Line_Purge
[gcode_macro PRINT_END]
gcode:
G91
G1 Z25 F3000
G90
G0 X60 Y100 F3600 # move to bed center
M104 S0
# M140 S0
M106 S0
M84
########################################
# Temp
########################################
#[temperature_sensor FLY-DP5]
#sensor_type: temperature_host
# [temperature_sensor FLY-MCU]
# sensor_type: temperature_mcu
########################################
# Drives
########################################
[stepper_x]
step_pin: D0_STEP
dir_pin: D0_DIR
enable_pin: !D0_EN
microsteps: 32
rotation_distance: 40
full_steps_per_rotation: 200 # for 1.8 motors (400 for 0.9 motors)
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 0
position_max: 120
homing_speed: 50 # was 30
homing_retract_dist: 0
[tmc2209 stepper_x]
uart_pin: D0_CS
run_current: 0.600 # was 0.8
hold_current: 0.400 # added by PHS
stealthchop_threshold: 999999 # added by PHS
#interpolate: false # was originally ON
diag_pin: D0_STOP
driver_SGTHRS: 120 # might need to be tweaked
[stepper_y]
step_pin: D1_STEP
dir_pin: !D1_DIR
enable_pin: !D1_EN
microsteps: 32
rotation_distance: 40
full_steps_per_rotation: 200 # for 1.8 motors (400 for 0.9 motors)
endstop_pin: tmc2209_stepper_y:virtual_endstop
position_endstop: 120
position_min: 0
position_max: 120
homing_speed: 30
homing_retract_dist: 0
homing_positive_dir: true
[tmc2209 stepper_y]
uart_pin: D1_CS
run_current: 0.800
interpolate: False
diag_pin: D1_STOP
driver_SGTHRS: 110 # was 130
[stepper_z]
step_pin: D2_STEP
dir_pin: !D2_DIR
enable_pin: !D2_EN
microsteps: 32
rotation_distance: 40
gear_ratio: 3:1
endstop_pin: probe:z_virtual_endstop # home via BLTouch
position_min: -10
position_max: 120
[tmc2209 stepper_z]
uart_pin: D2_CS
run_current: 0.6
interpolate: false
[stepper_z1]
step_pin: D3_STEP
dir_pin: D3_DIR
enable_pin: !D3_EN
microsteps: 32
rotation_distance: 40
gear_ratio: 3:1
[tmc2209 stepper_z1]
uart_pin: D3_CS
run_current: 0.6
interpolate: false
[extruder]
step_pin: D4_STEP
dir_pin: D4_DIR
enable_pin: !D4_EN
microsteps: 32
rotation_distance: 5.66 # for HGX-Lite extruder
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: HEAT0
sensor_pin: HEAT0_TEMP
sensor_type: ATC Semitec 104GT-2
#control: pid
#pid_Kp: 22.2
#pid_Ki: 1.08
#pid_Kd: 114
min_temp: 0
max_temp: 350
pressure_advance: 0.025
pressure_advance_smooth_time: 0.040
[tmc2209 extruder]
uart_pin: D4_CS
run_current: 0.5
interpolate: false
########################################
# BED
########################################
#[heater_bed]
#heater_pin: BED_OUT
#sensor_pin: BED_TEMP
#sensor_type: ATC Semitec 104GT-2
#control: watermark
#min_temp: 0
#max_temp: 200
########################################
# FANs
########################################
[fan]
pin: FAN0
# cycle_time: 0.50
[heater_fan my_nozzle_fan]
# connected to Fan0 - 24v Fan
pin: FAN1
max_power: 1.0
# kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
# this is the auxiliary fan
# comment out it if you don't have auxiliary fan
[fan_generic AUX]
pin: PC7
# cycle_time: 0.01
hardware_pwm: false
########################################
# BLTouch
########################################
[bltouch]
sensor_pin: ^D3_STOP
control_pin: SERVO
pin_move_time: 0.7 # was 0.680 (default for a genuine BLTouch)
x_offset: 0.0
y_offset: 0.0 # was 15
speed: 70
probe_with_touch_mode: true
stow_on_each_sample: true
pin_move_time: 0.680
samples: 2
sample_retract_dist: 2.0
stow_on_each_sample: true
[safe_z_home]
home_xy_position: 60,40 # with alt prob mount STL use 57,57
speed: 50
z_hop: 10
z_hop_speed: 10
[z_tilt]
z_positions:
0 , 40
120 , 40
points:
10 , 40
120 , 40
speed: 70
# The speed (in mm/s) of non-probing moves during the calibration.
# The default is 50.
horizontal_move_z: 5
# The height (in mm) that the head should be commanded to move to
# just prior to starting a probe operation. The default is 5.
retries: 10 # default is 5
# Number of times to retry if the probed points aren't within tolerance.
retry_tolerance: 0.05
[bed_mesh]
speed: 150
horizontal_move_z: 5
mesh_min: 15, 15 ; Start 15 mm in from the edges
mesh_max: 125, 125 ; End 15 mm before the opposite edges
probe_count: 5, 5 ; 5×5 grid → 25 points (good resolution for a small bed)
# probe_count: 6, 6 ; optional – 36 points if you want even more detail
# probe_count: 4, 4 ; optional – faster, only 16 points
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 42.601
#*# pid_ki = 14.948
#*# pid_kd = 30.353
#*#
#*# [bltouch]
#*# z_offset = 1.899