Everething seems to works, besides mesh bed leveling. it looks like when bed leveling is launched printer moves Z asix out of imits, that cause loosing steps. Please check this video wiith sound on https://youtube.com/shorts/e3ThuyX-w4s
This is my config, no idea how to solve that:
[include mainsail.cfg]
[stepper_x]
step_pin: PE3
dir_pin: !PE2
enable_pin: !PE4
microsteps: 16
rotation_distance: 40
endstop_pin: !PA15
position_endstop: 0
position_max: 223
homing_speed: 50[stepper_y]
step_pin: PE0
dir_pin: !PB9
enable_pin: !PE1
microsteps: 16
rotation_distance: 40
endstop_pin: !PA12
position_endstop: 230
position_min: 2
position_max: 230
homing_speed: 50[stepper_z]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
microsteps: 16
rotation_distance: 2
endstop_pin: probe:z_virtual_endstop
#endstop_pin: !PA11
#position_endstop: 0.5
position_max: 230[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
microsteps: 16
#rotation_distance: 23.52
rotation_distance: 22.67895 #for 5mm Shaft Driven Bondtech gearsets
gear_ratio: 50:10 #for standard 10t motor
#gear_ratio: 50:8 #for sherpa mini 8t motor
full_steps_per_rotation: 200 #1.8deg Motormax_extrude_only_distance: 1400.0
max_extrude_only_velocity: 75.0
max_extrude_only_accel: 1500nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC3
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC1
control: pid
pid_Kp: 14.669
pid_Ki: 0.572
pid_Kd: 94.068
min_temp: 0
max_temp: 250[tmc2209 stepper_x]
uart_pin: PD5
run_current: 0.800
stealthchop_threshold: 999999
interpolate: True[tmc2209 stepper_y]
uart_pin: PD7
run_current: 0.800
stealthchop_threshold: 999999
interpolate: True[tmc2209 stepper_z]
uart_pin: PD4
run_current: 1.000
stealthchop_threshold: 999999
interpolate: True[tmc2209 extruder]
uart_pin: PD9
stealthchop_threshold: 999999
interpolate: True
run_current: 0.30 #min current, equivalent to 0.42A peak (Peak = RMS/0.707)
#run_current: 0.35 #max current, equivalent to 0.49A peak (Peak = RMS/0.707)[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
control: pid
pid_Kp: 325.10
pid_Ki: 63.35
pid_Kd: 417.10
min_temp: 0
max_temp: 130[heater_fan extruder]
pin: PB0[bed_mesh]
speed: 10
horizontal_move_z: 5
mesh_min: 5, 49
mesh_max: 218, 225
probe_count: 5, 3[bltouch]
sensor_pin: ^PA11
control_pin: PA8
z_offset: 0
x_offset: 0
y_offset: -42.8[safe_z_home]
home_xy_position: 114, 154.3 # Change coordinates to the center of your print bed
speed: 50
z_hop: 10 # Move up 10mm
z_hop_speed: 5[fan]
pin: PB1[mcu]
serial: /dev/ttyAMA0
restart_method: command[printer]
kinematics: corexy
max_velocity: 250
max_accel: 4500
max_z_velocity: 10
max_z_accel: 80[bed_screws]
screw1: 15,15
screw2: 210,15
screw3: 210,210
screw4: 15,210########################################
EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_2=PE13, EXP1_4=PC6, EXP1_6=PE15, EXP1_8=PD10, EXP1_10=<5V>,
EXP1_1=PC5, EXP1_3=PD13, EXP1_5=PE14, EXP1_7=PD11, EXP1_9=,
# EXP2 header
EXP2_2=PA5, EXP2_4=PE0, EXP2_6=PE10, EXP2_8=, EXP2_10=<3.3v>,
EXP2_1=PA6, EXP2_3=PE8, EXP2_5=PE11, EXP2_7=PE12, EXP2_9=
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus “ssp1”See the sample-lcd.cfg file for definitions of common LCD displays.
[pause_resume]
[display_status]
[mcu rpi]
serial: /tmp/klipper_host_mcu[output_pin BEEPER_Pin]
pin: rpi:gpio17 # for Raspberry Pi
pwm: True[gcode_macro M300]
gcode:
{% set S = params.S | default(1000) | int %} ; S sets the tone frequency
{% set P = params.P | default(100) | int %} ; P sets the tone duration
{% set L = 0.5 %} ; L varies the PWM on time, close to 0 or 1 the tone gets a bit quieter. 0.5 is a symmetric waveform
{% if S <= 0 %} ; dont divide through zero
{% set F = 1 %}
{% set L = 0 %}
{% elif S >= 10000 %} ;max frequency set to 10kHz
{% set F = 0 %}
{% else %}
{% set F = 1/S %} ;convert frequency to seconds
{% endif %}
SET_PIN PIN=BEEPER_Pin VALUE={L} CYCLE_TIME={F} ;Play tone
G4 P{P} ;tone duration
SET_PIN PIN=BEEPER_Pin VALUE=0[gcode_macro BUZZER_TEST]
gcode:
M300 S1000 P100
M300 S1000 P100
M300 S1000 P100