Maybe usable?

This commit is contained in:
Kyle Brown 2023-06-22 03:18:32 +00:00
parent d0523dcf31
commit 4df7e1f100
4 changed files with 298 additions and 298 deletions

88
basic_macros.cfg Normal file
View file

@ -0,0 +1,88 @@
[gcode_macro PARK]
gcode:
{% set th = printer.toolhead %}
G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30
[gcode_macro G32]
gcode:
SAVE_GCODE_STATE NAME=STATE_G32
G90
G28
QUAD_GANTRY_LEVEL
G28
PARK
RESTORE_GCODE_STATE NAME=STATE_G32
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode:
G32 ; home all axes
G90 ; absolute positioning
G1 Z20 F3000 ; move nozzle away from bed
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
# safe anti-stringing move coords
{% set th = printer.toolhead %}
{% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %}
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}
SAVE_GCODE_STATE NAME=STATE_PRINT_END
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-5.0 F1800 ; retract filament
TURN_OFF_HEATERS
G90 ; absolute positioning
G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing
G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear
M107 ; turn off fan
BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END
#QUAD_GANTRY_LEVEL horizontal_move_z=10 retry_tolerance=1.000 # First slow pass far away from the bed as a "sanity check"
#QUAD_GANTRY_LEVEL horizontal_move_z=2 # Lower pass at speed
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
BED_MESH_CLEAR
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
#Edit this#
#{% set bound = params.BOUND|default(5)|int %}
#{% set X = printer.toolhead.axis_minimum.x + bound %}
#{% set Y = printer.toolhead.axis_maximum.y - bound %}
#{% set Z = bound %}
###########
SAVE_GCODE_STATE NAME=PAUSE_state
G1 E-1.7 F2100
PARK
BASE_PAUSE
#G91
#G1 Z{Z}
#G90
#G1 X{X} Y{Y} F6000
#G91
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
G91
G1 E1.7 F2100
G91
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME

27
fans.cfg Normal file
View file

@ -0,0 +1,27 @@
[multi_pin pcf_fan_pins]
pins: PE6, PE0
[fan]
## Print Cooling Fan - FAN0 - MAKE SURE TO SET THE VOLTAGE JUMPER!
pin: multi_pin:pcf_fan_pins
kick_start_time: 0.5
## Depending on your fan, you may need to increase this value
## if your fan will not start. Can change cycle_time (increase)
## if your fan is not able to slow down effectively
off_below: 0.10
[heater_fan hotend_fan]
## Hotend Fan - FAN1
pin: PC12
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
## If you are experiencing back flow, you can reduce fan_speed
#fan_speed: 1.0
#[controller_fan controller_fan]
## Controller fan - FAN2
#pin: PBE5
#kick_start_time: 0.5
#heater: heater_bed

View file

