Klipper for Ender 5+ with SKR1.4 (and EVA2)

If you are looking for Klipper Printer Configuration for an Ender 5 Plus running on a BigTreeTech SKR 1.4 Turbo with an EVA2 Direct Drive BMG/Dragonfly Hotend then you are welcome to try one of the following.

  1. Printer Config – this is my original config where I had not finished tuning and tweaking but it should be a good starting point if you go with Octo (see comment below).
  2. Printer Config Fluidd – this is my config today (1st March) almost a month after switching.

Fluidd or Octoprint

When I first set up Klipper I went with Octoprint as per the official documentation. However, I wanted the neat visualisation tool for bed levelling. It wasn’t obvious how to access it so speaking to a friend who said “I use Fluidd and it just works” I made the switch and I have ZERO regrets.

With Octoprint

To set up Klipper with Octoprint you start with Installation before continuing with Configuration Reference & Rotational Distance before finally being able to start the Configuration Checks such as PID and homing.

With Fluidd (Recommended)

Download the Pi image as per https://docs.fluidd.xyz/installation/fluiddpi and then move on to configuration. This should mostly be the same as for Octoprint as you will be working in the Console.

Printer MCU

When completing Building and flashing the micro-controller you need to pick (as per Voron Docs) :

  • Ensure that the micro-controller architecture is set to ‘LPC176x’
  • If the SKR is a Turbo model, ensure the processor model is set to ‘lpc1769 (120 Mhz)’
  • Ensure that “Target board uses Smoothieware bootloader” is enabled
  • Ensure that “Use USB for communication (instead of serial)” is enabled

Configuration

PID

https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings

  • PID_CALIBRATE HEATER=extruder TARGET=170
  • PID_CALIBRATE HEATER=heater_bed TARGET=60
  • SAVE_CONFIG to update settings.

Z-Offset

The Paper Test needs to be performed

  • PROBE_CALIBRATE
  • TESTZ Z=-.1
  • ACCEPT
  • SAVE_CONFIG

Bed Level > Bed Mesh

I plan to revisit did revisit the Bed Mesh because of the Mesh Interpolation configuration. In the end I basically took the defaults. BED_MESH_CALIBRATE will produce a bed mesh and save as default.

[bed_mesh]
    speed: 120
    horizontal_move_z: 8
    mesh_min: 25, 25
    mesh_max: 275, 275
    probe_count: 5, 5
    mesh_pps: 2, 2
    algorithm: bicubic
    bicubic_tension: 0.2
    move_check_distance: 5
    split_delta_z: .025
    fade_start: 1
    fade_end: 10
    fade_target: 0

Resonance Compensation

You can calculate in put shaping manually as described Resonance Compensation but you can also skip to the Measuring Resonances page to complete this using an ADXL345. I selected to use one from Adafruit because of quality and reported issues with other lessor brands. Note: Resonance Compensation should be completed before Pressure Advance although using the automated measuring it is disabled for you.

Configure your Pi as an MCU

In order to use an ADXL345 you must first configure the Pi as a second MCU (Micro Controller Unit) – the first being your board of choice (in this case an SKR1.4). There are two stages to this discussed in detail here and here but for the quick start follow the steps below.

1) In an SSH terminal, type the following to install numpy. This can take a while to complete so be patient. Watch for errors and check the details if they occur.

~/klippy-env/bin/pip install -v numpy

2) Now type the following

sudo apt update 
sudo apt install python3-numpy python3-matplotlib

3) Now, to make sure our RPi MCU runs first, we jump over to the other documentation and type:

cd ~/klipper/ 
sudo cp "./scripts/klipper-mcu-start.sh" /etc/init.d/klipper_mcu 
sudo update-rc.d klipper_mcu defaults

4) Next we have to configure it as a Linux process Microcontroller Architecture using the following and making the appropriate selection. Save and Quit.

cd ~/klipper/
make menuconfig

5) Stop and restart the KIipper service to ensure the changes have taken place.

sudo service klipper stop 
make flash 
sudo service klipper start

