Ultimaker 2+ and Klipper
by rambos_tabana in Workshop > 3D Printing
3871 Views, 6 Favorites, 0 Comments
Ultimaker 2+ and Klipper
Hey Ultimaker lovers, this is a quick guide how to set up Klipper with Ultimaker 2+. I decided to go with MainsailOS since it includes basically everything you need (Mainsail, Klipper, Moonraker, Crowsnest, etc).
Keep in mind that I'm not professional and I'm quite new with Klipper. I'm still fine tuning settings, macros, timelapse, smart plug etc. so consider it as a work in progress. This guide is made because many Ultimaker owners asked me how to do it. I'm just trying to help, so please do it on your own risk. I had a huge help from lovely redditors BagOfSmashedAnuses and Intelligent_Visit774 to get the extruder fan and LCD working <3
Attached files printer.cfg and macros.cfg are not accepted file formats on instructables, so I added extension .txt to be able to upload.
Just-In-Case warning: Pay attention to your X, Y and Z limits, extruder rotation distance and direction, temperatures, etc. Make sure you do it safe and on your own risk!
In case you want to switch back to Ultimaker Marlin Firmware: try connecting your maching and PC with USB cable and open Cura -> Settings -> Printer -> Manage Printers... -> Select your machine -> Update Firmware. You can try auto upgrade or custom Firmware that you can download from GitHub. If none of that works you can use Arduino IDE to upload that custom firmware.
I also found this guide for Ender, but might be useful, check it out
Let me know if you find mistakes or you need help.
EDIT 17.04.2023.: There was a mistake in printer.cfg file, so I replaced it with correct version
EDIT 14.06.2023.: don't update at all! there is some debian bug that will mess up your serial/by-id and you will have to follow some workarounds until Debian receive update with fix
Supplies
- Ultimaker 2+
- Raspberry pi with PSU and microSD card (I'm using Rpi4 with 2GB ram and official PSU)
- USB-A to USB-B cable
- PC with microSD card reader (I'm using Windows 11)
Install MainsailOS
This part is done with the guide from mainsail web:
- Download and install Raspberry Pi Imager
- Lunch Raspberry Pi Imager and select CHOOSE OS -> Other specific-purpose OS -> 3D printing -> Mainsail OS -> 32-bit
- Click CCHOOSE STORAGE -> select your SD card
- Click gear wheel on the bottom
- set the hostname to ultimaker.local or anything you like
- enable SSH and choose Username and Password
- enter your WIFI credentials (unless you are connected with a LAN cable)
- Click WRITE and wait until it's done
- Safely remove SD card, insert it in Raspberry pi, connect it with the machine using USB cable and power up the system
- Wait a few minutes and access Mainsail from http://ultimaker.local (or check your local IP in your router settings)
- Go to Machine and update all components (don't update at all! there is some debian bug that will mess up your serial/by-id)
#### Additional step after 5. (check this)
WIFI didn't work for me so I had to open SD card again and there is a WiFi-README.txt with explanation how to setup. You have to create txt file (use Notepad++) called wpa_supplicant.conf which should contain your settings:
# Simple configuration for a typical WPA2 network
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US # US Country code
network={
scan_ssid=1
ssid="<Name of your wireless LAN>"
psk="<Password for your wireless LAN>"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
Change your ssid, psk and Country code and then save the file in the /boot partition
Flash Klipper Firmware
This part is done with the guide from klipper web:
- Use Putty to SSH into the Raspberry pi
- Login using username and password from Step 1
- Use next commands:
(this might be unnecessary since we already installed klipper using MainsailOS)
git clone https://github.com/Klipper3d/klipper
./klipper/scripts/install-octopi.sh
Build and flash the micro-controller
cd ~/klipper/
make menuconfig
Use Atmega AVR - atmega2560, press "Q" to exti, and then "Y" to save, then run:
make
Check your serial port with:
ls /dev/serial/by-id/*
It should report something similar to the following:
/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
Use that port name to flash your machine:
sudo service klipper stop
make flash FLASH_DEVICE=/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
sudo service klipper start
Configure Klipper for Ultimaker 2+
- Open Mainsail and go to MACHINE
- Open printer.cfg and replace the content with the one from txt file in attachment
- Modify your [mcu] section with your serial from Step 2
- Click SAVE & RESTART
Downloads
Add Macros and Configure Cura
Add Macros
- Create the text file called macros.cfg and paste the content from the file in attachment
- Go to Mainsail -> MACHINE and upload that file
This file contains 4 macros which will appear in your DASHBOARD:
- [gcode_macro remove_material] will heat up your nozzle and retract the material. Whole length of bowden tube is ~700 mm, but macro will retract 5 mm (slowly) and then 800 mm (at higher speed) to make sure the material is completely removed
- [gcode_macro insert_material] will heat up your nozzle and extrude 650 mm at higher speed and then 100 mm slowly. Filament should start coming out from nozzle before the macro is complete, but you can always manually extrude from DASHBOARD
- [gcode_macro START_PRINT] will do similar movements like stock Ultimaker start code just before print starts
- [gcode_macro END_PRINT] just turns off the heaters and motors when print is done
Configure Cura
- Open Cura and go to Settings -> Printer -> Manage Printers... -> Select your machine -> Machine Settings
- Modify Start G-code:
START_PRINT BED_TEMP={material_bed_temperature_layer_0} EXTRUDER_TEMP={material_print_temperature_layer_0}
3. Modify End G-code:
END_PRINT