Calibrating thermistor and PT1000 readings
Some Duets may need their analog-to-digital converters (ADCs) calibrated to report accurate temperatures.
This document is relevant to: all Duet boards
Firmware versions: all firmware versions except where noted
The analog-to-digital converters (ADCs) in microcontrollers have gain and offset errors that vary between one chip and another. These errors in turn introduce errors in the temperature readings taken from thermistors and PT1000 sensors that are connected to the thermistor input pins.
All Duets have some degree of self-calibration to measure and cancel these errors, either in the ADC itself or in external hardware. However, under some conditions the residual errors may be high enough to warrant correction. In particular:
- When high resistance thermistors are used (e.g. the ones sold by Dyze Design and Slice Engineering), the readings at room temperature may be wildly inaccurate unless the high-end ADC error is corrected
- Duet 3 MB6HC boards sometimes exhibit different errors on different ADC channels. As a result, the hardware self-calibration isn't perfect.
- The ADC on the Duet 0.6 and 0.8.5 is not calibrated automatically, so you may need to calibrate it in order to get accurate readings, especially at low temperatures or when using PT1000 sensors.
RepRapFirmware provides manual and (in some cases) semi-automatic methods of calibration.
This facility is supported in RepRapFirmware 3.2 and later for Duet 3 MB6HC, Duet 3 Mini 5+ and Duet Maestro main boards, and for Duet 3 expansion and tool boards. The procedure is:
- Configure the inputs to be calibrated as thermistors or PT1000 sensors
- Disconnect the thermistors and PT1000 sensors from all thermistor inputs on the Duet main board or Duet expansion board to be calibrated
- For each input to be calibrated send M308 Snn H999 where nn is the sensor number. RepRapFirmware will report the measured H correction and store it in nonvolatile memory.
- Place a jumper across each thermistor input to be calibrated
- For each input to be calibrated send M308 Snn L999 where nn is the sensor number. RepRapFirmware will report the measured L correction and store it in nonvolatile memory.
- You can now remove the jumpers and reconnect the thermistors or PT1000 sensors. When you use M308 commands to configure thermistors or PT1000 sensors, RepRapFirmware will default the L and H parameters to the values that were stored in nonvolatile memory.
The following is for RepRapFirmware 3.x for all boards except the Duet Maestro, but should also work in RepRapFirmware 1.x and 2.x, by changing M308 command to the appropriate M305 commands (see also next section).
- Configure the input to be calibrated as a thermistor
- Connect a resistor to the input, with the resistance being the same as the thermistor resistance at 25C. For example, if you are using a standard 100K thermistor as supplied with E3D hot ends, use 100K. If you are using a Dyze Design or Slice Engineering high temperature thermistor, use 500K.
- Send M308 Snn Hhhh (where nn is the sensor number) for various value of hhh until you find the value of hhh that gives the reading closest to 25C. Higher values of hhh increase the temperature reading. The allowed range of hhh is -127 to 127.
- If you wish to calibrate the low-end error, then replace the resistor with a value corresponding to a high temperature, for example 100 or 220 ohms. Then send M308 Snn Lvvv for various values of vvv until you find the value that gives a reading close to the expected value for that resistance using the thermistor settings you have chosen. For example, if you are using the standard parameters for E3D thermistors (T100000 B4725 C7.06e-8) then the expected reading is 285C for 100 ohms, or 236.5C for 220 ohms.
- Include the L and H parameters you found in your M308 commands in config.g.
Correcting the temperature calibration of Duet 0.6 and 0.85. boards
The ADC on the Duet 0.6 and 0.8.5 is not calibrated automatically, so you may need to calibrate it in order to get accurate readings, especially at low temperatures or when using PT1000 sensors. Here's how:
- With the machine cold, see what temperatures the are displayed for the bed and hot end(s), and compare that with room temperature.
- If using thermistors, add H parameters in the M305 commands to get readings close to room temperature. If the readings are too low, use a positive H parameter to bring the readings up to the correct value. If the readings are too high, use a negative H parameter. All heater numbers should need the same value of H parameter - any residual differences you see are probably caused by thermistor tolerances. You should never need to use an H parameter below -100 or above 100, and it is rare to need a value outside the range -30 to 30.
- If you use a PT1000 instead of a thermistor, then the L parameter mostly affects the reading at low temperatures (the opposite to when using a thermistor), so you may wish to adjust it to get the correct room temperature reading, or to get a 0C reading when you substitute a 1K resistor for the PT1000.
- Very important! Check that if you disconnect the thermistors, the temperature in the web interface reads as error. If instead it reads a very low temperature, reduce the H parameters until it does report error, then reduce them a bit more.