Heatsoaking
Introduction
Most materials used in the construction of 3D printers are subject to thermal expansion - that is, the dimensions change depending on how hot or cold they are. The frame, gantry and bed of a 3D printer can experience significant temperature changes when the bed and/or chamber heats up, which can lead to dimensional changes and deflection. Waiting for these effects to stabilize is commonly referred to as "heatsoaking". If performing calibration routines or printing takes place before the printer has reached adequate thermal stability, ongoing dimensional changes can lead to calibration inaccuracies, poor print quality, and in extreme cases, print failure or damage to the bed.
In addition to dimensional effects, the bed needs to be evenly-heated before printing to ensure good adhesion and print quality. This is particularly important for large and/or thick beds, which can take a long time to heat through evenly and may have significant temperature gradients across the bed during the heatup phase.
The heatsoaking of the bed, gantry and chamber typically take place together, and we refer to this as general heatsoaking.
The hotend will also experience thermal expansion. For many hotend designs, this expansion is stable as soon as the hotend reaches its target temperature. However, some hotends may require additional time to stabilize. If desired, a hotend heatsoak duration can be configured, which is used during printing and calibration routines. This is covered in the hotend heatsoaking section below.
General Heatsoaking
In a simple printer setup without active chamber heating, the heated bed is used as the source of heat for the general heatsoaking process. As such, general heatsoaking is often referred to as "bed heatsoaking", or simply "heatsoaking".
RatOS provides two mechanisms to help manage general heatsoaking:
- Basic heatsoaking simply waits for a configured time period after the bed has reached temperature.
- Beacon adaptive heatsoaking dynamically determines when the printer has reached sufficient thermal stability using beacon proximity measurements.
The configured heatsoaking is used during the START_PRINT macro and by applicable calibration routines.
Basic Heatsoaking
If your printer has a beacon probe, consider using beacon adaptive heatsoaking rather than basic heatsoaking, as it takes the guesswork and experimentation out of finding the optimal heatsoaking duration for your printer, and can adapt to different printing conditions such as starting from cold or warm, different bed temperatures, and so on. Adaptive heatsoaking is enabled by default for V-Core 4.x variants, and can be optionally enabled on other printers.
Basic heatsoaking is used if beacon adaptive heatsoaking is not enabled. It simply waits for a fixed time period after the bed has reached temperature before proceeding.
By default, no heatsoaking is performed. While this may be suitable for some smaller open frame printers, most printers will benefit from some level of heatsoaking to improve print quality and calibration accuracy. A good starting point for many printers is around 5-10 minutes (300-600 seconds), but the optimal duration can vary widely depending on the printer design, materials, and environment. It is recommended to experiment with different durations to find the best setting for your specific setup.
[gcode_macro RatOS]
| Name | Possible Values | Default | Description |
|---|---|---|---|
| variable_bed_heat_soak_time | integer (seconds) | 0 | Time in seconds to heat soak the bed before printing or calibration |
Beacon Adaptive Bed Heatsoaking
Beacon adaptive heatsoaking is only available when a beacon probe is configured. It uses beacon proximity measurements to dynamically assess the printer's dimensional stability and determine when it is appropriate to start printing. The soak duration is controlled by the duration of the first layer of the print, and the user's choice of "quality". Quality expresses the trade-off between soak time and first/early layer accuracy - much like slicer profiles trade speed against quality. The algorithm automatically adapts to different gantry constructions and sizes, bed temperatures, starting from cold or warm, and so on. The user does not need to be an experienced expert.
The algorithm has been tested successfully under various scenarios:
- aluminium extrusion, steel tube and titianium tube gantry beams
- various bed and enclosure temperatures
- open and enclosed printers
- from cold and warm start
Any setup which creates unstable thermal conditions - for example, coarse bang-bang thermostat controlled chamber heating with bimetallic gantry - may lead to extended soak times, as the thermal conditions may not stabilize adequately. Likewise, an open frame printer in a drafty environment may struggle to reach stability. In these scenarios, you may need to fall back to basic heatsoaking with fixed times.
Generally, the algorithm is designed to err on the safe side - that is, to soak longer than strictly necessary rather than shorter, but this cannot be guaranteed in all scenarios. If your printer has an unusual design or thermal characteristics, it is recommended to monitor the first few prints carefully to ensure that the adaptive heatsoaking is working as expected.
Basic Configuration
Adaptive heatsoaking is enabled by default for V-Core 4.x variants, and can be optionally enabled on other printers. Note that some aspects of the adpative algorithm were trained and tuned using the V-Core 4 design, so enabling it on other printers should be done with caution.
Layer Quality Settings
The layer quality setting controls the tradeoff between soak time and first layer quality:
- 1 (Rough): Fastest soak time. This setting seeks to allow the greatest amount of oversquish during the first few layers, while not being so oversquished as to risk print failure or bed damage. It is suitable for draft prints where speed is more important than first/early layer quality.
- 2 (Draft): Faster soak, first/early layer imperfections acceptable
- 3 (Normal): Balanced soak time and quality (default)
- 4 (High): Longer soak, minimal first layer imperfections
- 5 (Maximum): Slowest soak, best first layer quality and Z dimensional accuracy
Important: Maximum First Layer Duration
The maximum_first_layer_duration setting must be set correctly for your prints. This should be the longest first layer time you expect to print.
For example:
- If your typical first layers take up to 30 minutes, set this to
1800(seconds) - For very large prints with 60-minute first layers, set this to
3600
If you print a first layer significantly longer than this value, excessive thermal deflection may occur during the print, leading to poor first layer quality, print failure, or even damage to the bed.
At present, variable_beacon_adaptive_heat_soak_maximum_first_layer_duration must be manually configured by the user. A future enhancement may be introduced to automatically determine this value from the gcode file for each print, so that it would no longer need to be manually configured.
[gcode_macro RatOS]
| Name | Possible Values | Default | Description |
|---|---|---|---|
| variable_beacon_adaptive_heat_soak | True / False | (see above) | Enable adaptive heat soaking based on beacon proximity measurements. |
| variable_beacon_adaptive_heat_soak_layer_quality | number (1-5) | 3 | Controls the tradeoff between soak time and first layer quality. 1 = rough (fastest soak), 2 = draft, 3 = normal, 4 = high, 5 = maximum (slowest soak, best quality). Longer soak times leave less thermal deflection during the print. |
| variable_beacon_adaptive_heat_soak_maximum_first_layer_duration | number | 1800 | Maximum first layer print time in seconds for your gcode files. Must be set correctly. If you print a significantly longer first layer than this value, excessive thermal deflection may occur. Internally, this value is clamped to between 60 and 7200 seconds. |
Advanced Configuraton
[gcode_macro RatOS]
| Name | Possible Values | Default | Description |
|---|---|---|---|
| variable_beacon_adaptive_heat_soak_max_wait | number | 5400 | The maximum time in seconds to wait for adaptive heat soaking to complete. This is a sanity limit to prevent waiting indefinitely. |
| variable_beacon_adaptive_heat_soak_extra_wait_after_completion | number | 0 | Extra time in seconds to wait after adaptive heat soaking is considered complete. Typically not needed, but could be useful for large printers with stable gantry designs (such as steel rail on steel tube) where the adaptive heat soak completes before the bed edge temperature stabilizes. |
Theory of Operation
Beacon adaptive heatsoaking places the toolhead at the centre of the bed and monitors beacon proximity measurements as the soak progresses. The rate of change of the proximity measurment, or z-rate, is used to determine when the printer has reached sufficient level of dimensional stability to start printing. The core principle here is to estimate how much residual z-deflection will occur during the first layer, and to wait until that residual deflection is below an acceptable threshold.
Hotend Heatsoaking
Hotend heatsoaking is typically not needed, as typical modern hotends have relatively low thermal mass and experience no significant dimensional changes once at temperature. However, a hotend heatsoak duration can be configured if desired, and is used during printing and calibration routines.
[gcode_macro RatOS]
| Name | Possible Values | Default | Description |
|---|---|---|---|
| variable_hotend_heat_soak_time | integer (seconds) | 0 | Time in seconds to heat soak the hotend before printing or calibration |
Changing Heatsoak Settings On The Fly
Heatsoak settings can be changed before a print is started without editing printer.cfg. Changes made this way are temporary and only last until the next printer restart, at which point the settings in printer.cfg are restored (these are referred to as the "startup settings").
While you can use the general-purpose SET_GCODE_VARIABLE command to change heatsoak settings, RatOS provides dedicated macros to simplify this process.
If you want to apply heatsoak settings within slicer custom gcode, the custom gcode must be placed before the START_PRINT macro.
USE_ADAPTIVE_HEATSOAK Macro
Temporarily enables beacon adaptive bed heatsoaking (if a beacon probe is present), will reset to printer.cfg settings when Klipper is restarted. Optionally specify QUALITY (1-5) and maximum FIRST_LAYER_DURATION (in minutes).
By default, the startup settings from printer.cfg will be used for any unspecified optional arguments, although this can be configured to use current settings instead - see the Default Values for Optional Arguments section below for details.
Example:
USE_ADAPTIVE_HEATSOAK QUALITY=3 FIRST_LAYER_DURATION=30
Console shows:
RatOS: Will use adaptive bed heatsoak with quality 3 and maximum first layer duration of 30 minutes.
USE_FIXED_HEATSOAK Macro
Temporarily enables fixed bed heatsoaking, will reset to printer.cfg settings when Klipper is restarted. Optionally specify DURATION (in minutes). The startup settings from printer.cfg will be used by default.
By default, the startup settings from printer.cfg will be used for any unspecified optional arguments, although this can be configured to use current settings instead - see the Default Values for Optional Arguments section below for details.
Example:
USE_FIXED_HEATSOAK DURATION=10
Console shows:
RatOS: Will use fixed-duration bed heatsoak duration of 10 minutes.
USE_NO_HEATSOAK Macro
Temporarily disables bed heatsoaking, will reset to printer.cfg settings when Klipper is restarted.
Example:
USE_NO_HEATSOAK
Console shows:
RatOS: Will use no bed heatsoak.
Default Values for Optional Arguments
This section applies only to the default values for unspecified optional arguments in the USE_ADAPTIVE_HEATSOAK and USE_FIXED_HEATSOAK commands.
For optional arguments that are not specified, the default values can come either from the startup settings in printer.cfg or from the current settings (which may have been changed since startup). By default, the macros will use startup settings.
The default source can be configured by adding the following to printer.cfg:
[gcode_macro HEATSOAK_SETTINGS]
variable_default_source: "current" # The source of default values. Must be "current" or "startup".
You can also specify the default source on a per-macro basis by including DEFAULT=... in the macro call. For example, to use current settings as the default for unspecified arguments when calling USE_ADAPTIVE_HEATSOAK:
USE_ADAPTIVE_HEATSOAK DEFAULT=current QUALITY=1
HEATSOAK_SETTINGS Macro
The HEATSOAK_SETTINGS macro displays the current heatsoak settings can be used from the Mainsail console, added as a Mainsail custom macro button, or included in slicer custom gcode prior to the START_PRINT macro.
Without Arguments
Without arguments, HEATSOAK_SETTINGS displays a simple summary of the current bed heatsoak settings. Specify VERBOSE=1 to show all the underlying heatsoak variables. If you do not have a beacon probe configured, the beacon adaptive heatsoak settings are not shown.
Example:
HEATSOAK_SETTINGS
Console shows:
RatOS: Will use adaptive bed heatsoak with quality 3 and maximum first layer duration of 5 minutes.
Example with VERBOSE=1:
HEATSOAK_SETTINGS VERBOSE=1
Console shows:
RatOS: Will use adaptive bed heatsoak with quality 3 and maximum first layer duration of 5 minutes.
Detailed settings:
beacon_adaptive_heat_soak: True
beacon_adaptive_heat_soak_max_wait: 5400
beacon_adaptive_heat_soak_extra_wait_after_completion: 120
beacon_adaptive_heat_soak_layer_quality: 3
beacon_adaptive_heat_soak_maximum_first_layer_duration: 300
bed_heat_soak_time: 0
hotend_heat_soak_time: 0
With Full Variable Names
You can also use the full variable names to set heatsoak settings. Do not include the variable_ prefix. Note that no validation is performed on the value supplied when adjusting settings this way, so you must ensure that the value is valid. Prefer the dedicated macros described above where possible, as they perform validation and provide feedback in the console.
Example:
HEATSOAK_SETTINGS beacon_adaptive_heat_soak_extra_wait_after_completion=120
Console shows:
Setting beacon_adaptive_heat_soak_extra_wait_after_completion to 120
RESET_HEATSOAK_SETTINGS Macro
The RESET_HEATSOAK_SETTINGS macro resets all heatsoak settings to the values from printer.cfg when Klipper started up. This can be useful if you have made temporary changes using the HEATSOAK_SETTINGS macro and wish to revert to the startup configuration without restarting the printer.