BLTouch looses config

Hello!

I’ve already tried to investigate my situation on Discord but it’s stuck there.
I use the Klipper with Moonraker, Mainsail and Fluid.
I’ve configured my genuine BLTouch probe well with PROBE_CALIBRATION. Done the mesh calibration with 5x5 matrix 3 times probing and started to print. The printer printed in the air. The nozzle was around 1-1.5 mm above the bed.
With some help on Discord I’ve re-run all the calibration many times without luck. The absolute Z co-ordinate was always too high. But in one case somehow after a probe calibration the Z co-ordinate set to the good value. I’ve started a print and this became awesome. The first layer was terrific and the print result is very good quality.
I thought that that’s all, I can finally enjoy the Klipper and my printer. I’ve started another print with the same settings in slicer and in the Klipper printer.cfg too. But it started to print in the air again.
On Discord we have run out of possibilities. It seems to software/firmware related issue for me. The Z motor has been stopped when the nozzle is at 1-1.5 mm above the bed.

My printer is an Artillery Sidewinder X1 with MKS Gen L v1.1 board.
My printer config:
https://pastebin.pl/view/bfc696c6
My Klipper log:
https://pastebin.pl/view/96fe315c

After you create your mesh it must be saved. Then it must be loaded before the print in your start gcode. so you are either loading “default” or “base”.

1 Like

A couple things jump out at me.

First, you shouldn’t use relative_reference_index. That should only be used if you have a separate Z endstop, but you appear to be using the bltouch for homing.

Second, I don’t see a z_offset in the save_config section of your config. If you’ve done a probe_calibrate, then it didn’t save properly. This is the number that is causing you problems. The log shows an initial z_offset on your bltouch of 4.651, but a subsequent restart shows it at 2.761 which matches your posted config file. This means something changed, but it’s not reflected the way I would expect in the config file.

1 Like

Thanks a lot, I’m going to check it.

This is the code from our X1 and it works fine :slight_smile:
the start und end code is not testet

[include kiauh_macros.cfg]

[include Dragi_Spielwiese.cfg]

########## Addons ########

[include Config_Addons/Auto_Bed_Mesh.cfg]
[include Config_Addons/Filament_runout_sensor.cfg]
[include Config_Addons/PiTemp.cfg]
[include Config_Addons/NeoPixel.cfg]
[include Config_Addons/timelapse.cfg]

[mcu]
#make sure this reflects your serial port you found when flashing klipper
#serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
serial: /dev/ttyAMA0
restart_method: command
pin_map: arduino

[mcu host]
serial: /tmp/klipper_host_mcu

[virtual_sdcard]
path: ~/gcode_files


[stepper_x]
step_pin: ar54
dir_pin: ar55
enable_pin: !ar38
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar3
position_endstop: 0
position_max: 310
homing_speed: 40.0

[stepper_y]
step_pin: ar60
dir_pin: ar61
enable_pin: !ar56
microsteps: 16
rotation_distance: 40
endstop_pin: ^!ar14
position_endstop: 0
position_max: 310
homing_speed: 40
homing_positive_dir: false

[stepper_z]
step_pin: ar46
dir_pin: !ar48
enable_pin: !ar62
microsteps: 16
rotation_distance: 8
#endstop_pin: ^!ar18
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
position_min: -3
position_max: 400
homing_speed: 30
second_homing_speed: 1

[stepper_z1]
step_pin: ar36
dir_pin: !ar34
enable_pin: !ar30
microsteps: 16
rotation_distance: 8

[extruder]
step_pin: ar26
dir_pin: ar28
enable_pin: !ar24
microsteps: 16
rotation_distance: 7
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: ar10
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog13
min_extrude_temp: 190
min_temp: 5
max_temp: 240
max_extrude_only_distance: 500
max_extrude_cross_section: 2.2

[heater_bed]
heater_pin: ar8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: analog14
min_temp: 5
max_temp: 150

[fan]
pin: ar9
kick_start_time: 0.500

[heater_fan my_nozzle_fan]
pin: ar7
heater: extruder
heater_temp: 50.0
fan_speed: 1.0


[printer]
kinematics: cartesian
max_velocity: 200
max_accel: 3000
max_z_velocity: 50
max_z_accel: 100
square_corner_velocity: 5 

[bed_screws]
screw1: 55,55
screw1_name: front left
screw2: 255,55
screw2_name: front right
screw3: 255,255
screw3_name: back right
screw4: 55,255
screw4_name: back left
speed: 100.0


[screws_tilt_adjust]
screw1: 22,83
screw1_name: front left
screw2: 222,83
screw2_name: front right
screw3: 22,283
screw3_name: back left
screw4: 222,283
screw4_name: back right
speed: 100.0
screw_thread: CW-M5

[bltouch]
sensor_pin: ar19
control_pin: ar11 
#x_offset:28
#y_offset:-33
x_offset:38
y_offset:-15
z_offset:2.045
speed:10
samples:3
samples_result:average
set_output_mode: 5V
probe_with_touch_mode: true
stow_on_each_sample: false

[safe_z_home]
home_xy_position: 122,183
speed: 100
z_hop: 20               
z_hop_speed: 20

[bed_mesh]
speed: 800
mesh_min: 38,30
mesh_max: 270,270
probe_count: 9,9
mesh_pps: 2,2
algorithm: bicubic
bicubic_tension: 0.2
move_check_distance: 3.0
split_delta_z: .010
fade_start: 1.0 
fade_end: 5.0

