VORON Leviathan V1.3
This guide will walk you through common firmware configurations for your 3D printers. Leviathan boards ship out already flashed with USB firmware. Run ls /dev/serial/by-id/* to confirn you have a klipper ID. If you need to update firmware or use other ways of connection, there are two major steps covered in this guide that will need to be completed in order: Flashing the Leviatan with the Katapult Bootloader The USB interface should be used for the Katapult bootloader for both USB or CAN Klipper configuration. The UART interface should be used for the Katapult bootloader for UART Klipper configuration. Flashing the Leviatan with the Klipper Firmware USB interface is the recommended configuration for most situations. CAN interface is supported, if you are using CANBus UART interface can be used when USB ports aren't available such as with Raspberry Pi Zero 2W. This are the recommended configurations however Leviathan is very flexible, so not all options are covered by this guide. Important Links: Leviathan GitHub Repo - https://github.com/MotorDynamicsLab/Leviathan
Contents
- 1. Overview and Preparation(7 steps)
- 2. Katapult Bootloader (6 steps)
- 3. Klipper Firmware Installation(4 steps)
- 5. Kilipper Firmware Testing(1 step)
- 6. Credit(1 step)
- 7. Additional Information(3 steps)
1. Overview and Preparation
Wiring Diagram & Drawing
The main board requires 24v power source on the left side. The HV drivers need to be powered separately by 24v or 48v on the right side.
Step Images


Pin Assignment & Extension Port
Note the DIAG pins which can be used for sensorless homing.
Step Images


Referenced by step 1
Voltage Selection - Remove All Jumpers
Remove all of the jumpers used for voltage selection prior to installation. This is a preventative measure to ensure the correct voltage is selected.
When using passive toolhead boards that connect using umblical cables (i.e. 14 pin connectors), check if the 24V supply is shared between the fan, hotend and probe. If so, all shared components MUST be set to 24V. Mixing voltage will permanantly damage the controller and attached components.
It is recommended to re-insert the voltage selection jumpers after the board is configured and installed into the printer. The voltage of the attached components should be verfied and then connected.
Step Images

Raspberry Pi Mounting
Mount the Raspberry Pi using the included stand-offs. Additional mounting holes are for smaller boards such as the Raspberry Pi Zero 2W.
Some ports of the Rasberry Pi may not be usable do to interference with the Leviathan ports. Power for the Raspberry Pi is supplied by the GPIO adapter.
Raspberry 5 Pi Hat Adapter Attach the adapter and wire the RPi the Leviathan as shown. Note: The orientation differs from the Raspberry 3/4 Pi Hat Adapter
Raspberry 3/4 Pi Hat Adapter Attach the adapter and wire the RPi the Leviathan as shown. Note: The orientation differs from the Raspberry 5 Pi Hat Adapter
Be sure to use the correct Raspberry Pi adapter that matches the RPi version. All other images will only show the Raspberry Pi 3/4 version.
Step Images

Referenced by step 1

Referenced by step 3

Referenced by step 4

Required Raspberry Pi software
This guide assumes that the Raspberry Pi (RPi) is already imaged with a Raspberry Pi OS (we recommend Raspberry Pi OS lite (Legacy) Bullseye) or similiar pre-configured images like MainsailOS. If not please refer to https://www.raspberrypi.com/software/
Verify that you can remotely connect to the RPi using SSH Typical command to ssh via a terminal (i.e. command prompt for Windows users, terminal for Mac/Linux users)
1ssh pi@<ip address>
Bug Fix for Raspberry Pi OS Bullseye - /dev/serial/by-id/ is broken
1apt show udev
If the version shows as 247.3-7+deb11u2 or 247.3-7+rpi1+deb11u2 Apply this fix:
1sudo wget -O /usr/lib/udev/rules.d/60-serial.rules https://raw.githubusercontent.com/systemd/systemd/main/rules.d/60-serial.rules
1sudo reboot
Host Configuration - CANBus
Configuration for CAN Only For more detailed information on Klipper CANBus documentation - https://www.klipper3d.org/CANBUS.html
Add CAN host adapter Copy and Paste the entire block
1sudo bash -c 'cat > /etc/network/interfaces.d/can0 << EOF allow-hotplug can0 iface can0 can static bitrate 1000000 up ip link set $IFACE txqueuelen 128 EOF'
Restart the RPi networking
1sudo systemctl restart networking
Host Configuration - UART Interface
Configuration for UART Only
Edit /boot/cmdline.txt
1sudo nano /boot/cmdline.txt
and delete
1console=serial0,115200
Press CTRL-O and hit Enter and Press CTRL-X
Edit /boot/config.txt
1sudo nano /boot/config.txt
and add the following to the end of the file
1dtoverlay=disable-bt
Press CTRL-O and hit Enter Press CTRL-X
Reboot the Raspberry Pi
1sudo reboot
2. Katapult Bootloader
Katapult is the recommend bootloader for the Leviathan. The USB interface should be used for both USB and CAN for the bootloader. After flashing is completed you will be able to activate the bootloader by quickly pressing the SW1 button twice.
Enable Device Firmware Upgrade (DFU) Mode to prepare for flashing the bootloader
DFU or Device Firmware Upgrade mode allows bootloader/firmware to be flashed/loaded onto the Leviathan
The device should be wired as shown and powered on. The USB cable is required for both USB and UART configuration for these steps.
It is highly recommended to have ONLY the Leviathan connected to the RPI during this process. All other USB device should be disconnected.
ssh into the Raspberry Pi
Press BOTH the SW2 and SW1 button as the same time then release SW1 first followed by SW2.
Verify the board is in DFU mode
1lsusb
the output should show a USB device with
1Bus 001 Device 006: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Step Images

Referenced by step 2

Referenced by step 5

Referenced by step 6
Install Klipper
Install Klipper, if it's not already installed using the following options: Using KIAUH (Klipper Installation And Update Helper) - RECOMMENDED or Klipper from GitHub first using the installation guide Klipper installation guide
Stop the Klipper system service if it was previously started
1sudo systemctl stop klipper
Step Images

Referenced by step 1
Install Katapult
For full documentation visit https://github.com/Arksine/katapult
Install Git, if it's not already installed
1sudo apt update && sudo apt install git -y
Download Katapult
1cd ~ && git clone https://github.com/Arksine/katapult
Create a Virtual Python Envionment for Katapult with pyserial
1virtualenv -p python3 ~/katapult-env ~/katapult-env/bin/pip3 install pyserial greenlet cffi python-can aenum
Settings for USB or CAN Interface & Building the Bootloader
The bootloader will use USB as the interface for both USB or CANBus Klipper configurations
1cd ~/katapult make menuconfig
Copy the settings as shown in the screenshot.The important setttings are:
1Microcontroller Architecture: STMicroelectronics STM32 Processor model: STM32H743 Clock Reference: 25 MHz crystal Communication interface: USB (on PA11/PA12) Application start offset: 128KiB offset SELECTED Support bootloader entry on rapid double click of reset button SELECTED Enable Status LED Status LED GPIO Pin: PE1
Press Q to quit Press Y to Save Configuration
Build the bootloader
1make
the output of a successful build should end with
1Linking out/katapult.elf Creating bin file out/katapult.bin Creating legacy binary out/canboot.bin
Step Images


Referenced by step 3
Settings for UART Interface & Building the Bootloader
Configuration for UART
1cd ~/katapult make menuconfig
Copy the settings as shown in the screenshot.The important setttings are:
1Microcontroller Architecture: STMicroelectronics STM32 Processor model: STM32H743 Clock Reference: 25 MHz crystal Communication interface: Serial (on USART1 PA10/PA9) Application start offset: 128KiB offset (250000) Baud rate for serial port SELECTED Support bootloader entry on rapid double click of reset button SELECTED Enable Status LED Status LED GPIO Pin: PE1
Press Q to quit Press Y to Save Configuration
Build the bootloader
1make
the output of a successful build should end with
1Linking out/katapult.elf Creating bin file out/katapult.bin Creating legacy binary out/canboot.bin
Step Images

Referenced by step 3
Flash Katapult on to Leviathan
Flash board with Katapult bootloader
1sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000:mass-erase:force -D out/katapult.bin
the output of a sucessful flash will end with
1File downloaded successfully Resetting USB to switch back to Run-Time mode
For USB Interface Verify the Katapult is flashed succesfully Press the SW1 button on the board then do
1lsusb
the output should show the USB device
1Bus 001 Device 007: ID 1d50:6177 OpenMoko, Inc. stm32H743xx
and
1ls /dev/serial/by-id/*
the output should show katapult in the device name similiar to
1/dev/serial/by-id/usb-katapult_stm32H743xx_<unique id>
For USB or UART Interface Verify the Katapult is flashed succesfully Press the SW1 button on the board Check that the Bootloader Status LED is blinking
For UART The USB cable can now be removed from the RPi to the Leviathan
Step Images

Referenced by step 2

Referenced by step 3
3. Klipper Firmware Installation
Configure and Build Klipper - USB/CAN Interface
Configuration for USB and CAN - Follow the respective step as indicated
1cd ~/klipper make menuconfig
For USB Interface Copy the settings as shown in the screenshot.The important setttings are:
1Microcontroller Architecture: STMicroelectronics STM32 Processor model: STM32H743 Bootloader offset 128KiB bootloader Clock Reference: 25 MHz crystal Communication interface: USB (on PA11/PA12)
For CAN Interface Klipper must be configured as USB to CAN bus bridge. Copy the settings as shown in the screenshot.The important setttings are:
1Microcontroller Architecture: STMicroelectronics STM32 Processor model: STM32H743 Bootloader offset 128KiB bootloader Clock Reference: 25 MHz crystal Communication interface: USB to CAN bus bridge (USB on PA11/PA12) CAN bus interface: CAN bus (on PB5/PB6)
Press Q to quit Press Y to Save Configuration
Build the firmware
1make
the output of a successful build should end with
1Creating hex file out/klipper.bin
Step Images

Referenced by step 3

Referenced by step 4
Flashing Klipper - USB/CAN Interface
Configuration for USB and CAN - Follow the respective step as indicated
Verify the bootloader active (the bootloader status LED should be blinking)
1ls /dev/serial/by-id/*
the output should have katapult in the service device name
1/dev/serial/by-id/usb-katapult_stm32H743xx_<unique id>
if not, press the SW1 button twice quickly to activate the bootloader then verify again with the command above
Flash board with Klipper firmware
1~/katapult-env/bin/python3 ~/katapult/scripts/flashtool.py -d /dev/ttyACM0 -f out/klipper.bin
or use the full device path from the previous step
1~/katapult-env/bin/python3 ~/katapult/scripts/flashtool.py -d /dev/serial/by-id/usb-katapult_stm32H743xx_<unique id> -f out/klipper.bin
the output of a successful flash will end with
1Verification Complete: SHA = <unique id> Flash Success
For USB Interface Verify the Klipper flashed succesfully
1ls /dev/serial/by-id/*
the output should show Klipper in the device name similiar to
1/dev/serial/by-id/usb-Klipper_stm32H743xx_<unique id>
For CAN Interface Verify the Klipper flashed succesfully
1~/katapult-env/bin/python3 ~/klipper/scripts/canbus_query.py can0
the output should show the USB device
1Found canbus_uuid=<unique id>, Application: Klipper Total 1 uuids found
The Bootloader Status LED should now be off, if the flashing was successful.
Step Images

Referenced by step 2

Referenced by step 3

Referenced by step 6
Configure and Build Klipper - UART Interface
Configuration for UART
1cd ~/klipper make menuconfig
Copy the settings as shown in the screenshot.The important setttings are:
1Microcontroller Architecture: STMicroelectronics STM32 Processor model: STM32H743 Bootloader offset 128KiB bootloader Clock Reference: 25 MHz crystal Communication interface: Serial (on USART1 PA10/PA9) (250000) Baud rate for serial port
Press Q to quit Press Y to Save Configuration
Build the firmware
1make
the output of a successful build should end with
1Creating hex file out/klipper.bin
Step Images

Referenced by step 3
Flashing Klipper - UART Interface
Configuration for UART
Flash board with Klipper firmware (press SW1 twice quickly if the flash does not start immediately)
1~/katapult-env/bin/python3 ~/katapult/scripts/flashtool.py -d /dev/ttyAMA0 -b 250000 -f out/klipper.bin
the output of a successful flash will end with
1Verification Complete: SHA = <unique id> Flash Success
The Bootloader Status LED should now be off, if the flashing was successful.
Step Images


Referenced by step 2
5. Kilipper Firmware Testing
Validate the Interface
For USB Interface Enter the command
1ls /dev/serial/by-id/*
the output should look similiar to
1/dev/serial/by-id/<unique id>
Replace in the next command with the output from the previous command
1~/katapult-env/bin/python3 ./klippy/console.py <SERIAL>
Verify the connection is success and the output looks similiar to the screenshot Press CTRL-C to end the connection Copy the from above - This will be needed for your Klipper MCU configuration file
For CANBus Enter the command
1~/katapult-env/bin/python3 ~/klipper/scripts/canbus_query.py can0
the output should look similiar to
1Found canbus_uuid=<unique id>, Application: Klipper Total 1 uuids found
Replace in the following command with the from the previous command.
1~/katapult-env/bin/python3 ./klippy/console.py -c can0 <UUID>
the output should look similiar to screenshot Press CTRL-C to end the connection Copy the from above- This will be needed for your Klipper MCU configuration file
For UART Enter the command
1~/katapult-env/bin/python3 ./klippy/console.py /dev/ttyAMA0
the output should look similiar to screenshot Press CTRL-C to end the connection Copy /dev/ttyAMA0 - This will be needed for your Klipper MCU configuration file
Step Images

6. Credit
Message from JNP
Step Images

7. Additional Information
Stepper Driver Resistor Values
1TMC5160 resistor value is 0.075Ω TMC2209 resistor value is 0.11Ω
We have provided sample configurations for Voron V2.4 and Trident on our GitHub
https://github.com/MotorDynamicsLab/Leviathan/tree/master/Klipper_config
For additional help with CANBUS setups and troubleshooting
https://canbus.esoterical.online/