From 5979673f54d88e6ae97bf35d4612e4e88eb396e5 Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Thu, 7 Sep 2023 00:59:57 -0400 Subject: [PATCH 1/5] Fix calibrate esteps link, and add accompanying everything-sv06 link. Adjust calibration.cfg to turn off print cooling fan after pid tune hotend. --- cfgs/CALIBRATION.cfg | 1 + printer.cfg | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cfgs/CALIBRATION.cfg b/cfgs/CALIBRATION.cfg index 589b963..7458fa0 100644 --- a/cfgs/CALIBRATION.cfg +++ b/cfgs/CALIBRATION.cfg @@ -22,6 +22,7 @@ gcode: G1 X{max_x/2} Y{max_y/2} Z10 F6000 M106 S64 PID_CALIBRATE HEATER=extruder TARGET={TARGETTEMP} + M107 ; Turn off print cooling fan # TODO test this [gcode_macro PID_TEST_ALL] diff --git a/printer.cfg b/printer.cfg index 6b21e56..9565a9f 100644 --- a/printer.cfg +++ b/printer.cfg @@ -96,7 +96,7 @@ step_pin: PB4 dir_pin: !PB3 enable_pin: !PC3 microsteps: 128 -rotation_distance: 4.65 # NOTE Calibrate e-steps and adjust https://www.klipper3d.org/Rotation_Distance.html +rotation_distance: 4.65 # NOTE Calibrate e-steps https://www.klipper3d.org/Rotation_Distance.html#calibrating-rotation_distance-on-extruders, https://github.com/bassamanator/everything-sovol-sv06/blob/main/howto.md#calibrate-esteps nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PA1 From 4150f5512dbbd865bc0ab0ff162cec8d047e99f4 Mon Sep 17 00:00:00 2001 From: Bassam <61985779+bassamanator@users.noreply.github.com> Date: Sun, 10 Sep 2023 13:07:09 -0400 Subject: [PATCH 2/5] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index bb8b451..e6411c7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -23,6 +23,9 @@ A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. +**What printer are you using?** +- SV06, SV06 Plus, etc. + **What kind of device are you using to host Klipper?** - OS: [e.g. old laptop, PC, Raspberry Pi] - Version: [] @@ -30,5 +33,8 @@ If applicable, add screenshots to help explain your problem. **How did you install Klipper?** - Manual install, KIAUH, MainsailOS, FluiddPi, etc. +**Is your local copy of this configuration up to date?** +- This configuration changes all the time, when did you install it? Are you sure you're running the latest version? + **Additional context** Add any other context about the problem here. From 82bdf0892f8f005057ec959807d9a39b5f618249 Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Sun, 10 Sep 2023 14:55:41 -0400 Subject: [PATCH 3/5] Adjust README.md: link. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 84a277e..0dcafb4 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Although I've made switching over to Klipper as easy as is possible, it can stil - Follow the steps in order. - If an error was reported at a step, do no proceed to the next step. - It is assumed that you are connected to your host Raspberry Pi (or other host device) via SSH, and that your printer motherboard is connected to the host via a data USB cable. Note that most of the micro USB cables that you find at home are _unlikely_ to be data cables, and it's not possible to tell just by looking. -- [Disable](https://github.com/bassamanator/everything-sovol-sv06/blob/main/initialsteps.md#put-tape-on-the-5v-pin) the USB cable's 5V pin. +- [Disable](https://github.com/bassamanator/everything-sovol-sv06/blob/main/initialsteps.md#disable-usb-cable-5v-pin) the USB cable's 5V pin. - It is also assumed that the username on the host device is `pi`. If that is not the case, you will have to manually edit `moonraker.conf` and `cfgs/misc-macros.cfg` and change any mentions of `/home/pi` to `/home/yourUserName`. - Klipper _must_ be installed on the host Raspberry Pi for everything to work. Easiest is to use a [MainsailOS](https://github.com/mainsail-crew/mainsail/releases/latest) image. Alternatively, you can install `Fluidd` or `Mainsail` via [KIAUH](https://github.com/th33xitus/kiauh). - Robert Redford's performance in _Spy Game (2001)_ was superb! From bfacd4448fd5feabe9862a3829d934d0b6732fda Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Sun, 10 Sep 2023 15:02:55 -0400 Subject: [PATCH 4/5] Adjust README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0dcafb4..563b9df 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ I am creating these files for my personal use and cannot be held responsible for ## Stay Up-to-Date -⭐ ${\normalsize{\textcolor{goldenrod}{\texttt{Star this project}}}}$ (Highly recommended, starred users may receive priority over regular users) +⭐ ${\normalsize{\textcolor{goldenrod}{\texttt{Star this project}}}}$ Watch for releases and updates. From 29df5b6cddbbe8e099de0a211abc5f0099406756 Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Wed, 13 Sep 2023 17:04:28 -0400 Subject: [PATCH 5/5] Pulled in KAMP from upstream. --- cfgs/kamp/Adaptive_Meshing.cfg | 16 ++++-- cfgs/kamp/KAMP_Settings.cfg | 9 +++- cfgs/kamp/Line_Purge.cfg | 14 ++++-- cfgs/kamp/Smart_Park.cfg | 31 ++++++++++++ cfgs/kamp/Voron_Purge.cfg | 90 ++++++++++++++++++++++++++++++++++ 5 files changed, 150 insertions(+), 10 deletions(-) create mode 100644 cfgs/kamp/Smart_Park.cfg create mode 100644 cfgs/kamp/Voron_Purge.cfg diff --git a/cfgs/kamp/Adaptive_Meshing.cfg b/cfgs/kamp/Adaptive_Meshing.cfg index f1cb3a0..21f42a7 100644 --- a/cfgs/kamp/Adaptive_Meshing.cfg +++ b/cfgs/kamp/Adaptive_Meshing.cfg @@ -14,6 +14,9 @@ gcode: {% set bed_mesh_max = printer.configfile.settings.bed_mesh.mesh_max %} # Get bed mesh max from printer.cfg {% set probe_count = printer.configfile.settings.bed_mesh.probe_count %} # Get probe count from printer.cfg {% set verbose_enable = printer["gcode_macro _KAMP_Settings"].verbose_enable | abs %} # Pull verbose setting from _KAMP_Settings + {% set probe_dock_enable = printer["gcode_macro _KAMP_Settings"].probe_dock_enable | abs %} # Pull probe dockable probe settings from _KAMP_Settings + {% set attach_macro = printer["gcode_macro _KAMP_Settings"].attach_macro | string %} # Pull attach probe command from _KAMP_Settings + {% set detach_macro = printer["gcode_macro _KAMP_Settings"].detach_macro | string %} # Pull detach probe command from _KAMP_Settings {% set mesh_margin = printer["gcode_macro _KAMP_Settings"].mesh_margin | float %} # Pull mesh margin setting from _KAMP_Settings {% set fuzz_amount = printer["gcode_macro _KAMP_Settings"].fuzz_amount | float %} # Pull fuzz amount setting from _KAMP_Settings {% set probe_count = probe_count if probe_count|length > 1 else probe_count * 2 %} # If probe count is only a single number, convert it to 2. E.g. probe_count:7 = 7,7 @@ -30,6 +33,11 @@ gcode: {% set adapted_x_max = (bed_mesh_max[0] - fuzz_amount + mesh_margin, x_max) | min + (fuzz_range | random / 100.0) %} # Adapt x_max to margin and fuzz constraints {% set adapted_y_max = (bed_mesh_max[1] - fuzz_amount + mesh_margin, y_max) | min + (fuzz_range | random / 100.0) %} # Adapt y_max to margin and fuzz constraints + {% set adapted_x_min = [adapted_x_min , bed_mesh_min[0]] | max %} # Compare adjustments to defaults and choose max + {% set adapted_y_min = [adapted_y_min , bed_mesh_min[1]] | max %} # Compare adjustments to defaults and choose max + {% set adapted_x_max = [adapted_x_max , bed_mesh_max[0]] | min %} # Compare adjustments to defaults and choose min + {% set adapted_y_max = [adapted_y_max , bed_mesh_max[1]] | min %} # Compare adjustments to defaults and choose min + {% set points_x = (((adapted_x_max - adapted_x_min) / max_probe_point_distance_x) | round(method='ceil') | int) + 1 %} # Define probe_count's x point count and round up {% set points_y = (((adapted_y_max - adapted_y_min) / max_probe_point_distance_y) | round(method='ceil') | int) + 1 %} # Define probe_count's y point count and round up @@ -41,10 +49,10 @@ gcode: {% set min_points = 3 %} # {% endif %} # - {% set points_x = [points_x, min_points]|max %} # Set probe_count's x points to fit the calculated algorithm - {% set points_y = [points_y, min_points]|max %} # Set probe_count's y points to fit the calculated algorithm - {% set points_x = [points_x, probe_count[0]]|min %} - {% set points_y = [points_y, probe_count[1]]|min %} + {% set points_x = [points_x , min_points]|max %} # Set probe_count's x points to fit the calculated algorithm + {% set points_y = [points_y , min_points]|max %} # Set probe_count's y points to fit the calculated algorithm + {% set points_x = [points_x , probe_count[0]]|min %} + {% set points_y = [points_y , probe_count[1]]|min %} {% if verbose_enable == True %} # If verbose is enabled, print information about KAMP's calculations diff --git a/cfgs/kamp/KAMP_Settings.cfg b/cfgs/kamp/KAMP_Settings.cfg index 3164fba..9ddcfca 100644 --- a/cfgs/kamp/KAMP_Settings.cfg +++ b/cfgs/kamp/KAMP_Settings.cfg @@ -1,7 +1,9 @@ # Below you can include specific configuration files depending on what you want KAMP to do: [include ./Adaptive_Meshing.cfg] # Include to enable adaptive meshing configuration. -# [include ./KAMP/Line_Purge.cfg] # Include to enable adaptive line purging configuration. +# [include ./Line_Purge.cfg] # Include to enable adaptive line purging configuration. +# [include ./Voron_Purge.cfg] # Include to enable adaptive Voron logo purging configuration. +# [include ./Smart_Park.cfg] # Include to enable the Smart Park function, which parks the printhead near the print area for final heating. [gcode_macro _KAMP_Settings] description: This macro contains all adjustable settings for KAMP @@ -26,6 +28,9 @@ variable_purge_margin: 10 # Distance the purge will be in fron variable_purge_amount: 30 # Amount of filament to be purged prior to printing. variable_flow_rate: 12 # Flow rate of purge in mm3/s. Default is 12. +# The following variables are for adjusting the Smart Park feature for KAMP, which will park the printhead near the print area at a specified height. +variable_smart_park_height: 10 # Z position for Smart Park, default is 10. + gcode: # Gcode section left intentionally blank. Do not disturb. - {action_respond_info(" Running the KAMP_Settings macro does nothing, it is only used for storing KAMP settings. ")} \ No newline at end of file + {action_respond_info(" Running the KAMP_Settings macro does nothing, it is only used for storing KAMP settings. ")} diff --git a/cfgs/kamp/Line_Purge.cfg b/cfgs/kamp/Line_Purge.cfg index f6e77ac..d03c61f 100644 --- a/cfgs/kamp/Line_Purge.cfg +++ b/cfgs/kamp/Line_Purge.cfg @@ -37,11 +37,11 @@ gcode: {% set purge_y_origin = ([purge_y_min - purge_margin, 0] | max) %} # Add margin to y min, compare to 0, and choose the larger # Calculate purge speed - {% set purge_move_speed = (flow_rate / cross_section) * 60 | float %} + {% set purge_move_speed = (flow_rate / 5.0) * 60 | float %} - {% if cross_section != 5 %} + {% if cross_section < 5 %} - {action_respond_info("[Extruder] max_extrude_cross_section is not configured correctly, please set it to 5. Purge skipped.")} + {action_respond_info("[Extruder] max_extrude_cross_section is insufficient for purge, please set it to 5 or greater. Purge skipped.")} {% else %} @@ -78,6 +78,8 @@ gcode: {% endif %} + SAVE_GCODE_STATE NAME=Prepurge_State # Create gcode state + {% if purge_y_origin > 0 %} # If there's room on Y, purge along X axis in front of print area G92 E0 # Reset extruder @@ -89,6 +91,7 @@ gcode: G1 E{tip_distance} F{purge_move_speed} # Move filament tip G1 X{purge_x_center + purge_amount} E{purge_amount} F{purge_move_speed} # Purge line {RETRACT} # Retract + G0 X{purge_x_center + purge_amount + 10} F{travel_speed} # Rapid move to break string G92 E0 # Reset extruder distance M82 # Absolute extrusion mode G0 Z{purge_height * 2} F{travel_speed} # Z hop @@ -104,10 +107,13 @@ gcode: G1 E{tip_distance} F{purge_move_speed} # Move filament tip G1 Y{purge_y_center + purge_amount} E{purge_amount} F{purge_move_speed} # Purge line {RETRACT} # Retract + G0 Y{purge_y_center + purge_amount + 10} F{travel_speed} # Rapid move to break string G92 E0 # Reset extruder distance M82 # Absolute extrusion mode G0 Z{purge_height * 2} F{travel_speed} # Z hop {% endif %} + + RESTORE_GCODE_STATE NAME=Prepurge_State # Restore gcode state - {% endif %} \ No newline at end of file + {% endif %} diff --git a/cfgs/kamp/Smart_Park.cfg b/cfgs/kamp/Smart_Park.cfg new file mode 100644 index 0000000..2d2acb4 --- /dev/null +++ b/cfgs/kamp/Smart_Park.cfg @@ -0,0 +1,31 @@ +[gcode_macro Smart_Park] +description: Parks your printhead near the print area for pre-print hotend heating. +gcode: + + {% set kamp_settings = printer["gcode_macro _KAMP_Settings"] %} # Pull all variables from _KAMP_Settings + {% set z_height = kamp_settings.smart_park_height | float %} # Set Z height variable + {% set purge_margin = kamp_settings.purge_margin | float %} # Set purge margin variable + {% set verbose_enable = kamp_settings.verbose_enable | abs %} # Set verbosity + {% set center_x = printer.toolhead.axis_maximum.x / 2 | float %} # Create center point of x for fallback + {% set center_y = printer.toolhead.axis_maximum.y / 2 | float %} # Create center point of y for fallback + {% set all_points = printer.exclude_object.objects | map(attribute='polygon') | sum(start=[]) %} # Gather all object points + {% set x_min = all_points | map(attribute=0) | min | default(center_x) %} # Set x_min from smallest object x point + {% set y_min = all_points | map(attribute=1) | min | default(center_y) %} # Set y_min from smallest object y point + {% set travel_speed = (printer.toolhead.max_velocity) * 60 | float %} # Set travel speed from config + + {% if purge_margin > 0 and x_min != center_x and y_min != center_y %} # If objects are detected and purge margin + {% set x_min = [ x_min - purge_margin , x_min ] | max %} # value is greater than 0, move + {% set y_min = [ y_min - purge_margin , y_min ] | max %} # to purge location + margin + {% endif %} + + {% if verbose_enable == True %} # Verbose park location + + { action_respond_info("Smart Park location: {},{}.".format( + (x_min), + (y_min), + )) } + + {% endif %} + + G0 X{x_min} Y{y_min} F{travel_speed} # Move near object area + G0 Z{z_height} # Move Z to park height diff --git a/cfgs/kamp/Voron_Purge.cfg b/cfgs/kamp/Voron_Purge.cfg new file mode 100644 index 0000000..30cf5de --- /dev/null +++ b/cfgs/kamp/Voron_Purge.cfg @@ -0,0 +1,90 @@ +[gcode_macro VORON_PURGE] +description: A purge macro that adapts to be near your actual printed objects +gcode: + # Get relevant printer params + {% set travel_speed = (printer.toolhead.max_velocity) * 60 | float %} + {% set cross_section = printer.configfile.settings.extruder.max_extrude_cross_section | float %} + + # Use firmware retraction if it is defined + {% if printer.firmware_retraction is defined %} + {% set RETRACT = G10 | string %} + {% set UNRETRACT = G11 | string %} + {% else %} + {% set RETRACT = 'G1 E-.5 F2100' | string %} + {% set UNRETRACT = 'G1 E.5 F2100' | string %} + {% endif %} + + # Get purge settings from _Kamp_Settings + {% set verbose_enable = printer["gcode_macro _KAMP_Settings"].verbose_enable | abs %} + {% set purge_height = printer["gcode_macro _KAMP_Settings"].purge_height | float %} + {% set tip_distance = printer["gcode_macro _KAMP_Settings"].tip_distance | float %} + {% set purge_margin = printer["gcode_macro _KAMP_Settings"].purge_margin | float %} + {% set purge_amount = printer["gcode_macro _KAMP_Settings"].purge_amount | float %} + {% set flow_rate = printer["gcode_macro _KAMP_Settings"].flow_rate | float %} + {% set size = 10 | float %} + + # Calculate purge origins and centers from objects + {% set all_points = printer.exclude_object.objects | map(attribute='polygon') | sum(start=[]) %} # Get all object points + {% set purge_x_min = (all_points | map(attribute=0) | min | default(0)) %} # Object x min + {% set purge_x_max = (all_points | map(attribute=0) | max | default(0)) %} # Object x max + {% set purge_y_min = (all_points | map(attribute=1) | min | default(0)) %} # Object y min + {% set purge_y_max = (all_points | map(attribute=1) | max | default(0)) %} # Object y max + + {% set purge_x_center = ([((purge_x_max + purge_x_min) / 2) - (purge_amount / 2), 0] | max) %} # Create center point of purge line relative to print on X axis + {% set purge_y_center = ([((purge_y_max + purge_y_min) / 2) - (purge_amount / 2), 0] | max) %} # Create center point of purge line relative to print on Y axis + + {% set purge_x_origin = ([purge_x_min - purge_margin, 0] | max) %} # Add margin to x min, compare to 0, and choose the larger + {% set purge_y_origin = ([purge_y_min - purge_margin, 0] | max) %} # Add margin to y min, compare to 0, and choose the larger + + # Calculate purge speed + {% set purge_move_speed = (flow_rate / 5.0) * 60 | float %} + + {% if cross_section < 5 %} + + {action_respond_info("[Extruder] max_extrude_cross_section is insufficient for purge, please set it to 5 or greater. Purge skipped.")} + + {% else %} + + {% if verbose_enable == True %} + + {action_respond_info("Moving filament tip {}mms".format( + (tip_distance), + )) } + {% endif %} + + {% if printer.firmware_retraction is defined %} + {action_respond_info("KAMP purge is using firmware retraction.")} + {% else %} + {action_respond_info("KAMP purge is not using firmware retraction, it is recommended to configure it.")} + {% endif %} + + SAVE_GCODE_STATE NAME=Prepurge_State # Create gcode state + + G92 E0 # Reset extruder + G0 F{travel_speed} # Set travel speed + G90 # Absolute positioning + G0 X{purge_x_origin} Y{purge_y_origin+size/2} # Move to purge position + G0 Z{purge_height} # Move to purge Z height + M83 # Relative extrusion mode + G1 E{tip_distance} F{purge_move_speed} # Move tip of filament to nozzle + G1 X{purge_x_origin+size*0.289} Y{purge_y_origin+size} E{purge_amount/4} F{purge_move_speed}# Purge first line of logo + G1 E-.5 F2100 # Retract + G0 Z{purge_height*2} # Z hop + G0 X{purge_x_origin+size*0.789} Y{purge_y_origin+size} # Move to second purge line origin + G0 Z{purge_height} # Move to purge Z height + G1 E.5 F2100 # Recover + G1 X{purge_x_origin+size*0.211} Y{purge_y_origin} E{purge_amount/2} F{purge_move_speed} # Purge second line of logo + G1 E-.5 F2100 # Retract + G0 Z{purge_height*2} # Z hop + G0 X{purge_x_origin+size*0.711} Y{purge_y_origin} # Move to third purge line origin + G0 Z{purge_height} # Move to purge Z height + G1 E.5 F2100 # Recover + G1 X{purge_x_origin+size} Y{purge_y_origin+size/2} E{purge_amount/4} F{purge_move_speed} # Purge third line of logo + G1 E-.5 F2100 # Retract + G92 E0 # Reset extruder distance + M82 # Absolute extrusion mode + G0 Z{purge_height*2} F{travel_speed} # Z hop + + RESTORE_GCODE_STATE NAME=Prepurge_State # Restore gcode state + + {% endif %}