Klipper BL Touch Bed Mesh and Offset update ( commit c5d94a7 )

After updating my klipper to the latest commit on GitHub ( yes, I am not following the official release, Klipper is so active that I like to stay on the pulse ), there is a few changes that were required…

To Remove

To things I had to remove from my configuration: the position_endstop in the z_stepper config and the probe_offset in the mesh section ( which I never understood why it was needed but now it is gone !). If you don’t want to remove them completely, just comment them out in the config file, you never know, might need it again later !

After that, my configuration is loading and klipper is working again, at least not complaining anymore

Z offset and bed mesh

So here is how I setup the new config file to work with bed mesh

First set the z_offset in the probe section to 0 and in your z_stepper the min to -5

[stepper_z]
position_min: -5

[probe]
z_offset: 0

Upload and restart klipper. Position the nozzle to the probe position ( correcting the offset of course ) and use you favorite way to calibrate the height. Use the M206Zx.xx command to change the z offset to calibrate the height. Remember that positive values will drop the nozzle to the bed, so be careful with the values you put in, make baby steps ! I recommend to to your offset setting under operating temperature otherwise it will be slightly off, and we all know, slightly off for the first layer can be a nightmare !

So after using my credit card offset measurement technique, I got an offset of 1.1. Then set this value to the z_offset in your probe.

[probe]
z_offset: 1.1

Upload, restart and check if the offset is correct again using the same offset calibration technique. For me it work perfectly, but I can imagine that it might require some minor changes ( a few 1/100 mm) to make it perfect !

Now run the bed_mesh_calibrate command. I got the following results ( might be different with your machine )

Recv: // probe at 35.000,5.000 is z=1.165000
Recv: // probe at 135.000,5.000 is z=1.115000
Recv: // probe at 235.000,5.000 is z=1.067500
Recv: // probe at 235.000,110.000 is z=1.070000
Recv: // probe at 135.000,110.000 is z=1.095000
Recv: // probe at 35.000,110.000 is z=1.090000
Recv: // probe at 35.000,215.000 is z=1.067500
Recv: // probe at 135.000,215.000 is z=1.132500
Recv: // probe at 235.000,215.000 is z=1.182500
Recv: // Mesh Bed Leveling Complete
Recv: // Bed Mesh state has been saved to profile [default]
Recv: // for the current session. The SAVE_CONFIG command will
Recv: // update the printer config file and restart the printer.
Recv: ok

One important thing is that some points are below the 1.1 mm offset I set in the z_offset. This means that if you set in your z_stepper a position_min from 0, it will not work. It is obvious that some of the point on the bed might be lower than the reference point taken at the beginning of the measurement. It is therefore necessary to set the position_min to a small value below zero. As you can see above, I can set it to 0.1 mm, it will enough. Just make sure that the position min is large enough so you do not run into trouble but small enough that if you tip wrong, you won’t hit the bed hard !

That is pretty much it, the new software from Klipper as simplified a lot the offset and bed_mesh_offset ! Thanks a lot for that ! I hope it will help you get the bed mesh running ! Happy printing !

Here is the config file section I needed to make it working !

[stepper_z]
step_pin: PB3
dir_pin: !PB2
enable_pin: !PA5
step_distance: .0025
endstop_pin: probe:z_virtual_endstop
position_min: -5
position_max: 240
homing_speed: 5

[servo bltouch]
pin: PA4
maximum_servo_angle: 180
minimum_pulse_width: 0.0006
maximum_pulse_width: 0.0024

[probe]
pin: PC4
z_offset: 1.1
speed: 1.0
activate_gcode:
SET_SERVO SERVO=bltouch ANGLE=10
SET_SERVO SERVO=bltouch ANGLE=60
G4 P200
deactivate_gcode:
SET_SERVO SERVO=bltouch ANGLE=90
G4 P100

[homing_override]
set_position_z: 5
gcode:
G91 ; Uncomment these 2 lines to blindly lift the Z 20mm at start
G1 Z20 F600
G90
G28 X0 Y0
G1 X140 Y110 F3600
G28 Z0
G1 Z10 ; lift to Z10 at the end

[bed_mesh]
min_point: 35,5
max_point: 235,215
probe_count: 3,3
fade_start: 1.0
fade_end: 5.0

Klipper BL Touch Bed Mesh and Offset update ( commit c5d94a7 )

3 thoughts on “Klipper BL Touch Bed Mesh and Offset update ( commit c5d94a7 )

  1. Hi,
    Currently I’m working on my own Klipper config file. I can see that you are using BLTouch and bed Mesh. Could you share as reference your config file?

    1. I update the post with the section I needed to make it run. This should be enough to get you going. Hope it will work for you !

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top