Forskjell mellom versjoner av «Installing Klipper on Prusa i3 mk3»
(→Installation) |
(→About OrcaSlicer) |
||
| (5 mellomliggende revisjoner av samme bruker vises ikke) | |||
| Linje 20: | Linje 20: | ||
** sudo sed -i 's/oldname/newname/g' /etc/hosts | ** sudo sed -i 's/oldname/newname/g' /etc/hosts | ||
** sudo cloud-init clean | ** sudo cloud-init clean | ||
| − | |||
| − | |||
* Open /boot/firmware/config.txt in some editor and look for '''[pi0]'''. Under that, you should find '''gpu_mem=128'''. Since a π zero 2 W only has 512MB RAM, giving it 128MB for a GPU that'll be sleeping happily, isn't a good idea and will effectively crash the system during an automatic update (beleive me on that!). So change this to 32 and give it a reboot to regain that memory. If you're curious, type 'free -h' before and after rebooting to see the status. | * Open /boot/firmware/config.txt in some editor and look for '''[pi0]'''. Under that, you should find '''gpu_mem=128'''. Since a π zero 2 W only has 512MB RAM, giving it 128MB for a GPU that'll be sleeping happily, isn't a good idea and will effectively crash the system during an automatic update (beleive me on that!). So change this to 32 and give it a reboot to regain that memory. If you're curious, type 'free -h' before and after rebooting to see the status. | ||
| Linje 29: | Linje 27: | ||
** sudo apt-get autoremove | ** sudo apt-get autoremove | ||
** sudo reboot | ** sudo reboot | ||
| + | |||
| + | When all is up and running again: | ||
| + | * Connect the USB cable on the π to the Prusa controller with a SUB Micro-B ->> USB Standard-B. | ||
| + | * Login to the π and | ||
| + | ** cd klipper | ||
| + | ** make menuconfig | ||
| + | ** Choose "Enable extra low-level configuration options" | ||
| + | ** Choose "UART1" | ||
| + | ** Save and exit | ||
| + | ** Run "make flash FLASH_DEVICE=/dev/serial/whatever" | ||
| + | |||
| + | ''It also should be possible to flash the printer directly through the serial interface on the GPIO pins, those that connect directly to the RAMBo board, but I haven't tried it, since this is discouraged.'' | ||
| + | |||
| + | == Setup OrcaSlicer == | ||
| + | |||
| + | You an use any slicer you want, but I've focused on OrcaSlicer in this document, since it's probably the best open source slicer that exists at this time of writing. | ||
| + | |||
| + | === About OrcaSlicer === | ||
| + | * It all started with Slic3r back in 2018, perhaps the best slicer at the time. It was licensed under AGPL. | ||
| + | * Prusa took the code and made their own, [https://www.prusa3d.com/p/prusaslicer/ PrusaSlicer], also released under AGPL, which gained a lot of popularity, competing heavily with Cura and Simplify3D. | ||
| + | * Bambu took the code and wrote Bambu Studio, based on this. However, they initially said it was all made in-house. People quickly found this was indeed not the case and Bambu said they always wanted to release the code anyway, just wait until it was finished. They released the code, but kept the code for the connector used with cloud and printers, [https://blogg.karlsbakk.net/2024/05/24/more-on-bambus-license-issues/ breaking the AGPL license on the way]. | ||
| + | * It didn't take long before a new fork arrived, which was eventually named [https://www.orcaslicer.com/ OrcaSlicer] | ||
| + | |||
| + | === Setting up OrcaSlicer with MainsailOS === | ||
| + | |||
| + | ==== The simple way ==== | ||
| + | |||
| + | Last ned [https://raw.githubusercontent.com/rkarlsba/ymse/refs/heads/master/3d/Klipperized-Prusa-i3-mk3s/Klippperized%20Prusa%20i3%20mk3s.json profilen] og importer den i OrcaSlicer | ||
| + | |||
| + | ==== If you really need full control over everything and can't stand others missing out critical details ==== | ||
| + | |||
| + | Below, I''ve used "firefly" as my printer name. You may keep this if you like it, for all your printers, even, but it *will* make a mess. | ||
| + | |||
| + | * Open OrcaSlicer and add Select/Remove printers in the printer menu at the top left | ||
| + | * Wait till it'll chewed through everything and choose Klipper | ||
| + | * You now have a Generic Klipper Printer, click Edit | ||
| + | * Set printable area to 250 x 210mm | ||
| + | * Set height to 210mm | ||
| + | * Choose machine start g-code and remove what's there and add | ||
| + | ** '''PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]''' | ||
| + | * Choose Multimaterial and turn off '''Single Extruder Multi Material''' | ||
| + | * Click the floppydisk to save (obviously) | ||
| + | * Klick the radiation symble to the right of "Printer". This is to administer dangerous radiation. | ||
| + | ** Change the name to something familiar. My old printer was called Firefly, so I named this Firefly-klipper. | ||
| + | ** Host type: Octo/Klipper | ||
| + | ** Printer Agent: Moonraker | ||
| + | ** Hostname, IP or URL: firefly.local | ||
| + | ** Click '''Test'''. It should work. If it doesn't, ask a grown-up for help. | ||
| + | |||
| + | == Problems, issues and bad language == | ||
| + | '''This HOWTO was written before I ran into issues with using the π 2 zero w for this. It didn't really work at all, except for perhaps an hour or two. After a few reboots, it lost its network and never regained it. This is possibly because of a power issue, memory card getting corrupted etc, but having it fail the exact same place as to drop the wifi connection for 5-10 different installations, on different boards and sd cards, the statistics don't agree there. I haven't concluded on this yet, more testing is needed.''' | ||
| + | |||
| + | [mailto:roy@karlsbakk.net roy] | ||
Nåværende revisjon fra 24. sep. 2026 kl. 13:02
Innhold
Installation of the π and printer
Introduction
The Prusa i3 mk3 series originally runs Prusa's own firmware, which is based on Marlin. Marlin works well, but it's a small and by today's standards, old microcontroller in the mk3 (and earlier) are Atmega controllers. In the mk3(s), it's an ATmega2560, the same chip used in the Arduino Mega 2560. Asking such a small thing to do all the heavy lifting, is unfair!
Klipper architecture
Where Marlin is a monolithic build, Klipper is built on a two-level model where the tiny microcontroller in the printer is used for the realtime jobs, but only those. Then another, much larger and several hundred (or thousand) times more power than the tiny microcontroller. We're obviously talking about a Raspberry pi or similar SBC. In this article, I'll focus on the π. According to my and others testing, one should see a performance gain of about 50-100% with such an upgrade.
Installation
The installation is rather straight forward:
- Our current solution uses a Raspberry Pi Zero W with Octoprint, chosen since it fits neatly behind a cover on the Prusa RAMBo controller. This has a single core clocked at 700MHz and 512MB RAM. This is probably just enough, but may be a bit low if you want to do some video streaming on top of the printing. We chose to switch to a Raspberry Pi Zero 2 W after a a member came by with some. It's way faster CPU-wise, but still only has 512MB RAM. Low, but it'll probably do.
- Grab an SD card of 16GB or more (64 is nice) and install MainsailOS. It's readily available in the Raspberry Pi Imager. Choose the Raspbery pi you're using from the menus, choose "Other specific-purpose OS", "3D printing" and then "Mainsail OS". Choose the card, accept, fill out everything, accept, blabla, you're done.
- Start the π from the SD card and login. If you have chosen a temporary hostname (like klippertest42), you'll need to reset cloud-init. If you're on a pi zero, you really, really should reduce the amount of memory reserved for the GPU, since it's a lot.
- To change the hostname:
- sudo hostnamectl set-hostname newname
- sudo sed -i 's/oldname/newname/g' /etc/hosts
- sudo cloud-init clean
- Open /boot/firmware/config.txt in some editor and look for [pi0]. Under that, you should find gpu_mem=128. Since a π zero 2 W only has 512MB RAM, giving it 128MB for a GPU that'll be sleeping happily, isn't a good idea and will effectively crash the system during an automatic update (beleive me on that!). So change this to 32 and give it a reboot to regain that memory. If you're curious, type 'free -h' before and after rebooting to see the status.
- IMPORTANT: Run a full upgrade of everything. This needs to be allowed to run uninterrupted before you continue!
- sudo apt-get -y update
- sudo apt-get -y dist-upgrade
- sudo apt-get autoremove
- sudo reboot
When all is up and running again:
- Connect the USB cable on the π to the Prusa controller with a SUB Micro-B ->> USB Standard-B.
- Login to the π and
- cd klipper
- make menuconfig
- Choose "Enable extra low-level configuration options"
- Choose "UART1"
- Save and exit
- Run "make flash FLASH_DEVICE=/dev/serial/whatever"
It also should be possible to flash the printer directly through the serial interface on the GPIO pins, those that connect directly to the RAMBo board, but I haven't tried it, since this is discouraged.
Setup OrcaSlicer
You an use any slicer you want, but I've focused on OrcaSlicer in this document, since it's probably the best open source slicer that exists at this time of writing.
About OrcaSlicer
- It all started with Slic3r back in 2018, perhaps the best slicer at the time. It was licensed under AGPL.
- Prusa took the code and made their own, PrusaSlicer, also released under AGPL, which gained a lot of popularity, competing heavily with Cura and Simplify3D.
- Bambu took the code and wrote Bambu Studio, based on this. However, they initially said it was all made in-house. People quickly found this was indeed not the case and Bambu said they always wanted to release the code anyway, just wait until it was finished. They released the code, but kept the code for the connector used with cloud and printers, breaking the AGPL license on the way.
- It didn't take long before a new fork arrived, which was eventually named OrcaSlicer
Setting up OrcaSlicer with MainsailOS
The simple way
Last ned profilen og importer den i OrcaSlicer
If you really need full control over everything and can't stand others missing out critical details
Below, Ive used "firefly" as my printer name. You may keep this if you like it, for all your printers, even, but it *will* make a mess.
- Open OrcaSlicer and add Select/Remove printers in the printer menu at the top left
- Wait till it'll chewed through everything and choose Klipper
- You now have a Generic Klipper Printer, click Edit
- Set printable area to 250 x 210mm
- Set height to 210mm
- Choose machine start g-code and remove what's there and add
- PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]
- Choose Multimaterial and turn off Single Extruder Multi Material
- Click the floppydisk to save (obviously)
- Klick the radiation symble to the right of "Printer". This is to administer dangerous radiation.
- Change the name to something familiar. My old printer was called Firefly, so I named this Firefly-klipper.
- Host type: Octo/Klipper
- Printer Agent: Moonraker
- Hostname, IP or URL: firefly.local
- Click Test. It should work. If it doesn't, ask a grown-up for help.
Problems, issues and bad language
This HOWTO was written before I ran into issues with using the π 2 zero w for this. It didn't really work at all, except for perhaps an hour or two. After a few reboots, it lost its network and never regained it. This is possibly because of a power issue, memory card getting corrupted etc, but having it fail the exact same place as to drop the wifi connection for 5-10 different installations, on different boards and sd cards, the statistics don't agree there. I haven't concluded on this yet, more testing is needed.