Skip to content

Instantly share code, notes, and snippets.

@varunmehta
Last active June 6, 2025 16:16
Show Gist options
  • Save varunmehta/3faef62f674da81c38ddb2d2d250dc83 to your computer and use it in GitHub Desktop.
Save varunmehta/3faef62f674da81c38ddb2d2d250dc83 to your computer and use it in GitHub Desktop.
Klipper config for Ender3 on Glass Bed
# This file contains common pin mappings for the BIGTREETECH SKR mini
# E3 v2.0. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader" and USB communication. Also,
# select "Enable extra low-level configuration options" and configure
# "GPIO pins to set at micro-controller startup" to "!PA14".
# The "make flash" command does not work on the SKR mini E3. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the SKR
# mini E3 with that SD card.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PB13
dir_pin: !PB12
enable_pin: !PB14
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC0
position_endstop: 0
position_max: 235
homing_speed: 50
[tmc2209 stepper_x]
uart_pin: PC11
tx_pin: PC10
uart_address: 0
run_current: 0.580
stealthchop_threshold: 999999
[stepper_y]
step_pin: PB10
dir_pin: !PB2
enable_pin: !PB11
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC1
position_endstop: 0
position_max: 235
homing_speed: 50
[tmc2209 stepper_y]
uart_pin: PC11
tx_pin: PC10
uart_address: 2
run_current: 0.580
stealthchop_threshold: 999999
[stepper_z]
step_pin: PB0
dir_pin: PC5
enable_pin: !PB1
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_max: 250
position_min: -5
[tmc2209 stepper_z]
uart_pin: PC11
tx_pin: PC10
uart_address: 1
run_current: 0.580
stealthchop_threshold: 999999
[extruder]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PD2
microsteps: 16
rotation_distance: 32.996418 # 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp: 26.138
pid_Ki: 1.556
pid_Kd: 109.779
min_temp: 0
max_temp: 250
pressure_advance: 0.06
[tmc2209 extruder]
uart_pin: PC11
tx_pin: PC10
uart_address: 3
run_current: 0.650
stealthchop_threshold: 999999
[heater_bed]
heater_pin: PC9
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC3
control: pid
pid_Kp: 73.021
pid_Ki: 1.764
pid_Kd: 755.771
min_temp: 0
max_temp: 130
[heater_fan heatbreak_cooling_fan]
pin: PC7
[fan]
pin: PC6
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_34FFD7054D50383533742243-if00
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[static_digital_output usb_pullup_enable]
pins: !PA14
[bltouch]
sensor_pin: ^PC14
control_pin: PA1
x_offset : -39
y_offset : -8
samples: 2
speed: 2
#z_offset : 1.630
[safe_z_home]
home_xy_position: 125, 125 # Change coordinates to the center of your print bed
speed: 50
z_hop: 10 # Move up 10mm
z_hop_speed: 5
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 11, 22
mesh_max: 196, 227
probe_count: 5, 5
mesh_pps: 2,2
fade_start: 1
fade_end: 10
fade_target: 0
[gcode_macro G29]
gcode:
BED_MESH_CALIBRATE PROFILE=default
BED_MESH_PROFILE LOAD=default
[endstop_phase]
[include mainsail.cfg]
[include TEST_SPEED.cfg]
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
EXP1_2=PA15, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PB15, EXP1_10=<5V>
[display]
lcd_type: st7920
cs_pin: EXP1_7
sclk_pin: EXP1_6
sid_pin: EXP1_8
encoder_pins: ^EXP1_5, ^EXP1_3
click_pin: ^!EXP1_2
[output_pin beeper]
pin: EXP1_1
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.343750, 0.298750, 0.200000, 0.055000, -0.082500
#*# 0.242500, 0.197500, 0.091250, -0.065000, -0.212500
#*# 0.127500, 0.070000, -0.030000, -0.176250, -0.292500
#*# 0.038750, -0.020000, -0.107500, -0.226250, -0.330000
#*# -0.005000, -0.070000, -0.150000, -0.252500, -0.335000
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 11.0
#*# max_x = 196.0
#*# min_y = 22.0
#*# max_y = 227.0
#*#
#*# [bltouch]
#*# z_offset = 1.714
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment