3D Printer FirmwareGuidesKlipper Firmware

How to Install Klipper on Sapphire Plus and Speed Up Your Prints

In this guide I will show you how to install Klipper on Sapphire Plus, to speed up your prints and improve print quality.

What is Klipper?

Klipper Sidewinder X1 | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

Klipper is an open-source firmware for your 3D printer that combines the power of a Raspberry Pi and your printer main board for better printer control. By doing this, You are able to run your printer at higher speeds with better precision and control.

Why Install Klipper on Sapphire Plus?

As you might know, the default Marlin Firmware which comes stock with the Sapphire Plus is not the best. It’s not the latest Marlin Firmware, it doesn’t support Linear Advance, and it’s hard to edit.

By installing Klipper on Sapphire Plus, you will be able to print much faster compared to a stock printer, and you will also be able to control your printer remotely, trough Wi-Fi.

In the video below, you can take a glimpse of the speeds you can achieve with Klipper on Sapphire Plus.

Besides the speed benefits, there’s also the added ease of use. With Klipper you can edit the configuration of your printer without needing to constantly compile and update the firmware, like with Marlin.


To install Klipper on Sapphire Plus, you need to have the following:

  1. MainsailOS installed on a Raspberry Pi
  2. Sapphire Plus 1st Gen. You can also install it on newer machines, but you will need to edit the configuration file.
  3. BTT PITFT50 Touchscreen for extra functionality (optional)

Before you begin

Before you begin

Please note that in order to install Klipper on Sapphire Plus you need some experience with 3D printers and hardware. This is not a trivial task for beginners, and you may break your printer during the process.

Read the full guide carefully and install Klipper on Sapphire Plus only after you properly understood all the steps involved. If you have questions before starting, leave a comment and wait for a reply.

I am not responsible for any damage you may cause to your printer by following this guide. You are doing this on your own responsibility.

The configuration file shared in this article, is made for the 1st Gen Sapphire Plus with the following modifications:

Also, please keep in mind that the stock screen will not work with Klipper and you are limited to using the Octoprint interface exclusively.

Install MainsailOS on Raspberry Pi

MainsailOS Logo | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

I have covered the MainsailOS installation in a previous article, so please follow it before continuing. This will ensure you have the same setup as I do which will make the entire process a bit easier.

In that article I also covered how to install KIAUH which is a helpful tool for installing and updating Klipper.

Build Kliper firmware for Sapphire Plus

The first step in running Klipper on Sapphire Plus is to build the firmware. SSH to your MainsailOS installation, and navigate to the kiauh folder

cd kiauh

Next, run the kiauh.sh script to open the gui


In the Main Menu, type 4 to select the Advanced Menu

image 6 | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

Next, type 3 to build the firmware

image 7 | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

The Klipper Firmware Configuration screen will appear. Using your navigation keys, move through the menus and replicate the same settings I used. Please don’t forget to add the GPIO pins accordingly.

image 9 | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

When finished, press Q then Y to save your configuration.

image 10 | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

The build process will start and when finished, the firmware will be ready to install, but for the Sapphire Plus, we need to install it from the SD card.

But before we do that, we also need to run the following command:

./scripts/update_mks_robin.py ./out/klipper.bin ./out/Robin_nano35.bin

Copy the firmware and install it on Sapphire Plus

First, connect via SFTP to MainsailOS. I use WinSCP.

Enter the IP, username and password just like you did for Putty, then click on Login.

image 11 | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

Navigate to /home/pi/klipper/out and copy the Robin_nano35.bin file on an SD card.

Next, plug the SD card in your printer and turn it on. In a few seconds the firmware will be installed, and your touchscreen will be blank. Wait for 15 seconds then restart your printer.

Copy the configuration file

Now that our Sapphire Plus is running Klipper firmware, we need to copy the configuration file. You can download my sample configuration to get you started.

Please note that this configuration file has all my calibration values installed, and it’s strongly recommended you re-do some of the calibrations for Pressure Advance and Resonance Compensation.

In your MainsailOS Web UI, navigate to Settings, and click on the Upload File icon.

Upload config file | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

Select the printer.cfg file you previously downloaded and upload it.

Upload printer.cfg to clipper | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

Connect Klipper to your printer

Finally, you just need to connect Klipper to your printer. This is super easy. You just need to go back on your MainsailOS Dashboard and click on Firmware Restart.

image 13 | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

This action will trigger the connection between the Klipper service running on Mainsail OS and the Sapphire Plus firmware we just installed. If all the steps have been followed, then your printer will connect, and you will be greeted by this interface.

