Skip to content

Instantly share code, notes, and snippets.

@blackfyre
Last active February 10, 2023 20:38
Show Gist options
  • Save blackfyre/1a1701bd3ef765b8d16dbe637719c873 to your computer and use it in GitHub Desktop.
Save blackfyre/1a1701bd3ef765b8d16dbe637719c873 to your computer and use it in GitHub Desktop.
Klipper Config for FLSUN QQ-S, Duet 2 Wifi, Duet Smart Effector
[mcu]
serial: /dev/serial/by-id/usb-Klipper_sam4e8e_00313953325753543039303330303630-if00
[printer]
kinematics: delta
max_velocity: 500
max_accel: 2000
max_z_velocity: 200
minimum_z_position: 0
delta_radius: 130
[stepper_a]
step_pin: PD6
dir_pin: !PD11
enable_pin: !PC6
microsteps: 16
rotation_distance: 32
endstop_pin: ^PC14
position_endstop: 316
arm_length: 288.14
homing_speed: 60
second_homing_speed: 5
[tmc2660 stepper_a]
cs_pin: PD14
spi_bus: usart1
run_current: 1.000
sense_resistor: 0.051
[stepper_b]
step_pin: PD7
dir_pin: !PD12
enable_pin: !PC6
microsteps: 16
rotation_distance: 32
endstop_pin: ^PA2
[tmc2660 stepper_b]
cs_pin: PC9
spi_bus: usart1
run_current: 1.000
sense_resistor: 0.051
[stepper_c]
step_pin: PD8
dir_pin: !PD13
enable_pin: !PC6
microsteps: 16
rotation_distance: 32
endstop_pin: ^PD29
[tmc2660 stepper_c]
cs_pin: PC10
spi_bus: usart1
run_current: 1.000
sense_resistor: 0.051
[extruder]
step_pin: PD5
dir_pin: PA1
enable_pin: !PC6
microsteps: 16
rotation_distance: 9
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: !PA20
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC15
control: pid
pid_Kp: 14.529
pid_Ki: 0.557
pid_Kd: 94.802
min_extrude_temp: 180
min_temp: 0
max_temp: 260
[tmc2660 extruder]
cs_pin: PC17
spi_bus: usart1
run_current: 1.000
sense_resistor: 0.051
[heater_bed]
heater_pin: !PA19
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC13
control: pid
pid_Kp: 325.10
pid_Ki: 63.35
pid_Kd: 417.10
min_temp: 0
max_temp: 150
[fan]
pin: PC23
[probe]
pin: PC1
z_offset: -0.1
speed: 20
samples: 2
[delta_calibrate]
radius: 120
[gcode_arcs]
resolution: 1.0
[filament_switch_sensor Filament]
pause_on_runout: True
switch_pin: !PD10
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[bed_mesh]
mesh_radius: 120
# This file contains common pin mappings for Duet2 Eth/Wifi boards. To
# use this config, the firmware should be compiled for the SAM4E8E.
# See docs/Config_Reference.md for a description of parameters.
[mcu rpi]
serial: /tmp/klipper_host_mcu
[adxl345]
cs_pin: rpi:None
[resonance_tester]
accel_chip: adxl345
probe_points:
0,0,20 # an example
[mcu]
serial: /dev/serial/by-id/usb-Klipper_sam4e8e_00313953325753543039303330303630-if00
[printer]
kinematics: delta
max_velocity: 500
max_accel: 2000
max_z_velocity: 200
minimum_z_position: -5
#delta_radius: 130
[stepper_a]
step_pin: PD6
dir_pin: !PD11
enable_pin: !PC6
microsteps: 16
rotation_distance: 32
endstop_pin: ^PC14
#position_endstop: 316
#arm_length: 288.14
homing_speed: 60
second_homing_speed: 5
[tmc2660 stepper_a]
cs_pin: PD14
spi_bus: usart1
run_current: 1.000
sense_resistor: 0.051
[stepper_b]
step_pin: PD7
dir_pin: !PD12
enable_pin: !PC6
microsteps: 16
rotation_distance: 32
endstop_pin: ^PA2
[tmc2660 stepper_b]
cs_pin: PC9
spi_bus: usart1
run_current: 1.000
sense_resistor: 0.051
[stepper_c]
step_pin: PD8
dir_pin: !PD13
enable_pin: !PC6
microsteps: 16
rotation_distance: 32
endstop_pin: ^PD29
[tmc2660 stepper_c]
cs_pin: PC10
spi_bus: usart1
run_current: 1.000
sense_resistor: 0.051
[extruder]
step_pin: PD5
dir_pin: PA1
enable_pin: !PC6
microsteps: 16
rotation_distance: 7.618
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: !PA20
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC15
#control: pid
#pid_Kp: 14.529
#pid_Ki: 0.557
#pid_Kd: 94.802
min_extrude_temp: 180
min_temp: 0
max_temp: 260
max_extrude_cross_section: 50
pressure_advance: 0.082
[tmc2660 extruder]
cs_pin: PC17
spi_bus: usart1
run_current: 1.000
sense_resistor: 0.051
#[extruder1]
#step_pin: PD4
#dir_pin: PD9
#enable_pin: !PC6
#heater_pin: !PA16
#sensor_pin: PC12
#...
#[tmc2660 extruder1]
#cs_pin: PC25
#spi_bus: usart1
#sense_resistor: 0.051
#...
[heater_bed]
heater_pin: !PA19
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC13
#control: pid
#pid_Kp: 325.10
#pid_Ki: 63.35
#pid_Kd: 417.10
min_temp: 0
max_temp: 150
[fan]
pin: PC23 # FAN0
#[heater_fan nozzle_cooling_fan]
#pin: PC26 # FAN1
#[heater_fan board_cooling_fan]
#pin: PA0 # FAN2
[probe]
pin: PC1
z_offset: -0.340
speed: 20
samples: 2
samples_tolerance_retries: 2
[delta_calibrate]
radius: 120
[gcode_arcs]
resolution: 1.0
[filament_switch_sensor Filament]
pause_on_runout: false #pause handled by macro
runout_gcode:
M600 #calls a macro with the name M600 (so it can be called by slicers too)
switch_pin: !PD10
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[bed_mesh]
mesh_radius: 120
# This macro should be called at the 'start g-code' part
# of your slicer and you would put all the start g-code here
# instead so that you don't have to re-slice everytime you
# have to edit the commands
[gcode_macro START_PRINT]
gcode:
SET_GCODE_OFFSET Z=0.0
SET_GCODE_OFFSET Z_ADJUST=-0.1 MOVE=1 # PETG for 260mm plate
#SET_GCODE_OFFSET Z_ADJUST=-0.340 MOVE=1 # PLA for 260mm plate
#SET_GCODE_OFFSET Z_ADJUST=-0.560 MOVE=1 # PLA for 265mm plate
# This macro should be called at the 'end g-code' part
# of your slicer and like the macro above, you would
# also put all of your end g-code here for the same reason as above
[gcode_macro END_PRINT]
gcode:
G91
G1 E-7 F2100
SET_GCODE_OFFSET Z_ADJUST=0 # resets the z-offset (otherwise, )
# Pause print macro
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
default_parameter_X: 0 #edit to your park position
default_parameter_Y: 100 #edit to your park position
default_parameter_Z: 30 #edit to your park position
default_parameter_E: 5 #edit to your retract length
gcode:
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
# Resume print macro
[gcode_macro RESUME]
rename_existing: BASE_RESUME
default_parameter_E: 5 #edit to your retract length
gcode:
G91
G1 E{E} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
# Cancel print macro
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
G28
END_PRINT
[gcode_macro SET_Z]
gcode:
G28
G1 X0 Y0 Z10 F5000
PROBE
G1 X0 Y0 Z10
G1 X0 Y0 Z0
[gcode_macro UNLOAD]
gcode:
M83
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
G0 E-50 F1800
[gcode_macro LOAD]
gcode:
M83
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
G0 E50 F1800
[gcode_macro PARK_MACRO]
default_parameter_X: 0
default_parameter_Y: 100
default_parameter_Z: 30
gcode:
M117 PARKING..
G91
G1 E-3.14 F1500
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
[gcode_macro M600]
gcode:
PAUSE_MACRO
UNLOAD
[gcode_macro PAUSE_MACRO]
gcode:
PAUSE
PARK_MACRO
[gcode_macro PURGE]
gcode:
M117 PURGING..
G91
G1 E45.0 F250
G1 E45.0 F250
G1 E-5 F1800
G90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment