Skip to content

Instantly share code, notes, and snippets.

@frap129
Last active March 28, 2021 01:27
Show Gist options
  • Save frap129/e2e58d966d682e1c386fb79ebd6a2398 to your computer and use it in GitHub Desktop.
Save frap129/e2e58d966d682e1c386fb79ebd6a2398 to your computer and use it in GitHub Desktop.
Klipper Config for the FLSUN Q5 with TMC2208 Drivers in UART mode
[stepper_a]
step_pin: PE3
dir_pin: PE2
enable_pin: !PE4
endstop_pin: PA15
microsteps: 16
rotation_distance: 40
homing_speed: 20
homing_retract_dist: 5
homing_retract_speed: 10
second_homing_speed: 2
#arm_length: 215
#position_endstop: 219
[tmc2208 stepper_a]
uart_pin: PA10
run_current: 0.800
hold_current: 0.500
stealthchop_threshold: 250
[stepper_b]
step_pin: PE0
dir_pin: PB9
enable_pin: !PE1
endstop_pin: PA12
microsteps: 16
rotation_distance: 40
[tmc2208 stepper_b]
uart_pin: PA9
run_current: 0.800
hold_current: 0.500
stealthchop_threshold: 250
[stepper_c]
step_pin: PB5
dir_pin: PB4
enable_pin: !PB8
endstop_pin: PC4
microsteps: 16
rotation_distance: 40
[tmc2208 stepper_c]
uart_pin: PC7
run_current: 0.800
hold_current: 0.500
stealthchop_threshold: 250
[endstop_phase]
[extruder]
step_pin: PD6
dir_pin: !PD3
enable_pin: !PB3
rotation_distance: 44.59
gear_ratio: 50:17
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
#control: pid
#pid_Kp: 14.669
#pid_Ki: 0.572
#pid_Kd: 94.068
min_temp: 0
max_temp: 250
pressure_advance: 0.61
microsteps: 16
max_extrude_only_distance: 110.0
[heater_bed]
heater_pin: PA0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
#control: pid
#pid_Kp: 325.10
#pid_Ki: 63.35
#pid_Kd: 417.10
min_temp: 0
max_temp: 130
[fan]
pin: PB1
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: delta
max_velocity: 300
max_accel: 14000
max_z_velocity: 100
#delta_radius: 105
print_radius: 100
minimum_z_position: -5
[delta_calibrate]
radius: 100
horizontal_move_z: 25
speed: 10
[probe]
pin: !PA11
x_offset: 0
y_offset: 0
#z_offset: 20.26
speed: 5.0
samples: 5
samples_result: average
sample_retract_dist: 3
samples_tolerance: 0.02
samples_tolerance_retries: 5
[bed_mesh]
speed: 30
horizontal_move_z: 25
mesh_radius: 85
round_probe_count: 5
[gcode_arcs]
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#[resonance_tester]
#accel_chip: adxl345
#probe_points:
# 0,0,20
[input_shaper]
shaper_freq_x: 67.0
shaper_type_x: mzv
shaper_freq_y: 66.2
shaper_type_y: 2hump_ei
[gcode_macro STOW_RETRACT]
default_parameter_E: 6 # edit to your preferred retract length
gcode:
G91
G1 E-{E} F40000
G90
[gcode_macro STOW_UNRETRACT]
default_parameter_E: 6 # edit to your preferred retract length
gcode:
G91
G1 E{E} F40000
G90
[gcode_macro PARK]
gcode:
STOW_RETRACT
G91
G28
G90
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
M117 Pausing
M106 S255
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
PARK
M117 Paused
M107
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
M117 Resuming
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
M117 Printing
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
M117 Cancelling
M106 S255
PARK
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
M107
M117 Done!
[gcode_macro START_PRINT]
default_parameter_T_BED: 60
default_parameter_T_EXTRUDER: 205
default_parameter_Z_OFFSET: 0.18
gcode:
M140 S{T_BED}
M104 S170
M106 S255
M117 Homing
G28 ; home printer
SET_GCODE_OFFSET Z_ADJUST={Z_OFFSET} MOVE=0
M117 Heating
M190 S{T_BED}
M109 S{T_EXTRUDER}
STOW_UNRETRACT
M107
M117 Printing
[gcode_macro END_PRINT]
gcode:
M106 S255
TURN_OFF_HEATERS
PARK
M84 ; disable motors
M107
M117 Done!
[gcode_macro SET_MODE_QUALITY]
gcode:
SET_VELOCITY_LIMIT ACCEL=5000
SET_VELOCITY_LIMIT ACCEL_TO_DECEL=2500
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=4
[gcode_macro SET_MODE_SPEED]
gcode:
SET_VELOCITY_LIMIT ACCEL={printer.configfile.settings.printer.max_accel}
SET_VELOCITY_LIMIT ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={printer.configfile.settings.printer.square_corner_velocity}
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [endstop_phase stepper_a]
#*# endstop_phase = 58
#*#
#*# [endstop_phase stepper_b]
#*# endstop_phase = 11
#*#
#*# [endstop_phase stepper_c]
#*# endstop_phase = 34
#*#
#*# [printer]
#*# delta_radius = 105.853129
#*#
#*# [stepper_a]
#*# angle = 210.146644
#*# arm_length = 214.496467
#*# position_endstop = 223.113973
#*#
#*# [stepper_b]
#*# angle = 330.015070
#*# arm_length = 214.509346
#*# position_endstop = 223.735480
#*#
#*# [stepper_c]
#*# angle = 90.000000
#*# arm_length = 216.339864
#*# position_endstop = 222.428822
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 21.454
#*# pid_ki = 0.715
#*# pid_kd = 160.904
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 63.230
#*# pid_ki = 2.702
#*# pid_kd = 369.897
#*#
#*# [probe]
#*# z_offset = 23.012
#*#
#*# [delta_calibrate]
#*# height0 = 23.025
#*# height0_pos = 15999.800,15981.800,16025.800
#*# height1 = 23.025
#*# height1_pos = 20812.000,20800.000,13760.000
#*# height2 = 23.025
#*# height2_pos = 15671.800,23895.800,15695.800
#*# height3 = 23.025
#*# height3_pos = 13844.000,20020.000,20041.000
#*# height4 = 23.025
#*# height4_pos = 15519.000,15514.000,21180.000
#*# height5 = 23.025
#*# height5_pos = 19304.000,13983.000,19355.000
#*# height6 = 23.025
#*# height6_pos = 22321.000,15540.000,15600.000
#*# distance0 = 65.3
#*# distance0_pos1 = 17634.502,18042.423,17895.740
#*# distance0_pos2 = 15857.403,20916.376,20646.420
#*# distance1 = 65.18
#*# distance1_pos1 = 17731.357,17835.134,17997.851
#*# distance1_pos2 = 17249.590,17422.377,22753.487
#*# distance2 = 64.85
#*# distance2_pos1 = 17934.270,17730.627,17895.740
#*# distance2_pos2 = 20633.325,15920.674,20646.420
#*# distance3 = 64.76
#*# distance3_pos1 = 18040.452,17831.221,17693.580
#*# distance3_pos2 = 22825.250,17363.687,17263.737
#*# distance4 = 65.37
#*# distance4_pos1 = 17941.588,18038.455,17593.503
#*# distance4_pos2 = 20772.085,20840.290,15822.307
#*# distance5 = 65.42
#*# distance5_pos1 = 17738.577,18145.182,17693.580
#*# distance5_pos2 = 17358.006,23086.488,17263.737
#*# distance6 = 65.14
#*# distance6_pos1 = 15958.185,20300.589,20418.769
#*# distance6_pos2 = 17385.495,17259.698,22513.155
#*# distance7 = 65.11
#*# distance7_pos1 = 17366.475,17235.168,22048.495
#*# distance7_pos2 = 20685.986,15954.115,20324.728
#*# distance8 = 65.29
#*# distance8_pos1 = 20414.303,16024.688,20056.866
#*# distance8_pos2 = 22588.096,17502.521,17106.898
#*# distance9 = 65.17
#*# distance9_pos1 = 22119.344,17481.420,17084.804
#*# distance9_pos2 = 20446.642,20892.657,15856.812
#*# distance10 = 65.34
#*# distance10_pos1 = 20171.481,20609.437,15926.033
#*# distance10_pos2 = 17196.546,22835.317,17399.624
#*# distance11 = 65.38
#*# distance11_pos1 = 17170.795,22345.727,17377.112
#*# distance11_pos2 = 15888.786,20581.359,20694.592
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.013308, 0.013308, 0.013308, 0.013308, 0.013308
#*# 0.030590, 0.030590, -0.029654, -0.000855, -0.000855
#*# -0.068718, -0.041515, 0.053250, 0.101004, 0.008352
#*# -0.000643, -0.000643, 0.093679, 0.075455, 0.075455
#*# 0.111187, 0.111187, 0.111187, 0.111187, 0.111187
#*# tension = 0.2
#*# min_x = -85.0
#*# algo = lagrange
#*# y_count = 5
#*# mesh_y_pps = 2
#*# min_y = -85.0
#*# x_count = 5
#*# max_y = 85.0
#*# mesh_x_pps = 2
#*# max_x = 85.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment