This is an old revision of the document!

A [https://en.wikipedia.org/wiki/Resistance_thermometer PT100] is a commonly used RTD. Compared to how Thermistor class works - it handles NTC's PT100 is PTC so the change in resistance with temperature is “other way around”. PT100 also have very different curve then NTC's handled by Thermistor class.

PTC means positive temperature coefficient so electrical resistance increases with raising temperature.

You wire a PT100 the same way you would a Thermistor, but you need to specify Smoothie it is a PT100 and what type it is.

### Un-amplified PT100

Example configuration :

code temperature_control.hotend.enable true
temperature_control.hotend.sensor pt100
temperature_control.hotend.pt100linear 1
temperature_control.hotend.thermistor_pin 0.23
temperature_control.hotend.ampmod1_pin nc
temperature_control.hotend.ampmod2_pin nc
temperature_control.hotend.slope 0.0523809524 #slope for e3d pt100 amp
temperature_control.hotend.yintercept -299.6 #yintercept for e3d pt100 amp
code

### Amplified PT100

Example configuration :Â

code temperature_control.hotend.thermistor_pin 0.23
temperature_control.hotend.pt100linear 0 # use 0 for RDT curve (alpha/beta values)
temperature_control.hotend.pt100_a 0.0039083 # PT100 ALPHA value
temperature_control.hotend.pt100_b 0.0000005775 # PT100 BETA value
temperature_control.hotend.pt100_r0 100 # resistance at 0C
temperature_control.hotend.pt100_amptype 0 # type of RTD amp, attm only 0 supported (0 is e3d pt100 amp)

1. quoeficients for the ADC to Rt formula

temperature_control.hotend.pt100_q1 810000
temperature_control.hotend.pt100_q2 45409000
temperature_control.hotend.pt100_q3 280
code

code temperature_control.hotend.thermistor_pin 0.23
temperature_control.hotend.pt100linear 0 # use 0 for RDT curve (alpha/beta values)
temperature_control.hotend.pt100_a 0.0039083 # PT100 ALPHA value
temperature_control.hotend.pt100_b 0.0000005775 # PT100 BETA value
temperature_control.hotend.pt100_r0 100 # resistance at 0C
temperature_control.hotend.pt100_amptype 0 # type of RTD amp, attm only 0 supported (0 is e3d pt100 amp)

1. coefficients for the ADC to Rt formula

temperature_control.hotend.pt100_q1 810000
temperature_control.hotend.pt100_q2 45409000
temperature_control.hotend.pt100_q3 280

1. coefficients that are also known to work with E3D amp:
2. temperature_control.hotend.pt100_q1 11000000
3. temperature_control.hotend.pt100_q2 606888919
4. temperature_control.hotend.pt100_q3 2500

Too technical for the wiki, greyed for now, please transform this into more digestible/usage-oriented documentation above ^

NOTE that PT100 is not currently supported in edge firmware, there is a pull request https://github.com/Smoothieware/Smoothieware/pull/1034 that needs to be tested.
NOTE The PT100 amplifier needs to be powered from the AVCC and AGND header pins on the smoothieboard, only newer boards have this header. DO NOT power from 5v or you will kill the port.

Platinum Resistance Thermometers (PRT) are often manufactured of coiled platinum wire or as film thermometers with a layer of platinum applied on non conductive substrates. They are used in the range -200Â°C â¤ t â¤ 850Â°C. Outer these bounds polynomial approximation is not assured and higher temperatures are often problematic for proper use. PRT sensors are differentiated by their specific electrical resistance R0 at 0Â°C. Common types are:

Resistance of the sensor can be converted to temperature for the respective PRT type. Tolerances according to DIN IEC 751/DIN EN 60751 (1995) ([http://www.code10.info/index.php?option=com_content&view=article&id=82:measuring-temperature-platinum-resistance-thermometers&catid=60:temperature&Itemid=83 data from here]) are:

• Class A: Â±(0.15 + 0.002*|Ï|) Â°C
• Class B: Â±(0.30 + 0.005*|Ï|) Â°C
• Class C: Â±(1.20 + 0.005*|Ï|) Â°C
• Class 1/3: Â±[1/3*(0.3 + 0.005*|Ï|)] Â°C
• Class 1/5: Â±[1/5* (0.3 + 0.005*|Ï|)] Â°C
• Class 1/10: Â±[1/10*(0.3+ 0.005*|Ï|)] Â°C

Resistance / Temperature curve for PT100 comes from this formula
Rt = R0 * (1 + A* t + B*t2 + C*(t-100)* t3)

Where:
Rt is the resistance at temperature t
R0 is the resistance at 0 Â°C, and
A= 3.9083 Eâ3
B = â5.775 Eâ7
C = â4.183 Eâ12 (below 0 Â°C), or
C = 0 (above 0 Â°C)

We assume C = 0 since we don't care about sub zero temps for 3D printing

So resulting formula is:
T = (SQRT(A^2*R0 +4*B*(Rt â R0)) - A*SQRT(R0)) / (2*B*SQRT(R0))

pt100 type of sensor implementation support 2 different approaches of reading the temperature from the PT100 sensor.

These implementations are select with pt100linear and it can be 0 or 1. In case pt100linear is 1 (default value) class will use a simple line formula

T = slope * ADC + yintersect

so you need to find a sweet spot for your setup to get a minimal error in the range of temperatures you are using.
In a non linearized PT100 amp circuit (for e.g. just measuring voltage across the PT100 that's conducting constant current) this linear function will be precise inside +-2Â°C in a 60C range, meaning that in 200-260C for e.g. you can have 2 Â°C reading error. Should be acceptable in 3D printing. Now on the other hand, if you are using non linear amplification linearizing the RTD curve on the input (for e.g. E3D is trying to do that with their PT100 amplifier) the the error is even lower. For e.g. with this approach, reading E3D amp we get below 3 Â°C error on 150-280C range and less 1 Â°C error on the 60 Â°C range.

There are 2 more parameters that does not depend on the linearity of the read. “ampmod1_pin” and “ampmod2_pin” values are used for energizing the PT100. When you are pushing current trough PT100 it self heats and you get a wrong read. Some solutions use 2 mcu pins to energize the PT100 so if you configure these 2 pins they will go HIGH while reading the temperature and then back low. You can configure only one or both or neither. By default they are nc.

to configure this linear readout of the PT100 sensor setup the sensor type to pt100, pt100linear value to 1 and configure slope and yintersect.

code temperature_control.hotend.enable true
temperature_control.hotend.sensor pt100
temperature_control.hotend.pt100linear 1
temperature_control.hotend.thermistor_pin 0.23
temperature_control.hotend.ampmod1_pin nc
temperature_control.hotend.ampmod2_pin nc
temperature_control.hotend.slope 0.0523809524 #slope for e3d pt100 amp
temperature_control.hotend.yintercept -299.6 #yintercept for e3d pt100 amp
code

The second approach, where we read RTD sensor that's amplified using “linear” amplifier so we get the curvature characteristic to RTD the pt100linear parameter should be 0.

This type of readout is configured in 2 set of parameters. First set of parameters define A, B and R0 of your RTD. For e.g. if your using IPTS-68 then
A = +3.90802E-03
B = -5.80195E-07

on the other hand if you are using ITS-90 then
A = +3.9083E-03
B = -5.7750E-07

These parameters are configured using pt100_a and pt100_b parameters. You also need to configure pt100_r0 that is your r0 value (100 for PT100).

With A, B and R0 we can convert resistance to temperature, but now we need a second set of parameters to convert our ADC value to resistance.
Different amplification types can be selected using pt100_amptype parameter (at the moment of this writing only 1 amp is supported, value is 0).
The initial amp that's implemented covers most of the amplifier out there including e3d pt100 amp. Use value 0 for it. It needs 3 coefficients and it's calculating resistance from ADC using following formula:

E3D values are
Q1: 805200
Q2: 45409000
Q3: 183

but since this is tracing (expecting) a proper RTD curve and not straightened curve that E3D amp is making the errors start to be significant at higher temp values.

Example configuration:

code temperature_control.hotend.thermistor_pin 0.23
temperature_control.hotend.pt100linear 0 # use 0 for RDT curve (alpha/beta values)
temperature_control.hotend.pt100_a 0.0039083 # PT100 ALPHA value
temperature_control.hotend.pt100_b 0.0000005775 # PT100 BETA value
temperature_control.hotend.pt100_r0 100 # resistance at 0C
temperature_control.hotend.pt100_amptype 0 # type of RTD amp, attm only 0 supported (0 is e3d pt100 amp)

1. quoeficients for the ADC to Rt formula