image 14 | How to Install Klipper on Sapphire Plus and Speed Up Your Prints

Feel free to home the printer first, to make sure everything is running correctly. Heat up the nozzle and heatbed and check if the temperature rises as expected. If everything looks good, then you are ready to start your first print with Klipper.

How to revert back to Stock Firmware?

If you decide Klipper is not for you, reverting to the stock firmware is easy. You can download the Sapphire Plus Firmware I shared previously, and follow the steps described in the article.

Please note that this firmware only works only on the first gen Sapphire Plus. If you are running Klipper on later variants of this printer (with dual Z entstops) then you need to use the original firmware from the manufacturer.

Wrapping up

Even though the installation steps seem to be a bit hard to follow, I hope this guide helped you and now you are running Klipper on your Sapphire Plus.

You can also check out my Ultimate 3D Printer Upgrade Purchase Guide article if you are looking for ways to upgrade your Sapphire Plus.

If you encounter issues during your installation, feel free to leave a comment below and I will do my best to help you. Besides that, you can also join the 3DPrintBeginner Forum where there’s a dedicated thread for Klipper Firmware.

Liked it?
Consider supporting 3DPrintBeginner if this content helped. You can also join Patreon for exclusive perks!

Related Articles


  1. Hi!
    i have tried to run the command ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano.bin but it does not work. i try to write cd klipper but it dont work. where do i write that?
    I have the version with two z motors working from one pin with belt attached.
    original stm drivers but 2209 on its way from china.

  2. I just used your guide and installed Klipper on my Sapphire Plus v1 and i am having a very hard time getting the BED_MESH working at all, the nozzle keeps crashing into the back of my printer every time i try to run it. i am using basically your config file with some extra code for the bltouch. when i set the mesh_min and mesh_max to what i think they should me, i get errors in mainsailos when i try to load it. i think it’s because the sapphire plus uses the ymax endstop and it doesn’t understand that the mesh_min should be at 10,275.
    # PROBE #

    sensor_pin: ^PA11
    control_pin: PA8
    x_offset: 0.0
    y_offset: 27.0
    z_offset: 0.0
    speed: 10500
    samples: 2
    sample_retract_dist: 5.0

    #home_xy_position: 120, 150
    #speed: 100
    #z_hop: 10
    #z_hop_speed: 5

    set_position_z: 0
    gcode: G1 Z10 F600
    G28 X Y
    G1 X120 Y150 F6000
    G28 Z

    speed: 100
    horizontal_move_z: 5
    mesh_min: 10, 275
    mesh_max: 240, 60
    probe_count: 3,3
    mesh_pps: 2,2
    algorithm: bicubic
    bicubic_tension: 0.2
    move_check_distance: 5
    split_delta_z: .025
    relative_reference_index: 5

  3. The correct command which is just after where it says “But before we do that, we also need to run the following command:”, is this;
    cd klipper
    ./scripts/update_mks_robin.py ./out/klipper.bin ./out/Robin_nano35.bin

    Also, if you have the newer version of the sapphire with 5 x TMC2225s, 2 x z steppers and a sync belt, and 1 endstop, here is the correct config;

    # BigDan1190 set up

    # This file contains common pin mappings for the Two Trees Sapphire
    # Plus printer from 2020 (revision 2 with dual Z axis).

    # To use this config, the firmware should be compiled for the STM32F103.
    # When running “make menuconfig” you have to:
    # – enable “extra low-level configuration setup”,
    # – select the 28KiB bootloader,
    # – select serial (on USART3 PB11/PB10) communication
    # – set “GPIO pins to set at micro-controller startup” to “!PC6,!PD13”

    # Note that the “make flash” command does not work with the Sapphire
    # Pro. After running “make”, run the following command:
    # ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano35.bin
    # Copy the file out/Robin_nano35.bin to an SD card and then restart the
    # printer with that SD card.

    # See docs/Config_Reference.md for a description of parameters.

    step_pin: PE3
    dir_pin: !PE2
    enable_pin: !PE4
    microsteps: 32
    rotation_distance: 40
    endstop_pin: !PA15
    position_endstop: 0
    position_max: 290
    homing_speed: 80
    homing_retract_dist: 4.0
    second_homing_speed: 25

    step_pin: PE0
    dir_pin: !PB9
    enable_pin: !PE1
    microsteps: 32
    rotation_distance: 40
    endstop_pin: !PA12
    position_endstop: 300
    position_max: 300
    homing_speed: 80
    homing_retract_dist: 4.0
    second_homing_speed: 25

    step_pin: PB5
    dir_pin: !PB4
    enable_pin: !PB8
    microsteps: 32
    rotation_distance: 8
    endstop_pin: !PA11
    position_endstop: 0
    position_max: 340
    homing_speed: 8
    homing_retract_dist: 3.0
    second_homing_speed: 2

    step_pin: PA6
    dir_pin: !PA1
    enable_pin: !PA3
    microsteps: 32
    rotation_distance: 8

    step_pin: PD6
    dir_pin: !PD3
    enable_pin: !PB3
    microsteps: 32
    heater_pin: PC3
    sensor_type: EPCOS 100K B57560G104F # Stock
    sensor_pin: PC1
    min_temp: 0
    max_temp: 260
    control: pid
    pid_Kp: 17.48
    pid_Ki: 1.32
    pid_Kd: 57.81
    filament_diameter: 1.750
    nozzle_diameter: 0.400
    gear_ratio: 50:17
    rotation_distance: 22.3
    pressure_advance = 0.09

    heater_pin: PA0
    sensor_type: EPCOS 100K B57560G104F # Stock
    sensor_pin: PC0
    control: pid
    pid_Kp: 325.10
    pid_Ki: 63.35
    pid_Kd: 417.10
    min_temp: 0
    max_temp: 130

    pin: PB1

    serial: /dev/ttyUSB0
    restart_method: command

    kinematics: corexy
    max_velocity: 300
    max_accel: 5000
    max_z_velocity: 50
    max_z_accel: 200

    shaper_freq_x: 47.34
    shaper_freq_y: 62.11
    shaper_type: mzv

    path: ~/gcode_files


    [gcode_macro PAUSE]
    rename_existing: BASE_PAUSE
    default_parameter_X: 5 #edit to your park position
    default_parameter_Y: 5 #edit to your park position
    default_parameter_Z: 10 #edit to your park position
    default_parameter_E: 0.5 #edit to your retract length
    G1 E-{E} F2100
    G1 Z{Z}
    G1 X{X} Y{Y} F6000

    [gcode_macro RESUME]
    rename_existing: BASE_RESUME
    default_parameter_E: 0.5 #edit to your retract length
    G1 E{E} F2100

    [gcode_macro CANCEL_PRINT]
    rename_existing: BASE_CANCEL_PRINT

    screw1: 35,35
    screw2: 265,35
    screw3: 265,265
    screw4: 35,265

    [gcode_macro testLEVEL]

    [gcode_macro testNEXTPOINT]

    [gcode_macro testACCEPT]

    [static_digital_output reset_display]
    pins: !PC6, !PD13

    1. I’ve been trying to get Klipper loaded on my SP-5 for a few days now and I think I’m almost there. I’m getting the following error in the Mainsail interface:
      mcu ‘mcu’: Unable to connect
      Once the underlying issue is corrected, use the
      “FIRMWARE_RESTART” command to reset the firmware, reload the
      config, and restart the host software.
      Error configuring printer

      I’m guessing that the physical connection between the RPi4 and the MB is not correct. But I can’t find any details about how to connect the two. I’ve just been using a USB cable, but is this not correct?

  4. Will support for the LCD ever be added? Saw some GitHub issue threads but not sure if the LCD is/will ever be supported.

  5. Hi, I went through this a couple of time, but then I have to boot firmware on a printer it just loads previous firmware I already had. Any thoughts?

  6. Hello,

    I also wanted to flash Klipper on my Plus. I did everything according to your instructions and also renamed the file on the sd card to Robin_nano35.bin.

    TFT Updateing at 100% after a reboot, stands at the TFT Booting… However, I can not connect the printer to Mainsail. I changed in the config the Serial Port to:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 but no connection. Can you help me, please ?

    1. There was a change in kipper on how the serial number is assigned. Make sure you have the right port from the command line.

  7. Thaks for the guide. I have the version with dual endstops but I don’t use them, I’m using the probe as endstop. Can I still use your configuration? What changes do I need to make?

      1. a possible solution: disconnecting one endstop (z-max?) and connect the z-motors in parallel to one z-motor stepper. On my Anet A8 this is wired in this way standard. I have not done this myself, to be clear. Had my Plus for a day and already clogged the hot-end completely an eventually have broken of the heatbreak. The hot-end is really the worst “quality” part of this printer.

        1. I added this to my config file and it worked for me.

          step_pin: PA6
          dir_pin: PA1
          enable_pin: !PA3
          microsteps: 16
          rotation_distance: 8
          endstop_pin: !PC4

Leave a Reply

Your email address will not be published.