mirror of
https://github.com/bassamanator/Sovol-SV06-firmware.git
synced 2025-11-08 21:41:15 +00:00
Merge branch 'master' into sv06-plus
This commit is contained in:
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -14,6 +14,7 @@
|
|||||||
"gcode",
|
"gcode",
|
||||||
"githubstar",
|
"githubstar",
|
||||||
"hotend",
|
"hotend",
|
||||||
|
"KAMP",
|
||||||
"KIAUH",
|
"KIAUH",
|
||||||
"Klipper",
|
"Klipper",
|
||||||
"Klipperized",
|
"Klipperized",
|
||||||
|
|||||||
47
README.md
47
README.md
@@ -36,7 +36,7 @@ I am creating these files for my personal use and cannot be held responsible for
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
- 💥 This Klipper configuration is an _endpoint_, meaning that it contains **everything** that you could possibly need in order to have an excellent Klipper experience! 💥
|
- 💥 This Klipper configuration is an _endpoint_, meaning that it contains **everything** that you could possibly need in order to have an excellent Klipper experience! 💥
|
||||||
- <img src="./images/party_blob.gif" width="20" alt=''/> Filament runout sensor usage implemented. <img src="./images/party_blob.gif" width="20" alt=''/>
|
- Filament runout sensor usage implemented.
|
||||||
- Minimum configuration settings for Mainsail/Fluiddpi to work.
|
- Minimum configuration settings for Mainsail/Fluiddpi to work.
|
||||||
- SuperSlicer config bundle that contains the printer configuration, as well as what are considered by many to be the best print settings available for any FDM printer ([Ellis' SuperSlicer Profiles](https://github.com/AndrewEllis93/Ellis-SuperSlicer-Profiles)). Find the differences between the different print setting profiles [here](https://github.com/AndrewEllis93/Ellis-SuperSlicer-Profiles/tree/master/SuperSlicer). But basically, the 45 degree profile places the seam at the back.
|
- SuperSlicer config bundle that contains the printer configuration, as well as what are considered by many to be the best print settings available for any FDM printer ([Ellis' SuperSlicer Profiles](https://github.com/AndrewEllis93/Ellis-SuperSlicer-Profiles)). Find the differences between the different print setting profiles [here](https://github.com/AndrewEllis93/Ellis-SuperSlicer-Profiles/tree/master/SuperSlicer). But basically, the 45 degree profile places the seam at the back.
|
||||||
- Bed model and texture to use in SuperSlicer/PrusaSlicer.
|
- Bed model and texture to use in SuperSlicer/PrusaSlicer.
|
||||||
@@ -45,13 +45,17 @@ I am creating these files for my personal use and cannot be held responsible for
|
|||||||
- Misc macros: `PRINT_START`, `CANCEL_PRINT`, `PRINT_END`, `PAUSE`, `RESUME`.
|
- Misc macros: `PRINT_START`, `CANCEL_PRINT`, `PRINT_END`, `PAUSE`, `RESUME`.
|
||||||
- Parking macros (parks the printhead at various locations): `PARKFRONT`, `PARKFRONTLOW`, `PARKREAR`, `PARKCENTER`, `PARKBED`.
|
- Parking macros (parks the printhead at various locations): `PARKFRONT`, `PARKFRONTLOW`, `PARKREAR`, `PARKCENTER`, `PARKBED`.
|
||||||
- Load/unload filament macros.
|
- Load/unload filament macros.
|
||||||
- Purge line macro.
|
- `PURGE_LINE` macro.
|
||||||
|
- `NEW` <img src="./images/party_blob.gif" width="20" alt=''/> `TEST_SPEED` macro. <img src="./images/party_blob.gif" width="20" alt=''/> Find instructions [here](#how-do-i-use-the-test_speed-macro).
|
||||||
|
- `NEW` <img src="./images/party_blob.gif" width="20" alt=''/> Klipper Adaptive Meshing & Purging (KAMP) added! <img src="./images/party_blob.gif" width="20" alt=''/> Read about it [here](#how-do-i-enable-kamp-klipper-adaptive-meshing--purging).
|
||||||
|
|
||||||
## Stay Up-to-Date
|
## Stay Up-to-Date
|
||||||
|
|
||||||
|
**⭐ Star this project** (Highly recommended, starred users may receive priority over regular users)
|
||||||
|
|
||||||
Watch for releases and updates.
|
Watch for releases and updates.
|
||||||
|
|
||||||
<img src="./images/githubstar.gif" width="500" alt='Raspberry Pi'/>
|
<img src="./images/githubstar.gif" width="500" alt='githubstar'/>
|
||||||
|
|
||||||
## Preface
|
## Preface
|
||||||
|
|
||||||
@@ -101,6 +105,8 @@ Please note:
|
|||||||
5. Turn on the printer and wait a minute (usually takes 10 seconds).
|
5. Turn on the printer and wait a minute (usually takes 10 seconds).
|
||||||
6. Turn off the printer and remove the microSD.
|
6. Turn off the printer and remove the microSD.
|
||||||
|
|
||||||
|
At this point, it's not possible to tell with certainty whether your flash was successful, continue on with the guide.
|
||||||
|
|
||||||
You may find this [video](https://youtu.be/p6l253OJa34) useful.
|
You may find this [video](https://youtu.be/p6l253OJa34) useful.
|
||||||
|
|
||||||
### Download OSS Klipper Configuration
|
### Download OSS Klipper Configuration
|
||||||
@@ -112,6 +118,7 @@ You can choose _either_ of the 2 following methods.
|
|||||||
1. `cd ~/printer_data/config`
|
1. `cd ~/printer_data/config`
|
||||||
2. Empty entire `~/printer_data/config` folder.
|
2. Empty entire `~/printer_data/config` folder.
|
||||||
- In linux, you can delete files via `rm fileName` and directories via `rmdir directoryName`.
|
- In linux, you can delete files via `rm fileName` and directories via `rmdir directoryName`.
|
||||||
|
- In linux, you can list files and folders via `ls -lah`.
|
||||||
3. `git clone -b sv06-plus --single-branch https://github.com/bassamanator/Sovol-SV06-firmware.git .` ⚠️ Don't miss the period!
|
3. `git clone -b sv06-plus --single-branch https://github.com/bassamanator/Sovol-SV06-firmware.git .` ⚠️ Don't miss the period!
|
||||||
|
|
||||||
#### Method 2: Download the ZIP
|
#### Method 2: Download the ZIP
|
||||||
@@ -141,7 +148,7 @@ You can choose _either_ of the 2 following methods.
|
|||||||
|
|
||||||
3. Do a `FIRMWARE_RESTART`.
|
3. Do a `FIRMWARE_RESTART`.
|
||||||
|
|
||||||
If you've done everything correctly, you should see no errors or warnings in your Mainsail/Fluidd dashboard.
|
If the Klipper flash that you did earlier was successful, and you've done everything else correctly, you should see no errors or warnings in the Mainsail/Fluidd dashboard. **Klipper has successfully been installed on your printer!**
|
||||||
|
|
||||||
### Configure Your Printer
|
### Configure Your Printer
|
||||||
|
|
||||||
@@ -239,9 +246,9 @@ This repository contains many files and folders. Some are _necessary_ for this K
|
|||||||
|
|
||||||
## Support Me
|
## Support Me
|
||||||
|
|
||||||
Please ⭐ star ⭐ this repository!
|
Please ⭐ star this repository!
|
||||||
|
|
||||||
If you found my work useful, please consider buying me a [<img src="./images/logo_white_stroke.png" height="20" alt='Ko-fi'/>](https://ko-fi.com/bassamanator).
|
If you found my work useful, consider buying me a [<img src="./images/logo_white_stroke.png" height="20" alt='Ko-fi'/>](https://ko-fi.com/bassamanator).
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
@@ -322,6 +329,33 @@ The printhead is now parked front center waiting for you to insert filament. You
|
|||||||
- OR, you can push some filament by hand _making sure to first disengage the extruder's spring loaded arm_.
|
- OR, you can push some filament by hand _making sure to first disengage the extruder's spring loaded arm_.
|
||||||
3. Hit resume in your Klipper dashboard.
|
3. Hit resume in your Klipper dashboard.
|
||||||
|
|
||||||
|
##### How do I enable KAMP (Klipper Adaptive Meshing & Purging)?
|
||||||
|
|
||||||
|
Although this repo contains all the code from the KAMP repository, only the `mesh` functionality of KAMP has been enabled and tested.
|
||||||
|
|
||||||
|
If you KAMP is disabled, and you don't have a `default` mesh stored in your `printer.cfg`, `PRINT_START` will crash.
|
||||||
|
|
||||||
|
Adjust according to your needs.
|
||||||
|
|
||||||
|
| File | `cfgs/misc-macros.cfg` |
|
||||||
|
| -------- | ------------------------ |
|
||||||
|
| Section | `[gcode_macro _globals]` |
|
||||||
|
| Variable | `variable_kamp_enable` |
|
||||||
|
| Disable | `0` |
|
||||||
|
| Enable | `1` |
|
||||||
|
|
||||||
|
##### How do I use the `TEST_SPEED` macro?
|
||||||
|
|
||||||
|
⚠️ This is for advanced users only, with well oiled machines. You can cause serious damage to your printer if you're not careful. ☠️ **You have been warned** ☠️.
|
||||||
|
|
||||||
|
Find full instructions [here](https://ellis3dp.com/Print-Tuning-Guide/articles/determining_max_speeds_accels.html).
|
||||||
|
|
||||||
|
Some tips:
|
||||||
|
|
||||||
|
- Before running with `ITERATIONS=40` with an untested speed/accel value, run with `ITERATIONS=1`.
|
||||||
|
- Pay close attention throughout the run, so that you can click **`EMERGENCY STOP`** at a moment's notice.
|
||||||
|
- This macro will simply help you determine the maximum speed your printhead and bed can reliably move at, not necessarily print at. The bottleneck for my SV06, for example, is the 15mm/s^2 that the hotend maxes out at (well under 200mm/s actual print speed).
|
||||||
|
|
||||||
## Useful Resources
|
## Useful Resources
|
||||||
|
|
||||||
- [Everything Sovol SV06](https://github.com/bassamanator/everything-sovol-sv06)
|
- [Everything Sovol SV06](https://github.com/bassamanator/everything-sovol-sv06)
|
||||||
@@ -345,5 +379,6 @@ The printhead is now parked front center waiting for you to insert filament. You
|
|||||||
- https://www.printables.com/model/378915-sovol-sv06-buildplate-texture-and-model-for-prusas
|
- https://www.printables.com/model/378915-sovol-sv06-buildplate-texture-and-model-for-prusas
|
||||||
- https://github.com/AndrewEllis93/Ellis-SuperSlicer-Profiles
|
- https://github.com/AndrewEllis93/Ellis-SuperSlicer-Profiles
|
||||||
- https://www.printables.com/model/447787-sovol-sv06-plus-build-plate
|
- https://www.printables.com/model/447787-sovol-sv06-plus-build-plate
|
||||||
|
- [Klipper Adaptive Meshing & Purging](https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging)
|
||||||
|
|
||||||
[](https://ko-fi.com/H2H0HIHTH)
|
[](https://ko-fi.com/H2H0HIHTH)
|
||||||
|
|||||||
@@ -46,4 +46,4 @@ gcode:
|
|||||||
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=60
|
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=60
|
||||||
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=180
|
TEMPERATURE_WAIT SENSOR=extruder MINIMUM=180
|
||||||
G28
|
G28
|
||||||
BED_MESH_CALIBRATE
|
_BED_MESH_CALIBRATE
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# NOTE This macro is not ready for use. ☠️☠️☠️
|
# NOTE Find how to use instructions here: https://ellis3dp.com/Print-Tuning-Guide/articles/determining_max_speeds_accels.html
|
||||||
# Home, get position, throw around toolhead, home again.
|
# 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.
|
# 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.
|
# We only measure to a full step to accomodate for endstop variance.
|
||||||
@@ -42,6 +42,7 @@ gcode:
|
|||||||
{ action_respond_info("TEST_SPEED: starting %d iterations at speed %d, accel %d" % (iterations, speed, accel)) }
|
{ action_respond_info("TEST_SPEED: starting %d iterations at speed %d, accel %d" % (iterations, speed, accel)) }
|
||||||
|
|
||||||
# Home and get position for comparison later:
|
# Home and get position for comparison later:
|
||||||
|
M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66
|
||||||
G28
|
G28
|
||||||
# QGL if not already QGLd (only if QGL section exists in config)
|
# QGL if not already QGLd (only if QGL section exists in config)
|
||||||
{% if printer.configfile.settings.quad_gantry_level %}
|
{% if printer.configfile.settings.quad_gantry_level %}
|
||||||
@@ -53,6 +54,7 @@ gcode:
|
|||||||
# Move 50mm away from max position and home again (to help with hall effect endstop accuracy - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/24)
|
# Move 50mm away from max position and home again (to help with hall effect endstop accuracy - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/24)
|
||||||
G90
|
G90
|
||||||
G1 X{printer.toolhead.axis_maximum.x-50} Y{printer.toolhead.axis_maximum.y-50} F{30*60}
|
G1 X{printer.toolhead.axis_maximum.x-50} Y{printer.toolhead.axis_maximum.y-50} F{30*60}
|
||||||
|
M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66
|
||||||
G28 X Y
|
G28 X Y
|
||||||
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
|
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
|
||||||
G4 P1000
|
G4 P1000
|
||||||
@@ -65,8 +67,7 @@ gcode:
|
|||||||
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2}
|
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2}
|
||||||
|
|
||||||
{% for i in range(iterations) %}
|
{% for i in range(iterations) %}
|
||||||
# Large pattern
|
# Large pattern diagonals
|
||||||
# Diagonals
|
|
||||||
G0 X{x_min} Y{y_min} F{speed*60}
|
G0 X{x_min} Y{y_min} F{speed*60}
|
||||||
G0 X{x_max} Y{y_max} F{speed*60}
|
G0 X{x_max} Y{y_max} F{speed*60}
|
||||||
G0 X{x_min} Y{y_min} F{speed*60}
|
G0 X{x_min} Y{y_min} F{speed*60}
|
||||||
@@ -74,14 +75,13 @@ gcode:
|
|||||||
G0 X{x_min} Y{y_max} F{speed*60}
|
G0 X{x_min} Y{y_max} F{speed*60}
|
||||||
G0 X{x_max} Y{y_min} F{speed*60}
|
G0 X{x_max} Y{y_min} F{speed*60}
|
||||||
|
|
||||||
# Box
|
# Large pattern box
|
||||||
G0 X{x_min} Y{y_min} F{speed*60}
|
G0 X{x_min} Y{y_min} F{speed*60}
|
||||||
G0 X{x_min} Y{y_max} F{speed*60}
|
G0 X{x_min} Y{y_max} F{speed*60}
|
||||||
G0 X{x_max} Y{y_max} F{speed*60}
|
G0 X{x_max} Y{y_max} F{speed*60}
|
||||||
G0 X{x_max} Y{y_min} F{speed*60}
|
G0 X{x_max} Y{y_min} F{speed*60}
|
||||||
|
|
||||||
# Small pattern
|
# Small pattern diagonals
|
||||||
# Small diagonals
|
|
||||||
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
||||||
G0 X{x_center_max} Y{y_center_max} F{speed*60}
|
G0 X{x_center_max} Y{y_center_max} F{speed*60}
|
||||||
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
||||||
@@ -89,7 +89,7 @@ gcode:
|
|||||||
G0 X{x_center_min} Y{y_center_max} F{speed*60}
|
G0 X{x_center_min} Y{y_center_max} F{speed*60}
|
||||||
G0 X{x_center_max} Y{y_center_min} F{speed*60}
|
G0 X{x_center_max} Y{y_center_min} F{speed*60}
|
||||||
|
|
||||||
# Small box
|
# Small patternbox
|
||||||
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
G0 X{x_center_min} Y{y_center_min} F{speed*60}
|
||||||
G0 X{x_center_min} Y{y_center_max} F{speed*60}
|
G0 X{x_center_min} Y{y_center_max} F{speed*60}
|
||||||
G0 X{x_center_max} Y{y_center_max} F{speed*60}
|
G0 X{x_center_max} Y{y_center_max} F{speed*60}
|
||||||
@@ -100,7 +100,8 @@ gcode:
|
|||||||
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}
|
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}
|
||||||
|
|
||||||
# Re-home and get position again for comparison:
|
# Re-home and get position again for comparison:
|
||||||
G28
|
M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66
|
||||||
|
G28 # This is a full G28 to fix an issue with CoreXZ - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/12
|
||||||
# Go to XY home positions (in case your homing override leaves it elsewhere)
|
# Go to XY home positions (in case your homing override leaves it elsewhere)
|
||||||
G90
|
G90
|
||||||
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
|
G0 X{printer.toolhead.axis_maximum.x-1} Y{printer.toolhead.axis_maximum.y-1} F{30*60}
|
||||||
|
|||||||
104
cfgs/kamp/Adaptive_Meshing.cfg
Normal file
104
cfgs/kamp/Adaptive_Meshing.cfg
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
# # # Klipper Adaptive Meshing # # #
|
||||||
|
|
||||||
|
# Heads up! If you have any other BED_MESH_CALIBRATE macros defined elsewhere in your config, you will need to comment out / remove them for this to work. (Klicky/Euclid Probe)
|
||||||
|
# You will also need to be sure that [exclude_object] is defined in printer.cfg, and your slicer is labeling objects.
|
||||||
|
# This macro will parse information from objects in your gcode to define a min and max mesh area to probe, creating an adaptive mesh!
|
||||||
|
# This macro will not increase probe_count values in your [bed_mesh] config. If you want richer meshes, be sure to increase probe_count. We recommend at least 5,5.
|
||||||
|
|
||||||
|
[gcode_macro BED_MESH_CALIBRATE]
|
||||||
|
rename_existing: _BED_MESH_CALIBRATE
|
||||||
|
gcode:
|
||||||
|
|
||||||
|
{% set all_points = printer.exclude_object.objects | map(attribute='polygon') | sum(start=[]) %} # Gather all object points
|
||||||
|
{% set bed_mesh_min = printer.configfile.settings.bed_mesh.mesh_min %} # Get bed mesh min from printer.cfg
|
||||||
|
{% 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 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
|
||||||
|
{% set max_probe_point_distance_x = ( bed_mesh_max[0] - bed_mesh_min[0] ) / (probe_count[0] - 1) %} # Determine max probe point distance
|
||||||
|
{% set max_probe_point_distance_y = ( bed_mesh_max[1] - bed_mesh_min[1] ) / (probe_count[1] - 1) %} # Determine max probe point distance
|
||||||
|
{% set x_min = all_points | map(attribute=0) | min | default(bed_mesh_min[0]) %} # Set x_min from smallest object x point
|
||||||
|
{% set y_min = all_points | map(attribute=1) | min | default(bed_mesh_min[1]) %} # Set y_min from smallest object y point
|
||||||
|
{% set x_max = all_points | map(attribute=0) | max | default(bed_mesh_max[0]) %} # Set x_max from largest object x point
|
||||||
|
{% set y_max = all_points | map(attribute=1) | max | default(bed_mesh_max[1]) %} # Set y_max from largest object y point
|
||||||
|
|
||||||
|
{% set fuzz_range = range((0) | int, (fuzz_amount * 100) | int + 1) %} # Set fuzz_range between 0 and fuzz_amount
|
||||||
|
{% set adapted_x_min = (bed_mesh_min[0] + fuzz_amount - mesh_margin, x_min) | max - (fuzz_range | random / 100.0) %} # Adapt x_min to margin and fuzz constraints
|
||||||
|
{% set adapted_y_min = (bed_mesh_min[1] + fuzz_amount - mesh_margin, y_min) | max - (fuzz_range | random / 100.0) %} # Adapt y_min to margin and fuzz constraints
|
||||||
|
{% 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 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
|
||||||
|
|
||||||
|
{% if (([points_x, points_y]|max) > 6) %} #
|
||||||
|
{% set algorithm = "bicubic" %} #
|
||||||
|
{% set min_points = 4 %} #
|
||||||
|
{% else %} # Calculate if algorithm should be bicubic or lagrange
|
||||||
|
{% set algorithm = "lagrange" %} #
|
||||||
|
{% 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 %}
|
||||||
|
|
||||||
|
{% if verbose_enable == True %} # If verbose is enabled, print information about KAMP's calculations
|
||||||
|
|
||||||
|
{ action_respond_info( "Algorithm: {}.".format(
|
||||||
|
(algorithm),
|
||||||
|
)) }
|
||||||
|
|
||||||
|
{ action_respond_info("Default probe count: {},{}.".format(
|
||||||
|
(probe_count[0]),
|
||||||
|
(probe_count[1]),
|
||||||
|
)) }
|
||||||
|
|
||||||
|
{ action_respond_info("Adapted probe count: {},{}.".format(
|
||||||
|
(points_x),
|
||||||
|
(points_y),
|
||||||
|
)) }
|
||||||
|
|
||||||
|
{action_respond_info("Default mesh bounds: {}, {}.".format(
|
||||||
|
(bed_mesh_min[0],bed_mesh_min[1]),
|
||||||
|
(bed_mesh_max[0],bed_mesh_max[1]),
|
||||||
|
)) }
|
||||||
|
|
||||||
|
{% if mesh_margin > 0 %}
|
||||||
|
{action_respond_info("Mesh margin is {}, mesh bounds extended by {}mm.".format(
|
||||||
|
(mesh_margin),
|
||||||
|
(mesh_margin),
|
||||||
|
)) }
|
||||||
|
{% else %}
|
||||||
|
{action_respond_info("Mesh margin is 0, margin not increased.")}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if fuzz_amount > 0 %}
|
||||||
|
{action_respond_info("Mesh point fuzzing enabled, points fuzzed up to {}mm.".format(
|
||||||
|
(fuzz_amount),
|
||||||
|
)) }
|
||||||
|
{% else %}
|
||||||
|
{action_respond_info("Fuzz amount is 0, mesh points not fuzzed.")}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{ action_respond_info("Adapted mesh bounds: {}, {}.".format(
|
||||||
|
(adapted_x_min, adapted_y_min),
|
||||||
|
(adapted_x_max, adapted_y_max),
|
||||||
|
)) }
|
||||||
|
|
||||||
|
{action_respond_info("KAMP adjustments successful. Happy KAMPing!")}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if probe_dock_enable == True %}
|
||||||
|
{attach_macro} # Attach/deploy a probe if the probe is stored somewhere outside of the print area
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
_BED_MESH_CALIBRATE mesh_min={adapted_x_min},{adapted_y_min} mesh_max={adapted_x_max},{adapted_y_max} ALGORITHM={algorithm} PROBE_COUNT={points_x},{points_y}
|
||||||
|
|
||||||
|
{% if probe_dock_enable == True %}
|
||||||
|
{detach_macro} # Detach/stow a probe if the probe is stored somewhere outside of the print area
|
||||||
|
{% endif %} # End of verbose
|
||||||
31
cfgs/kamp/KAMP_Settings.cfg
Normal file
31
cfgs/kamp/KAMP_Settings.cfg
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
[gcode_macro _KAMP_Settings]
|
||||||
|
description: This macro contains all adjustable settings for KAMP
|
||||||
|
|
||||||
|
# The following variables are settings for KAMP as a whole.
|
||||||
|
variable_verbose_enable: True # Set to True to enable KAMP information output when running. This is useful for debugging.
|
||||||
|
|
||||||
|
# The following variables are for adjusting adaptive mesh settings for KAMP.
|
||||||
|
variable_mesh_margin: 0 # Expands the mesh size in millimeters if desired. Leave at 0 to disable.
|
||||||
|
variable_fuzz_amount: 0 # Slightly randomizes mesh points to spread out wear from nozzle-based probes. Leave at 0 to disable.
|
||||||
|
|
||||||
|
# The following variables are for those with a dockable probe like Klicky, Euclid, etc. # ---------------- Attach Macro | Detach Macro
|
||||||
|
variable_probe_dock_enable: False # Set to True to enable the usage of a dockable probe. # ---------------------------------------------
|
||||||
|
variable_attach_macro: 'Attach_Probe' # The macro that is used to attach the probe. # Klicky Probe: 'Attach_Probe' | 'Dock_Probe'
|
||||||
|
variable_detach_macro: 'Dock_Probe' # The macro that is used to store the probe. # Euclid Probe: 'Deploy_Probe' | 'Stow_Probe'
|
||||||
|
# Legacy Gcode: 'M401' | 'M402'
|
||||||
|
|
||||||
|
# The following variables are for adjusting adaptive purge settings for KAMP.
|
||||||
|
variable_purge_height: 0.8 # Z position of nozzle during purge, default is 0.8.
|
||||||
|
variable_tip_distance: 0 # Distance between tip of filament and nozzle before purge. Should be similar to PRINT_END final retract amount.
|
||||||
|
variable_purge_margin: 10 # Distance the purge will be in front of the print area, default is 10.
|
||||||
|
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.
|
||||||
|
|
||||||
|
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. ")}
|
||||||
113
cfgs/kamp/Line_Purge.cfg
Normal file
113
cfgs/kamp/Line_Purge.cfg
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
[gcode_macro LINE_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 %}
|
||||||
|
|
||||||
|
|
||||||
|
# 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 / cross_section) * 60 | float %}
|
||||||
|
|
||||||
|
{% if cross_section != 5 %}
|
||||||
|
|
||||||
|
{action_respond_info("[Extruder] max_extrude_cross_section is not configured correctly, please set it to 5. 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 %}
|
||||||
|
|
||||||
|
{% if purge_y_origin > 0 %}
|
||||||
|
|
||||||
|
{action_respond_info("KAMP purge starting at {}, {} and purging {}mm of filament, requested flow rate is {}mm/s3.".format(
|
||||||
|
(purge_x_center),
|
||||||
|
(purge_y_origin),
|
||||||
|
(purge_amount),
|
||||||
|
(flow_rate),
|
||||||
|
)) }
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
{action_respond_info("KAMP purge starting at {}, {} and purging {}mm of filament, requested flow rate is {}mm/s3.".format(
|
||||||
|
(purge_x_origin),
|
||||||
|
(purge_y_center),
|
||||||
|
(purge_amount),
|
||||||
|
(flow_rate),
|
||||||
|
)) }
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if purge_y_origin > 0 %} # If there's room on Y, purge along X axis in front of print area
|
||||||
|
|
||||||
|
G92 E0 # Reset extruder
|
||||||
|
G0 F{travel_speed} # Set travel speed
|
||||||
|
G90 # Absolute positioning
|
||||||
|
G0 X{purge_x_center} Y{purge_y_origin} # 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 filament tip
|
||||||
|
G1 X{purge_x_center + purge_amount} E{purge_amount} F{purge_move_speed} # Purge line
|
||||||
|
{RETRACT} # Retract
|
||||||
|
G92 E0 # Reset extruder distance
|
||||||
|
M82 # Absolute extrusion mode
|
||||||
|
G0 Z{purge_height * 2} F{travel_speed} # Z hop
|
||||||
|
|
||||||
|
{% else %} # If there's room on X, purge along Y axis to the left of print area
|
||||||
|
|
||||||
|
G92 E0 # Reset extruder
|
||||||
|
G0 F{travel_speed} # Set travel speed
|
||||||
|
G90 # Absolute positioning
|
||||||
|
G0 X{purge_x_origin} Y{purge_y_center} # 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 filament tip
|
||||||
|
G1 Y{purge_y_center + purge_amount} E{purge_amount} F{purge_move_speed} # Purge line
|
||||||
|
{RETRACT} # Retract
|
||||||
|
G92 E0 # Reset extruder distance
|
||||||
|
M82 # Absolute extrusion mode
|
||||||
|
G0 Z{purge_height * 2} F{travel_speed} # Z hop
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
@@ -29,13 +29,10 @@ gcode:
|
|||||||
variable_filament_sensor_enabled: 1 # NOTE Enable(1) or disable(0) the filament sensor, if one is connected
|
variable_filament_sensor_enabled: 1 # NOTE Enable(1) or disable(0) the filament sensor, if one is connected
|
||||||
variable_beeping_enabled: 0 # NOTE Enable(1) or disable(0) beeping everywhere except during gantry calibration
|
variable_beeping_enabled: 0 # NOTE Enable(1) or disable(0) beeping everywhere except during gantry calibration
|
||||||
variable_bed_temp_over: 10 # NOTE Start print if bed temperature is over by this amount, otherwise wait for temperature drop
|
variable_bed_temp_over: 10 # NOTE Start print if bed temperature is over by this amount, otherwise wait for temperature drop
|
||||||
|
variable_kamp_enable: 0 # NOTE Enable(1) or disable(0) KAMP (adaptive mesh)
|
||||||
variable_pre_purge_prime_length: 1.40
|
variable_pre_purge_prime_length: 1.40
|
||||||
gcode:
|
gcode:
|
||||||
# DELETEME This section is unnecessary
|
# Don't delete this section
|
||||||
SET_GCODE_VARIABLE MACRO=_globals VARIABLE=pre_purge_prime_length VALUE={ variable_pre_purge_prime_length }
|
|
||||||
SET_GCODE_VARIABLE MACRO=_globals VARIABLE=filament_sensor_enabled VALUE={ variable_filament_sensor_enabled }
|
|
||||||
SET_GCODE_VARIABLE MACRO=_globals VARIABLE=beeping_enabled VALUE={ variable_beeping_enabled }
|
|
||||||
SET_GCODE_VARIABLE MACRO=_globals VARIABLE=bed_temp_over VALUE={ variable_bed_temp_over }
|
|
||||||
|
|
||||||
[gcode_macro CONDITIONAL_BEEP]
|
[gcode_macro CONDITIONAL_BEEP]
|
||||||
gcode:
|
gcode:
|
||||||
@@ -122,6 +119,7 @@ gcode:
|
|||||||
|
|
||||||
[gcode_macro PRINT_START]
|
[gcode_macro PRINT_START]
|
||||||
gcode:
|
gcode:
|
||||||
|
ADJUST_FILAMENT_SENSOR_STATUS ENABLE=1
|
||||||
# Parameters
|
# Parameters
|
||||||
{% set bedtemp = params.BED|int %}
|
{% set bedtemp = params.BED|int %}
|
||||||
{% set hotendtemp = params.HOTEND|int %}
|
{% set hotendtemp = params.HOTEND|int %}
|
||||||
@@ -132,6 +130,7 @@ gcode:
|
|||||||
{% set bedtempOver = printer["gcode_macro _globals"].bed_temp_over|default(0)|int %}
|
{% set bedtempOver = printer["gcode_macro _globals"].bed_temp_over|default(0)|int %}
|
||||||
{% set maxVelocity = printer.configfile.settings.printer.max_velocity|default(200)|int %}
|
{% set maxVelocity = printer.configfile.settings.printer.max_velocity|default(200)|int %}
|
||||||
{% set maxVelocityAdjusted = (0.90 * maxVelocity * 60)|int %}
|
{% set maxVelocityAdjusted = (0.90 * maxVelocity * 60)|int %}
|
||||||
|
{% set kampEnabled=printer["gcode_macro _globals"].kamp_enable|default(0)|int %}
|
||||||
|
|
||||||
{% if printer.configfile.settings.safe_z_home %}
|
{% if printer.configfile.settings.safe_z_home %}
|
||||||
{% set startX = printer.configfile.settings.safe_z_home.home_xy_position[0]|float %}
|
{% set startX = printer.configfile.settings.safe_z_home.home_xy_position[0]|float %}
|
||||||
@@ -149,9 +148,6 @@ gcode:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
BED_MESH_PROFILE LOAD=default ; NOTE if not using a mesh, comment out this line
|
|
||||||
ADJUST_FILAMENT_SENSOR_STATUS ENABLE=1
|
|
||||||
|
|
||||||
G90 ; absolute positioning
|
G90 ; absolute positioning
|
||||||
M140 S{bedtempAlmost} ; set & don't wait for bed temp
|
M140 S{bedtempAlmost} ; set & don't wait for bed temp
|
||||||
M104 S{hotendtempStepOne} ; set & don't wait for hotend temp
|
M104 S{hotendtempStepOne} ; set & don't wait for hotend temp
|
||||||
@@ -161,12 +157,21 @@ gcode:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
M190 S{bedtempAlmost} ; set & wait for bed temp
|
M190 S{bedtempAlmost} ; set & wait for bed temp
|
||||||
|
{% if kampEnabled == 0 %}
|
||||||
M104 S{hotendtempStepTwo} ; set & don't wait for hotend temp
|
M104 S{hotendtempStepTwo} ; set & don't wait for hotend temp
|
||||||
|
{% endif %}
|
||||||
M190 S{bedtemp} ; set & wait for bed temp
|
M190 S{bedtemp} ; set & wait for bed temp
|
||||||
M140 S{bedtempSlicer} ; set & don't wait for bed temp ; set temp to sliced setting regardless
|
M140 S{bedtempSlicer} ; set & don't wait for bed temp ; set temp to sliced setting regardless
|
||||||
|
|
||||||
|
{% if kampEnabled == 0 %}
|
||||||
|
BED_MESH_PROFILE LOAD=default ; NOTE if not using a mesh, comment out this line
|
||||||
M104 S{hotendtemp} ; set & don't wait for hotend temp
|
M104 S{hotendtemp} ; set & don't wait for hotend temp
|
||||||
G28 Z ; final z homing
|
G28 Z ; final z homing
|
||||||
|
{% else %}
|
||||||
|
G28 Z ; final z homing
|
||||||
|
BED_MESH_CALIBRATE ; KAMP mesh
|
||||||
|
M104 S{hotendtemp} ; set & don't wait for hotend temp
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
G1 X0 Y0 F{maxVelocityAdjusted}
|
G1 X0 Y0 F{maxVelocityAdjusted}
|
||||||
M109 S{hotendtemp} ; set & wait for hotend temp
|
M109 S{hotendtemp} ; set & wait for hotend temp
|
||||||
|
|||||||
11
osskc.cfg
Normal file
11
osskc.cfg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[include ./cfgs/misc-macros.cfg]
|
||||||
|
[include ./cfgs/PARKING.cfg]
|
||||||
|
[include ./cfgs/MECHANICAL_GANTRY_CALIBRATION.cfg]
|
||||||
|
[include ./cfgs/CALIBRATION.cfg]
|
||||||
|
[include ./cfgs/kamp/KAMP_Settings.cfg]
|
||||||
|
[include ./cfgs/TEST_SPEED.cfg]
|
||||||
|
|
||||||
|
# NOTE Uncomment the ONE of the following lines if you're using an adxl345
|
||||||
|
# [include ./cfgs/adxl-rp2040.cfg]
|
||||||
|
# [include ./cfgs/adxl-rpi-pico-2x.cfg]
|
||||||
|
# [include ./cfgs/adxl-direct.cfg]
|
||||||
10
printer.cfg
10
printer.cfg
@@ -4,15 +4,7 @@
|
|||||||
#
|
#
|
||||||
# See https://www.klipper3d.org/Config_Reference.html for configuration reference.
|
# See https://www.klipper3d.org/Config_Reference.html for configuration reference.
|
||||||
|
|
||||||
[include ./cfgs/misc-macros.cfg]
|
[include ./osskc.cfg]
|
||||||
[include ./cfgs/PARKING.cfg]
|
|
||||||
[include ./cfgs/MECHANICAL_GANTRY_CALIBRATION.cfg]
|
|
||||||
[include ./cfgs/CALIBRATION.cfg]
|
|
||||||
|
|
||||||
# NOTE Uncomment the ONE of the following lines if you're using an adxl345
|
|
||||||
# [include ./cfgs/adxl-rp2040.cfg]
|
|
||||||
# [include ./cfgs/adxl-rpi-pico-2x.cfg]
|
|
||||||
# [include ./cfgs/adxl-direct.cfg]
|
|
||||||
|
|
||||||
[mcu]
|
[mcu]
|
||||||
# NOTE Obtain definition by "ls -l /dev/serial/by-path/" or "ls -l /dev/serial/by-id/"
|
# NOTE Obtain definition by "ls -l /dev/serial/by-path/" or "ls -l /dev/serial/by-id/"
|
||||||
|
|||||||
Reference in New Issue
Block a user