Flsun Q5 - Install Klipper and Fluidd

Emanuele
8 min readMar 11, 2022

Intro

The main goal of this tutorial is to install Klipper and Fluidd to the Flsun Q5. Following is a quick comparison between Klipper and Marlin:

Advantages

Configuration is handled automatically, you can also add an accelerometer to the printer head to calculate how much it “shakes” and compensate for that.

Specifically for delta one major advantage is that you can calibrate the end-stop phase: how do you know when the end-stop is triggered? Is triggered always at the same time? If you start a print how do you know that the head will be positioned always in the same place? (delta are not like a cartesian printer that check with eg. a bltouch the height before the print starts)

You can attach a webcam and use an AI to stop automatically the print if something is wrong (eg. “the spaghetti detective”).. Or you can just watch the print from time to time directly from the browser

Disadvantage

Klipper is an advanced firmware, that is not so tricky to install, but it might be difficult for someone that doesn’t know much about Linux and Raspberry Pi. From time to time, you will get errors and you need to troubleshoot them.

Klipper works only with specific displays, unfortunately, the Flsun one is not supported, so it can’t be used. For me is not a bit issue because with Klipper you can access the printer and control it from the browser or your smartphone (also I think it’s easier than the printer display)

With Klipper, you don’t have the “Power-loss Recovery” functionality — but honestly, I don’t know how much you will use it and in the end, the nozzle will ruin the print. If you are scared of that I think that a battery pack would be a better choice.

Why Fluidd and not Mainsail or Octoprint?

Octoprint is a beautiful project, I’ve been using it for a while with Klipper, but it requires a more powerful raspberry, so then you should get an external PSU to power it properly. Also, Octoprint is not tailored for Klipper as Fluidd and Mainsail

Mainsail and Fluidd are very similar, but I found Fluidd a bit more robust. There aren’t too many differences, so you should give them a try and choose your preferred one.

Bill of materials

  • Raspberry Pi Zero 2 W
  • 1x SD card ≥ 8GB
  • 1x SD card, just use the one that comes with the Flsun, size is not important, used for flashing the firmware
  • Dupont wires
  • Soldering iron (only if you want to use the drivers in UART mode)
  • Raspberry Pi mount for Flsun Q5
  • Some ssh client to access the Raspberry Pi (I usually install git for windows or you can enable the new PowerShell feature)

Use drivers in UART mode

This step is optional, but I highly recommend doing that because this will enable advanced features in Klipper. Following the YT video on how to do that:

The steps are very simple:

  • Remove the three TMC2208 from the motherboard
  • For each of them solder together the R8 and UART pin and connect a Dupont wire as shown in the video. Make sure to use 2 male connectors and 1 female
  • Before inserting again the TMC2208 into the motherboard, remove all the jumpers as shown in the official video at 1:12
  • Insert the TCM2208 and leave the Dupont wires disconnected, we will connect them later

Prepare the Raspberry Pi and Fluidd

In Fluidd documentation is well explained on how to prepare the SD card, following a copy and paste and additional step for our use case:

  • Download the latest release
  • Flash the SD card with Balena Etcher
  • Detach and attach the SD card again
  • Configure the WiFi connection by editing fluiddpi-wpa-supplicant.txt on the root of the flashed card when using it as a thumb drive. Important: Do not use WordPad (Windows) or TextEdit (MacOS X) for this, those editors are known to mangle the file, making configuration fail. Use something like Notepad++, Atom, VSCode or Sublime
  • Connect the SD card to the Raspberry Pi, then mount it to the back of the PSU with the 3d printed mount
  • Connect all the Dupont wires as follows:

Raspberry - Printer

GPIO 6 (GND) → BLTOUCH GND
GPIO 4 (5v) → BLTOUCH 5v
GPIO 14 (TX) → WiFi RX-PA10
GPIO 15 (RX) → WiFi TX-PA9

Connect also the TMC2208 to use them in UART mode:

Driver X → WiFi IO1-PC7
Driver Y → PA3
Driver Z1 → WiFi IO0-P13

Following are a couple of pictures:

Wirings

Now is time to power on the printer, fingers crossed we should not see any smoke :)

The first boot always takes a bit of time, so be patient and wait at least 5min.

Then if your computer supports Bonjour you should be able to access the User Interface with the following link: http://fluiddpi.local or http://fluiddpi. If not, you may need to access via it’s IP address, so go to your router web UI and try to find out the IP address, so you should have something like http://192.168.1.XX.

