Overview of the project

This project consists in changing the default Marlin software that comes with the Ender 3 V3 SE from factory to Klipper. There are several benefits to running Klipper apart from the huge support you can find online, for example:

  • Send gcode directly from your PC instead of manual SD card transfer
  • Remote monitoring and command sending
  • Web interface you can access from any device in your home
  • Improved bed leveling with KAMP
  • Pressure advance and input shaping

Requirements

  • An Ender 3 V3 SE
  • A Raspberry Pi (or PC) running Linux
  • microSD card for the Pi
  • Power Supply for the Pi
  • SD card
  • USB C to USB A cable to connect the Ender and the Pi

Disclaimer: The Ender 3 V3 SE display doesn’t work with Klipper (yet) so you would lose the ability to operate your printer from the display knob, however there are some solutions like this repo to restore some of the display’s functionality

Installation

Raspberry Pi Setup

The first step would be to have a working Raspberry Pi (or PC) to which you can SSH into. If you already do, you can skip this step. If you don’t, there is a great guide by the Raspberry Pi team on how to set it up.

The steps without going into much detail are:

  1. Install Raspberry Pi Imager
  2. Choose your device (which Raspberry Pi do you have)
  3. Choose the operating system (I recommend the lite version of Raspberry Pi OS)
  4. Choose your storage device (the microSD which you will install in your Raspberry Pi)
  5. Customize OS to generate a username and password, add Wi-Fi credentials, set hostname and enable SSH
  6. Flash the microSD
  7. Plug the microSD into your Raspberry Pi
  8. Connect the power supply
  9. SSH into your Raspberry Pi

KIAUH

Once your Raspberry Pi is set up and you are SSH’d into it, you can proceed to download and install KIAUH which is a script that provides an easy way of installing Klipper and other features that we will need like Moonraker, Fluidd or Mainsail.

Steps to Install KIAUH

A prerequisite to installing KIAUH is to have Git installed. If you don’t have it installed already (or if unsure) then run the following command:

sudo apt-get update && sudo apt-get install git -y

Once git is installed, run the following command to clone KIAUH to your home directory:

cd ~ && git clone https://github.com/dw-0/kiauh.git

After successfully cloning, run KIAUH by running the following command:

./kiauh/kiauh.sh

Installing Klipper and Necessary Packages

You should now see a similar screen to the one shown below, which is the main menu of KIAUH, from where we will install the necessary packages to run Klipper.

screenshot of KIAUH main menu
KIAUH main menu

The necessary packages to install will be:

  • Klipper
  • Moonraker
  • Fluidd or Mainsail

Installing Klipper

To install each package we have to type: 1 (for Install) and hit Enter which takes us to the following screen:

screenshot of KIAUH install menu
KIAUH install menu

Now we have to type: 1 (for Klipper) and hit Enter again. Then follow any prompts that appear to complete the installation.

Installing Moonraker

To install Moonraker we have to repeat the steps from above but selecting Moonraker in the second screen. The steps would be:

  1. Run KIAUH or go to Main Menu if already running
  2. Type “1” (without quotation marks) and hit Enter
  3. Type “2” (without quotation marks) and hit Enter
  4. Follow the prompts to install

Installing Fluidd or Mainsail

Fluidd and Mainsail are user interfaces for Klipper, they are the ones we will interact with to send commands to our printer. Selecting one is completely up to personal preference so you can visit their sites and see which one you like the most, their functionality is pretty much the same.

To install one of them we have to repeat the steps from above but selecting our preference in the second screen. The steps would be:

  1. Run KIAUH or go to Main Menu if already running
  2. Type “1” (without quotation marks) and hit Enter
  3. Type “3” OR “4” (without quotation marks) and hit Enter
  4. Follow the prompts to install

Configuration

Once the steps above are complete, you should be able to access your web interface by going to http://[hostname-of-your-pi].local and see something similar to this:

screenshot of Fluidd home menu
Fluidd home menu

Next you need to go to the Configuration tab (below image) and you should see a printer.cfg file and a macro.cfg file. If those files are nowhere to be seen, you can create them by clicking on the ‘+’ button on top of the file list.

screenshot of Fluidd config menu
Fluidd config menu

Then go to one of the many Github Repos to get a configuration file that is pre-set. I recommend bootuz-dinamon. Copy and paste the contents of printer.cfg and macro.cfg into yours.

Create Printer Firmware (.bin file)

Make sure your SD card is formatted as FAT32 with an allocation size of 4096, otherwise you might run into issues and be unable to flash

To create the actual firmware that will be running in your 3D printer, you have to compile the firmware on your Rasberry Pi. For this, you need to follow the following steps:

  1. Go to the /klipper directory and run the menuconfig command by running the following code:

    cd ~/klipper/
    make menuconfig
    
  2. Select the following settings:

    - Micro-controller architecture: STMicroelectronics STM32
    - Processor model: STM32F103
    - Bootloader offset: 28KiB
    - Communication interface: Serial (on USART1 PA10/PA09)
    
  3. After everything is selected, press q and save your changes, then run:

    make
    

Flash 3D Printer

Once completed, there will be a klipper.bin file in the klipper/out/ folder. To get the file you will have to copy it from your Raspberry Pi to your computer, but first we have to move it from where it is generated to a folder Fluidd/Mainsail can access.

To move the file, SSH into your Raspberry Pi and navigate to the klipper/out/ folder by running the following command:

cd ~/klipper/out

Then run the ls command to confirm the file is there and if it is, you can send it to your config folder so it is visible from Fluidd/Mainsail by running the following command

cp klipper.bin ~/printer_data/config/

