Skip to content

Instantly share code, notes, and snippets.

@eropple
Last active January 14, 2023 03:53
Show Gist options
  • Save eropple/6e8a53ad2ca40eef56c85a665cecf0d4 to your computer and use it in GitHub Desktop.
Save eropple/6e8a53ad2ca40eef56c85a665cecf0d4 to your computer and use it in GitHub Desktop.
cr-10 smart/cr-6/ender6/ender7 klipper configs (via Sonic Pad
# !CR-10 Smart
# printer_size: 300x300x400
# version: 3.2
# This file contains pin mappings for the Creality CR-10 Smart
# with a CRC-2405V1.2 board.
# To use this config, during "make menuconfig" select the STM32F103
# with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# MAKE SURE TO SET PA0 on startup (in the firmware).
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# The machine itself includes a small router that can run a Klipper
# frontend. You don't need to buy a single-board computer.
# See docs/Config_Reference.md for a description of parameters.
###fluidd set
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE
[stepper_x]
step_pin: PB8
dir_pin: !PB7
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC4
position_min: -5
position_endstop: -5
position_max: 305
homing_speed: 80
[stepper_y]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC5
position_min: -2
position_endstop: -2
position_max: 302
homing_speed: 80
[stepper_z]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
rotation_distance: 8
microsteps: 16
endstop_pin: probe:z_virtual_endstop
position_min: -1.5
position_max: 405
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0
[extruder]
max_extrude_only_distance: 1000.0
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
rotation_distance: 30.4768
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB14
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB1
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_Kp: 14.32
pid_Ki: 0.81
pid_Kd: 63.12
min_temp: 0
max_temp: 275
[heater_bed]
heater_pin: PB13
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB0
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_Kp: 79.49
pid_Ki: 1.17
pid_Kd: 1349.52
min_temp: 0
max_temp: 120
[fan]
pin: PB15
kick_start_time: 1.0
#set heater fan runnig with temperature over 60;
[heater_fan my_nozzle_fan]
pin: PD2
max_power: 1.0
shutdown_speed : 0
heater:extruder
heater_temp : 60
fan_speed : 1.0
[mcu]
serial: /dev/serial/by-id/usb_serial_1
restart_method: command
[probe]
pin: PA4
x_offset: 0.0
y_offset: 0.0
z_offset: 0
speed: 3
lift_speed: 5
samples_tolerance: 0.05
samples_tolerance_retries: 2
samples: 1
[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: ^!PA7
[static_digital_output daughterboard_communication]
pins: !PA5
# [bltouch]
# sensor_pin: ^PB1 #signal check port ^stand for pull up
# control_pin: PB0 #singal control prot
# #x_offset: -31.8
# #y_offset: -40.5
# #z_offset: 1.50 #z off_set configuration
# speed: 3.0
# stow_on_each_sample = false #high speed for bltoch,
# samples: 1
# #probe_with_touch_mode = true
[bed_mesh]
speed: 150
mesh_min: 10,10 #need to handle head distance with bl_touch
mesh_max: 295,295 #max probe range
probe_count: 5,5
fade_start: 1
fade_end: 10
fade_target: 0
[safe_z_home]
home_xy_position:150,150
speed: 200
z_hop: 5
z_hop_speed: 3
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_speed: 2000000
#spi_bus: spidev2.0
#[resonance_tester]
#accel_chip: adxl345
#accel_per_hz: 70
#probe_points:
# 150,150,20
[input_shaper]
shaper_type_x = 2hump_ei
shaper_freq_x = 90.6
shaper_type_y = mzv
shaper_freq_y = 27.2
[gcode_macro G29] #界面中增加G29指令
gcode:
G28
bed_mesh_calibrate
G1 X0 Y0 Z10 F4200
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 5000
square_corner_velocity: 5.0
max_z_velocity: 10
max_z_accel: 1000
[include timelapse.cfg]
# !CR-10 Smart
# printer_size: 300x300x400
# version: 3.2
# This file contains pin mappings for the Creality CR-10 Smart
# with a CR-FDM-v2.5.S1 board.
# To use this config, during "make menuconfig" select the STM32F103
# with a "64KiB bootloader" and serial (on USART1 PA10/PA9)
# MAKE SURE TO SET PA0 on startup (in the firmware).
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# The machine itself includes a small router that can run a Klipper
# frontend. You don't need to buy a single-board computer.
# See docs/Config_Reference.md for a description of parameters.
###fluidd set
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE
[stepper_x]
step_pin: PB8
dir_pin: !PB7
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC4
position_min: -5
position_endstop: -5
position_max: 305
homing_speed: 80
[stepper_y]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC5
position_min: -2
position_endstop: -2
position_max: 302
homing_speed: 80
[stepper_z]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
rotation_distance: 8
microsteps: 16
endstop_pin: probe:z_virtual_endstop
position_min: -1.5
position_max: 405
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0
[extruder]
max_extrude_only_distance: 1000.0
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
rotation_distance: 30.4768
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB14
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB1
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_Kp: 14.32
pid_Ki: 0.81
pid_Kd: 63.12
min_temp: 0
max_temp: 275
[heater_bed]
heater_pin: PB13
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB0
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_Kp: 79.49
pid_Ki: 1.17
pid_Kd: 1349.52
min_temp: 0
max_temp: 130
[fan]
pin: PB15
kick_start_time: 0.5
[mcu]
serial: /dev/serial/by-id/usb_serial_1
restart_method: command
# Before printing the PROBE_CALIBRATE command needs to be issued
# to run the probe calibration procedure, described at
# docs/Probe_Calibrate.md, to find the correct z_offset.
[probe]
pin: PC15
x_offset: 0.0
y_offset: 0.0
z_offset: 0
speed: 3
lift_speed: 5
samples_tolerance: 0.05
samples_tolerance_retries: 2
samples: 1
[safe_z_home]
home_xy_position:150,150
speed: 200
z_hop: 5
z_hop_speed: 3
############################
# bed mesh
############################
# A 5x5 bed mesh was choosen to have a point in the center of the bed
# that uses the middle mesh point, which is also the safe z home, for reference
[bed_mesh]
speed: 150
mesh_min: 23.5,23.5
mesh_max: 270,270
probe_count: 5,5
algorithm: bicubic
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 5000
square_corner_velocity: 5.0
max_z_velocity: 10
max_z_accel: 1000
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_speed: 2000000
#spi_bus: spidev2.0
#[resonance_tester]
#accel_chip: adxl345
#accel_per_hz: 70
#probe_points:
# 150,150,20
[input_shaper]
shaper_type_x = 2hump_ei
shaper_freq_x = 90.6
shaper_type_y = mzv
shaper_freq_y = 27.2
[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: ^!PA7
[static_digital_output daughterboard_communication]
pins: !PC14
[include timelapse.cfg]
[gcode_macro G29] # If moving from marlin to klipper uncomment to mimic G29
gcode:
G28
BED_MESH_CALIBRATE
G1 X0 Y0 Z10 F4000
# !CR-10 Smart
# printer_size: 300x300x400
# version: 3.2
# This file contains pin mappings for the Creality CR-10 Smart
# with a CR-FDM-v2.5.S1 board.
# To use this config, during "make menuconfig" select the STM32F401
# with a "64KiB bootloader" and serial (on USART1 PA10/PA9)
# MAKE SURE TO SET PA0 on startup (in the firmware).
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# The machine itself includes a small router that can run a Klipper
# frontend. You don't need to buy a single-board computer.
# See docs/Config_Reference.md for a description of parameters.
###fluidd set
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE
[stepper_x]
step_pin: PB8
dir_pin: !PB7
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC4
position_min: -5
position_endstop: -5
position_max: 305
homing_speed: 80
[stepper_y]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC5
position_min: -2
position_endstop: -2
position_max: 302
homing_speed: 80
[stepper_z]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
rotation_distance: 8
microsteps: 16
endstop_pin: probe:z_virtual_endstop
position_min: -1.5
position_max: 405
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0
[extruder]
max_extrude_only_distance: 1000.0
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
rotation_distance: 30.4768
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB14
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB1
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_Kp: 14.32
pid_Ki: 0.81
pid_Kd: 63.12
min_temp: 0
max_temp: 275
[heater_bed]
heater_pin: PB13
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB0
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_Kp: 79.49
pid_Ki: 1.17
pid_Kd: 1349.52
min_temp: 0
max_temp: 130
[fan]
pin: PB15
kick_start_time: 0.5
[mcu]
serial: /dev/serial/by-id/usb_serial_1
restart_method: command
# Before printing the PROBE_CALIBRATE command needs to be issued
# to run the probe calibration procedure, described at
# docs/Probe_Calibrate.md, to find the correct z_offset.
[probe]
pin: PC15
x_offset: 0.0
y_offset: 0.0
z_offset: 0
speed: 3
lift_speed: 5
samples_tolerance: 0.05
samples_tolerance_retries: 2
samples: 1
[safe_z_home]
home_xy_position:150,150
speed: 200
z_hop: 5
z_hop_speed: 3
############################
# bed mesh
############################
# A 5x5 bed mesh was choosen to have a point in the center of the bed
# that uses the middle mesh point, which is also the safe z home, for reference
[bed_mesh]
speed: 150
mesh_min: 23.5,23.5
mesh_max: 270,270
probe_count: 5,5
algorithm: bicubic
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 5000
square_corner_velocity: 5.0
max_z_velocity: 10
max_z_accel: 1000
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_speed: 2000000
#spi_bus: spidev2.0
#[resonance_tester]
#accel_chip: adxl345
#accel_per_hz: 70
#probe_points:
# 150,150,20
[input_shaper]
shaper_type_x = 2hump_ei
shaper_freq_x = 90.6
shaper_type_y = mzv
shaper_freq_y = 27.2
[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: ^!PA7
[static_digital_output daughterboard_communication]
pins: !PC14
[include timelapse.cfg]
[gcode_macro G29] #界面中增加G29指令
gcode:
G28
bed_mesh_calibrate
G1 X0 Y0 Z10 F4200
# !CR-10 Smart Pro
# printer_size: 300x300x400
# version: 3.2
# This file contains pin mappings for the Creality CR-10 Smart Pro
# with a CR-FDM-v2.5.S1 board.
# To use this config, during "make menuconfig" select the STM32F103
# with a "64KiB bootloader" and serial (on USART1 PA10/PA9)
# communication. Enable PA0 GPIO pin on startup.
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# The machine itself includes a small router that can run a Klipper
# frontend. You don't need to buy a single-board computer.
# See docs/Config_Reference.md for a description of parameters.
###fluidd set
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE
[stepper_x]
step_pin: PB8
dir_pin: !PB7
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC4
position_min: -5
position_endstop: -5
position_max: 305
homing_speed: 50
[stepper_y]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC5
position_min: -2
position_endstop: -2
position_max: 302
homing_speed: 50
[stepper_z]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
rotation_distance: 8
microsteps: 16
endstop_pin: probe:z_virtual_endstop
position_min: -10
position_max: 405
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0
[extruder]
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
rotation_distance: 7.640
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB14
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB1
control: pid
pid_Kp: 22.865
pid_Ki: 1.292
pid_Kd: 101.178
min_temp: 0
max_temp: 305
[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: !PA15
[heater_bed]
heater_pin: PB13
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB0
control: pid
pid_Kp: 72.49
pid_Ki: 0.844
pid_Kd: 1542.189
min_temp: 0
max_temp: 130
[heater_fan hotend_fan]
pin: PC13
heater: extruder
heater_temp: 50.0
[fan]
pin: PB15
kick_start_time: 0.5
[mcu]
serial: /dev/serial/by-id/usb_serial_1
restart_method: command
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_speed: 2000000
#spi_bus: spidev2.0
#[resonance_tester]
#accel_chip: adxl345
#accel_per_hz: 70
#probe_points:
# 150,150,10
[input_shaper]
shaper_type_x = mzv
shaper_freq_x = 56.8
shaper_type_y = 2hump_ei
shaper_freq_y = 41.4
[bltouch]
sensor_pin: ^PC15
control_pin: PC14
x_offset: -32.5
y_offset: -40.6
z_offset: 0
speed: 20
samples: 1
stow_on_each_sample: False
[safe_z_home]
home_xy_position: 182.5,190
speed: 200
z_hop: 10
z_hop_speed: 10
[bed_screws]
screw1: 30, 30
screw2: 270, 30
screw3: 270, 270
screw4: 30, 270
[bed_mesh]
speed: 150
mesh_min: 23.5,23.5
mesh_max: 270,260
probe_count: 5,5
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0
# Main light bar
[output_pin lights]
pin: PA7
value: 1
# Turns off the printer
[output_pin power]
pin: PA0
value: 1
shutdown_value: 1
# Conservative default values that mimic the behaviour of the
# stock firmware for easy results. It can go faster.
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 5000
square_corner_velocity: 5.0
max_z_velocity: 10
max_z_accel: 1000
[include timelapse.cfg]
[gcode_macro G29] #界面中增加G29指令
gcode:
G28
bed_mesh_calibrate
G1 X0 Y0 Z10 F4200
# !CR-10 Smart Pro
# printer_size: 300x300x400
# version: 3.2
# This file contains pin mappings for the Creality CR-10 Smart Pro
# with a CR-FDM-v2.5.S1 board.
# To use this config, during "make menuconfig" select the STM32F401
# with a "64KiB bootloader" and serial (on USART1 PA10/PA9)
# communication. Enable PA0 GPIO pin on startup.
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# The machine itself includes a small router that can run a Klipper
# frontend. You don't need to buy a single-board computer.
# See docs/Config_Reference.md for a description of parameters.
###fluidd set
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE
[stepper_x]
step_pin: PB8
dir_pin: !PB7
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC4
position_min: -5
position_endstop: -5
position_max: 305
homing_speed: 50
[stepper_y]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC5
position_min: -2
position_endstop: -2
position_max: 302
homing_speed: 50
[stepper_z]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
rotation_distance: 8
microsteps: 16
endstop_pin: probe:z_virtual_endstop
position_min: -10
position_max: 405
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0
[extruder]
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
rotation_distance: 7.640
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB14
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB1
control: pid
pid_Kp: 22.865
pid_Ki: 1.292
pid_Kd: 101.178
min_temp: 0
max_temp: 305
[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: !PA15
[heater_bed]
heater_pin: PB13
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB0
control: pid
pid_Kp: 72.49
pid_Ki: 0.844
pid_Kd: 1542.189
min_temp: 0
max_temp: 130
[heater_fan hotend_fan]
pin: PC13
heater: extruder
heater_temp: 50.0
[fan]
pin: PB15
kick_start_time: 0.5
[mcu]
serial: /dev/serial/by-id/usb_serial_1
restart_method: command
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_speed: 2000000
#spi_bus: spidev2.0
#[resonance_tester]
#accel_chip: adxl345
#accel_per_hz: 70
#probe_points:
# 150,150,10
[input_shaper]
shaper_type_x = mzv
shaper_freq_x = 56.8
shaper_type_y = 2hump_ei
shaper_freq_y = 41.4
[bltouch]
sensor_pin: ^PC15
control_pin: PC14
x_offset: -32.5
y_offset: -40.6
z_offset: 0
speed: 20
samples: 1
stow_on_each_sample: False
[safe_z_home]
home_xy_position: 182.5,190
speed: 200
z_hop: 10
z_hop_speed: 10
[bed_screws]
screw1: 30, 30
screw2: 270, 30
screw3: 270, 270
screw4: 30, 270
[bed_mesh]
speed: 150
mesh_min: 23.5,23.5
mesh_max: 270,260
probe_count: 5,5
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0
# Main light bar
[output_pin lights]
pin: PA7
value: 1
# Turns off the printer
[output_pin power]
pin: PA0
value: 1
shutdown_value: 1
# Conservative default values that mimic the behaviour of the
# stock firmware for easy results. It can go faster.
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 5000
square_corner_velocity: 5.0
max_z_velocity: 10
max_z_accel: 1000
[include timelapse.cfg]
[gcode_macro G29] #界面中增加G29指令
gcode:
G28
bed_mesh_calibrate
G1 X0 Y0 Z10 F4200
# !CR-6 Max
# printer_size: 400x400x400
# version: 3.2
# This file contains pin mappings for the Creality CR-6 SE
# with a V4.5.3 board.
# To use this config, during "make menuconfig" select the STM32F103
# with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# The machine itself includes a small router that can run a Klipper
# frontend. You don't need to buy a single-board computer.
# See docs/Config_Reference.md for a description of parameters.
###fluidd set
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE
[stepper_x]
step_pin: PB8
dir_pin: !PB7
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC4
position_min: -5
position_endstop: -5
position_max: 405
homing_speed: 80
[stepper_y]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC5
position_min: -2
position_endstop: -2
position_max: 405
homing_speed: 80
[stepper_z]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
rotation_distance: 8
microsteps: 16
endstop_pin: probe:z_virtual_endstop
position_min: -1.5
position_max: 405
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0
[extruder]
max_extrude_only_distance: 1000.0
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
rotation_distance: 30.4768
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB14
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB1
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_kp = 22.692
pid_ki = 1.104
pid_kd = 116.580
min_temp: 0
max_temp: 275
[heater_bed]
heater_pin: PB13
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB0
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_kp = 67.350
pid_ki = 1.754
pid_kd = 646.562
min_temp: 0
max_temp: 130
[fan]
pin: PB15
kick_start_time: 1.0
#set heater fan runnig with temperature over 60;
[heater_fan my_nozzle_fan]
pin: PD2
max_power: 1.0
shutdown_speed : 0
heater:extruder
heater_temp : 60
fan_speed : 1.0
[mcu]
serial: /dev/serial/by-id/usb_serial_1
restart_method: command
[probe]
pin: PA4
x_offset: 0.0
y_offset: 0.0
z_offset: -0.2
speed: 3
lift_speed: 5
samples_tolerance: 0.05
samples_tolerance_retries: 2
samples: 1
[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: ^!PA7
[static_digital_output daughterboard_communication]
pins: !PA5
[bed_mesh]
speed: 120
mesh_min: 15,15 #need to handle head distance with bl_touch
mesh_max: 385,385 #max probe range
probe_count: 5,5
fade_start: 1
fade_end: 10
fade_target: 0
[safe_z_home]
home_xy_position:200,200
speed: 100
z_hop: 5
z_hop_speed: 3
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_speed: 2000000
#spi_bus: spidev2.0
#[resonance_tester]
#accel_chip: adxl345
#accel_per_hz: 70
#probe_points:
# 200,200,20
[input_shaper]
shaper_type_x = 2hump_ei
shaper_freq_x = 81.8
shaper_type_y = mzv
shaper_freq_y = 38.0
[output_pin LED_pin]
pin: PA6
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 5000
max_z_velocity: 10
max_z_accel: 1000
square_corner_velocity: 5.0
[gcode_macro LED_ON]
gcode:
SET_PIN PIN=LED_pin VALUE=1
[gcode_macro LED_OFF]
gcode:
SET_PIN PIN=LED_pin VALUE=0
[include timelapse.cfg]
[gcode_macro G29] #界面中增加G29指令
gcode:
G28
bed_mesh_calibrate
G1 X0 Y0 Z10 F4200
# !CR-6 SE
# printer_size: 235x235x250
# version: 3.2
# This file contains pin mappings for the Creality CR-6 SE
# with a V4.5.3 board.
# To use this config, during "make menuconfig" select the STM32F103
# with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# Flash this firmware on the MCU by copying "out/klipper.bin" to an SD
# card and turning the printer on with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# The machine itself includes a small router that can run a Klipper
# frontend. You don't need to buy a single-board computer.
# See docs/Config_Reference.md for a description of parameters.
###fluidd set
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE
[stepper_x]
step_pin: PB8
dir_pin: !PB7
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC4
position_min: -5
position_endstop: -5
position_max: 235
homing_speed: 80
[stepper_y]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
rotation_distance: 40
microsteps: 16
endstop_pin: PC5
position_min: -2
position_endstop: -2
position_max: 235
homing_speed: 80
[stepper_z]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
rotation_distance: 8
microsteps: 16
endstop_pin: probe:z_virtual_endstop
position_min: -1.5
position_max: 255
homing_speed: 4
second_homing_speed: 1
homing_retract_dist: 2.0
[extruder]
max_extrude_only_distance: 1000.0
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
rotation_distance: 30.4768
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB14
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB1
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_kp = 22.692
pid_ki = 1.104
pid_kd = 116.580
min_temp: 0
max_temp: 275
[heater_bed]
heater_pin: PB13
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PB0
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_kp = 67.350
pid_ki = 1.754
pid_kd = 646.562
min_temp: 0
max_temp: 130
[fan]
pin: PB15
kick_start_time: 1.0
#set heater fan runnig with temperature over 60;
[heater_fan my_nozzle_fan]
pin: PD2
max_power: 1.0
shutdown_speed : 0
heater:extruder
heater_temp : 60
fan_speed : 1.0
[mcu]
serial: /dev/serial/by-id/usb_serial_1
restart_method: command
[probe]
pin: PA4
x_offset: 0.0
y_offset: 0.0
z_offset: -0.2
speed: 3
lift_speed: 5
samples_tolerance: 0.05
samples_tolerance_retries: 2
samples: 1
[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: ^!PA7
[static_digital_output daughterboard_communication]
pins: !PA5
[bed_mesh]
speed: 120
mesh_min: 10,10 #need to handle head distance with bl_touch
mesh_max: 220,220 #max probe range
probe_count: 5,5
fade_start: 1
fade_end: 10
fade_target: 0
[safe_z_home]
home_xy_position:115,115
speed: 100
z_hop: 5
z_hop_speed: 3
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_speed: 2000000
#spi_bus: spidev2.0
#[resonance_tester]
#accel_chip: adxl345
#accel_per_hz: 70
#probe_points:
# 115,115,20
[input_shaper]
shaper_type_x = 2hump_ei
shaper_freq_x = 81.8
shaper_type_y = mzv
shaper_freq_y = 38.0
[output_pin LED_pin]
pin: PA6
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 5000
max_z_velocity: 10
max_z_accel: 1000
square_corner_velocity: 5.0
[gcode_macro LED_ON]
gcode:
SET_PIN PIN=LED_pin VALUE=1
[gcode_macro LED_OFF]
gcode:
SET_PIN PIN=LED_pin VALUE=0
[include timelapse.cfg]
[gcode_macro G29] #界面中增加G29指令
gcode:
G28
bed_mesh_calibrate
G1 X0 Y0 Z10 F4200
# !Ender-6
# printer_size: 250*250*400
# version: 3.2
# This file contains pin mappings for the stock 2020 Creality Ender 6.
# To use this config, during "make menuconfig" select the STM32F103
# with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.
# Because this printer has factory wiring, mounts, and firmware for
# a BLTouch, but does not ship with one at this time, default values
# for the sensor have been specified, but disabled, in anticipation of
# future revisions or user modification. User should take care to
# customize the offsets, particularly z-offset, for their specific unit.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# See docs/Config_Reference.md for a description of parameters.
###fluidd set
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE
[stepper_x]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: 260
position_max: 260
homing_speed: 50
[stepper_y]
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_endstop: 260
position_max: 260
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
position_endstop: 0.0 # disable to use BLTouch
endstop_pin: ^PA7 # disable to use BLTouch
# endstop_pin: probe:z_virtual_endstop # enable to use BLTouch
# position_min: -5 # enable to use BLTouch
position_max: 400
[extruder]
max_extrude_only_distance: 1000.0
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 22.857
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
pid_Kp: 26.949
pid_Ki: 1.497
pid_Kd: 121.269
min_temp: 0
max_temp: 260
# [safe_z_home] # enable for BLTouch
# home_xy_position: 150.7, 137
# speed: 100
# z_hop: 10
# z_hop_speed: 5
# [bltouch] # enable for BLTouch
# sensor_pin: ^PB1
# control_pin: PB0
# x_offset: -20.7
# y_offset: -7
# z_offset: 2.4
# speed:10
# samples:1
# samples_result:average
# probe_with_touch_mode: true
# stow_on_each_sample: false
# [bed_mesh] # enable for BLTouch
# speed: 100
# mesh_min: 10, 10
# mesh_max: 239, 239
# algorithm: bicubic
# probe_count: 5, 5
[bed_screws]
screw1: 25, 33
screw2: 222, 33
screw3: 222, 222
screw4: 25, 222
[verify_heater extruder]
check_gain_time: 200
hysteresis: 5
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
pid_Kp: 327.11
pid_Ki: 19.20
pid_Kd: 1393.45
min_temp: 0
max_temp: 100
[fan]
pin: PA0
[fan_generic extruder_partfan]
pin: PC6
[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: PA4
[mcu]
serial: /dev/serial/by-id/usb_serial_1
restart_method: command
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_speed: 2000000
#spi_bus: spidev2.0
#[resonance_tester]
#accel_chip: adxl345
#accel_per_hz: 70
#probe_points:
# 130,130,10
[printer]
kinematics: corexy
max_velocity: 500
max_accel: 5000
max_z_velocity: 10
max_z_accel: 1000
square_corner_velocity: 5.0
[input_shaper]
shaper_type_x = ei
shaper_freq_x = 110.4
shaper_type_y = mzv
shaper_freq_y = 87.0
[include timelapse.cfg]
# !Ender-7
# printer_size: 250x250x300
# version: 3.2
# This file contains pin mappings for the stock 2021 Creality Ender 7.
# To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.
# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# See docs/Config_Reference.md for a description of parameters.
###fluidd set
[virtual_sdcard]
path: ~/gcode_files
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z4.5 F300
G90
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
G28 X Y
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
G1 Y{y_park} F2000
M84
CANCEL_PRINT_BASE
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 32
rotation_distance: 32
endstop_pin: ^PA5
position_endstop: 0
position_max: 260
homing_speed: 80
[stepper_y]
step_pin: PB8
dir_pin: !PB7
enable_pin: !PC3
microsteps: 32
rotation_distance: 32
endstop_pin: ^PA6
position_endstop: 260
position_max: 260
homing_speed: 80
[stepper_z]
step_pin: PB6
dir_pin: PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
endstop_pin: ^PA7
position_endstop: 0.0
position_max: 300
[extruder]
pressure_advance : 0.520
max_extrude_only_distance: 1000.0
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
microsteps: 16
rotation_distance: 22.84
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
# tuned for stock hardware with 200 degree Celsius target
pid_kp = 19.028
pid_ki = 0.919
pid_kd = 98.472
min_temp: 0
max_temp: 265
[heater_bed]
heater_pin: PA15
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_kp = 74.146
pid_ki = 1.521
pid_kd = 903.658
min_temp: 0
max_temp: 130
[bed_screws]
screw1: 25, 33
screw2: 230, 33
screw3: 230, 230
screw4: 25, 230
[fan]
pin: PA0
[fan_generic extruder_partfan]
pin: PC6
[mcu]
serial: /dev/serial/by-id/usb_serial_1
restart_method: command
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_speed: 2000000
#spi_bus: spidev2.0
#[resonance_tester]
#accel_chip: adxl345
#accel_per_hz: 70
#probe_points:
# 125,125,10
[input_shaper]
shaper_type_x = 2hump_ei
shaper_freq_x = 118.8
shaper_type_y = mzv
shaper_freq_y = 59.4
[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: !PA4
[printer]
kinematics: corexy
max_velocity: 500
max_accel: 5000
max_z_velocity: 10
max_z_accel: 1000
square_corner_velocity: 5.0
[include timelapse.cfg]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment