Klipper setup guide

I have finally got klippered snapmaker original 3D printer.
I introduce “how.”
Btw I could not figure out how to implement self update firmware and its bootloader. So my method needs JTAG cable to re-flash the control board. I mention that the control board uses GD32F105RC and it is compatible to STM32F1XX mcu.

((Klipper Firmware Configuration))
Enable extra low-level configuration options: ON
Micro-controller Architecture: STMicroelectronics STM32
Processor model: STM32F103
Only 100KiB of RAM: OFF
Disable SWD at start up: OFF
Bootloader offset: No bootloader
Clock Reference: 16MHz crystal
Communication interface: Serial on USART1 PA10/PA9
Baud rate for serial port: 460800 (stable value for CH340 chip)
GPIO pins to set at micro-controller startup: Just default

((Re-flash)) I use J-Flash (Segger J-link cable) . this is my .jflash file
AppVersion = 78606
FileVersion = 2
[GENERAL]
aATEModuleSel[24] = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
ConnectMode = 0
CurrentFile = “klipper.elf”
DataFileSAddr = 0x08000000
GUIMode = 0
HostName = “”
TargetIF = 1
USBPort = 0
USBSerialNo = 0x00000000
UseATEModuleSelection = 0
[JTAG]
IRLen = 0
MultipleTargets = 0
NumDevices = 0
Speed0 = 1000
Speed1 = 1000
TAP_Number = 0
UseAdaptive0 = 0
UseAdaptive1 = 0
UseMaxSpeed0 = 0
UseMaxSpeed1 = 0
[CPU]
NumInitSteps = 1
InitStep0_Action = “Reset”
InitStep0_Value0 = 0x00000000
InitStep0_Value1 = 0x00000000
InitStep0_Comment = “Reset and halt target”
NumExitSteps = 0
UseScriptFile = 0
ScriptFile = “”
RAMAddr = 0x20000000
RAMSize = 0x00018000
CheckCoreID = 1
CoreID = 0x3BA00477
CoreIDMask = 0x0F000FFF
UseAutoSpeed = 0x00000001
ClockSpeed = 0x00000000
EndianMode = 0
ChipName = “GigaDevice GD32F105RC”
[FLASH]
aRangeSel[1] = 0-127
BankName = “Internal flash”
BankSelMode = 1
BaseAddr = 0x08000000
NumBanks = 1
[PRODUCTION]
AutoPerformsDisconnect = 0
AutoPerformsErase = 1
AutoPerformsProgram = 1
AutoPerformsSecure = 0
AutoPerformsStartApp = 0
AutoPerformsVerify = 0
EnableFixedVTref = 0
EnableTargetPower = 0
EraseType = 3
FixedVTref = 0x00000CE4
MonitorVTref = 0
MonitorVTrefMax = 0x0000157C
MonitorVTrefMin = 0x000003E8
OverrideTimeouts = 0
ProgramSN = 0
SerialFile = “”
SNAddr = 0x00000000
SNInc = 0x00000001
SNLen = 0x00000004
SNListFile = “”
SNValue = 0x00000001
StartAppType = 0
TargetPowerDelay = 0x00000014
TimeoutErase = 0x00003A98
TimeoutProgram = 0x00002710
TimeoutVerify = 0x00002710
VerifyType = 1
[PERFORMANCE]
DisableSkipBlankDataOnProgram = 0x00000000
PerfromBlankCheckPriorEraseChip = 0x00000001
PerfromBlankCheckPriorEraseSelectedSectors = 0x00000001

((printer.cfg))
[include mainsail.cfg]

[virtual_sdcard]
path: /home/shoji/printer_data/gcodes
on_error_gcode: CANCEL_PRINT

[mcu]
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
baud: 460800
restart_method: command

[printer]
kinematics: cartesian
max_velocity: 140
max_accel:3000
max_z_velocity: 20
max_z_accel: 500
square_corner_velocity:4.0

[stepper_x]
step_pin: PB5
dir_pin: !PB6
enable_pin: !PB7
microsteps: 16
rotation_distance: 8
endstop_pin: ^!PC11
position_endstop: -5
position_min: -5
position_max: 125
homing_speed: 10

[stepper_y]
step_pin: PB8
dir_pin: !PB9
enable_pin: !PB4
microsteps: 16
rotation_distance: 8
endstop_pin: ^!PC10
position_endstop: -5
position_min: -5
position_max: 125
homing_speed: 10

[stepper_z]
step_pin: PB3
dir_pin: !PD2
enable_pin: !PC12
microsteps: 16
rotation_distance: 8
endstop_pin: ^!PA8
#position_endstop: 0
position_min: -8
position_max: 125.5
homing_speed: 10

#[stepper_z2]
#step_pin: PC2
#dir_pin: !PC1
#enable_pin: !PC3
#microsteps: 16
#rotation_distance: 8
#endstop_pin: ^!PC0
#position_endstop: 0
#position_min: -8
#position_max: 125.5
#homing_speed: 10

[extruder]
step_pin: PA4
dir_pin: !PA1
enable_pin: !PA0
microsteps: 16
rotation_distance: 32.3544767893
nozzle_diameter: 0.4
filament_diameter: 1.750
heater_pin: !PB10
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC5
#control: pid
min_temp: -257
max_temp: 230
#pid_Kp: 7
#pid_Ki: 0.5
#pid_Kd: 45
[output_pin LED_R]
pin: mcu:PC7
value:0

[output_pin LED_B]
pin: mcu:PC8
value:0
[output_pin GATE_CTRL]
pin: mcu:PB0
value:1

[output_pin MAIN_POWER]
pin: mcu:PF2
value:1

[output_pin STEPPER_POWER]
pin: mcu:PF1
value:1

[heater_bed]
heater_pin: PA7
sensor_pin: PC4
sensor_type: EPCOS 100K B57560G104F
min_temp: -257
max_temp: 80

[bed_mesh]
speed: 80
horizontal_move_z: 1
mesh_min: 15, 15
mesh_max: 115, 115
probe_count: 3, 3

[input_shaper]
shaper_freq_x: 20
shaper_freq_y: 40

[firmware_retraction]
retract_length: 0.6
retract_speed: 40
unretract_extra_length: 0.0
unretract_speed: 20

[force_move]
enable_force_move: 1

[homing_override]
gcode:
SET_STEPPER_ENABLE STEPPER=stepper_z ENABLE=1
FORCE_MOVE STEPPER=stepper_z DISTANCE=0.5 VELOCITY=20 ACCEL=100
G28 X0
G28 Y0
G28 Z0
G1 Z10 F3000
G1 X65 Y65

## <---------------------- SAVE_CONFIG ---------------------->
#
# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
##
#
# [heater_bed]
## control = pid
#
# pid_kp = 68.783
## pid_ki = 2.011
#
# pid_kd = 588.090
##
#
# [extruder]
## control = pid
#
# pid_kp = 30.663
## pid_ki = 2.323
#
# pid_kd = 101.187
##
#
# [stepper_z]
## position_endstop = -4.735
#
#
## [bed_mesh default]
#
# version = 1
## points =
#
# 0.260000, 0.010000, -0.140000
## 0.325000, 0.020000, -0.130000
#
# 0.285000, -0.000000, -0.170000
## x_count = 3
#
# y_count = 3
## mesh_x_pps = 2
#
# mesh_y_pps = 2
## algo = lagrange
#
# tension = 0.2
## min_x = 15.0
#
# max_x = 115.0
## min_y = 15.0
#
# max_y = 115.0

4 Likes

This is awesome! How has it performed so far?

I feel that output is stable more than official firmware. because of “input shaping” and “pressure advance.” however speed is limited by the hardware issue mainly cooling fan. for 3D benchy model, maximum speed is around 35mm/s.

good part:

  1. I can print via web browser. official firmware is USB flash. I know that we can use octoprint or luban via USB port however my idea it is unstable. I guess baud rate.
  2. We can add bed mesh from 2x2. I use 3x3.
  3. Klipper allows us to use baby steps while it is printing (Actually Mailsail function).

bad part:

  1. We need JTAG cable (Actually it is not so bad for me).

Now I have touch display port (UART, TX and RX). and one extra stepper motor port (one stepper output and end stop input). So I may make modification of print module. I have E3D V6 clone and Orbiter 2.0 extruder. or maybe filament run out sensor.

Klipper Host is actually small Single Board Computer (FriendlyElec NanoPi NEO2 512MB, Armbian).

Today I compared Air duct mod model for “Original.”
Test data is 3D Hubs Marvin. Same generated GCode.
Blue ducts are crashes when I used official firmware from Snapmaker. because of homing sequence. So I never tested before. Still Orange duct is better.