6) You might also want to add the pi user to the tty group in case of errors. See the full docs for more details.

sudo usermod -a -G tty pi

7) Lastly – don’t forget to place a copy of this file into your Pi home directory alongside printer.cfg. It should be called raspberry-pi.cfg

8) Enabling SPI is described in both sections of the relevant documentation. Assuming you have connected your ADXL as an SPI then you need to type the following and under <blah> enable SPI.

sudo raspi-config

9) Add the following to your printer.cfg

[mcu rpi]
serial: /tmp/klipper_host_mcu

[adxl345]
cs_pin: rpi:None

[resonance_tester]
accel_chip: adxl345
probe_points:
    100, 100, 20  # an example

10) Now, via the Octoprint terminal, restart the firmware. The documentation suggests that restart is sufficient but I found that firmware_restart prevented an // Unknown command:”ACCELEROMETER_QUERY” error.

Firmware_Restart
Checking the Setup

As the Ender is a Cartesian printer with only one ADXL we can type (into Octo-Terminal) the following two commands:

ACCELEROMETER_QUERY
MEASURE_AXES_NOISE

The first command should respond with something like Recv: // adxl345 values (x, y, z): 470.719200, 941.438400, 9728.196800 with the second command giving us noise values between 0-100.

Measuring the resonances

Now for the fun bit. The following commands will test the X and Y axis respectively based on the points listed under resonance_tester/probe_points.

TEST_RESONANCES AXIS=X
TEST_RESONANCES AXIS=Y

Definitely start with a single point before adding more points to test the whole bed.

probe_points:
    75, 75, 20
    75, 275, 20
    175, 175, 160
    275, 75, 20
    275, 275, 20

It takes a few minutes to run each one and if successful a csv file is saved to your /tmp directory.

Once both tests are completed you can process the data and make the required adjustments to your printer.cfg. To make this easier I wrote the following script:

!/usr/bin/env bash

tmp="/tmp"
destdir="/home/pi/resonances"

find $tmp -name '.csv' -print0 | xargs -0 cp -t $destdir
for csvfile in $destdir/.csv; do
  [ -f "$csvfile" ] || break
  pngfile=${csvfile%.}.png
  outfile=${csvfile%.}.txt
  /home/pi/klipper/scripts/calibrate_shaper.py $csvfile -o $pngfile > $outfile
done

If you copy it into a file called process_resonances.sh in the pi home folder and type the following commands the files and images will end up in a folder called resonances for you. Note: the first two lines only need to be done the first time!

chmod +x process_resonances.sh
mkdir resonances
./process_resonances.sh

Now you can look at the files, taking the suggested shaper types, frequency and max acceleration and adding them to your printer.cfg.

[input_shaper]
shaper_freq_x: ...
shaper_type_x: ...
shaper_freq_y: 34.6
shaper_type_y: mzv

[printer]
max_accel: 3000  # should not exceed the estimated max_accel for X and Y axes

Restart Klipper and you are good to test – happy printing!

Pressure Advance

Pressure Advance helps avoid bubbling on corners and oozing during no extrusion movements. For more detail check out the documentation. To complete pressure advance you must first slice the following Square Tower STL with this settings:

  • Use a high speed (eg, 100mm/s),
  • Zero infill,
  • Use a coarse layer height e.g. 0.3mm for a 0.4mm nozzle as the layer height should be ~75% nozzle diameter,
  • Disable any dynamic acceleration control.

Now, in the Octo Terminal, you can prepare to start the test with

SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500

If like me you are running Direct Drive you next type

TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005

Now print the Square Tower. Once completed you are looking for the sweet spot on the corner. Measure from the base to this point.

Now with that measurement you can calculate the pressure advance value. Anything between .050 and 1.000 is considered normal. Bowden would be towards the top end of the range. The calculated value is placed in the [Extruder] section as pressure_advance = <calculated_value>

pressure_advance = <start> + <measured_height> * <factor>
e.g. pressure_advance = 0 + 12.90 * .020 = 0.258.

Leave a Reply

Your email address will not be published.

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