diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-09-01 12:54:25 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-09-03 18:11:05 -0400 |
commit | c84956befe88daeeb9512acaa9fa82395665df16 (patch) | |
tree | 517a34f0f9abbcfc1d1b78ac8833f85aa4265c98 | |
parent | af3622544d8adc6ce92dd47d1f1087b970ad8b6e (diff) | |
download | kutter-c84956befe88daeeb9512acaa9fa82395665df16.tar.gz kutter-c84956befe88daeeb9512acaa9fa82395665df16.tar.xz kutter-c84956befe88daeeb9512acaa9fa82395665df16.zip |
heaters: Change default smooth_time from 2 seconds to 1 second
A larger smooth_time results in a slower reaction time for the PID.
This increased delay can cause temperature oscillations with high
power heaters. Many boards produce good results without any
smoothing. So, it seems a smooth_time of 1 second is a better
default.
Reported by @ReXT3D.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | docs/Config_Changes.md | 4 | ||||
-rw-r--r-- | docs/Config_Reference.md | 4 | ||||
-rw-r--r-- | klippy/extras/heaters.py | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md index 13fefdad..a6558f2e 100644 --- a/docs/Config_Changes.md +++ b/docs/Config_Changes.md @@ -8,6 +8,10 @@ All dates in this document are approximate. ## Changes +20210903: The default [`smooth_time`](Config_Reference.md#extruder) +for heaters has changed to 1 second (from 2 seconds). For most +printers this will result in more stable temperature control. + 20210830: The default adxl345 name is now "adxl345". The default CHIP parameter for the `ACCELEROMETER_MEASURE` and `ACCELEROMETER_QUERY` is now also "adxl345". diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md index a3d9842a..1ae5a5c6 100644 --- a/docs/Config_Reference.md +++ b/docs/Config_Reference.md @@ -707,10 +707,10 @@ sensor_pin: # The resistance (in ohms) of the pullup attached to the thermistor. # This parameter is only valid when the sensor is a thermistor. The # default is 4700 ohms. -#smooth_time: 2.0 +#smooth_time: 1.0 # A time value (in seconds) over which temperature measurements will # be smoothed to reduce the impact of measurement noise. The default -# is 2 seconds. +# is 1 seconds. control: # Control algorithm (either pid or watermark). This parameter must # be provided. diff --git a/klippy/extras/heaters.py b/klippy/extras/heaters.py index e63881dc..b9f60e63 100644 --- a/klippy/extras/heaters.py +++ b/klippy/extras/heaters.py @@ -34,7 +34,7 @@ class Heater: is not None) self.can_extrude = self.min_extrude_temp <= 0. or is_fileoutput self.max_power = config.getfloat('max_power', 1., above=0., maxval=1.) - self.smooth_time = config.getfloat('smooth_time', 2., above=0.) + self.smooth_time = config.getfloat('smooth_time', 1., above=0.) self.inv_smooth_time = 1. / self.smooth_time self.lock = threading.Lock() self.last_temp = self.smoothed_temp = self.target_temp = 0. |