How to Install Klipper on Ender 5 with BTT SKR Mini E3 1.2, BMG Direct Drive and ABL Probe

I decided even though I have plenty of processing power with my SKR boards that my nerdy self had to give Klipper a try. I was experiencing lots of print defects with Marlin, and I had heard the kinematics in Klipper were much better. I embarked on an all-day journey on my day off to install Klipper to a VM on my server, and flash the firmware to my Ender 5. My Ender 5 is quite upgraded with linear rails, BMG Extruder, V6 all-metal hot-end, SKR Mini E3 1.2 board and my DIY ABL probe you can find on our blog. These upgrades made the config a little more challenging to figure out, and most of the configurations I could find had obsolete parameters that required me to figure out anyway.

Install Klipper and OctoPrint to make Firmware

I am sharing my configurations and information to help you save some time, there should be no need to take hours to setup a configuration. We had so many things to figure out like pin-outs, and end-stop directions etc. Now you can use my configuration and steps to save you some time, you should spend time tuning the firmware instead of chasing your tail with the config. Right now I will not be talking about how I setup the Klipper firmware in a Debian VM, nor about installing OctoPrint that is for a later time. You will need to already have a Pi, or Linux distribution with Klipper installed and ready to make the firmware. Also you should already have OctoPrint installed, most people reading this most likely will. You can also alternatively use FluiddPi or Mainsail with Klipper. There are plenty of tutorials on how to make the firmware, just make sure to use the menu configuration settings below.

  • STM32F103
  • 28KiB bootloader
  • “GPIO pins to set at micro-controller startup” to “!PC13”

Just remember the “make flash” command will not work for the SKR boards, because we cannot flash via USB. We must use the “make” command only; You will need to transfer the klipper.bin file from the “out” folder to your SD Card, and rename it to “firmware.bin” just like in marlin. Then you insert the SD card into the Ender 5, and reboot. The firmware will flash in several moments, and later it will come active once you have a proper configuration setup.

Ender 5 Klipper Configuration with ABL, SKR Mini E3 1.2 and BMG Extruder

Now, we need to travel to your configuration directory. Most people will have their config in the home folder, so you will first travel there and create a new configuration file using the commands below.

cd ~/
nano printer.cfg

With the nano text editor open, you will now copy/paste the configuration file from below. You can alternatively download the config file from the link at the bottom of the post.

[gcode_macro START_PRINT]
gcode:
   G90
   G92 E0
   G1 X35.0 Y5.0 Z0.1 E1.0 F5000.0 ; intro line start
   G1 X35.0 Y5.0 Z0.1 E4.0 F1000.0 ; start extruding
   G1 X60.0 Y5.0 Z0.2 E10 F1000.0 ; middle
   G1 X100.0 Y5.0 Z0.1 E15 F1000.0 ; intro line finish

[gcode_macro END_PRINT]
gcode:
   G91 ; relative movements
   G1 Z5 F5000 ; lift nozzle
   G90 ; back to absolute
   G0 X0 Y30 F10000
   M107 ; turn fan off
   M104 S0 ; turn off extruder
   M140 S0 ; turn off bed
   M18 ;turn Motors off
   SET_PIN PIN=power VALUE=0

[gcode_macro REBOOT]
gcode:
  FIRMWARE_RESTART

[stepper_x]
step_pin: PB13
dir_pin: !PB12
enable_pin: !PB14
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC0
position_endstop: 235
position_max: 235
homing_speed: 100

[tmc2209 stepper_x]
uart_pin: PB15
run_current: 0.580
stealthchop_threshold: 140

[stepper_y]
step_pin: PB10
dir_pin: !PB2
enable_pin: !PB11
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC1
position_endstop: 235
position_max: 235
homing_speed: 100

[tmc2209 stepper_y]
uart_pin: PC6
run_current: 0.590
stealthchop_threshold: 140

[stepper_z]
step_pin: PB0
dir_pin: !PC5
enable_pin: !PB1
microsteps: 16
rotation_distance: 4
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
position_max: 300
position_min: -10

[tmc2209 stepper_z]
uart_pin: PC10
run_current: 0.580
stealthchop_threshold: 999999

[extruder]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PD2
microsteps: 16
rotation_distance: 7.710
nozzle_diameter: 0.400
pressure_advance: 0.019
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
#control: pid
#pid_Kp: 21.527
#pid_Ki: 1.063
#pid_Kd: 108.982
min_temp: 0
max_temp: 295

[tmc2209 extruder]
uart_pin: PC11
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: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130

[fan]
pin: PA8

[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_37FFD8055257393639750843-if00

[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 1500
max_z_velocity: 5
max_z_accel: 100

[input_shaper]
shaper_freq_x: 57.8
shaper_freq_y: 94.8

[static_digital_output usb_pullup_enable]
pins: !PC13

[board_pins]
aliases:
    # EXP1 header
    EXP1_1=PB5, EXP1_3=PA9,   EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
    EXP1_2=PB6, EXP1_4=<RST>, EXP1_6=PB9,  EXP1_8=PB7, EXP1_10=<5V>

# See the sample-lcd.cfg file for definitions of common LCD displays.

[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

[bed_mesh]
speed: 100
probe_count: 4,4
mesh_min: 10,15
mesh_max: 200,210

[probe]
pin:  !PC2
#z_offset: -1.8
speed: 5.0
x_offset: -35
y_offset: -9

[safe_z_home]
home_xy_position: 115,115
speed: 100
z_hop: 15
z_hop_speed: 5

[bed_screws]
screw1: 32,32
screw2: 203,32
screw3: 203,203
screw4: 32,203
screw5: 117,117

Then, hit CTRL+O and CTRL+X to save and exit. Once you have saved the configuration you should reboot the firmware by issuing the command below, and the printer will come to life if you have done everything correct.

sudo service klipper restart

I recommend installing the Klipper plugin to your Octoprint service to aid in managing and configuring the printer further.

Ender 5 Klipper Tuning

Once you have the printer display showing up, and everything seems to be working you need to start the calibration steps. This includes Probe calibration, Linear Advance, Input Shaping and so much more awesome things this firmware supports! My print quality has never been this good, at speeds over 100mm/s always!

I will continue to add more information about Klipper as I continue to learn it and write these configurations for my printers, and I will also do a write-up about using a VM in Proxmox to run Klipper and Octoprint!


0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0