From 12ed1d3a9fee3964b1f8d516ba78eccf99827b6f Mon Sep 17 00:00:00 2001 From: Ed Ropple Date: Tue, 20 Jun 2023 18:28:50 -0400 Subject: [PATCH 1/4] replaced manual PID/calibration steps with reusable macros --- README.md | 32 +++++++++----------------------- cfgs/CALIBRATION.cfg | 39 +++++++++++++++++++++++++++++++++++++++ printer.cfg | 1 + 3 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 cfgs/CALIBRATION.cfg diff --git a/README.md b/README.md index 078dbef..aaa8b6d 100644 --- a/README.md +++ b/README.md @@ -157,32 +157,18 @@ You will be pasting/typing these commands into the Mainsail/Fluidd console. 2. Do a `G34`; mechanical gantry calibration. After the controlled collision against the beam at the top, there will be a 10 second pause for you to verify that both sides of the gantry are pressed up against the `stoppers` at the top. You will hear a succession of beeps. 1. Figure out your `Z` `position_max` by baby stepping your way up to the beam. The range is 250 to 261 from what I've seen, could be even higher for you. Adjust `position_max`, if necessary. I can go all the way to 258, however, I would not print anything higher than 257. 3. PID tune the bed, but first move the printhead to the center. Ideally, all PID tuning should occur at the temperatures that you print most at. - 1. `G28` - 2. `G90` - 3. `G1 X111 Y111 Z40 F6000` - 4. `PID_CALIBRATE HEATER=heater_bed TARGET=70` - 5. `SAVE_CONFIG` (once completed) + 1. `PID_TEST_BED` + 2. `SAVE_CONFIG` (once completed) 4. PID tune the extruder while part cooling fan runs at 25%. - 1. `G28` - 2. `G90` - 3. `G1 X111 Y111 Z10 F6000` - 4. `M106 S64` - 5. `PID_CALIBRATE HEATER=extruder TARGET=245` - 6. `SAVE_CONFIG` (once completed) + 1. `PID_TEST_HOTEND` + 2. `SAVE_CONFIG` (once completed) 5. Adjust `z_offset`. Make sure your nozzle if very clean. Do the [Paper test](https://www.klipper3d.org/Bed_Level.html?h=probe_calibrate#the-paper-test). - 1. `SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60` - 2. `SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180` - 3. Proceed to next steps after both temperatures have been reached. - 4. `G28` - 5. `PROBE_CALIBRATE` - 6. `SAVE_CONFIG` (once completed) + 1. `DO_PROBE_CALIBRATE` + 2. Follow z-offset setup in Mainsail. + 3. `SAVE_CONFIG` (once completed) 6. Create a bed mesh. - 1. `SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60` - 2. `SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180` - 3. Proceed to next steps after both temperatures have been reached. - 4. `G28` - 5. `BED_MESH_CALIBRATE` - 6. `SAVE_CONFIG` (once completed) + 1. `DO_BED_CALIBRATE` + 2. `SAVE_CONFIG` (once completed) If you've made it here, then your printer has been Klipperized, and is ready to print! diff --git a/cfgs/CALIBRATION.cfg b/cfgs/CALIBRATION.cfg new file mode 100644 index 0000000..2cf7e4b --- /dev/null +++ b/cfgs/CALIBRATION.cfg @@ -0,0 +1,39 @@ +[gcode_macro PID_TEST_BED] +gcode: + G28 + G90 + PARKBED + M106 S64 + PID_CALIBRATE HEATER=heater_bed TARGET=75 + +[gcode_macro PID_TEST_HOTEND] +gcode: + G28 + G90 + PARKBED + M106 S64 + PID_CALIBRATE HEATER=extruder TARGET=245 + +[gcode_macro PID_TEST_ALL] +gcode: + PID_TEST_BED + PID_TEST_HOTEND + SAVE_CONFIG + +[gcode_macro DO_PROBE_CALIBRATE] +gcode: + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60 + SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180 + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=60 + TEMPERATURE_WAIT sensor=extruder MINIMUM=180 + G28 + PROBE_CALIBRATE + +[gcode_macro DO_BED_CALIBRATE] +gcode: + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60 + SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180 + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=60 + TEMPERATURE_WAIT sensor=extruder MINIMUM=180 + G28 + BED_MESH_CALIBRATE \ No newline at end of file diff --git a/printer.cfg b/printer.cfg index a72b668..bd391d2 100644 --- a/printer.cfg +++ b/printer.cfg @@ -7,6 +7,7 @@ [include ./cfgs/misc-macros.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] From d405db4922a4c6511312c2b78c858ace962c6f5d Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Wed, 21 Jun 2023 18:18:21 -0400 Subject: [PATCH 2/4] Adjusted mcu section. --- cfgs/CALIBRATION.cfg | 48 ++++++++++++++++++++++---------------------- printer.cfg | 4 ++-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/cfgs/CALIBRATION.cfg b/cfgs/CALIBRATION.cfg index ddae194..006e30b 100644 --- a/cfgs/CALIBRATION.cfg +++ b/cfgs/CALIBRATION.cfg @@ -1,39 +1,39 @@ [gcode_macro PID_TEST_BED] gcode: - G28 - G90 - G1 X111 Y111 Z40 F6000 - PID_CALIBRATE HEATER=heater_bed TARGET=70 + G28 + G90 + G1 X111 Y111 Z40 F6000 + PID_CALIBRATE HEATER=heater_bed TARGET=70 [gcode_macro PID_TEST_HOTEND] gcode: - G28 - G90 - G1 X111 Y111 Z10 F6000 - M106 S64 - PID_CALIBRATE HEATER=extruder TARGET=245 + G28 + G90 + G1 X111 Y111 Z10 F6000 + M106 S64 + PID_CALIBRATE HEATER=extruder TARGET=245 # TODO test this [gcode_macro PID_TEST_ALL] gcode: - PID_TEST_BED - PID_TEST_HOTEND - SAVE_CONFIG + PID_TEST_BED + PID_TEST_HOTEND + SAVE_CONFIG [gcode_macro DO_PROBE_CALIBRATE] gcode: - SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60 - SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180 - TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=60 - TEMPERATURE_WAIT SENSOR=extruder MINIMUM=180 - G28 - PROBE_CALIBRATE + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60 + SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180 + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=60 + TEMPERATURE_WAIT SENSOR=extruder MINIMUM=180 + G28 + PROBE_CALIBRATE [gcode_macro DO_CREATE_MESH] gcode: - SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60 - SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180 - TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=60 - TEMPERATURE_WAIT SENSOR=extruder MINIMUM=180 - G28 - BED_MESH_CALIBRATE \ No newline at end of file + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60 + SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180 + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM=60 + TEMPERATURE_WAIT SENSOR=extruder MINIMUM=180 + G28 + BED_MESH_CALIBRATE \ No newline at end of file diff --git a/printer.cfg b/printer.cfg index bd391d2..f7462d9 100644 --- a/printer.cfg +++ b/printer.cfg @@ -15,8 +15,8 @@ # [include ./cfgs/adxl-direct.cfg] [mcu] -# NOTE Obtain definition by "ls -l /dev/serial/by-id/" -serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 +# NOTE Obtain definition by "ls -l /dev/serial/by-path/" or "ls -l /dev/serial/by-id/" +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.2:1.0-port0 restart_method: command [printer] From 82c02bbdbf762499f950328c2d3b92dfba41d772 Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Thu, 22 Jun 2023 19:29:36 -0400 Subject: [PATCH 3/4] Adjusted readme structure. --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 44651b9..969c56c 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ I am creating these files for my personal use and cannot be held responsible for - [Features](#features) - [Stay Up-to-Date](#stay-up-to-date) - [Preface](#preface) -- [Installation Steps](#installation-steps) - - [Before You Begin](#before-you-begin) +- [Before You Begin](#before-you-begin) +- [Klipper Installation](#klipper-installation) - [Flash Firmware](#flash-firmware) - - [Download Klipper Configuration](#download-klipper-configuration) + - [Download OSS Klipper Configuration](#download-oss-klipper-configuration) - [Initial Steps](#initial-steps) 1. [Adjust Configuration with MCU Path](#adjust-configuration-with-mcu-path) 2. [Configure Your Printer](#configure-your-printer) @@ -55,9 +55,7 @@ Watch for releases and updates. Although I've made switching over to Klipper as easy as is possible, it can still be a challenge for some, especially considering that most of you have likely never used GNU+Linux. Save yourself the frustration, and fully read all documentation found on this page. Also note that Klipper is not a _must_, and is not for everyone. You can stick with Marlin, and have a fine 3D printing experience. -## Installation Steps - -### Before You Begin +## Before You Begin - Read this documentation _fully!_ - Make sure your printer is in good physical condition, because print and travel speeds will be _a lot faster_ than they were before. Consider yourself warned. @@ -71,6 +69,8 @@ Although I've made switching over to Klipper as easy as is possible, it can stil - Your question has probably been answered already, but if it hasn't, please post in the [Discussion](https://github.com/bassamanator/Sovol-SV06-firmware/discussions) section. - I would recommend searching for the word `NOTE` in this repository. There are roughly half a dozen short points amongst the various files that you should be aware of if you're using this configuration. +## Klipper Installation + ### Flash Firmware 💡 _If you have already flashed klipper onto your motherboard in the past, you can skip this step._ @@ -100,7 +100,7 @@ Please note: You may find this [video](https://youtu.be/p6l253OJa34) useful. -### Download Klipper Configuration +### Download OSS Klipper Configuration You can choose _either_ of the 2 following methods. From d6f03f7a2ca4f5b3d0d9fb625716c10d1b964c15 Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Sat, 1 Jul 2023 00:51:59 -0400 Subject: [PATCH 4/4] Cleanup in misc-macros.cfg. Adjusted calibration.cfg to work dynamically. --- cfgs/CALIBRATION.cfg | 8 ++++++-- cfgs/misc-macros.cfg | 8 +++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cfgs/CALIBRATION.cfg b/cfgs/CALIBRATION.cfg index 006e30b..73895c7 100644 --- a/cfgs/CALIBRATION.cfg +++ b/cfgs/CALIBRATION.cfg @@ -1,15 +1,19 @@ [gcode_macro PID_TEST_BED] gcode: + {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %} + {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %} G28 G90 - G1 X111 Y111 Z40 F6000 + G1 X{max_x/2} Y{max_y/2} Z40 F6000 PID_CALIBRATE HEATER=heater_bed TARGET=70 [gcode_macro PID_TEST_HOTEND] gcode: + {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %} + {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %} G28 G90 - G1 X111 Y111 Z10 F6000 + G1 X{max_x/2} Y{max_y/2} Z10 F6000 M106 S64 PID_CALIBRATE HEATER=extruder TARGET=245 diff --git a/cfgs/misc-macros.cfg b/cfgs/misc-macros.cfg index 5ca1dc1..e523294 100644 --- a/cfgs/misc-macros.cfg +++ b/cfgs/misc-macros.cfg @@ -31,6 +31,7 @@ variable_beeping_enabled: 1 # NOTE Enable(1) or disable(0) beeping everywhere ex variable_bed_temp_over: 10 # NOTE Start print if bed temperature is over by this amount, otherwise wait for temperature drop variable_pre_purge_prime_length: 1.40 gcode: + # DELETEME This section is unnecessary 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 } @@ -87,10 +88,7 @@ gcode: {% set PRE_PURGE_PRIME_LENGTH=printer["gcode_macro _globals"].pre_purge_prime_length|default(1.40)|float %} ADJUST_FILAMENT_SENSOR_STATUS ENABLE=1 - # Get Boundaries - {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %} - {% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %} - {% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %} + # Misc variables {% set extrudeAmount = 26.6 %} {% set movementLength = 100.0 %} {% set movementSpeed = 15 * 60 %} @@ -108,7 +106,7 @@ gcode: M83 ; Relative extrusion mode G1 E{PRE_PURGE_PRIME_LENGTH} F500 ; pre-purge prime LENGTH SHOULD MATCH YOUR PRINT_END RETRACT G1 X{xStart + movementLength} E{extrudeAmount} F{movementSpeed} ; intro line 1 - #G1 E-.5 F2100 # Retract + G92 E0.0 ; reset extruder M82 ; Absolute extrusion mode G1 Z5.0 ; move nozzle to prevent scratch