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

1. Overview and Preparation

1

Wiring Diagram & Drawing

Step 1 of 7 in this section

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

drawing.jpg
wiring_V1.3.jpg
2

Pin Assignment & Extension Port

Step 2 of 7 in this section

Note the DIAG pins which can be used for sensorless homing.

1 image(s) - Click to view

Step Images

extensionport.jpg
pin_assignment.jpg

Referenced by step 1

3

Voltage Selection - Remove All Jumpers

Step 3 of 7 in this section

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

voltageselection_V1.3.jpg
5

Raspberry Pi Mounting

Step 4 of 7 in this section

Mount the Raspberry Pi using the included stand-offs. Additional mounting holes are for smaller boards such as the Raspberry Pi Zero 2W.

1 image(s) - Click to view

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

1 image(s) - Click to view

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

1 image(s) - Click to view

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

rpimounting.jpg

Referenced by step 1

rpi5_installed_V1.3.jpg

Referenced by step 3

rpi4_installed_V1.3.jpg

Referenced by step 4

rpi4_usb_installed_labels_V1.3.jpg
8

Required Raspberry Pi software

Step 5 of 7 in this section

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)

SQL
1ssh pi@<ip address>

Bug Fix for Raspberry Pi OS Bullseye - /dev/serial/by-id/ is broken

TEXT
1apt show udev

If the version shows as 247.3-7+deb11u2 or 247.3-7+rpi1+deb11u2 Apply this fix:

TEXT
1sudo wget -O /usr/lib/udev/rules.d/60-serial.rules https://raw.githubusercontent.com/systemd/systemd/main/rules.d/60-serial.rules
TEXT
1sudo reboot
14

Host Configuration - CANBus

Step 6 of 7 in this section

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

TEXT
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

TEXT
1sudo systemctl restart networking
17

Host Configuration - UART Interface

Step 7 of 7 in this section

Configuration for UART Only

Edit /boot/cmdline.txt

TEXT
1sudo nano /boot/cmdline.txt

and delete

TEXT
1console=serial0,115200

Press CTRL-O and hit Enter and Press CTRL-X

Edit /boot/config.txt

TEXT
1sudo nano /boot/config.txt

and add the following to the end of the file

TEXT
1dtoverlay=disable-bt

Press CTRL-O and hit Enter Press CTRL-X

Reboot the Raspberry Pi

TEXT
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.

4

Enable Device Firmware Upgrade (DFU) Mode to prepare for flashing the bootloader

Step 1 of 6 in this section

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.

1 image(s) - Click to view

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.

1 image(s) - Click to view

Verify the board is in DFU mode

TEXT
1lsusb

the output should show a USB device with

TEXT
1Bus 001 Device 006: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
1 image(s) - Click to view

Step Images

rpi4_usb_installed_V1.3.jpg

Referenced by step 2

frontsw1sw2_V1.3.jpg

Referenced by step 5

lsusb.jpg

Referenced by step 6

6

Install Klipper

Step 2 of 6 in this section

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

1 image(s) - Click to view

Stop the Klipper system service if it was previously started

TEXT
1sudo systemctl stop klipper

Step Images

KIAUH1.png

Referenced by step 1

7

Install Katapult

Step 3 of 6 in this section

For full documentation visit https://github.com/Arksine/katapult

Install Git, if it's not already installed

BASH
1sudo apt update && sudo apt install git -y

Download Katapult

TEXT
1cd ~ && git clone https://github.com/Arksine/katapult

Create a Virtual Python Envionment for Katapult with pyserial

TEXT
1virtualenv -p python3 ~/katapult-env ~/katapult-env/bin/pip3 install pyserial greenlet cffi python-can aenum
9

Settings for USB or CAN Interface & Building the Bootloader

Step 4 of 6 in this section

The bootloader will use USB as the interface for both USB or CANBus Klipper configurations

TEXT
1cd ~/katapult make menuconfig

Copy the settings as shown in the screenshot.The important setttings are:

TEXT
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
1 image(s) - Click to view

Press Q to quit Press Y to Save Configuration

Build the bootloader

TEXT
1make

the output of a successful build should end with

TEXT
1Linking out/katapult.elf Creating bin file out/katapult.bin Creating legacy binary out/canboot.bin

Step Images

lsusbkatapult_V1.3.png
katapult_usb_V1.3.jpg

Referenced by step 3

10

Settings for UART Interface & Building the Bootloader

Step 5 of 6 in this section

Configuration for UART

TEXT
1cd ~/katapult make menuconfig

Copy the settings as shown in the screenshot.The important setttings are:

TEXT
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
1 image(s) - Click to view

Press Q to quit Press Y to Save Configuration

Build the bootloader

TEXT
1make

the output of a successful build should end with

TEXT
1Linking out/katapult.elf Creating bin file out/katapult.bin Creating legacy binary out/canboot.bin

Step Images

katapult_uart_V1.3.png

Referenced by step 3

13

Flash Katapult on to Leviathan

Step 6 of 6 in this section

Flash board with Katapult bootloader

TEXT
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

TEXT
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

TEXT
1lsusb

the output should show the USB device