Now it’s time to configure your host:

  • SSH into your Raspberry Pi. The default username and password are pi and raspberry.
  • Run the raspi-config tool; sudo raspi-config
  • Change your Password via System Options -> Password.
  • Change your Timezone via Localization Options -> Timezone.
  • Change your Locale via Localization Options -> Locale.
  • Optionally change your hostname via System Options -> Hostname. Your hostname should be a single word. Fluidd will no longer be available at fluiddpi.local but rather yourhostname.local.
  • Swap ports used by GPIO and Bluetooth: sudo nano /boot/config.txt Move the cursor to the very end and add:
dtoverlay=pi3-miniuart-bt
  • Disable the serial console: sudo nano /boot/cmdline.txt

Look for the following string (text) and delete it

console=serial0,115200
  • Enable Serial: sudo raspi-config . Go to ‘Interfacing Options’ Then I6 — Serial, then a couple of questions will be asked, answer No at the first one and Yes for the second one. Then go down to finish and reboot.

Build Klipper firmware

Time to build the firmware. SSH into the Raspberry and then:

$ cd klipper
$ make menuconfig

Configure as following:

Press “Q” to quit and save.

Then run the command:

$ make
$ ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano.bin

Time to transfer the bin file from the Raspberry Pi to our local machine. You can use tools like WinSCP, or you can use just the scp command from your local machine:

$ scp pi@fluiddpi:~/klipper/out/Robin_nano.bin <YOUR_LOCAL_PATH>

Now we have our bin file:

  • Copy the bin into the root of the second SD card
  • Power off the 3d printer
  • Insert the SD card into the 3d printer motherboard
  • Power on, the printer will start the flashing and the screen will show you the progress. It will be stuck at 100%, which is normal because as I said in the intro the Flsun stock display is not supported
  • SSH into the Raspberry Py and run the command:
$ cd ~/klipper_config; wget https://raw.githubusercontent.com/mrwolfjunior/Flsun-Q5-Klipper/main/printer.cfg
  • Reboot the printer. Access Fluidd web page and everything should work as expected, the Raspberry will handle the communication with the 3d printer motherboard and you will see something similar to the following:
Fluidd screen

Tadaaaaa… Done!

Note1: if you have some error and you are not using the TMC2208 in UART mode, you have to remove from the printer.cfg all the three [tmc2208 stepper_… ] sections

Note2: Klipper team slightly changes the configuration and adds extra parameters from time to time. If you have errors I suggest you check the official config file and add the section related to the tmc2208c+mcu serial to be /dev/ttyAMA0

The remaining part is to do the first configuration with Klipper and you are ready to go. There are plenty of tutorials on the first conf, in particular for the delta printer I highly recommend the Teaching Tech one time at 18:00

A few tips about probing

I’ve tried both the automatic method and the manual one. I don’t know if you have a scientific background in measurement but let me try to simplify: with the automatic method you have to calibrate first the position of the sensor related to the position of the nozzle in the x and y position, then you have to calibrate correctly the difference in the z-axis (usually with the stock Flsun firmware it first probe the bed and then ask you to remove the probe, but the magnet is strong so when you detach it you have to make sure to not apply too much force to not modify the position of the head) and finally you have to create the bed mesh. So you have to do 3 calibrations that can lead to errors.

With the manual method you have to do just one calibration, that’s it, it’s more reliable in my opinion and since the bed is not moving and there aren’t any springs under the bed (like cartesian printers) you can do the calibration time to time (I do it once a month)

Technically speaking the Flsun probe is very good and you have the precision to do an auto-calibration, but I found the manual method more reliable with better results. If I may I would suggest you do a manual calibration and then if you need to improve even more run this sophisticated calibration for the delta printer.

It depends on what you are printing, I usually print mechanical parts, so I always looking for reliability and precision.

Troubleshooting

Warnings after related to the PolKit rules: with the latest update of moonraker it might pop a warning related to the PolKit, you can have a look at the official doc, but the steps are:

cd ~/moonraker/scripts; ./install-moonraker.sh
cd ~/moonraker/scripts; ./set-policykit-rules.sh

Then reboot the printer and the warning should disappear

Credits

I’ve only collected multiple tutorials and resources, a big thanks go to:

--

--

Emanuele

Tech enthusiast, Photographer, 3d printer owner