Prusa Black Friday is here! Free shipping, printer discounts, amazing gifts & more! See all deals!

Ender 3 MKS Pi/Pi 3B/Pi 3B+ Mount + Tips on Installing Klipper

A very simple mount for the MKS Pi - designed to fit an Ender 3 (non-Pro, 2018 model) w/ an SKR Mini E3 v3.
7
33
1
1365
updated October 10, 2023

Description

PDF

BOM and instructions related to using and installing this model to your printer are a bit buried, scroll down a bit if you just want to get to that.

15/09/2023: Check out my BTT  U2C v2.1 enclosure for the Ender 3: https://www.printables.com/model/578668-ender-3-btt-u2c-v21-enclosuremount

27/06/2023: Added a 6 mm tall “slim” version - same as the original version, just 6 mm thinner. Adding linear rails to the Y axis reduces the clearance even further, so I had to make it thinner in order for the Y carriage to clear the assembly. The wiring is a bit tight, I would recommend going with the original version unless you absolutely need those extra 6 mm of clearance like I did. 

04/06/2023: Completely unrelated to the model, but in the interest of saving you time and a lot of frustration: DON'T use the OS images provided by MKS. I spent days trying to get everything to work properly, and -simply put- they are a disaster. 

Instead, download an Arbmian OS image from here:

https://github.com/redrathnure/armbian-mkspi

And follow these instructions to get you up and running:

A note about using the eMMC module:

The module comes pre-flashed with one of the aforementioned images that MKS provides in their Google Drive folder. You can go ahead and use the Pi with the image supplied in the eMMCas is and if after using it for a while and if you see nothing wrong with using it as is, then great! You've just saved yourself a lot of trouble. 

For anyone else, I must warn you that if you want to flash any image to the eMMC, you will need a computer that's running Linux, at least in my experience.

Windows will falsely detect the module as a 2 TB removable drive and that will cause any attempt to flash a bootable image with either balena etcher or Rufus (or most other “burn image to create a bootable USB program” programs that I tried in desperation) to the module to fail.

Also, the eMMC module won't work unless your computer has a SD card reader built-in. Using the included micro SD adapter + a micro SD to SD card adapter + a USB  SD card reader won't work in my experience. There was also a review or two on Aliexpress claiming the same thing, so I believe it could be more widespread rather than just a skill issue on my part.

Using balena etcher on Linux, the correct size should be detected (approx. 8 GB) and the subsequent flash should be successful. You can then proceed with the rest of the instructions on setting up Klipper.