TEXT
1Bus 001 Device 007: ID 1d50:6177 OpenMoko, Inc. stm32H743xx

and

TEXT
1ls /dev/serial/by-id/*

the output should show katapult in the device name similiar to

TEXT
1/dev/serial/by-id/usb-katapult_stm32H743xx_<unique id>
1 image(s) - Click to view

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

1 image(s) - Click to view

For UART The USB cable can now be removed from the RPi to the Leviathan

Step Images

lsusbkatapult_V1.3.jpg

Referenced by step 2

bootloader_led_V1.3.jpg

Referenced by step 3

3. Klipper Firmware Installation

11

Configure and Build Klipper - USB/CAN Interface

Step 1 of 4 in this section

Configuration for USB and CAN - Follow the respective step as indicated

TEXT
1cd ~/klipper make menuconfig

For USB Interface Copy the settings as shown in the screenshot.The important setttings are:

TEXT
1Microcontroller Architecture: STMicroelectronics STM32 Processor model: STM32H743 Bootloader offset 128KiB bootloader Clock Reference: 25 MHz crystal Communication interface: USB (on PA11/PA12)
1 image(s) - Click to view

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:

TEXT
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)
1 image(s) - Click to view

Press Q to quit Press Y to Save Configuration

Build the firmware

TEXT
1make

the output of a successful build should end with

TEXT
1Creating hex file out/klipper.bin

Step Images

klipper_usb_V1.3.jpg

Referenced by step 3

klipper_can_V1.3.jpg

Referenced by step 4

12

Flashing Klipper - USB/CAN Interface

Step 2 of 4 in this section

Configuration for USB and CAN - Follow the respective step as indicated

Verify the bootloader active (the bootloader status LED should be blinking)

TEXT
1ls /dev/serial/by-id/*

the output should have katapult in the service device name

TEXT
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

1 image(s) - Click to view

Flash board with Klipper firmware

TEXT
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

TEXT
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

TEXT
1Verification Complete: SHA = <unique id> Flash Success
1 image(s) - Click to view

For USB Interface Verify the Klipper flashed succesfully

TEXT
1ls /dev/serial/by-id/*

the output should show Klipper in the device name similiar to

TEXT
1/dev/serial/by-id/usb-Klipper_stm32H743xx_<unique id>

For CAN Interface Verify the Klipper flashed succesfully

TEXT
1~/katapult-env/bin/python3 ~/klipper/scripts/canbus_query.py can0

the output should show the USB device

TEXT
1Found canbus_uuid=<unique id>, Application: Klipper Total 1 uuids found

The Bootloader Status LED should now be off, if the flashing was successful.

1 image(s) - Click to view

Step Images

lsusbklipper_V1.3.png

Referenced by step 2

katapult_klipper_flash_V1.3.png

Referenced by step 3

bootloader_led_V1.3.jpg

Referenced by step 6

23

Configure and Build Klipper - UART Interface

Step 3 of 4 in this section

Configuration for UART

TEXT
1cd ~/klipper make menuconfig

Copy the settings as shown in the screenshot.The important setttings are:

TEXT
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
1 image(s) - Click to view

Press Q to quit Press Y to Save Configuration

Build the firmware

TEXT
1make

the output of a successful build should end with

TEXT
1Creating hex file out/klipper.bin

Step Images

klipper_uart_V1.3.jpg

Referenced by step 3

24

Flashing Klipper - UART Interface

Step 4 of 4 in this section

Configuration for UART

Flash board with Klipper firmware (press SW1 twice quickly if the flash does not start immediately)

TEXT
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

TEXT
1Verification Complete: SHA = <unique id> Flash Success
1 image(s) - Click to view

The Bootloader Status LED should now be off, if the flashing was successful.

Step Images

bootloader_led_V1.3.jpg
katapult_klipper_flash_UART_V1.3.jpg

Referenced by step 2

5. Kilipper Firmware Testing

18

Validate the Interface

Step 1 of 1 in this section

For USB Interface Enter the command

TEXT
1ls /dev/serial/by-id/*

the output should look similiar to

TEXT
1/dev/serial/by-id/<unique id>

Replace in the next command with the output from the previous command

TEXT
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

TEXT
1~/katapult-env/bin/python3 ~/klipper/scripts/canbus_query.py can0

the output should look similiar to

TEXT
1Found canbus_uuid=<unique id>, Application: Klipper Total 1 uuids found

Replace in the following command with the from the previous command.

TEXT
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

TEXT
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

klipper_mcu_test.jpg

6. Credit

19

Message from JNP

Step 1 of 1 in this section

Step Images

credits.png

7. Additional Information

20

Stepper Driver Resistor Values

Step 1 of 3 in this section
TEXT
1TMC5160 resistor value is 0.075Ω TMC2209 resistor value is 0.11Ω
21

We have provided sample configurations for Voron V2.4 and Trident on our GitHub

Step 2 of 3 in this section

https://github.com/MotorDynamicsLab/Leviathan/tree/master/Klipper_config

22

For additional help with CANBUS setups and troubleshooting

Step 3 of 3 in this section

https://canbus.esoterical.online/