Skip to content

Commit

Permalink
PID tuning, configuration tweaks, documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophist-UK committed Feb 29, 2024
1 parent 7b95216 commit d2cff66
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 207 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build_multiple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# and empty/commit the builds directory.

basic:
name: "Build: Basic ${{ matrix.lang }}"
name: "Build: Basic ${{ inputs.null }}"
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
secrets: inherit

en:
name: "Build: en"
name: "Build: en ${{ inputs.null }}"
if: ${{ github.event_name == 'release' }}
needs: basic
strategy:
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
secrets: inherit

fr:
name: "Build: fr"
name: "Build: fr ${{ inputs.null }}"
if: ${{ github.event_name == 'release' }}
needs: basic
strategy:
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
secrets: inherit

de:
name: "Build: de"
name: "Build: de ${{ inputs.null }}"
if: ${{ github.event_name == 'release' }}
needs: basic
strategy:
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
secrets: inherit

# lesimprimantes3d:
# name: "Build: lesimprimantes3d"
# name: "Build: lesimprimantes3d ${{ inputs.null }}"
# if: ${{ github.event_name == 'release' }}
# needs: basic
# strategy:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_single.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ jobs:
(inputs.head != 'STD' && '-') || '',
(inputs.head != 'STD' && inputs.head) || '',
(inputs.experiment != 'NONE' && '-EXPERIMENTAL-') || '',
(inputs.experiment != 'NONE' && inputs.experiment) || '',
'.hex') }}
(inputs.experiment != 'NONE' && inputs.experiment) || ''
}}
name: "Build:
${{ (inputs.screen == 'NONE' && 'nolcd') || inputs.lang }}
${{ (inputs.screen != 'NONE' && inputs.screen != 'STD' && inputs.screen) || '' }}
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
uses: actions/upload-artifact@v4
# https://github.com/marketplace/actions/upload-a-build-artifact
with:
name: ${{ env.BUILD_FILE }}
name: ${{ env.BUILD_FILE }}.hex
path: .pio/build/mega2560/${{ env.BUILD_FILE }}.hex
compression-level: 9
if-no-files-found: error
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,4 @@ tags
*.bak
*.zip
/*.pdf
!/docs/*.pdf
32 changes: 21 additions & 11 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@

#if TEMP_SENSOR_BED
#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_BED_WINDOW 3 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#endif

Expand Down Expand Up @@ -938,9 +938,17 @@
#define DEFAULT_Kd_LIST { 114.00, 114.00 }
#else
// Dagoma DiscoEasy200 hotend E3D-v6 1,75mm
#define DEFAULT_Kp 32.48
#define DEFAULT_Ki 6.40
#define DEFAULT_Kd 41.25

// Dagoma values (from before PID autotuning)
// #define DEFAULT_Kp 32.48
// #define DEFAULT_Ki 6.40
// #define DEFAULT_Kd 41.25

// Discussion on how following values were obtained at:
// https://github.com/Marlin-DE200/Marlin-DiscoEasy200/wiki/Hotend:Bed-PID-Tuning
#define DEFAULT_Kp 64.3
#define DEFAULT_Ki 12.6
#define DEFAULT_Kd 81.8
#endif
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
Expand All @@ -959,7 +967,7 @@
#define MPC_AUTOTUNE_MENU // Add MPC auto-tuning to the "Advanced Settings" menu. (~350 bytes of flash)

#define MPC_MAX 255 // (0..255) Current to nozzle while MPC is active.
#define MPC_HEATER_POWER { 40.0f } // (W) Heat cartridge powers.
#define MPC_HEATER_POWER { 30.0f } // (W) Heat cartridge powers - E3D v6 24v 1.75mm bowden.

#define MPC_INCLUDE_FAN // Model the fan speed?

Expand Down Expand Up @@ -1019,8 +1027,9 @@
*
* With this option disabled, bang-bang will be used. BED_LIMIT_SWITCHING enables hysteresis.
*/
//#define PIDTEMPBED

#if ENABLED(DE200_WARPING_BED_ANY)
#define PIDTEMPBED
#endif
#if ENABLED(PIDTEMPBED)
//#define MIN_BED_POWER 0
//#define PID_BED_DEBUG // Print Bed PID debug data to the serial port.
Expand Down Expand Up @@ -2163,9 +2172,9 @@
// With multiple runout sensors use the %c placeholder for the current tool in commands (e.g., "M600 T%c")
// NOTE: After 'M412 H1' the host handles filament runout and this script does not apply.
#if ENABLED(DE200_EXTRUDER_BICOLOR)
#define FILAMENT_RUNOUT_SCRIPT "M600 T%c I-1 U5 V195 X195 Y195"
#define FILAMENT_RUNOUT_SCRIPT "M600 T%c
#else
#define FILAMENT_RUNOUT_SCRIPT "M600 I-1 U5 V195 X195 Y195"
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif

// After a runout is detected, continue printing this length of filament
Expand Down Expand Up @@ -2307,7 +2316,8 @@
#define MESH_TEST_BED_TEMP 60 // (°C) Default bed temperature for G26.
#define G26_XY_FEEDRATE 40 // (mm/s) Feedrate for G26 XY moves.
#define G26_XY_FEEDRATE_TRAVEL 90 // (mm/s) Feedrate for G26 XY travel moves.
#define G26_RETRACT_MULTIPLIER 5.0 // G26 Q (retraction) used by default between mesh test elements.
// E3D v6 retraction must be < 5mm according to datasheet.
#define G26_RETRACT_MULTIPLIER 4.0 // G26 Q (retraction) used by default between mesh test elements.
#endif