@ -5,30 +5,18 @@
# See docs/Config_Reference.md for a description of parameters.
## THINGS TO CHANGE/CHECK: ***
## MCU paths [mcu] section
## Thermistor types [extruder] and [heater_bed] sections - See 'sensor types' list at end of file
## Z Endstop Switch location [safe_z_home] section
## Homing end position [gcode_macro G32] section
## Z Endstop Switch offset for Z0 [stepper_z] section
## Probe points [quad_gantry_level] section
## Min & Max gantry corner postions [quad_gantry_level] section
## PID tune [extruder] and [heater_bed] sections
## Thermistor types [extruder] and [heater_bed] sections
## Probe pin [probe] section
## Fine tune E steps [extruder] section
#####################################################################
# Important other files
#####################################################################
[mcu]
## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify
##--------------------------------------------------------------------
serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_4700270009504B4633373520-if00
restart_method: command
##--------------------------------------------------------------------
[printer]
kinematics: corexy
@ -38,183 +26,15 @@ max_z_velocity: 15
max_z_accel: 350
square_corner_velocity: 5.0
#####################################################################
# X/Y Stepper Settings
#####################################################################
[include steppers.cfg]
[include fans.cfg]
[include basic_macros.cfg]
## B Stepper - Left
## Connected to MOTOR_1
[stepper_x]
step_pin: PE2
dir_pin: PB4
enable_pin: !PC11
rotation_distance: 32
microsteps: 32
full_steps_per_rotation:200
position_min: 0
position_endstop: 180
position_max: 180
homing_positive_dir: true
endstop_pin: ^PF3
homing_retract_dist: 5
homing_speed: 50 #Max 100
[virtual_sdcard]
path: ~/printer_data/gcodes
[tmc2209 stepper_x]
uart_pin: PC10
interpolate: false
run_current: 0.6
stealthchop_threshold: 0
## A Stepper - Right
## Connected to MOTOR_2
[stepper_y]
step_pin: PF12
dir_pin: PF11
enable_pin: !PB3
endstop_pin: ^PF4
rotation_distance: 32
microsteps: 32
full_steps_per_rotation:200
position_min: 0
position_endstop: 190
position_max: 190
homing_positive_dir: true
endstop_pin: ^PF4
homing_retract_dist: 5
homing_speed: 50 #Max 100
[tmc2209 stepper_y]
uart_pin: PF13
interpolate: false
run_current: 0.6
stealthchop_threshold: 0
#####################################################################
# Z Stepper Settings
#####################################################################
## Z0 Stepper - Front Left
## Connected to MOTOR_3
[stepper_z]
step_pin: PD7
dir_pin: !PD6
enable_pin: !PF10
rotation_distance: 32
gear_ratio: 64:16
microsteps: 32
endstop_pin: ^PF5
## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0)
## (+) value = endstop above Z0, (-) value = endstop below
## Increasing position_endstop brings nozzle closer to the bed
## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config
position_endstop: -0.5
position_max: 165
position_min: -5
homing_speed: 8
second_homing_speed: 3
homing_retract_dist: 3
[tmc2209 stepper_z]
uart_pin: PF9
interpolate: false
run_current: 0.6
stealthchop_threshold: 0
## Z1 Stepper - Rear Left
## Connected to MOTOR_4
[stepper_z1]
step_pin: PD3
dir_pin: PD2
enable_pin: !PD1
rotation_distance: 32
gear_ratio: 64:16
microsteps: 32
[tmc2209 stepper_z1]
uart_pin: PD4
interpolate: false
run_current: 0.6
stealthchop_threshold: 0
## Z2 Stepper - Rear Right
## Connected to MOTOR_5
[stepper_z2]
step_pin: PC9
dir_pin: !PC8
enable_pin: !PD1
rotation_distance: 32
gear_ratio: 64:16
microsteps: 32
[tmc2209 stepper_z2]
uart_pin: PF2
interpolate: false
run_current: 0.6
sense_resistor: 0.110
stealthchop_threshold: 0
## Z3 Stepper - Front Right
## Connected to MOTOR_6
[stepper_z3]
step_pin: PA10
dir_pin: PA14
enable_pin: !PA15
rotation_distance: 32
gear_ratio: 64:16
microsteps: 32
[tmc2209 stepper_z3]
uart_pin: PD0
interpolate: false
run_current: 0.6
sense_resistor: 0.110
stealthchop_threshold: 0
#####################################################################
# Extruder
#####################################################################
## Connected to MOTOR_7
## Heater - HE0
## Thermistor - T0
[extruder]
step_pin: PD11
dir_pin: PD9
enable_pin: !PD15
## Update value below when you perform extruder calibration
## If you ask for 100mm of filament, but in reality it is 98mm:
## rotation_distance = <previous_rotation_distance> * <actual_extrude_distance> / 100
## 22.6789511 is a good starting point
rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears
gear_ratio: 50:10 #BMG Gear Ratio
microsteps: 32
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: PA3
## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types.
## Use "Generic 3950" for NTC 100k 3950 thermistors
sensor_type: PT1000
sensor_pin: PA1
min_temp: 10
max_temp: 350
max_power: 1.0
min_extrude_temp: 170
control = pid
pid_kp = 26.213
pid_ki = 1.304
pid_kd = 131.721
## E0 on MOTOR7
[tmc2209 extruder]
uart_pin: PD14
interpolate: false
run_current: 0.3
stealthchop_threshold: 0
[display_status]
[pause_resume]
#####################################################################
@ -222,11 +42,7 @@ stealthchop_threshold: 0
#####################################################################
[heater_bed]
## Heater Pin - BED_OUT - PB7
## Thermistor - TB - PA0
heater_pin: PB7
## Validate the following thermistor type to make sure it is correct
## See https://www.klipper3d.org/Config_Reference.html#common-thermistors for additional options
heater_pin: PE1
sensor_type: Generic 3950
sensor_pin: PA0
max_power: 0.6
@ -242,7 +58,6 @@ pid_kd: 363.769
#####################################################################
[probe]
## Klicky Probe - Since this is just an endstop switch its wired up to one of the endstop ports
# Uses the PS-ON port as we ran out of endstops
pin: PC3
x_offset: 0
@ -255,35 +70,6 @@ sample_retract_dist: 3.0
samples_tolerance: 0.006
samples_tolerance_retries: 3
#####################################################################
# Fan Control
#####################################################################
[fan]
## Print Cooling Fan - FAN0 - MAKE SURE TO SET THE VOLTAGE JUMPER!
pin: PE6
kick_start_time: 0.5
## Depending on your fan, you may need to increase this value
## if your fan will not start. Can change cycle_time (increase)
## if your fan is not able to slow down effectively
off_below: 0.10
[heater_fan hotend_fan]
## Hotend Fan - FAN1
pin: PE0
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
## If you are experiencing back flow, you can reduce fan_speed
#fan_speed: 1.0
[controller_fan controller_fan]
## Controller fan - FAN2
pin: PB6
kick_start_time: 0.5
heater: heater_bed
#####################################################################
# Homing and Gantry Adjustment Routines
#####################################################################
@ -291,8 +77,6 @@ heater: heater_bed
[idle_timeout]
timeout: 1800
[quad_gantry_level]
# Gantry Corners for Micron+ Build
@ -334,26 +118,6 @@ aliases:
EXP2_7=PE8, EXP2_8=<RST>,
EXP2_9=<GND>, EXP2_10=PC5
# See the sample-lcd.cfg file for definitions of common LCD displays.
#[bltouch]
#sensor_pin: PB2
#control_pin: PB1
# Proximity switch
#[probe]
#pin: PF6
#[neopixel my_neopixel_1]
#pin: PA9
#[neopixel my_neopixel_2]
#pin: PB15
#[hall_filament_width_sensor]
#adc1: PC5
#adc2: PB0
#[z_thermal_adjust]
#temp_coeff: #23.4 μm/m·°C for Misumi A6N01SS-T5 6005A-T5 aluminum alloy
# The temperature coefficient of expansion, in mm/degC. For example, a
@ -381,57 +145,3 @@ aliases:
#gcode_id:
# See the "heater_generic" section for the definition of this
# parameter.
#####################################################################
# Macros
#####################################################################
[gcode_macro PARK]
gcode:
{% set th = printer.toolhead %}
G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30
[gcode_macro G32]
gcode:
SAVE_GCODE_STATE NAME=STATE_G32
G90
G28
QUAD_GANTRY_LEVEL
G28
PARK
RESTORE_GCODE_STATE NAME=STATE_G32
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode:
G32 ; home all axes
G90 ; absolute positioning
G1 Z20 F3000 ; move nozzle away from bed
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
# safe anti-stringing move coords
{% set th = printer.toolhead %}
{% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %}
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}
SAVE_GCODE_STATE NAME=STATE_PRINT_END
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-5.0 F1800 ; retract filament
TURN_OFF_HEATERS
G90 ; absolute positioning
G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing
G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear
M107 ; turn off fan
BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END
#QUAD_GANTRY_LEVEL horizontal_move_z=10 retry_tolerance=1.000 # First slow pass far away from the bed as a "sanity check"
#QUAD_GANTRY_LEVEL horizontal_move_z=2 # Lower pass at speed

175
steppers.cfg Normal file
View file

@ -0,0 +1,175 @@
#####################################################################
# X/Y Stepper Settings
#####################################################################
## B Stepper - Left
## Connected to MOTOR_5
[stepper_x]
step_pin: PC9
dir_pin: PC8
enable_pin: !PD1
endstop_pin: ^PC1
rotation_distance: 32
microsteps: 32
full_steps_per_rotation:200
position_min: 0
position_endstop: 180
position_max: 180
homing_positive_dir: true
homing_retract_dist: 5
homing_speed: 50 #Max 100
[tmc2209 stepper_x]
uart_pin: PD0
interpolate: false
run_current: 0.6
stealthchop_threshold: 0
## A Stepper - Right
## Connected to MOTOR_6
[stepper_y]
step_pin: PA10
dir_pin: PA14
enable_pin: !PA15
endstop_pin: ^PC2
rotation_distance: 32
microsteps: 32
full_steps_per_rotation:200
position_min: 0
position_endstop: 190
position_max: 190
homing_positive_dir: true
homing_retract_dist: 5
homing_speed: 50 #Max 100
[tmc2209 stepper_y]
uart_pin: PF8
interpolate: false
run_current: 0.6
stealthchop_threshold: 0
#####################################################################
# Z Stepper Settings
#####################################################################
## Z0 Stepper - Front Left
## Connected to MOTOR_1
[stepper_z]
step_pin: PE2
dir_pin: !PB4
enable_pin: !PC11
rotation_distance: 32
gear_ratio: 64:16
microsteps: 32
endstop_pin: ^PF3
## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0)
## (+) value = endstop above Z0, (-) value = endstop below
## Increasing position_endstop brings nozzle closer to the bed
## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config
position_endstop: -0.5
position_max: 165
position_min: -5
homing_speed: 8
second_homing_speed: 3
homing_retract_dist: 3
[tmc2209 stepper_z]
uart_pin: PC10
interpolate: false
run_current: 0.6
stealthchop_threshold: 0
## Z1 Stepper - Rear Left
## Connected to MOTOR_2
[stepper_z1]
step_pin: PF12
dir_pin: PF11
enable_pin: !PB3
rotation_distance: 32
gear_ratio: 64:16
microsteps: 32
[tmc2209 stepper_z1]
uart_pin: PF13
interpolate: false
run_current: 0.6
stealthchop_threshold: 0
## Z2 Stepper - Rear Right
## Connected to MOTOR_3
[stepper_z2]
step_pin: PD7
dir_pin: !PD6
enable_pin: !PF10
rotation_distance: 32
gear_ratio: 64:16
microsteps: 32
[tmc2209 stepper_z2]
uart_pin: PF9
interpolate: false
run_current: 0.6
sense_resistor: 0.110
stealthchop_threshold: 0
## Z3 Stepper - Front Right
## Connected to MOTOR_4
[stepper_z3]
step_pin: PD3
dir_pin: PD2
enable_pin: !PD5
rotation_distance: 32
gear_ratio: 64:16
microsteps: 32
[tmc2209 stepper_z3]
uart_pin: PD4
interpolate: false
run_current: 0.6
sense_resistor: 0.110
stealthchop_threshold: 0
#####################################################################
# Extruder
#####################################################################
## Connected to MOTOR_7
## Heater - HE0
## Thermistor - T0
[extruder]
step_pin: PD11
dir_pin: PD9
enable_pin: !PD15
## Update value below when you perform extruder calibration
## If you ask for 100mm of filament, but in reality it is 98mm:
## rotation_distance = <previous_rotation_distance> * <actual_extrude_distance> / 100
## 22.6789511 is a good starting point
rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears
gear_ratio: 50:10 #BMG Gear Ratio
microsteps: 32
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: PA3
## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types.
## Use "Generic 3950" for NTC 100k 3950 thermistors
sensor_type: PT1000
pullup_resistor: 2200
sensor_pin: PA1
min_temp: 10
max_temp: 350
max_power: 1.0
min_extrude_temp: 170
control = pid
pid_kp = 26.213
pid_ki = 1.304
pid_kd = 131.721
## E0 on MOTOR7
[tmc2209 extruder]
uart_pin: PD14
interpolate: false
run_current: 0.3
stealthchop_threshold: 0