Skip to main content

Thermal Sensor Configuration Methods

This page organizes common temperature sensor configuration methods in Klipper, including the hotend, heated bed, chamber temperature, motherboard temperature, host computer temperature, PT1000 direct connection, MAX31865, and K-type thermocouple. The pins, sensor models, pull-up resistors, and temperature ranges in the examples must be modified according to the actual hardware.

Power Off Before Operation

Before inspecting or replacing thermistors, PT100/PT1000 sensors, thermocouple modules, heater cartridges, heated beds, jumper caps, or terminals, completely shut down the printer and disconnect the power supply, and wait for the hotend and heated bed to cool down. Do not plug or unplug wiring harnesses, rearrange interface wiring, or touch terminals while the system is powered on.

Usage Notes
  • sensor_type must match the actual sensor; do not simply copy the configuration example.
  • sensor_pin must be connected to an ADC / thermistor interface that supports temperature sampling; do not use fan ports, heater ports, endstop ports, or general output ports.
  • PT100/PT1000 sensors, thermocouples, and standard NTC thermistors use different interfaces and configuration methods. Connecting them to the wrong interface will cause abnormal temperature readings or ADC out of range.
  • After modifying the temperature sensor or heater configuration, re-check the temperature readings and re-run PID calibration as needed.

Basic Structure

Temperature sensors typically appear in the following configuration sections:

ScenarioConfiguration SectionCommon Purpose
Hotend[extruder]Reads hotend temperature and controls hotend heating
Heated Bed[heater_bed]Reads bed temperature and controls bed heating
Chamber / Additional Temperature[temperature_sensor xxx]Displays temperature only, does not directly control heating
Custom Heater[heater_generic xxx]Controls additional heating devices such as heated chambers or dry boxes
Motherboard Temperature[temperature_sensor xxx] + temperature_mcuDisplays internal MCU temperature
Host Computer Temperature[temperature_sensor xxx] + temperature_hostDisplays host CPU temperature

The most common hotend configuration structure is as follows:

printer.cfg
[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: <sensor_type>
sensor_pin: <hotend_sensor_pin>
min_temp: 0
max_temp: 300

The most common heated bed configuration structure is as follows:

printer.cfg
[heater_bed]
heater_pin: <bed_heater_pin>
sensor_type: <sensor_type>
sensor_pin: <bed_sensor_pin>
min_temp: 0
max_temp: 120

Standard NTC Thermistors

Standard hotends and heated beds commonly use 100K NTC thermistors. These sensors are typically connected to the standard thermistor interfaces on the motherboard or toolhead board.

Hotend Example

printer.cfg
[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: Generic 3950
sensor_pin: <hotend_sensor_pin>
min_temp: 0
max_temp: 300

Heated Bed Example

printer.cfg
[heater_bed]
heater_pin: <bed_heater_pin>
sensor_type: Generic 3950
sensor_pin: <bed_sensor_pin>
min_temp: 0
max_temp: 120

C8P Pin Examples

The following only demonstrates common pin assignments for the C8P. When actually using it, fill in the thermistor and heater pins according to your wiring.

C8P Hotend Example
[extruder]
heater_pin: PD12
sensor_type: Generic 3950
sensor_pin: PC2
min_temp: 0
max_temp: 300
C8P Heated Bed Example
[heater_bed]
heater_pin: PB0
sensor_type: Generic 3950
sensor_pin: PC5
min_temp: 0
max_temp: 120
Sensor Models

Common sensor_type values include Generic 3950, PT1000, or other built-in Klipper models. Use the model specified on the hotend, heated bed, or sensor label. If unsure, refer to the product documentation first or contact after-sales support for confirmation.

PT1000 Direct Connection

PT1000 sensors can be connected directly to thermistor interfaces that support PT1000. Different motherboards use different pull-up (sampling) resistors on their thermistor interfaces; they are not necessarily 1K. Common values include 4700, 2200, 1100, and 1000. Refer to the motherboard documentation or the actual hardware. Some motherboards allow switching the pull-up resistor via jumper caps.

The following example assumes a motherboard with a 1K pull-up resistor. pullup_resistor must be modified according to your motherboard's actual resistor value:

PT1000 Direct Connection Example (1K Pull-Up Motherboard)
[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: PT1000
sensor_pin: <pt1000_sensor_pin>
pullup_resistor: 1000
min_temp: 0
max_temp: 350
Pull-Up Resistor
  • pullup_resistor must be set according to the actual pull-up resistor on the motherboard's thermistor interface. Common values include 4700, 2200, 1100, and 1000; there is no universal value. Check the motherboard documentation or contact after-sales support first.
  • If the motherboard's thermistor interface uses the default 4.7K pull-up, pullup_resistor can be omitted, and Klipper will treat it as 4700 by default.
  • For motherboards with jumper caps, the jumper state and the configuration must be consistent; otherwise, temperatures will be noticeably higher, lower, or trigger ADC out of range.

MAX31865 Configuration

The MAX31865 is used to read RTD platinum resistance temperature sensors, commonly divided into PT100 and PT1000 types. This method does not use a standard thermistor ADC pin; instead, it uses SPI communication and a chip select pin.

SensorTypical SettingReference Resistor ExampleDescription
PT100rtd_nominal_r: 100rtd_reference_r: 430Probe nominal resistance is 100 ohms
PT1000rtd_nominal_r: 1000rtd_reference_r: 4300Probe nominal resistance is 1000 ohms
Confirm the Type First

PT100, PT1000, and K-type thermocouples are not the same type of sensor. The MAX31865 is only used for RTD platinum resistance sensors such as PT100/PT1000, and is not used for K-type thermocouples.

PT100 Example

PT100 + MAX31865
[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: MAX31865
sensor_pin: <max31865_cs_pin>
spi_bus: <spi_bus>
rtd_nominal_r: 100
rtd_reference_r: 430
rtd_num_of_wires: 2
min_temp: 0
max_temp: 350

PT1000 Example

PT1000 + MAX31865
[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: MAX31865
sensor_pin: <max31865_cs_pin>
spi_bus: <spi_bus>
rtd_nominal_r: 1000
rtd_reference_r: 4300
rtd_num_of_wires: 2
min_temp: 0
max_temp: 350
MAX31865 Notes
  • The MAX31865 can only be used with the PT100 / PT1000 wiring supported by the corresponding board. Do not connect a standard NTC thermistor to the MAX31865.
  • sensor_pin is the chip select pin of the MAX31865, not a standard thermistor ADC pin.
  • rtd_num_of_wires must be set according to the actual number of wires on the probe; common values are 2, 3, or 4.
  • For boards with DIP switches or jumpers, set the PT100/PT1000 type and wire count according to the product documentation; otherwise, temperature readings will be abnormal.

K-Type Thermocouple Configuration

K-type thermocouples require a matching thermocouple conversion chip. They cannot be connected directly to a standard thermistor interface, nor can they be connected to the PT100/PT1000 interface of the MAX31865. A common configuration uses SPI:

K-Type Thermocouple Example
[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: MAX31856
sensor_pin: <thermocouple_cs_pin>
spi_bus: <spi_bus>
tc_type: K
min_temp: 0
max_temp: 500

If using a different K-type thermocouple conversion chip, change sensor_type to the actual chip model, such as MAX6675, MAX31855, or MAX31856, and configure SPI according to the module documentation. tc_type: K indicates that the current probe is a K-type thermocouple.

High-Temperature Configuration

Only increase max_temp when the hotend, heater cartridge, thermistor, nozzle, hotend mounting structure, and wiring all support high temperatures. Do not arbitrarily set max_temp to a value far exceeding the hardware capability just to eliminate error messages.

Standalone Temperature Display

If you only want to display temperature without controlling a heater, use [temperature_sensor xxx].

Chamber / Ambient Temperature

Chamber Temperature Example
[temperature_sensor chamber]
sensor_type: Generic 3950
sensor_pin: <chamber_sensor_pin>
min_temp: 0
max_temp: 100

Mainboard Temperature

MCU Temperature Example
[temperature_sensor MCU]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100

Host Temperature

Host Temperature Example
[temperature_sensor Host]
sensor_type: temperature_host
min_temp: 0
max_temp: 100
Display Name

The chamber in [temperature_sensor chamber] is the display name in the frontend. It can be changed to box, toolboard, host, etc., based on actual usage. The name must not duplicate any existing configuration section.

Common Thermistors and Custom Thermistors

Klipper Built-in sensor_type

The following sensor_type values are built into Klipper and can be used directly without defining a custom [thermistor xxx]:

sensor_typeNominal ResistanceDefinition MethodCommon Use
Loading...
100K @ 25°CThree-point methodDefault config for FLY mainboard hotend / heated bed, standard printing scenarios like PLA/ABS
Loading...
100K @ 20°CThree-point methodHigh-temperature hotends, thermistors for E3D-style hotends
Loading...
100K @ 25°CThree-point methodUniversal for hotend / heated bed, common for generic NTC replacements
Loading...
100K @ 25°CB-value 4100Thermistors for silicone heating pads and heated beds
Loading...
500K @ 25°CThree-point methodHigh-temperature hotend (450°C-level measurement), verify the entire hotend's temperature rating
Loading...
100K @ 25°CThree-point methodHotend / heated bed, common SMD NTC replacement
Loading...
100K @ 25°CB-value 3974Universal for hotend / heated bed
Loading...
100K @ 25°CThree-point methodHotend, small package thermistor
Loading...
1000 Ω @ 0°CPlatinum RTDHigh-precision hotend; pullup_resistor must be filled in per the mainboard's actual pull-up resistor (commonly 4700, 2200, 1100, 1000, etc.), see PT1000 Direct Connection above
Selection Suggestions
  • FLY mainboards typically use Generic 3950 as the factory default. Confirm the original model before replacing the thermistor.
  • For E3D-style high-temperature hotends or their matching thermistors, ATC Semitec 104GT-2 is common.
  • If the model is uncertain, check the product documentation or contact support for confirmation. Do not change sensor_type casually.

Custom Thermistors

If the sensor is not in the built-in list above, you can define a custom thermistor curve with [thermistor xxx].

Placement

[thermistor xxx] must be written above the configuration section that references it, i.e., before the corresponding [extruder], [heater_bed], [temperature_sensor xxx], or [heater_generic xxx].

There are two common ways to write a custom thermistor:

Data TypeRecommended MethodDescription
Multiple temperature/resistance pointsThree-point methodPreferred; temperature curve is closer to the actual sensor
Only nominal resistance and B-valueB-value methodSimpler to write, but high-temperature accuracy may be lower than the three-point method

Three-Point Method Examples

Below uses the parameters of ATC Semitec 104GT-2 as an example to demonstrate the three-point method for a custom thermistor. First define [thermistor semitec_104gt2], then use it in [extruder]:

ATC Semitec 104GT-2 Three-Point Method
[thermistor semitec_104gt2]
temperature1: 20
resistance1: 126800
temperature2: 150
resistance2: 1360
temperature3: 300
resistance3: 80.65

[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: semitec_104gt2
sensor_pin: <hotend_sensor_pin>
min_temp: 0
max_temp: 300

Below uses the parameters of EPCOS 100K B57560G104F as an example:

EPCOS 100K B57560G104F Three-Point Method
[thermistor epcos_100k]
temperature1: 25
resistance1: 100000
temperature2: 150
resistance2: 1641.9
temperature3: 250
resistance3: 226.15

[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: epcos_100k
sensor_pin: <hotend_sensor_pin>
min_temp: 0
max_temp: 300
Point Selection

The three points should cover the common printing temperature range as much as possible, e.g., near room temperature, medium temperature, and the highest commonly used temperature. If the datasheet provides a temperature/resistance table, prefer selecting three points from it.

B-Value Method

If the manufacturer only provides the nominal resistance and B-value, you can define it using temperature1, resistance1, and beta:

100K B3950 B-Value Method
[thermistor ntc_100k_b3950]
temperature1: 25
resistance1: 100000
beta: 3950

[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: ntc_100k_b3950
sensor_pin: <hotend_sensor_pin>
min_temp: 0
max_temp: 300
100K B4500 B-Value Method
[thermistor ntc_100k_b4500]
temperature1: 25
resistance1: 100000
beta: 4500

[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: ntc_100k_b4500
sensor_pin: <hotend_sensor_pin>
min_temp: 0
max_temp: 350

High-Temperature Thermistor Configuration

The following high-temperature thermistor parameters are taken from thermistor tables in the Marlin firmware source code that have been verified against manufacturer datasheets. They are suitable for high-temperature hotends that need to measure above 300°C. Before use, confirm the hotend, heater cartridge, nozzle, and filament all support the corresponding temperature.

ATC Semitec 204GT-2 (200K / 300°C)
# R25 = 200K, B25 = 4338, 4.7K pull-up
# Source: Marlin thermistor_2.h, verified against Mouser manufacturer datasheet
[thermistor semitec_204gt2]
temperature1: 25
resistance1: 200000
temperature2: 150
resistance2: 2520
temperature3: 300
resistance3: 142

[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: semitec_204gt2
sensor_pin: <hotend_sensor_pin>
min_temp: 0
max_temp: 300
204GT-2 Notes
  • The 200K nominal resistance gives a higher resistance in the high-temperature range, offering better ADC resolution above 250°C compared to 100K thermistors.
  • Suitable for 300°C-class high-temperature hotends, such as printing high-temperature materials like PEI, PC, PA.
  • Use the standard 4.7 kΩ pull-up; no need to change the pull-up resistor.
Formbot / Vivedino 100K B3950 High-Temperature Version (350°C)
# R25 = 100K, B25/50 = 3950, 4.7K pull-up
# Source: Marlin thermistor_61.h, 100KR13950181203
[thermistor formbot_3950_350]
temperature1: 25
resistance1: 100000
temperature2: 150
resistance2: 509
temperature3: 300
resistance3: 63.5

[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: formbot_3950_350
sensor_pin: <hotend_sensor_pin>
min_temp: 0
max_temp: 350
100K High-Temperature Accuracy Limitation

At 300°C, the 100K thermistor's resistance is only about 63 Ω, which is vastly different from the 4.7 kΩ pull-up resistor, resulting in low ADC resolution in the high-temperature range. If you need to print at temperatures above 300°C for extended periods, it is recommended to use a 200K (204GT-2) or 500K (SliceEngineering 450) thermistor instead.

Dyze Design 2.5M B4500 (500°C)
# R25 = 2.5M, B25 = 4500, requires a high-value pull-up resistor
# Source: Marlin thermistor_66.h comment parameters
[thermistor dyze_500]
temperature1: 25
resistance1: 2500000
beta: 4500

[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: dyze_500
sensor_pin: <hotend_sensor_pin>
pullup_resistor: 470000
min_temp: 0
max_temp: 500
2.5M Thermistor Pull-up Requirements
  • The 2.5MΩ nominal resistance at room temperature is much higher than the standard 4.7 kΩ pull-up. Using the default pull-up will cause the ADC to nearly saturate in the low-temperature range, making accurate temperature readings impossible.
  • A pull-up resistor of 470 kΩ or higher must be used, and pullup_resistor: 470000 must be set in the configuration.
  • If the mainboard or toolboard does not support changing the pull-up resistor, do not use this thermistor. Instead, use a PT1000 + MAX31865 or K-type thermocouple solution.
  • For temperature measurement at the 500°C level, also verify that the heater cartridge, nozzle, hotend structure, and wiring all meet the required temperature ratings.
High-Temperature Solution Selection
Target TemperatureRecommended SolutionDescription
≤ 300°C
Loading...
or
Loading...
Standard configuration suffices
300°C ~ 350°C
Loading...
Requires adding the corresponding custom [thermistor] configuration from this page
350°C ~ 450°C
Loading...
Built into Klipper, just fill in the sensor_type
450°C ~ 500°C
Loading...
or
Loading...
Requires adding the corresponding custom [thermistor] configuration from this page, or use a K-type thermocouple
Above 500°C
Loading...
NTC thermistors are not suitable

General Template for Three-Point Method

If you have a datasheet but no ready-made parameters, you can fill in the template below:

Three-Point Method Template
[thermistor my_custom_thermistor]
temperature1: 25
resistance1: <resistance_at_25c>
temperature2: 150
resistance2: <resistance_at_150c>
temperature3: 250
resistance3: <resistance_at_250c>

[extruder]
heater_pin: <hotend_heater_pin>
sensor_type: my_custom_thermistor
sensor_pin: <hotend_sensor_pin>
min_temp: 0
max_temp: 300
High-Temperature Thermistor Limitations

max_temp should only be set based on the actual temperature ratings of the hotend, heater cartridge, thermistor, nozzle, and wiring. A high-temperature NTC configuration being able to read higher temperatures does not mean the entire hotend assembly can be safely heated to that temperature.

Post-Modification Checks

After saving the configuration and restarting Klipper, check the following in order:

  1. Verify that the front-end temperature is close to room temperature.
  2. If ADC out of range, extremely high temperature, extremely low temperature, or negative temperature is displayed, stop heating first, power off, and check the connector, wiring, and sensor type.
  3. Confirm that sensor_pin is not shared with any other function.
  4. Confirm that sensor_type, pullup_resistor, rtd_nominal_r, and rtd_reference_r match the actual hardware.
  5. After replacing the hotend or heated bed sensor, re-run PID calibration and save the results.

For common temperature and heating errors, refer to: Temperature, Heating, and Extrusion Errors.

Loading...