#endif
Expand Down Expand Up @@ -2601,7 +2611,7 @@

#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise }
#define NOZZLE_PARK_POINT { (X_MAX_POS - 10), (Y_MAX_POS - 10), 20 }
#define NOZZLE_PARK_POINT { (X_MIN_POS), (Y_MAX_POS - 10), 20 }
#define NOZZLE_PARK_MOVE 0 // Park motion: 0 = XY Move, 1 = X Only, 2 = Y Only, 3 = X before Y, 4 = Y before X
#define NOZZLE_PARK_Z_RAISE_MIN 2 // (mm) Always raise Z by at least this distance
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
Expand Down
34 changes: 19 additions & 15 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,9 @@

// If you want endstops to stay on (by default) even when not homing
// enable this option. Override at any time with M120, M121.
//#define ENDSTOPS_ALWAYS_ON_DEFAULT
#if ALL(SDSUPPORT, DE200_SCREEN_NONE)
#define ENDSTOPS_ALWAYS_ON_DEFAULT
endif

// @section extras

Expand Down Expand Up @@ -1664,9 +1666,11 @@
* This feature is enabled with 'M540 S1' or from the LCD menu.
* Endstops must be activated for this option to work.
*/
//#define SD_ABORT_ON_ENDSTOP_HIT
#if ENABLED(DE200_SCREEN_NONE)
#define SD_ABORT_ON_ENDSTOP_HIT
#endif
#if ENABLED(SD_ABORT_ON_ENDSTOP_HIT)
//#define SD_ABORT_ON_ENDSTOP_HIT_GCODE "G28XY" // G-code to run on endstop hit (e.g., "G28XY" or "G27")
#define SD_ABORT_ON_ENDSTOP_HIT_GCODE "G27" // G-code to run on endstop hit (e.g., "G28XY" or "G27")
#endif

//#define SD_REPRINT_LAST_SELECTED_FILE // On print completion open the LCD Menu and select the same file
Expand Down Expand Up @@ -2475,7 +2479,7 @@
* Currently handles M108, M112, M410, M876
* NOTE: Not yet implemented for all platforms.
*/
//#define EMERGENCY_PARSER
#define EMERGENCY_PARSER // Enabled to support Host Action Command Prompt responses

/**
* Realtime Reporting (requires EMERGENCY_PARSER)
Expand Down Expand Up @@ -2558,7 +2562,7 @@
#define MIN_AUTORETRACT 0.1 // (mm) Don't convert E moves under this length
#define MAX_AUTORETRACT 10.0 // (mm) Don't convert E moves over this length
#endif
#define RETRACT_LENGTH 3 // (mm) Default retract length (positive value)
#define RETRACT_LENGTH 4 // (mm) Default retract length (positive value)
#define RETRACT_LENGTH_SWAP 13 // (mm) Default swap retract length (positive value)
#define RETRACT_FEEDRATE 45 // (mm/s) Default feedrate for retracting
#define RETRACT_ZRAISE 0 // (mm) Default retract Z-raise
Expand Down Expand Up @@ -2681,45 +2685,45 @@
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 4.5 // (mm) Initial retract.
// This short retract is done immediately, before parking the nozzle.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 66 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 100 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 950 // (mm) The length of filament for a complete unload.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
// Set to 0 for manual unloading.
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 10 // (mm/s) Slow move when starting load.
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 5 // (mm/s) Slow move when starting load.
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 40 // (mm) Slow length, to allow time to insert material.
// 0 to disable start loading and skip to fast load only
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 50 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 840 // (mm) Load length of filament, from extruder gear to nozzle.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
#define ADVANCED_PAUSE_PURGE_FEEDRATE 2 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
#define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
#define ADVANCED_PAUSE_PURGE_LENGTH 2 // (mm) Length to extrude after loading.
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
#define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
//#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.

// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length.
#define FILAMENT_UNLOAD_PURGE_RETRACT 10 // (mm) Unload initial retract length.
#define FILAMENT_UNLOAD_PURGE_DELAY 5000 // (ms) Delay for the filament to cool after retract.
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
#define FILAMENT_UNLOAD_PURGE_LENGTH 30 // (mm) An unretract is done, then this length is purged.
// Dagoma FILAMENTCHANGE_AUTO_INSERTION_PURGE_LENGTH
#define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload

#define PAUSE_PARK_NOZZLE_TIMEOUT (5*60) // (seconds) Time limit before the nozzle is turned off for safety.
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
//#define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again.
#if ENABLED(DE200_EXTRUDER_PLUS)
#define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again.
#endif
//#define PAUSE_REHEAT_FAST_RESUME // Reduce number of waits by not prompting again post-timeout before continuing.

//#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
//#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change

#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
Expand Down Expand Up @@ -3893,7 +3897,7 @@
*/
#define HOST_ACTION_COMMANDS
#if ENABLED(HOST_ACTION_COMMANDS)
//#define HOST_PAUSE_M76 // Tell the host to pause in response to M76
#define HOST_PAUSE_M76 // Tell the host to pause in response to M76
//#define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback
#if ENABLED(HOST_PROMPT_SUPPORT)
//#define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications
Expand Down
Loading

0 comments on commit d2cff66

Please sign in to comment.