Connecting to the Pi via Ethernet:

  • Power everything up and connect to the Pi with PuTTY (https://www.putty.org/). You can get the Pi's IP address either through your router's web UI or by using some LAN IP scanner. 

Connecting to the Pi via USB/Serial:

  • If you're trying to connect via serial and you've connected the Pi to your computer through its USB-C port, you can get the Pi's COM port through Device Manager - the appropriate baud rate I believe is 1500000.

Continuing with the install:

  • Once PuTTY establishes a connection to the Pi, you'll be prompted to log in. The default credentials are “root” and the default password is “1234”.
  • Follow the rest of the instructions as they appear on your screen - it will take you a minute or two to get everything set up. If you have your USB WiFi adapter plugged into the Pi, you'll also be prompted to connect to your WLAN.
  • Once done, install KIUAH (follow the instructions here: https://github.com/th33xitus/kiauh) and then you should be able to easily install Klipper and the rest of the works.

Adding support for the ADXL345 (SPI):

As per Klipper's documentation (https://www.klipper3d.org/Measuring_Resonances.html & https://www.klipper3d.org/RPi_microcontroller.html?h=rpi#rpi-microcontroller), we'll have to run a few commands to install and set up a few things in order to be able to use our ADXL345 accelerometer via the Pi's SPI interface.

sudo apt update
sudo apt install python3-numpy python3-matplotlib libatlas-base-dev

This just installs a Python library that we'll be using later on.

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

This will install NumPy in the Klipper enviroment.

cd ~/klipper/
sudo cp ./scripts/klipper-mcu.service /etc/systemd/system/
sudo systemctl enable klipper-mcu.service

These commands will allow us to use the pins necessary to connect the ADXL345 to the Pi. While you're still at the Klipper directory, you'll also have to run the following command:

make menuconfig

Once that grey window pops up, all you have to do is navigate to “Micro-Controller Architecture” and then select “Linux Process”. Then you can exit the window and save all changes made.

Finally, run the following set of commands:

sudo service klipper stop
make flash
sudo service klipper start

All that's left to do is add the following lines to your printer.cfg file:

[mcu rpi]  
serial: /tmp/klipper_host_mcu  

[adxl345]  
cs_pin: rpi:None  
spi_bus: spidev0.2

You should then be able to start measuring resonances for your X and Y axis by following the relevant instructions in Klipper's documentation: https://www.klipper3d.org/Measuring_Resonances.html#measuring-the-resonances_1

Setting a custom hostname for your Pi:

  • To change your Pi's hostname,  SSH to the Pi and type “nmtui” in the terminal. Then, navigate to “Set system hostname” and press enter. Type in your desired hostname (I personally use http://fluiddpi.local/) and save your changes while exiting.
  • In order for the hostname you've just entered to resolve when you type it in your browser, you need to install the avahi daemon by entering the following command to the terminal:
sudo apt-get install avahi-daemon
  • Enter the hostname you've just set (or the Pi's IP address) to your browser's address bar and you should be greeted with whichever web UI you've installed in the previous steps.

25/05/2023: Added some photos to illustrate how I have the main board and the Pi connected via UART + the ADXL345 accelerometer to the Pi, for your reference.

A very simple mount for the MKS Pi designed for my 2018 Ender 3 that has been retrofitted with an SKR Mini E3 v3.

It's essentially a large spacer that goes between the top cover and the rest of the electronics enclosure. Using a few M3 threaded inserts and a couple of M3 bolts, the MKS Pi mounts on the bottom of the top cover, which is then bolted onto the printer same as before.

In my case, the MKS Pi is directly powered from the printer's PSU 24V rail and is then connected via UART to the main board.

Bill of Materials (BOM):

  • M3 Heat-Set Threaded Inserts (OD: 4 mm/L: 5.3 mm): 4 pcs
  • M3 x 6 mm Bolts: 4 pcs
  • M3 x 18 or 20 mm Bolts: 2 pcs
  • M3 x 30 mm: 1 pcs

Assembly:

  1. Print the part (PETG recommended).
  2. Using a soldering iron, insert the 4 threaded inserts into the appropriate holes.
  3. Mount the MKS Pi onto the mount using 4 M3 x 6 mm bolts.
  4. (Optional) While you're at it, you may also want to replace the crappy, prone-to-stripping screws that hold the printer's main board in place. Three or four M3 x 4 mm bolts should do the trick.
  5. Secure the top cover assembly onto the printer with three M3 x 20 mm bolts, same way as before.

Test that there is no interference between the Y-axis and the enclosure before turning on the printer by moving the Y-axis through its full motion range by hand.

I would also recommend that you clean up your wiring before proceeding with this modification to your printer and that you double-check that there is no interference between your main board and the MCU that you are installing. There shouldn't be any exposed metallic parts (e.g. the housing of the Ethernet or USB ports) touching ANY part of your printer's main board. The design leaves plenty of room between the two boards, but it never hurts to look at things for a second time.

This hasn't been tested with any other main board/MCU combination - in any case, apply some common sense and use at your own risk.

Thermals:

  • MCU average temperature is ~25-30 °C
  • Rockchip (Pi CPU) average temperature is ~50-60 °C (when the electronics fan is on it usually stays near 50 °C)
  • Both of these are with an ambient temperature of approximately 25 °C

If anything blows up on my printer, I'll be sure add an update :)

Limitations: 

  • This design leaves very little room between the electronics enclosure and the Y-axis POM wheels (approximately a millimeter or two). This is done to maximize the distance between the MKS Pi and the printer's main board, in order to minimize the possibility of any short circuit between the two boards. As a result, any fan cover/shroud you may have added for the electronics fan will need to be removed.
  • You'll have absolutely no access to any of the Pi's ports with everything assembled and in place. However, a small USB Wi-Fi dongle (like in my case) should easily fit even when it's all said and done.

.step file also included for anyone interested.

Tags



Model origin

The author marked this model as their own original creation.

License


Highlighted models from creator

View more