Revive your Prusa Mk3s with Klipper 1/5 – Flash Bootloader

Chapter 1/5

Preparation and How to Flash the Bootloader on the Einsy Board

 

This is a series of 5 chapters:

But… Why?

  • Is your Prusa MK3S or MK3S+ collecting dust?
  • Do you have a workhorse, but you want to go the extra mile? (If not, this is not for you!)
  • Feeling that an 8-bit board is not enough? Do the curves of an object no longer appear curved and instead look like semi-straight lines?
  • Are you tired of swapping SD cards? Do you need to control the printer via Wi-Fi?
  • Do you want to tune it and make it go a lot faster?
  • Do you want to eliminate ghosting, artifacts, 602 fix, ADXL, and input shaper?
  • Do you want to improve the reliability and the first layer?”

This series will cover all of these topics in 5 chapters and some bonuses such as: input shaper adxl345, new hotend with ceramic heater core and new galileo 2 extruder.

During this chapter your 3D printer MK3S MUST be completely turned off; make sure you have disconnected it from the electrical outlet.

Take note of your z height that you definied using the baby steps or z calibration.

After you flash the bootloader the printer will look exactly the same. The same firmware. The same statup process and display info. Etc. You won’t even notice that you placed a new bootloader but all your info will be erased. Including: z offset, pei sheets info, etc.

Why do we need to flash the bootloader of the einsy board?

The Einsy boards sold by Prusa have defective firmware on the usb-to-serial chip that makes the boards unusable with Klipper (boards sold by Ultimaker do not have this issue).

Preparation and requirements:

  • Raspberry Pi (any will work but we used a RPI Zero 2w with a OTG cable because we are going to use it later to run klipper on the back of the einsy board)
  • More material might be necessary depending on the method you choose to flash the board.

Method 1: USBASP AVR programmer

Easier method

Unplug the printer from the power plug.

Prepare a raspberry pi and have in hand a USBASP AVR Programmer with the small 10-6 pin adapter (we have both available for sale)

With both the printer completely shut down and the RPI we are going to connect the ribbon cable with the 10-6 pin adapter to the 6 pin header of the board. Check the direction of the ribbon cable just like the pictures below.  Double check!

(Click on the images to expand.)

Power on the RPI and SSH to the Raspberry. Do not power the printer! This entire method should be executed with the printer completely cycled off from the power supply.

sudo apt-get install avrdude gcc-avr make git -y

sudo avrdude -p m32u2 -F -P usb -c usbasp-clone -U flash:r:firmware_backup.hex:i -U eeprom:r:eeprom.hex:i -U lfuse:r:lowfuse:h -U hfuse:r:highfuse:h -U efuse:r:exfuse:h -U lock:r:lockfuse:h

sudo avrdude -p m32u2 -F -P usb -c usbasp-clone -U hfuse:w:0xD1:m

wget https://raw.githubusercontent.com/PrusaOwners/mk3-32u2-firmware/master/hex_files/DFU-hoodserial-combined-PrusaMK3-32u2.hex

sudo avrdude -p m32u2 -F -P usb -c usbasp-clone -U flash:w:DFU-hoodserial-combined-PrusaMK3-32u2.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m

You should see this success message:

Shutdown raspberry
sudo shutdown -r now

Disconnect all cables, USBASP AVR Programmer, USB OTG, etc.

And that’s it!

You can now turn on the printer. It will look exactly the same as before, the prusa firmware is still there, but all the info such as z offset, pei sheets, etc was resetted / erased.

 

Method 2: Pin header

Cheapest method

Using the header pin of the raspberry and 6 dupont male to female cables we are going to connect the RPI directly to the einsy board and flash the new booloader.

Again, unplug the printer from the main plug.

SSH to the RPI and run

sudo apt-get install avrdude gcc-avr make git -y

edit content of avrdude.conf to work with the inbuilt rpi headers

sudo nano /etc/avrdude.conf

and head for the section containing linuxgpio. Edit the block so it looks like this:

programmer
id = "pi_1";
desc = "Use the Linux sysfs interface to bitbang GPIO lines";
type = "linuxgpio";
reset = 12;
sck = 24;
mosi = 23;
miso = 18;
;

Shutdown raspberry. Unplug from power.  Using 6 dupont male to female cables connect the einsy board and the rpi.

Einsy PIN Position Einsy Board Raspberry PIN Description
1 Top left GPIO #18 MISO
2 Top right 5V VCC
3 Middle left GPIO #24 SCK
4 Middle right GPIO #23 MOSI
5 Bottom left GPIO #12 Reset
6 Bottom right GND GND

(image source Rat Rig. Click on the images to expand.)

Backup the actual firmware: sudo avrdude -p m32u2 -F -c pi_1 -U flash:r:firmware_backup.hex:i -U eeprom:r:eeprom.hex:i -U lfuse:r:lowfuse:h -U hfuse:r:highfuse:h -U efuse:r:exfuse:h -U lock:r:lockfuse:h

Place fuse: sudo avrdude -p m32u2 -F -c pi_1 -U hfuse:w:0xD1:m

Download the new firmware: wget https://raw.githubusercontent.com/PrusaOwners/mk3-32u2-firmware/master/hex_files/DFU-hoodserial-combined-PrusaMK3-32u2.hex

Flashing the new firmware: sudo avrdude -p m32u2 -F -c pi_1 -U flash:w:DFU-hoodserial-combined-PrusaMK3-32u2.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m

Shutdown raspberry
sudo shutdown -r now

Disconnect all cables, USBASP AVR Programmer, USB OTG, etc.

And that’s it!

You can now turn on the printer. It will look exactly the same as before, the prusa firmware is still there, but all the info such as z offset, pei sheets, etc was resetted / erased.

 

Method 3: Arduino

A little bit more complicated method


(Click on the images to expand.)

Follow the guide in https://github.com/PrusaOwners/mk3-32u2-firmware

Shopping Cart