Note: If you get an error that says “No such file or directory” you need to verify that the previous steps (compiling the firmware) were done correctly and look for the location of klipper/out/ or printer_data/config/ in your Raspberry Pi, then modify the previous commands accordingly.

Now when you go to the configuration tab of your Fluid/Mainsail UI, the klipper.bin file should be there so you can just right click and download to your computer. Once you download the file, the next steps are:

  1. Transfer the klipper.bin file to your printer’s SD card
  2. Turn off the printer
  3. Insert SD card
  4. Turn on the printer and wait 15 seconds
  5. Turn off the printer
  6. Take the SD card out and remove the .bin file
  7. Insert the empty SD card into the printer
  8. Turn on the printer (the screen should be a blue screensaver image)
  9. Connect your Raspberry Pi to the printer via USB cable
  10. Navigate to your Fluidd or Mainsail web interface

The printer should be there and you should be looking at something like this:

screenshot of Fluidd home menu
Fluidd home menu

In case the printer is not recognized, SSH into your Raspberry Pi and run the following command:

dmesg | grep usb

which after running should show something like this:

screenshot of a terminal
The line you should look for

Then navigate to your printer’s printer.cfg file and look for the [mcu] code block. There should be 2 lines under it that start with “serial:”. Comment the long one by adding “#” to the start (without quotation marks) and undocument the short one, changing the value to whatever you got when running the previous command.

Now you should have a working Ender 3 V3 SE with Klipper installed, congratulations! Now you can continue to the calibration section to get your printer calibrated and start printing.

Calibration

Calibrate PID Coefficients

Go to your main Fluidd or Mainsail web interface and scroll down to “Macros”. Then run the PID_BED and PID_EXTRUDER. Run one first and after it finishes, run the other.

screenshot of the macros box
Macros box

Note: If macros don’t appear in the home screen or if they don’t run, go to printer.cfg and add [include macro.cfg] somewhere in the file

Calibrate Z-Offset

To calibrate your Z-Offset go to the Tune tab on your left and click on “Calibrate” to generate a mesh matrix of your bed.

screenshot of bed mesh menu
Bed mesh menu

After it is generated, go to the Home tab and go to the Tool box and select PROBE_CALIBRATE under the “Tools” drop-down menu.

screenshot of tool box
Tool box

Get a piece of paper and run the paper test to calibrate the correct Z-offset for your printer, adjust the values by clicking on the ‘+’ or ‘-‘ buttons that appear. You should be able to move the paper but there should be some drag present. I have had better results doing this when the printer is cold but some recommend doing it when the nozzle and the bed are at operating temperature, give it a try and see which one works best for you.

screenshot of manual probe menu
Manual probe menu

Additional Installations and Configurations

KAMP

I highly recommend installing Klipper Adaptive Meshing & Purging (KAMP) to get the full benefits of improved bed leveling and adaptive purging. The installation steps on their site are pretty straightforward but I’ll provide them here as well.

First you need to define [exclude_object] in your printer.cfg file.

  1. Go to your printer.cfg file and add a line that says [exclude_object]
    screenshot of exclude object module
    Exclude object module
  2. Go to your moonraker.conf file and add 2 lines

    [file_manager]
    enable_object_processing: True
    
  3. Make sure to go to your slicer and enable the “Label Objects” option. I use Cura and it labels objects by default.

    (The next steps are copied from the KAMP Github)

  4. SSH into your Raspberry Pi and execute the following commands:

     cd
    
     git clone https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git
    
     ln -s ~/Klipper-Adaptive-Meshing-Purging/Configuration printer_data/config/KAMP
    
     cp ~/Klipper-Adaptive-Meshing-Purging/Configuration/KAMP_Settings.cfg ~/printer_data/config/KAMP_Settings.cfg
    

    Note: This will change to the home directory, clone the KAMP repo, create a symbolic link of the repo to your printer’s config folder, and create a copy of KAMP_Settings.cfg in your config directory, ready to edit.

    It is also possible that with older setups of klipper or moonraker that your config path will be different. Be sure to use the correct config path for your machine when making the symbolic link, and when copying KAMP_Settings.cfg to your config directory.

  5. Open your moonraker.conf file and add this configuration:

    [update_manager Klipper-Adaptive-Meshing-Purging]
    type: git_repo
    channel: dev
    path: ~/Klipper-Adaptive-Meshing-Purging
    origin: https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git
    managed_services: klipper
    primary_branch: main
    

    Note: Whenever Moonraker configurations are changed, it must be restarted for changes to take effect. If you do not want moonraker to notify you of future updates to KAMP, feel free to skip this.

  6. Depending on what features you want from KAMP, you’ll need to [include] some files in KAMP_Settings.cfg:

    Note: The KAMP configuration files are broken up like this to allow those who do not use bed probes to benefit from adaptive purging, and other features.

  7. After you [include] the features you want, be sure to restart your firmware so those inclusions take effect. Don’t forget to add [include KAMP_Settings.cfg] to your printer.cfg!

Axis Twist Compensation

I’ve seen that a lot of people seem to have issues with bed leveling even after they have gone through all the possible solutions for it. The issue I found is that most Ender 3 V3 SE printers have a little twist on their X rail which skews the results of their bed level. This video by Nero3D explains the issue in pretty good detail. I recommend to enable the Axis Twist Compensation module and set it up to get your printer running smoothly.

Calibrate Pressure Advance

Pressure Advance is another great way to improve your prints, I recommend to follow the Klipper documentation on Pressure Advance to tune yours correctly.

Final thoughts

I hope you found this guide useful and that you were able to get your Ender 3 V3 SE up and running with Klipper. I also want to recognize the guides and videos I followed to initially set up mine:

If you run into any issues while going through this guide, don’t hesitate to reach out and I’ll do my best to help you. Happy printing!

Updated: