From b53bfe9290d9901cbeb10ccc54044032d72176bb Mon Sep 17 00:00:00 2001 From: Kyle Brown Date: Wed, 6 Jul 2022 09:13:47 -0700 Subject: [PATCH] improve readability and reliability --- KlipperScreen.conf | 94 ++++++++++++++++++++++++++++++++++++++++++ basic_macros.cfg | 34 ++++++++------- calibration_macros.cfg | 16 ++++--- moonraker.conf | 10 +++++ pico.cfg | 3 +- printer.cfg | 10 ++--- purge_bucket.cfg | 10 ++--- sensorless.cfg | 11 ++--- sherpa_mini.cfg | 14 +++---- steppers.cfg | 8 ++-- 10 files changed, 162 insertions(+), 48 deletions(-) create mode 100644 KlipperScreen.conf diff --git a/KlipperScreen.conf b/KlipperScreen.conf new file mode 100644 index 0000000..1925170 --- /dev/null +++ b/KlipperScreen.conf @@ -0,0 +1,94 @@ +[printer Vz.44] +use_Dpms: False +titlebar_items: MCU + +[main] +theme = vzbot-theme-BlackCF +print_estimate_method = file +screen_blanking = 300 +font_size = small +use_dpms = False + +[displayed_macros Printer] +bed_mesh_calibrate = False +flow_calibration = False +get_timelapse_setup = False +hyperlapse = False +print_start = False +print_end = False +sensorless_home_y = False +heatsoak = False +test_speed = False +safe_unretract = False +m600 = False +safe_retract = False +sensorless_home_x = False +test_stream_delay = False +timelapse_render = False +timelapse_take_frame = False + +[preheat ABS] +bed = 110 +extruder = 200 + +[preheat ASA] +bed = 95 +extruder = 190 + +[preheat PLA] +bed = 55 +extruder = 175 +#~# --- Do not edit below this line. This section is auto generated --- #~# + +#~# +#~# [main] +#~# theme = vzbot-theme-BlackCF +#~# print_estimate_method = slicer +#~# screen_blanking = 3600 +#~# font_size = small +#~# use_dpms = False +#~# +#~# [displayed_macros Printer] +#~# bed_mesh_calibrate = False +#~# flow_calibration = False +#~# get_timelapse_setup = False +#~# hyperlapse = False +#~# print_start = False +#~# print_end = False +#~# sensorless_home_y = False +#~# heatsoak = False +#~# test_speed = False +#~# safe_unretract = False +#~# m600 = False +#~# safe_retract = False +#~# sensorless_home_x = False +#~# test_stream_delay = False +#~# timelapse_render = False +#~# timelapse_take_frame = False +#~# +#~# [displayed_macros Vz.44] +#~# cancel_print = False +#~# bed_mesh_calibrate = False +#~# disable_motors = False +#~# flow_calibration = False +#~# get_timelapse_setup = False +#~# hyperlapse = False +#~# pause = False +#~# print_start = False +#~# print_end = False +#~# sensorless_home_y = False +#~# resume = False +#~# heatsoak = False +#~# test_speed = False +#~# safe_unretract = False +#~# m600 = False +#~# safe_retract = False +#~# test_z_up_middle = False +#~# sensorless_home_x = False +#~# test_stream_delay = False +#~# test_z_down = False +#~# timelapse_render = False +#~# timelapse_take_frame = False +#~# test_z_down_middle = False +#~# test_z_up = False +#~# diff --git a/basic_macros.cfg b/basic_macros.cfg index cdfd6b3..2f5bd57 100644 --- a/basic_macros.cfg +++ b/basic_macros.cfg @@ -6,25 +6,22 @@ gcode: {% set DWELL = params.DWELL|default(300)|int %} {% set X = 200 %} - SET_VELOCITY_LIMIT ACCEL=5000 ACCEL_TO_DECEL=5000 SQUARE_CORNER_VELOCITY=8 - M104 S{hotendTemp|float*0.6} # set extruder pre warm temp + M104 S{hotendTemp|float*0.8} # set extruder pre warm temp M140 S{bedTemp} # set bed temp to warm while starting up G28 # home after setting temps M117 Waiting for temperatures... - M190 S{bedTemp} # Wait for bed to come to temperature - M117 Waiting for thermal expansion... + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bedTemp} MAXIMUM={bedTemp+1} ; Wait for bed temp (within 1 degree) HEATSOAK DWELL={DWELL} # Dwelling #ATTACH_PROBE # Have probe ready for calibration CLEAN_NOZZLE # Clean before getting offsets #BED_MESH_CALIBRATE AREA_START={params.AREA_START} AREA_END={params.AREA_END} G28 Z - CALIBRATE_Z # Auto calibrate the bed height + #CALIBRATE_Z # Auto calibrate the bed height GO_TO_BUCKET # No cleanup from nozzle ooze M109 S{hotendTemp} # Set extruder to printing temperature - HEATSOAK DWELL=15 # Wait for nozzle to actually hit temp CLEAN_NOZZLE # Final clean before print G90 - G1 X{X} F6000 # Avoid brush + G1 X{X} F{1000*60} # Avoid brush G91 [gcode_macro PRINT_END] @@ -38,7 +35,14 @@ gcode: [gcode_macro HEATSOAK] gcode: M117 Waiting for thermal expansion... - G4 P{params.DWELL|int*1000} + G4 P{params.DWELL|int*1000/4} + M117 Waiting for thermal expansion 25% + G4 P{params.DWELL|int*1000/4} + M117 Waiting for thermal expansion 50% + G4 P{params.DWELL|int*1000/4} + M117 Waiting for thermal expansion 75% + G4 P{params.DWELL|int*1000/4} + M117 Thermal expansion done [gcode_macro CANCEL_PRINT] rename_existing: BASE_CANCEL_PRINT @@ -80,13 +84,13 @@ gcode: RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1 BASE_RESUME -[gcode_macro UNLOAD] +[gcode_macro UNLOAD_FILAMENT] gcode: G91 - G1 E10.0 F1200 - G1 E3.0 F1600 - G1 E-13.14 F7000 - G1 E-100 F3000 + G1 E10.0 F{20*60} + G1 E3.0 F{26*60} + G1 E-13.14 F{120*60} + G1 E-100 F{50*60} [gcode_macro M600] gcode: @@ -112,8 +116,8 @@ gcode: G91 G1 Z{Z} G90 - G1 X{X} F4000 - G1 Y{Y} F4000 + G1 X{X} F{1000*60} + G1 Y{Y} F{1000*60} G91 [gcode_macro safe_retract] diff --git a/calibration_macros.cfg b/calibration_macros.cfg index 6ed6d4d..f7bd5ff 100644 --- a/calibration_macros.cfg +++ b/calibration_macros.cfg @@ -23,21 +23,25 @@ gcode: {% set amount = params.amount|default(1)|int %} TESTZ Z=+{amount} -[gcode_macro TEST_Z_UP_MIDDLE] +[gcode_macro TEST_Z_BISECT_UP] gcode: TESTZ Z=+ -[gcode_macro TEST_Z_DOWN_MIDDLE] +[gcode_macro TEST_Z_BISECT_DOWN] gcode: TESTZ Z=- -# Home, get position, throw around toolhead, home again. -# If MCU stepper positions (first line in GET_POSITION) are greater than a full step different (your number of microsteps), then skipping occured. -# We only measure to a full step to accomodate for endstop variance. -# Example: TEST_SPEED SPEED=300 ACCEL=5000 ITERATIONS=10 +[gcode_macro PID_HOTEND] +gcode: + PID_CALIBRATE HEATER=extruder TARGET=260 + +[gcode_macro PID_BED] +gcode: + PID_CALIBRATE HEATER=heater_bed TARGET=110 [gcode_macro TEST_SPEED] gcode: + # Example: TEST_SPEED SPEED=300 ACCEL=5000 ITERATIONS=10 # Speed {% set speed = params.SPEED|default(printer.configfile.settings.printer.max_velocity)|int %} # Iterations diff --git a/moonraker.conf b/moonraker.conf index a42669a..6bc1e27 100644 --- a/moonraker.conf +++ b/moonraker.conf @@ -9,6 +9,7 @@ database_path: /home/kdb424/.moonraker_database [authorization] trusted_clients: + 127.0.0.1 10.0.0.0/8 127.0.0.0/8 169.254.0.0/16 @@ -73,3 +74,12 @@ path: ~/klipper_z_calibration origin: https://github.com/protoloft/klipper_z_calibration.git install_script: install.sh managed_services: klipper + +[update_manager KlipperScreen] +type: git_repo +path: /home/kdb424/KlipperScreen +origin: https://github.com/jordanruthe/KlipperScreen.git +env: /home/kdb424/.KlipperScreen-env/bin/python +requirements: scripts/KlipperScreen-requirements.txt +install_script: scripts/KlipperScreen-install.sh + diff --git a/pico.cfg b/pico.cfg index 5cfcf9b..85a99df 100644 --- a/pico.cfg +++ b/pico.cfg @@ -8,6 +8,7 @@ cs_pin: pico:gpio1 [resonance_tester] accel_chip: adxl345 probe_points: - 155,155,20 # an example + 155,155,200 + 40,40,200 diff --git a/printer.cfg b/printer.cfg index 7462194..25050f7 100644 --- a/printer.cfg +++ b/printer.cfg @@ -19,9 +19,9 @@ path: ~/gcode_files [printer] kinematics: corexy -max_velocity: 500 -max_accel: 2000 -max_accel_to_decel: 2000 +max_velocity: 1000 +max_accel: 15000 +max_accel_to_decel: 15000 max_z_velocity: 80 max_z_accel: 1000 square_corner_velocity: 8 @@ -49,7 +49,7 @@ unretract_speed: 80 [input_shaper] shaper_type_x = zv -shaper_freq_x = 119.2 # accel=55400 +shaper_freq_x = 98.2 # accel=37600 shaper_type_y = zv -shaper_freq_y = 60.4 # accel=14200 +shaper_freq_y = 70.0 # accel=19100 diff --git a/purge_bucket.cfg b/purge_bucket.cfg index ebcfa2b..0e3d794 100644 --- a/purge_bucket.cfg +++ b/purge_bucket.cfg @@ -18,15 +18,15 @@ variable_purge_ret: 0 ; Retract length, in mm, after variable_ooze_dwell: 1 ; Dwell/wait time, in seconds, after purging and retracting. # Adjust this so that your nozzle scrubs within the brush. Currently defaulted to be a lot higher for safety. Be careful not to go too low! -variable_brush_top: 7 +variable_brush_top: 6 # These parameters define your scrubbing, travel speeds, safe z clearance and how many times you want to wipe. Update as necessary. Wipe # direction is randomized based off whether the left or right bucket is randomly selected in the purge & scrubbing routine. variable_clearance_z: 10 ; When traveling, but not cleaning, the clearance along the z-axis between nozzle and brush. -variable_wipe_qty: 3 ; Number of complete (A complete wipe: left, right, left OR right, left, right) wipes. -variable_prep_spd_xy: 12000 ; Travel (not cleaning) speed along x and y-axis in mm/min. -variable_prep_spd_z: 1500 ; Travel (not cleaning) speed along z axis in mm/min. -variable_wipe_spd_xy: 5000 ; Nozzle wipe speed in mm/min. +variable_wipe_qty: 3 ; Number of complete (A complete wipe: left, right, left OR right, left, right) wipes. +variable_prep_spd_xy: 48000 ; Travel (not cleaning) speed along x and y-axis in mm/s. +variable_prep_spd_z: 1500 ; Travel (not cleaning) speed along z axis in mm/s. +variable_wipe_spd_xy: 5100 ; Nozzle wipe speed in mm/s. # These parameters define the size of the brush. Update as necessary. A visual reference is provided below. Note that orientation of diff --git a/sensorless.cfg b/sensorless.cfg index ab0c583..667459e 100644 --- a/sensorless.cfg +++ b/sensorless.cfg @@ -1,7 +1,7 @@ [gcode_macro SENSORLESS_HOME_X] gcode: # Do not change -> if so do sensorless tuning again - {% set HOME_CUR = 0.700 %} + {% set HOME_CUR = 0.800 %} # End {% set driver_config = printer.configfile.settings['tmc2209 stepper_x'] %} @@ -16,7 +16,7 @@ gcode: G28 X0 # Move away G90 - G1 x20 F1200 + G1 x20 F{20*60} G91 # Set current during print SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CUR} @@ -25,7 +25,7 @@ gcode: [gcode_macro SENSORLESS_HOME_Y] gcode: # Do not change -> if so do sensorless tuning again - {% set HOME_CUR = 0.700 %} + {% set HOME_CUR = 0.800 %} # End {% set driver_config = printer.configfile.settings['tmc2209 stepper_y'] %} @@ -40,7 +40,7 @@ gcode: G28 Y0 # Move away G91 - G1 Y-10 F1200 + G1 Y-10 F{20*60} G90 # Set current during print SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CUR} @@ -74,8 +74,9 @@ gcode: {% if params.Z is defined or home_all %} {action_respond_info("Doing G28 Z0")} # You can do your logic for safe z here + G4 P2000 G90 - G1 x331 y249 F20000 + G1 x331 y249 F{1000*60} G28 Z0 G1 Z{Z} G91 diff --git a/sherpa_mini.cfg b/sherpa_mini.cfg index 76689f1..b95f63a 100644 --- a/sherpa_mini.cfg +++ b/sherpa_mini.cfg @@ -24,21 +24,21 @@ sensor_type: PT1000 sensor_pin: PF4 control: pid +# Copper +pid_Kp = 18.437 +pid_Ki = 0.706 +pid_Kd = 120.303 # Dragon HF -pid_Kp=19.814 -pid_Ki=1.083 -pid_Kd=90.649 +# pid_Kp=19.814 +# pid_Ki=1.083 +# pid_Kd=90.649 # Alu # pid_Kp = 21.956 # pid_Ki = 1.1031 # pid_Kd = 116.914 -# Copper -# pid_Kp = 18.940 -# pid_Ki = 0.713 -# pid_Kd = 125.716 #settings for NEMA14 Stepper [tmc2209 extruder] diff --git a/steppers.cfg b/steppers.cfg index 7ee7179..10251e1 100644 --- a/steppers.cfg +++ b/steppers.cfg @@ -21,7 +21,7 @@ run_current: 2 sense_resistor: 0.110 stealthchop_threshold: 0 diag_pin: ^PG6 # Set to MCU pin connected to TMC DIAG pin -driver_SGTHRS: 18 # 255 is most sensitive value, 0 is least sensitive +driver_SGTHRS: 20 # 255 is most sensitive value, 0 is least sensitive driver_TBL: 1 driver_TOFF: 3 driver_HSTRT: 1 @@ -50,7 +50,7 @@ run_current: 2 sense_resistor: 0.110 stealthchop_threshold: 0 diag_pin: ^PG12 # Set to MCU pin connected to TMC DIAG pin -driver_SGTHRS: 30 # 255 is most sensitive value, 0 is least sensitive +driver_SGTHRS: 25 # 255 is most sensitive value, 0 is least sensitive driver_TBL: 1 driver_TOFF: 3 driver_HSTRT: 1 @@ -64,8 +64,8 @@ microsteps: 16 rotation_distance: 4 #endstop_pin: PG11 # Bed Endstop endstop_pin: PG10 # Nozzle Endstop -position_endstop: 3.081 -position_min: -4 +position_endstop: 3.51 +position_min: -1 position_max: 400 full_steps_per_rotation: 200 homing_retract_dist: 5.0