[gcode_macro G29]
gcode:
 BED_MESH_CLEAR
 G28
 BED_MESH_CALIBRATE
 BED_MESH_PROFILE SAVE=x1

[gcode_macro START_PRINT]
# Reference https://github.com/KevinOConnor/klipper/blob/master/docs/Config_Reference.md#gcode_macroA
# On how to override default parameters
default_parameter_BED_TEMP: 60
default_parameter_EXTRUDER_TEMP: 200	

gcode:
    # enable PSU
    #SET_PIN PIN=PrinterPSU VALUE=1
    #LED on
    M105.1
    ## Start Code von Cura übernommen ##
    G28 ; home all axes
    M117 Purge extruder
    G92 E0 ; reset extruder
    G1 Z1.0 F3000 ; move z up little to prevent scratching of surface
    G1 X2 Y20 Z0.3 F5000.0 ; move to start-line position
    G1 X2 Y200.0 Z0.3 F1500.0 E15 ; draw 1st line
    G1 X2 Y200.0 Z0.4 F5000.0 ; move to side a little
    G1 X2 Y20 Z0.4 F1500.0 E30 ; draw 2nd line
    G92 E0 ; reset extruder
    G1 Z1.0 F3000 ; move z up little to prevent scratching of surface

### Start Code von der muster Config ###
    # Home the printer
#	G28 				 		  						 
    # Use absolute coordinates
#    G90
    # Move the nozzle near the bed
#    G1 X0 Y0 Z5 F3000
    # Move the nozzle very close to the bed
#    G1 Z0.15 F300
#    G92 E0 ;Reset Extruder
#    G1 X20 Y5 Z0.3 F5000.0			   
#    G1 Z0.3 F1000 				    
#    G1 X200 Y5 F1500.0 E15 			   
#    G1 X200 Y5.3 Z0.3 F5000.0			    
#    G1 X5.3  Y5.3 Z0.3 F1500.0 E30 			
#    G1 Z3 F3000 				     
#    G21 ; set units to millimeters
#    G90 ; use absolute coordinates
#    M83 ; use relative distances for extrusion
#    G92 E0

[gcode_macro END_PRINT]
gcode:
    ## End Code von Cura übernommen ##
    G91 ; relative positioning
    G1 Z1.0 F3000 ; move z up little to prevent scratching of print
    G90 ; absolute positioning
    G1 X0 Y200 F1000 ; prepare for part removal
    TIMELAPSE_RENDER
    M104 S0 ; turn off extruder
    M140 S0 ; turn off bed
    G1 X0 Y300 F1000 ; prepare for part removal
    M84 ; disable motors
    M106 S0 ; turn off fan


### End Code von der muster Config ###
    # Turn off bed, extruder, and fan
#    M140 S0
#    M104 S0
#    M106 S0
    # Move nozzle away from print while retracting
#    G91
#    G1 X-2 Y-2 E-3 F300
    # Raise nozzle by 10mm
#    G1 Z30 F3000
#    G90
    # Disable steppers
#    M84
    # Disable PSU
    SET_PIN PIN=PrinterPSU VALUE=0

[pause_resume]
recover_velocity: 50.

#[filament_switch_sensor my_sensor]
#Move filament runout sensor from TFT to X+ endstop pin. Umcomment all but this line if you want to use this
#pause_on_runout: False
#runout_gcode: PAUSE
#insert_gcode: RESUME
#switch_pin: ar2

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 21.465
#*# pid_ki = 0.980
#*# pid_kd = 117.521
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 48.362
#*# pid_ki = 0.638
#*# pid_kd = 915.854
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 	  0.297500, 0.172500, 0.120000, 0.057500, 0.055000, 0.057500, 0.100000, 0.175000
#*# 	  0.205000, 0.095000, 0.045000, 0.007500, 0.015000, 0.015000, 0.055000, 0.167500
#*# 	  0.147500, 0.025000, -0.010000, -0.025000, -0.017500, -0.007500, 0.037500, 0.135000
#*# 	  0.115000, 0.015000, -0.012500, -0.040000, -0.025000, -0.025000, 0.045000, 0.125000
#*# 	  0.130000, 0.032500, -0.007500, -0.025000, -0.015000, -0.005000, 0.040000, 0.127500
#*# 	  0.137500, 0.057500, 0.017500, 0.002500, 0.032500, 0.042500, 0.090000, 0.167500
#*# 	  0.200000, 0.112500, 0.057500, 0.042500, 0.055000, 0.060000, 0.107500, 0.182500
#*# 	  0.257500, 0.172500, 0.097500, 0.080000, 0.072500, 0.067500, 0.105000, 0.180000
#*# tension = 0.2
#*# min_x = 38.0
#*# algo = bicubic
#*# y_count = 8
#*# mesh_y_pps = 2
#*# min_y = 30.0
#*# x_count = 8
#*# max_y = 269.96
#*# mesh_x_pps = 2
#*# max_x = 269.97

@Dragi2k thanks for sharing your config. I was wondering if you had a Prusa configuration you could share of how to improve the speed of the printer using Klipper? I definitely think I can improve the speed wanted to know how much is possible with this one.
I have a Artillery X2 with the Stock Ruby board.