Auto z offset (auto bed leveling) with Kobra 2 Neo running Killiper

Basic Information:

Printer Model: Anycubic Kobra 2 Neo
Host / SBC: Raspberry Pi 3B

Current Config That I’m Using:

#################################################
#         ORIGINAL CONFIGS BY j0tp3
#         MODIFIED AND GENERALLY IMPROVED BY zamonary1
#         v0.7.3.5

# kvgx12 was very first to figure out how to flash the firmware
# Input shaper frequencies was provided by xenyon
# stop macro was taken from jschuh's github repo, pause and resume currently doesn't work but i am working on it
# Also you can look at other people, without whom it would be impossible to do this at our discussion (linked below)

# Thank you all guys for making this happen and thank YOU for your interest in our work.

# For suggections or improvements contact me via discord or telegram @zamonary1 or via our discourse thread
# https://klipper.discourse.group/t/getting-orange-pi-3-lts-klipper-working-with-anycubic-kobra-2-neo

#  Links to all of those cool guys mentioned above (except me ;_;)
# https://klipper.discourse.group/u/kvgx12/
# https://klipper.discourse.group/u/j0tp3/
# https://klipper.discourse.group/u/xenyon/
# https://klipper.discourse.group/u/kuroi/
# https://github.com/jschuh/klipper-macros/

# Please, do not remove this sign, these configs are distributed free of charge anyways :)
#################################################


# [include moonraker_obico_macros.cfg]
[include mainsail.cfg]
[include pause_resume.cfg]
[include scripts.cfg]
#[include display.cfg]

[exclude_object]
[gcode_arcs]

[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
baud: 250000

[printer]
kinematics: cartesian
max_velocity: 250
max_accel: 3000
max_z_velocity: 8
max_z_accel: 800

[virtual_sdcard]
path: ~/printer_data/gcodes
on_error_gcode: CANCEL_PRINT

[input_shaper]
shaper_type_x : mzv
shaper_freq_x : 65.200000
shaper_type_y : 2hump_ei
shaper_freq_y : 61.200000

[stepper_x]
step_pin: PA12
dir_pin: PA11
enable_pin: !PA15
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PB11
position_endstop: -10
position_min: -14
position_max: 225
homing_speed: 60

[stepper_y]
step_pin: PA9
dir_pin: !PA8
enable_pin: !PA15
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PC13
position_endstop: -2
position_min: -3
position_max: 240
homing_speed: 60

[stepper_z]
step_pin: PB0
dir_pin: !PB1
enable_pin: !PA15
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_min: -2
position_max: 200
homing_speed: 8
second_homing_speed: 2

[extruder]
max_extrude_cross_section: 5.0
step_pin: PB15
dir_pin: PB14
enable_pin: !PA15
microsteps: 16
max_extrude_only_distance: 200
max_extrude_only_velocity: 80
max_extrude_only_accel: 2500
rotation_distance: 7.084
nozzle_diameter: 0.400
filament_diameter: 1.750
pressure_advance: 0.06
heater_pin: PB8
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC3
min_extrude_temp: 190
min_temp: 0
max_temp: 250
control: pid
#pid_kp: 14.42
#pid_ki: 0.88
#pid_kd: 59.12 # old values
pid_Kp=20.861
pid_Ki=1.095
pid_Kd=99.353
pressure_advance: 0.225 # needs more testing, i am open for suggestions

[heater_bed]
heater_pin: PB9
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
min_temp: 0
max_temp: 120
control: pid
#pid_kp: 97.1
#pid_ki: 1.41
#pid_kd: 1675.16 # old values
pid_Kp=59.418
pid_Ki=1.082
pid_Kd=815.506

[probe]
pin: PA1
x_offset : 24.0
y_offset : 13.35
#z_offset: 0
samples: 3
samples_result: average
sample_retract_dist: 1
speed: 3
lift_speed: 8
samples_tolerance : 0.1
samples_tolerance_retries : 3

[bed_mesh]
speed: 200
horizontal_move_z: 3
#mesh_min: -8, 0
mesh_min: 14, 11
mesh_max: 210, 215
probe_count: 6,6
mesh_pps: 5,5 #interpolation, not the actual probe count
algorithm: bicubic
bicubic_tension: 0.2

[safe_z_home]
home_xy_position: 5, 5
speed: 60
z_hop: 4
z_hop_speed: 9

[firmware_retraction]
retract_length: 1.8
retract_speed: 50
#unretract_extra_length: 0
unretract_speed: 50

[controller_fan controller_fan]
pin: PB12

[heater_fan extruder_fan]
pin: PB13

[fan]
pin: PB5
cycle_time: 0.00005 #20kHz

#This pin enables the bed, hotend, extruder fan, part fan.
[output_pin enable_pin]
pin: PB6
value: 1

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [probe]
#*# z_offset = 0

Describe your issue:

Hi all, I successfully installed Klipper on my Anycubic Kobra 2 Neo, and the first few prints went really well. However, every time I change the nozzle size (from 0.4 to 0.2 or 0.6), I have to manually recalibrate the Z offset. The K2N has a Z stop button that can calculate the Z offset via auto leveling. How can I set up Klipper to use the existing hardware for auto leveling?

Thanks for your help!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.