From c179db3d4331db9d85c7acfdaa1e96e295d277ba Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 1 Nov 2021 13:54:11 -0400 Subject: [PATCH] temperature_sensors: Deprecate "NTC 100K beta 3950" thermistor It seems the common "beta 3950" thermistors generally follow a temperature table defined by the new "Generic 3950" definition. Using a table that actually follows the "beta 3950" temperature curve is generally less accurate. Deprecate the existing "NTC 100K beta 3950" definition to avoid this common issue. Signed-off-by: Kevin O'Connor --- config/generic-bigtreetech-skr-2.cfg | 2 +- config/generic-duet3-mini.cfg | 2 +- config/generic-mks-rumba32-v1.0.cfg | 2 +- config/generic-rumba.cfg | 2 +- config/kit-voron2-250mm.cfg | 2 +- config/printer-mtw-create-2015.cfg | 2 +- config/printer-wanhao-duplicator-i3-v2.1-2017.cfg | 4 ++-- docs/Config_Changes.md | 7 +++++++ docs/Config_Reference.md | 4 ++-- klippy/extras/heaters.py | 2 ++ klippy/extras/temperature_sensors.cfg | 2 +- 11 files changed, 20 insertions(+), 11 deletions(-) diff --git a/config/generic-bigtreetech-skr-2.cfg b/config/generic-bigtreetech-skr-2.cfg index 37cf3283..e978af21 100644 --- a/config/generic-bigtreetech-skr-2.cfg +++ b/config/generic-bigtreetech-skr-2.cfg @@ -73,7 +73,7 @@ max_temp: 250 [heater_bed] heater_pin: PD7 -sensor_type: NTC 100K beta 3950 +sensor_type: Generic 3950 sensor_pin: PA1 control: watermark min_temp: 0 diff --git a/config/generic-duet3-mini.cfg b/config/generic-duet3-mini.cfg index 732c1ae3..99e1af3d 100644 --- a/config/generic-duet3-mini.cfg +++ b/config/generic-duet3-mini.cfg @@ -123,7 +123,7 @@ sense_resistor: 0.056 [heater_bed] heater_pin: PB17 #out1 -sensor_type: NTC 100K beta 3950 +sensor_type: Generic 3950 sensor_pin: vref_scaled:PC0 control: pid pullup_resistor: 2200 diff --git a/config/generic-mks-rumba32-v1.0.cfg b/config/generic-mks-rumba32-v1.0.cfg index 229a7dfc..a2cf5554 100644 --- a/config/generic-mks-rumba32-v1.0.cfg +++ b/config/generic-mks-rumba32-v1.0.cfg @@ -72,7 +72,7 @@ max_temp: 250 [heater_bed] heater_pin: PA1 -sensor_type: NTC 100K beta 3950 +sensor_type: Generic 3950 sensor_pin: PC0 control: watermark min_temp: 0 diff --git a/config/generic-rumba.cfg b/config/generic-rumba.cfg index efc7398a..48bee09a 100644 --- a/config/generic-rumba.cfg +++ b/config/generic-rumba.cfg @@ -74,7 +74,7 @@ max_temp: 250 [heater_bed] heater_pin: PH6 -sensor_type: NTC 100K beta 3950 +sensor_type: Generic 3950 sensor_pin: PK3 control: watermark min_temp: 0 diff --git a/config/kit-voron2-250mm.cfg b/config/kit-voron2-250mm.cfg index 2d509967..282e7595 100644 --- a/config/kit-voron2-250mm.cfg +++ b/config/kit-voron2-250mm.cfg @@ -141,7 +141,7 @@ max_extrude_only_distance: 780.0 heater_pin: PB4 # D10 on mcu_xye max_power: 1.0 -sensor_type: NTC 100K beta 3950 +sensor_type: Generic 3950 sensor_pin: PK5 # T0 on mcu_xye smooth_time: 3.0 diff --git a/config/printer-mtw-create-2015.cfg b/config/printer-mtw-create-2015.cfg index cae0524e..4194fd23 100644 --- a/config/printer-mtw-create-2015.cfg +++ b/config/printer-mtw-create-2015.cfg @@ -79,7 +79,7 @@ max_temp: 275 [heater_bed] heater_pin: PE5 -sensor_type: NTC 100K beta 3950 +sensor_type: Generic 3950 sensor_pin: PF2 control: watermark min_temp: 0 diff --git a/config/printer-wanhao-duplicator-i3-v2.1-2017.cfg b/config/printer-wanhao-duplicator-i3-v2.1-2017.cfg index 211229e2..87f8f857 100644 --- a/config/printer-wanhao-duplicator-i3-v2.1-2017.cfg +++ b/config/printer-wanhao-duplicator-i3-v2.1-2017.cfg @@ -127,7 +127,7 @@ rotation_distance: 29.888 nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PD5 -sensor_type: NTC 100K beta 3950 +sensor_type: Generic 3950 sensor_pin: PA7 control: pid pid_Kp: 18.214030 @@ -138,7 +138,7 @@ max_temp: 230 [heater_bed] heater_pin: PD4 -sensor_type: NTC 100K beta 3950 +sensor_type: Generic 3950 sensor_pin: PA6 control: pid pid_Kp: 71.321 diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md index 828094b0..13c4da5e 100644 --- a/docs/Config_Changes.md +++ b/docs/Config_Changes.md @@ -8,6 +8,13 @@ All dates in this document are approximate. ## Changes +20211110: The "NTC 100K beta 3950" temperature sensor is deprecated. +This sensor will be removed in the near future. Most users will find +the "Generic 3950" temperature sensor more accurate. To continue to +use the older (typically less accurate) definition, define a custom +[thermistor](Config_Reference.md#thermistor) with `temperature1: 25`, +`resistance1: 100000`, and `beta: 3950`. + 20211104: The "step pulse duration" option in "make menuconfig" has been removed. A new `step_pulse_duration` setting in the [stepper config section](Config_Reference.md#stepper) should be set diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md index 2539def7..41bcd8ab 100644 --- a/docs/Config_Reference.md +++ b/docs/Config_Reference.md @@ -701,7 +701,7 @@ heater_pin: # periods) to the heater. The default is 1.0. sensor_type: # Type of sensor - common thermistors are "EPCOS 100K B57560G104F", -# "ATC Semitec 104GT-2", "NTC 100K beta 3950", "Honeywell 100K +# "ATC Semitec 104GT-2", "Generic 3950", "Honeywell 100K # 135-104LAG-J01", "NTC 100K MGB18-104F39050L32", "SliceEngineering # 450", and "TDK NTCG104LH104JT1". See the "Temperature sensors" # section for other sensors. This parameter must be provided. @@ -2058,7 +2058,7 @@ sections that use one of these sensors. ``` sensor_type: # One of "EPCOS 100K B57560G104F", "ATC Semitec 104GT-2", -# "NTC 100K beta 3950", "Honeywell 100K 135-104LAG-J01", +# "Generic 3950", "Honeywell 100K 135-104LAG-J01", # "NTC 100K MGB18-104F39050L32", "SliceEngineering 450", or # "TDK NTCG104LH104JT1" sensor_pin: diff --git a/klippy/extras/heaters.py b/klippy/extras/heaters.py index 00c0e593..b0b2c16d 100644 --- a/klippy/extras/heaters.py +++ b/klippy/extras/heaters.py @@ -280,6 +280,8 @@ class PrinterHeaters: if sensor_type not in self.sensor_factories: raise self.printer.config_error( "Unknown temperature sensor '%s'" % (sensor_type,)) + if sensor_type == 'NTC 100K beta 3950': + config.deprecate('sensor_type', 'NTC 100K beta 3950') return self.sensor_factories[sensor_type](config) def register_sensor(self, config, psensor, gcode_id=None): self.available_sensors.append(config.get_name()) diff --git a/klippy/extras/temperature_sensors.cfg b/klippy/extras/temperature_sensors.cfg index 5d67102b..f50fa47d 100644 --- a/klippy/extras/temperature_sensors.cfg +++ b/klippy/extras/temperature_sensors.cfg @@ -87,7 +87,7 @@ temperature1: 25 resistance1: 100000 beta: 3974 -# Definition inherent from name +# Definition inherent from name. This sensor is deprecated! [thermistor NTC 100K beta 3950] temperature1: 25 resistance1: 100000