Skip to content

Instantly share code, notes, and snippets.

@antage
Last active November 5, 2022 10:42
Show Gist options
  • Save antage/1976d9df8e8a1126ebbe6f3935145394 to your computer and use it in GitHub Desktop.
Save antage/1976d9df8e8a1126ebbe6f3935145394 to your computer and use it in GitHub Desktop.
Voron V2 250^3 FLYF407 controller Klipper configuration
# Voron 2.4 250^3 FLY407
[printer]
kinematics: corexy
max_velocity: 170
max_accel: 5000
max_accel_to_decel: 2500
max_z_velocity: 35
max_z_accel: 350
square_corner_velocity: 5.0
[idle_timeout]
gcode:
TURN_OFF_HEATERS
M84 ; disable steppers
timeout: 3600
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_200037001451363437363430-if00
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#[resonance_tester]
#probe_points: 125,125,20
#accel_chip: adxl345
[input_shaper]
shaper_freq_x: 56.4
shaper_type_x: ei
shaper_freq_y: 79.6
shaper_type_y: ei
[stepper_x]
step_pin: PB9
dir_pin: PE0
enable_pin: !PE1
step_distance: .0125
endstop_pin: ^PC2
position_min: 0
position_endstop: 250
position_max: 250
homing_speed: 50
second_homing_speed: 5
homing_retract_dist: 5
homing_positive_dir: true
[tmc2209 stepper_x]
uart_pin: PG13
microsteps: 16
run_current: 1.0
stealthchop_threshold: 250
[stepper_y]
step_pin: PB8
dir_pin: PG11
enable_pin: !PG12
step_distance: .0125
endstop_pin: ^PF1
position_min: 0
position_endstop: 259
position_max: 259
homing_speed: 50
second_homing_speed: 5
homing_retract_dist: 5
homing_positive_dir: true
[tmc2209 stepper_y]
uart_pin: PG10
microsteps: 16
run_current: 1.0
stealthchop_threshold: 250
[extruder]
step_pin: PC7
dir_pin: PD3
enable_pin: !PD4
step_distance: .0024
nozzle_diameter: 0.400
filament_diameter: 1.750
max_extrude_only_distance: 150
pressure_advance: 0.04 # nozzle 0.4, 0.6
heater_pin: PF7 # HEATER0
pwm_cycle_time: 0.01
sensor_pin: PA0 # T0
sensor_type: ATC Semitec 104GT-2
smooth_time: 0.6
control: pid
# e3d v6 + 40W heater
# pid_Kp: 27.0
# pid_Ki: 1.7
# pid_Kd: 110
# dragon + 40W heater
pid_Kp: 23.0
pid_Ki: 1.2
pid_Kd: 115.0
min_temp: 10
max_temp: 300
[tmc2209 extruder]
uart_pin: PD1
microsteps: 16
run_current: 0.5
stealthchop_threshold: 0
[stepper_z]
step_pin: PD15
dir_pin: PG7
enable_pin: !PG8
endstop_pin: ^PC15
step_distance: .00125
position_max: 205
# Set to -5 to allow room for squaring gantry with quad_gantry_level
position_min: -5
#position_endstop: 0.35 # flat PEI ???
position_endstop: 0.75 # powder PEI
homing_speed: 6.0
second_homing_speed: 3.0
homing_retract_dist: 3.0
homing_retract_speed: 3.0
homing_positive_dir: false
[tmc2209 stepper_z]
uart_pin: PG6
microsteps: 32
run_current: 1.0
stealthchop_threshold: 0
[stepper_z1]
step_pin: PD14
dir_pin: !PG4
enable_pin: !PG5
step_distance: 0.00125
[tmc2209 stepper_z1]
uart_pin: PG3
microsteps: 32
run_current: 1.0
stealthchop_threshold: 0
[stepper_z2]
step_pin: PD13
dir_pin: PD11
enable_pin: !PG2
step_distance: 0.00125
[tmc2209 stepper_z2]
uart_pin: PD10
microsteps: 32
run_current: 1.0
stealthchop_threshold: 0
[stepper_z3]
step_pin: PD12
dir_pin: !PD8
enable_pin: !PD9
step_distance: 0.00125
[tmc2209 stepper_z3]
uart_pin: PB12
microsteps: 32
run_current: 1.0
stealthchop_threshold: 0
[probe]
pin: ^PE11
x_offset: 0.0
y_offset: 25.0
z_offset: 0.0
speed: 3.0
samples: 5
samples_tolerance: 0.015
samples_tolerance_retries: 5
sample_retract_dist: 3.0
samples_result: median
[safe_z_home]
## XY Location of the Z Endstop Switch
## Update -10,-10 to the XY coordinates of your endstop pin
## (such as 157,305) after going through Z Endstop Pin
## Location Definition step.
home_xy_position: 182,253
speed: 50
z_hop: 10
z_hop_speed: 6.0
[quad_gantry_level]
gantry_corners:
-60,-10
310,320
points:
40,15 # orig 50,25
40,185 # orig 50,175
210,185 # orig 200,175
210,15 # orig 200,25
speed: 100
horizontal_move_z: 15
max_adjust: 8
retries: 5
retry_tolerance: 0.0075
[bed_mesh]
speed: 100
horizontal_move_z: 15
mesh_min: 5,25
mesh_max: 245,245
#probe_count: 7,7
probe_count: 7,7
#relative_reference_index: 24
relative_reference_index: 24
fade_start: 1
fade_end: 10
fade_target: 0
mesh_pps: 2,2
algorithm: bicubic
move_check_distance: 5
split_delta_z: 0.01
[heater_bed]
heater_pin: PE2 # BED_HEATER
sensor_pin: PC1 # T1
sensor_type: NTC 100K beta 3950
control: pid
pid_Kp: 56.0
pid_Ki: 2.0
pid_Kd: 390
# T50: pid_Kp=57.680 pid_Ki=2.035 pid_Kd=408.804
# T60: pid_Kp=55.447 pid_Ki=1.858 pid_Kd=413.774
# T70: pid_Kp=58.039 pid_Ki=2.224 pid_Kd=378.707
# T80: pid_Kp=57.861 pid_Ki=2.296 pid_Kd=364.526
# T90: pid_Kp=58.480 pid_Ki=2.307 pid_Kd=370.614
# T100: pid_Kp=55.952 pid_Ki=2.156 pid_Kd=362.989
# T110: pid_Kp=55.522 pid_Ki=1.990 pid_Kd=387.263
# T120: pid_Kp=55.244 pid_Ki=1.908 pid_Kd=399.827
max_power: 1.0
smooth_time: 0.6
pwm_cycle_time: 0.3
min_temp: 10
max_temp: 130
[verify_heater heater_bed]
check_gain_time: 60
heating_gain: 1.0
[fan]
pin: PF9 # FAN1
max_power: 1.0
cycle_time: 0.01
kick_start_time: 0.2
off_below: 0.1
[heater_fan extruder_fan]
pin: PF8 # FAN0
fan_speed: 1.0
cycle_time: 0.01
heater: extruder
[heater_fan nevermore_fan]
pin: PB11
cycle_time: 0.01
kick_start_time: 2.0
fan_speed: 1.0
heater: heater_bed
heater_temp: 40.0
[heater_fan exhaust_fan]
pin: PA2
cycle_time: 0.01
kick_start_time: 2.0
heater: heater_bed
heater_temp: 40
fan_speed: 0.2
[temperature_sensor chamber]
sensor_type: NTC 100K beta 3950
sensor_pin: PF4
min_temp: 10
max_temp: 90
gcode_id: C
[heater_fan bottom_fan1]
pin: PA1 # FAN3
cycle_time: 0.01
kick_start_time: 2.0
fan_speed: 0.3
heater: heater_bed
heater_temp: 45.0
[heater_fan bottom_fan2]
pin: PE13 # FAN4
cycle_time: 0.01
kick_start_time: 2.0
fan_speed: 0.3
heater: heater_bed
heater_temp: 45.0
[force_move]
enable_force_move: True
[pause_resume]
recover_velocity: 50
[virtual_sdcard]
path: ~/sd_card
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB10, EXP1_3=PE14, EXP1_5=PE10, EXP1_7=PE8, EXP1_9=<GND>,
EXP1_2=PE15, EXP1_4=PE12, EXP1_6=PE9, EXP1_8=PE7, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB14, EXP2_3=PC5, EXP2_5=PC4, EXP2_7=PB2, EXP2_9=<GND>,
EXP2_2=PB13, EXP2_4=PF11, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=<GND>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi2"
# Fysetc Mini 12864
[display]
lcd_type: uc1701
cs_pin: EXP1_3
a0_pin: EXP1_4
rst_pin: EXP1_5
contrast: 63
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2
spi_software_miso_pin: EXP2_1
spi_software_mosi_pin: EXP2_6
spi_software_sclk_pin: EXP2_2
[neopixel display]
pin: EXP1_6
chain_count: 3
color_order: RGB
initial_RED: 0.8
initial_GREEN: 0.8
initial_BLUE: 0.8
[output_pin beeper]
pin: EXP1_1
[output_pin led_backlight]
pin: PE3
pwm: true
shutdown_value: 1.0
value: 0.0
cycle_time: 0.002
[gcode_macro QUAD_GANTRY_LEVEL]
rename_existing: __QUAD_GANTRY_LEVEL
gcode:
BED_MESH_CLEAR
{% if "z" not in printer.toolhead.homed_axes %}
G28
{% elif ("x" not in printer.toolhead.homed_axes) or ("y" not in printer.toolhead.homed_axes) %}
G28 X Y
{% endif %}
__QUAD_GANTRY_LEVEL
G28 Z
G0 Z20 F360
G0 X240 Y240 F3000
[gcode_macro SET_DISPLAY_COLOR]
gcode:
SET_LED LED=display RED={params.R} GREEN={params.G} BLUE={params.B} INDEX=1 TRANSMIT=0
SET_LED LED=display RED={params.R} GREEN={params.G} BLUE={params.B} INDEX=2 TRANSMIT=0
SET_LED LED=display RED={params.R} GREEN={params.G} BLUE={params.B} INDEX=3
[gcode_macro HEATUP_BED]
gcode:
{% for preheat_temp in range(25, 120) %}
{% if printer.heater_bed.temperature < preheat_temp %}
{% if params.T|float > preheat_temp %}
M117 Preheat to {preheat_temp}
M190 S{preheat_temp}
G4 P10000 ; wait 10 seconds
{% endif %}
{% endif %}
{% endfor %}
M117 Preheat bed
M190 S{params.T|float} ; preheat bed
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script
gcode:
SET_DISPLAY_COLOR R=0.8 G=0.2 B=0.0
BED_MESH_CLEAR
M117 Homing... ; display message
G28 ; home all axes
G0 Z5 F300 ; move nozzle away from bed
G0 X125 Y125 F3000 ; move to center
M106 S255 ; fan on
HEATUP_BED T={params.BED|float}
M117 Wait 1 min
G4 P60000 ; wait 1 minute
M107 ; fan off
M117 QGL
QUAD_GANTRY_LEVEL ; QGL
G0 Z10 F300 ; move nozzle away from bed
G0 X85 Y258.5 F3000 ; move to purge bin
M117 Preheating nozzle
M109 S{params.EXTRUDER|float} ; preheat nozzle
M117 Wait 3 min
G4 P180000 ; wait 3 minutes
M117 Scrubbing nozzle
SCRUB_NOZZLE
M117 Homing
G28
M117 Scrubbing nozzle
SCRUB_NOZZLE
M117 Homing
G28
M83 ; use relative extruding
M117 Printing ...
BED_MESH_PROFILE LOAD=T120
SET_DISPLAY_COLOR R=0.8 G=0.0 B=0.0
SET_LIGHT S=1
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script
gcode:
M400 ; wait for buffer to clear
M83 ; use relative extruding
G1 E-1.0 F300 ; retract filament
G91 ; relative positioning
G0 Z1.00 X20.0 Y20.0 F12000 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G1 Z5 F300 ; move nozzle up 5mm
G90 ; absolute positioning
G0 X125 Y50 F6000 ; park nozzle at rear
{% if printer.toolhead.position.z < 120.0 %}
G0 Z120 F1800 ; lift toolhead to clean nozzle
{% endif %}
BED_MESH_CLEAR ; clear bed mesh
M117 Finished! ; display message
SET_DISPLAY_COLOR R=0.0 G=0.8 B=0.0
[gcode_macro MOVE_Z_UP]
# DIST = distance in mm
gcode:
{% if "z" not in printer.toolhead.homed_axes %}
SET_KINEMATIC_POSITION Z=0.0
{% endif %}
G91
G0 Z{params.DIST|float} F600
G90
[gcode_macro MOVE_Z_DOWN]
# DIST = distance in mm
gcode:
{% if "z" in printer.toolhead.homed_axes and printer.toolhead.position.z > params.DIST|float %}
G91
G0 Z-{params.DIST|float} F600
G90
{% else %}
SET_KINEMATIC_POSITION Z={params.DIST|float}
G0 Z0 F600
{% endif %}
[gcode_macro SCRUB_NOZZLE]
gcode:
{% if "z" not in printer.toolhead.homed_axes %}
G28
{% elif ("x" not in printer.toolhead.homed_axes) or ("y" not in printer.toolhead.homed_axes) %}
G28 X Y
{% endif %}
G0 Z20 F360
G0 X53 Y257 F3000
G0 Z1.5 F360
{% for i in range(20) %}
G0 X28 F9000
G0 X78 F9000
{% endfor %}
G0 Z20 F360
G0 X85 Y257 F3000
[gcode_macro SET_LIGHT]
gcode:
SET_PIN PIN=led_backlight VALUE={params.S|float}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CANCEL_PRINT_BASE
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.128000, 0.099750, 0.070500, 0.094000, 0.099750, 0.097750, 0.121000
#*# 0.110250, 0.070000, 0.039750, 0.038250, 0.032750, 0.064750, 0.093750
#*# 0.099250, 0.055250, 0.022250, -0.004500, 0.015750, 0.034250, 0.075500
#*# 0.088250, 0.036500, 0.018750, 0.000000, -0.002000, 0.027250, 0.057000
#*# 0.109500, 0.049750, 0.042250, 0.018250, 0.046750, 0.047000, 0.083750
#*# 0.124250, 0.071000, 0.042250, 0.057000, 0.053250, 0.057250, 0.093250
#*# 0.175250, -0.047000, 0.120250, 0.100750, 0.086500, 0.075000, 0.147250
#*# tension = 0.2
#*# min_x = 5.0
#*# algo = bicubic
#*# y_count = 7
#*# mesh_y_pps = 2
#*# min_y = 25.0
#*# x_count = 7
#*# max_y = 244.96
#*# mesh_x_pps = 2
#*# max_x = 245.0
#*#
#*# [bed_mesh T120]
#*# version = 1
#*# points =
#*# 0.128000, 0.099750, 0.070500, 0.094000, 0.099750, 0.097750, 0.121000
#*# 0.110250, 0.070000, 0.039750, 0.038250, 0.032750, 0.064750, 0.093750
#*# 0.099250, 0.055250, 0.022250, -0.004500, 0.015750, 0.034250, 0.075500
#*# 0.088250, 0.036500, 0.018750, 0.000000, -0.002000, 0.027250, 0.057000
#*# 0.109500, 0.049750, 0.042250, 0.018250, 0.046750, 0.047000, 0.083750
#*# 0.124250, 0.071000, 0.042250, 0.057000, 0.053250, 0.057250, 0.093250
#*# 0.175250, -0.047000, 0.120250, 0.100750, 0.086500, 0.075000, 0.147250
#*# tension = 0.2
#*# min_x = 5.0
#*# algo = bicubic
#*# y_count = 7
#*# mesh_y_pps = 2
#*# min_y = 25.0
#*# x_count = 7
#*# max_y = 244.96
#*# mesh_x_pps = 2
#*# max_x = 245.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment