Skip to content

Instantly share code, notes, and snippets.

@gretel
Created January 28, 2024 18:19
Show Gist options
  • Save gretel/442c9d5a01c2c08ee6d993a2044978c0 to your computer and use it in GitHub Desktop.
Save gretel/442c9d5a01c2c08ee6d993a2044978c0 to your computer and use it in GitHub Desktop.
creality ender 3 2020 klipper configuration
# This line includes all the standard macros.
[include klipper-macros/*.cfg]
# Uncomment to include features that require specific hardware support.
# LCD menu support for features like bed surface selection and pause next layer.
[include klipper-macros/optional/lcd_menus.cfg]
# Optimized bed leveling
[include klipper-macros/optional/bed_mesh.cfg]
[include macro.cfg]
# [include resonance_test.cfg]
[printer]
kinematics: cartesian
max_velocity: 150
max_accel: 2000
max_z_velocity: 10
max_z_accel: 100
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
# [mcu rpi]
# serial: /tmp/klipper_host_mcu
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 80
[display]
lcd_type: st7920
cs_pin: PB12
sclk_pin: PB13
sid_pin: PB15
encoder_pins: ^PB14, ^PB10
click_pin: ^!PB2
[fan]
pin: PA0
#kick_start_time: 0.0
off_below: 0.4
#max_power: 0.9
[output_pin beeper]
pin: PC6
pwm: True
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: 0
position_max: 250
homing_speed: 80
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_endstop: 0
position_max: 235
homing_speed: 80
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
#endstop_pin: ^PA7
endstop_pin: probe:z_virtual_endstop
position_max: 245
position_min: -4
homing_speed: 8
second_homing_speed: 1
[extruder]
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
#rotation_distance: 32.179
rotation_distance: 32.48
nozzle_diameter: 0.400
filament_diameter: 1.70
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
min_temp: 15
max_temp: 230
pressure_advance: 0.24
max_extrude_only_distance: 100.0
max_extrude_cross_section: 50.0
control: pid
pid_kp: 22.075
pid_ki: 1.008
pid_kd: 120.862
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
min_temp: 0
max_temp: 90
control: pid
pid_kp: 74.489
pid_ki: 1.860
pid_kd: 745.819
[bltouch]
sensor_pin: ^PB1
control_pin: PB0
samples: 2
x_offset: -44
y_offset: -14
#z_offset: 0.150
[safe_z_home]
home_xy_position: 161.5,123.5 # probe
z_hop: 10
[bed_screws]
screw1: 31,37
screw1_name: Front left
screw2: 31,208
screw2_name: Rear left
screw3: 201,208
screw3_name: Rear right
screw4: 201,37
screw4_name: Front right
screw5: 117.5,117.5
screw5_name: Center
[screws_tilt_adjust]
screw1: 74,36
screw1_name: front left screw
screw2: 74,206
screw2_name: rear left screw
screw3: 244,206
screw3_name: rear right screw
screw4: 244,36
screw4_name: front right screw
horizontal_move_z: 10
speed: 120
screw_thread: CW-M4
[skew_correction]
[bed_mesh]
speed: 100
horizontal_move_z: 5
mesh_min: 20, 20
mesh_max: 200, 200
probe_count: 5,5
#algorithm: bicubic
adaptive_margin: 5.0
fade_start: 1
fade_end: 10
fade_target: 0
[firmware_retraction]
retract_length: 2.6
retract_speed: 30
#unretract_extra_length: 0
#unretract_speed: 10
[exclude_object]
# The sections below here are required for the macros to work. If your config
# already has some of these sections you should merge the duplicates into one
# (or if they are identical just remove one of them).
[idle_timeout]
gcode:
_KM_IDLE_TIMEOUT # This line must be in your idle_timeout section.
[save_variables]
filename: ~/Ender3_data/config/variables.cfg
[display_status]
[pause_resume]
recover_velocity: 50
[respond]
[virtual_sdcard]
path: ~/Ender3_data/gcodes
on_error_gcode: CANCEL_PRINT
[input_shaper]
shaper_type_y: zv
shaper_freq_y: 26.0
shaper_type_x: zv
shaper_freq_x: 25.6
[gcode_arcs]
resolution: 0.1
[gcode_macro _km_options]
variable_bed_surfaces: ['glass']
variable_start_clear_adjustments_at_end: False
variable_load_length: 45.0
variable_menu_show_octoprint: False
variable_menu_show_sdcard: False
variable_menu_temperature: [ {'name' : 'PLA', 'extruder' : 210.0, 'bed' : 60.0} ]
variable_park_z: 10.0
variable_start_bed_heat_overshoot: 1.0
#variable_start_home_z_at_temp: True
#variable_start_level_bed_at_temp: False
variable_start_purge_clearance: 5.0
variable_start_purge_length: 15.0
variable_start_try_saved_surface_mesh: True
gcode: # This line is required by Klipper.
# Any code you put here will run at klipper startup, after the initialization
# for these macros. For example, you could uncomment the following line to
# automatically adjust your bed surface offsets to account for any changes made
# to your Z endstop or probe offset.
ADJUST_SURFACE_OFFSETS
BED_MESH_CHECK
LOAD_SURFACE_MESH
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.157500, 0.150000, 0.165000, 0.151250, 0.120000
#*# 0.080000, 0.083750, 0.095000, 0.086250, 0.067500
#*# -0.011250, -0.001250, 0.017500, 0.016250, -0.002500
#*# -0.058750, -0.042500, -0.017500, -0.011250, -0.016250
#*# -0.101250, -0.077500, -0.046250, -0.027500, -0.041250
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 20.0
#*# max_x = 200.0
#*# min_y = 20.0
#*# max_y = 200.0
#*#
#*# [bed_mesh glass]
#*# version = 1
#*# points =
#*# 0.157500, 0.150000, 0.165000, 0.151250, 0.120000
#*# 0.080000, 0.083750, 0.095000, 0.086250, 0.067500
#*# -0.011250, -0.001250, 0.017500, 0.016250, -0.002500
#*# -0.058750, -0.042500, -0.017500, -0.011250, -0.016250
#*# -0.101250, -0.077500, -0.046250, -0.027500, -0.041250
#*# min_x = 20.0
#*# max_x = 200.0
#*# min_y = 20.0
#*# max_y = 200.0
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*#
#*# [skew_correction skew_glass]
#*# xy_skew = -0.005201432891494373
#*# xz_skew = 0.0
#*# yz_skew = 0.0
#*#
#*# [bltouch]
#*# z_offset = 0.224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment