Hardware

OS Install

Download and install the base Klipper kernel

  1. See [1] for the BTT Pi 1 image
  2. Find the pi on the network and login to pi as root/root

Install Klipper, Moonraker and Mainsail

Install KIAUH (cannot install as root)

sudo apt-get update && sudo apt-get install git -y
cd ~ && git clone https://github.com/dw-0/kiauh.git
./kiauh/kiauh.sh

Follow prompts to install various components

Install Klipper to Octopus

See https://docs.vorondesign.com/build/software/octopus_klipper.html

cd ~/klipper
make menuconfig
# Enable extra low-level configuration options
#  Micro-controller Architecture (STMicroelectronics STM32)  --->
#  Processor model (STM32F446)  --->
#  Bootloader offset (32KiB bootloader)  --->
#  Clock Reference (12 MHz crystal)  --->
make
  1. Install firmeware to Octopus from file created at out/klipper.bin:
    • Over USB from PI via DFU
    • From memory card (recommended)
  2. Install printer.cfg from

Install Klipper to EBB

cd ~/klipper
make menuconfig
#    Enable extra low-level configuration options
#    Micro-controller Architecture (Raspberry Pi RP2040/RP235x)  --->
#    Processor model (rp2040)  --->
#    Bootloader offset (No bootloader)  --->
#    Flash chip (W25Q080 with CLKDIV 2)  --->
#    Communication Interface (USBSERIAL)  --->
#    USB ids  --->
#[*] Optimize stepper code for 'step on both edges'
#()  GPIO pins to set at micro-controller startup
make

Put Canbus processor in DFU mode by pressing and holding BOOT and then the RST button breifly:

Verify we're in DFU mode by looking for this in the lsusb command:

Bus 002 Device 003: ID 2e8a:0003 Raspberry Pi RP2 Boot

Note the device ID (2e8a:0003) and type in console from the klipper directory:

make flash FLASH_DEVICE=2e8a:0003

  Flashing out/klipper.uf2 to 2e8a:0003
sudo lib/rp2040_flash/rp2040_flash out/klipper.uf2

[sudo] password for bpopp:
Loaded UF2 image with 162 pages
Found rp2040 device on USB bus 2 address 3
Flashing...
Resetting interface
Locking
Exiting XIP mode
Erasing
Flashing
Rebooting device

Verify that the device now shows up under /dev/serial/by-id:

ls /dev/serial/by-id
usb-Klipper_rp2040_50443403101D961C-if00
usb-Klipper_stm32f446xx_1E0035000751313031393839-if00

Create a config file for the EBB in Mainsail:

# This file contains common pin mappings for the BIGTREETECH EBBCan
# Canbus board. To use this config, the firmware should be compiled for the
# STM32F072 with "8 MHz crystal" and "USB (on PA11/PA12)" or "CAN bus (on PB8/PB9)".
# The "EBB Can" micro-controller will be used to control the components on the nozzle.

# See docs/Config_Reference.md for a description of parameters.

[mcu EBBCan]
serial: /dev/serial/by-id/usb-Klipper_rp2040_50443403101D961C-if00

[temperature_sensor EBB_NTC]
sensor_type: Generic 3950
sensor_pin: EBBCan:gpio27

[adxl345]
cs_pin: EBBCan:gpio1
spi_software_sclk_pin: EBBCan:gpio2
spi_software_mosi_pin: EBBCan:gpio0
spi_software_miso_pin: EBBCan:gpio3
axes_map: z,-y,x

[resonance_tester]
probe_points: 100, 100, 20
accel_chip: adxl345

[extruder]
step_pin: EBBCan:gpio18
dir_pin: !EBBCan:gpio19
enable_pin: !EBBCan:gpio17
gear_ratio: 50:10				#BMG Gear Ratio
microsteps: 16
rotation_distance: 22.5078095278
nozzle_diameter: 0.400
filament_diameter: 1.750

heater_pin: EBBCan:gpio7
# sensor_type: NTC 100K MGB18-104F39050L32
pullup_resistor: 2200 # 2.2K
sensor_type: ATC Semitec 104GT-2
sensor_pin: EBBCan:gpio26
control: pid
pid_Kp: 19.939
pid_Ki: 0.636
pid_Kd: 156.259
min_temp: -50
max_temp: 250
min_extrude_temp: 150
# pressure_advance: 0.055
# pressure_advance_smooth_time: 0.040

# sensor_type: MAX31865
# sensor_pin: EBBCan:gpio9
# spi_software_sclk_pin: EBBCan:gpio10
# spi_software_mosi_pin: EBBCan:gpio8
# spi_software_miso_pin: EBBCan:gpio11
# rtd_nominal_r: 100
# rtd_reference_r: 430
# rtd_num_of_wires: 2

[tmc2209 extruder]
uart_pin: EBBCan:gpio20
run_current: 0.65
stealthchop_threshold: 999999
# sense_resistor: 0.110

[fan]
pin: EBBCan:gpio4
max_power: 0.5

[heater_fan hotend_fan]
pin: EBBCan:gpio14
heater: extruder
heater_temp: 50.0

[neopixel hotend_rgb]
pin: EBBCan:gpio16