Skip to main content

Site Navigation

Your Account

Choose Language


Revision to Connecting PT100 temperature sensors


[title|Connecting PT100 temperature sensors]
[summary]The Duet series supports 4 types of temperature sensor: thermistor and PT1000, thermocouple, and PT100. This page describes the support for PT100 and other RTD temperature sensors in RepRapFirmware for Duet and Duet WiFi electronics.[/summary]
== Hardware ==
To connect a PT100 sensor to a Duet, you need a RTD interface board based on the MAX31865 chip. The interface board you need depends on which Duet you have.
=== Duet WiFi ===
The Duet WiFi supports up to two MAX31865-based daughter boards. Each daughter board supports two PT100 temperature sensors:
On the lower board, the terminal blocks labelled RTD1 and RTD2 will be temperature measurement channels 200 and 201 respectively. If you stack two daughter boards, the terminal blocks on the upper board will be channels 202 and 203. The Duex5 &Duex2 have an additional 4 channels allowing two more boards to be stacked for channels 204-207.
Each channel has a 4-position terminal block. We'll number the terminals 1, 2, 3 and 4 in order (it doesn't matter which end you start from, because PT100 sensors don't care about polarity). Terminals 1 and 4 supply current to the sensor, and the voltage developed across the sensor is measured between the terminals 2 and 3.
To connect a 2-wire PT100 sensor:
* Connect the PT100 wires to terminal 2 and 3
* On production PT100 daughter boards, you need to either bridge each pair of solder pads next to the terminal block, or add a wire between terminals 1 and 2, and another between terminals 3 and 4. On pre-production PT100 boards there is already a trace bridging each pair of solder pads.
To connect a 4-wire PT100 sensor:
* Connect the two wires that go to one end of the PT100 resistance element to pins 1 and 2 (it doesn't normally matter which wire in each pair goes to which terminal)
* Connect the two wires that go to the other end of the PT100 resistance element to pins 3 and 4
* If you have a pre-production daughter board, cut the fine traces that bridge each pair of solder pads next to the terminal block
See for additional information about using a 4-wire PT100 connection.
=== Duet 0.6 or 0.8.5 ===
Purchase a third-party MAX31865-based PT100 interface board. The Duet uses 3.3V signalling, so get a board '''without''' 5V level shifters. The reference resistor on the board should be 400 ohms.
These boards are readily available on eBay. You will need one MAX31865 for each RTD sensor you want to connect. You can also buy boards with two MAX31865 chips, providing two channels on a single board.
These boards generally work with both 2- and 4-wire RTDs so they have a 4-pin terminal block. When using a 2-wire RTD, connect it to the RTD+ and RTD- terminals, and also add a wire link between the Force+ terminal and the RTD+ terminal, and another between the Force- terminal and the RTD- terminal.
The MAX31865 boards are connected to a Duet 0.6 or 0.8.5 as follows. If the 50-way expansion connector on the Duet is already occupied by a ribbon cable to connect a DueX4 expansion board, you can connect the MAX31865 board to the 26-way expansion connector on the DueX4 instead.
|! MAX31865 signal name
|! Duet signal name
|! Duet 50-way expansion connector pin
|! DueX4 26-way expansion connector pin
| Vcc
| +3.3V
| 3
| 25
| Gnd
| 2
| 21
| 30
| 26
| CS (see below)
| 27,26,11,12
| 20,11,6,7
| 28
| 24
| 29
| 23
Connect the CS pin to '''one''' of the pins listed above, a different one for each MAX31865 board. The pins listed are for temperature sensor channels 200, 201, 202 and 203 respectively. If you have Roland mill support enabled in the firmware, only two channels (200 and 201) are available because the mill uses the other two pins.
You may connect both thermocouple and RTD boards to the SPI bus at the same time, but each device must have its own CS pin. For example, you can have a thermocouple board on channel 100 and a RTD board on channel 201.
Your RTD interface board may also have a DR (Data Ready) pin. Leave it unconnected.
The communication between the Duet and the RTD interface board uses 4MHz SPI signalling, so the wires should be kept short.
== Firmware configuration ==
To tell the firmware to use a RTD channel for one of the heaters, use the X parameter in the M305 command for that heater to specify the required channel (200 to 203 on the DuetWifi, 204-207 on the Duex5 or Duex2).
For example:
[code]M305 P1 X200[/code]
This tells the firmware that for heater 1 (which is normally the first hot end heater) it should sense the temperature using the PT100 board whose CS pin is connected to NPCS0. The R, S, T, B, H and L parameters of the M305 command are not used.
== Troubleshooting ==
If the reading at room temperature is higher than it should be, then you probably have a bad connection between the RTD interface board and the sensor, or the wires to the sensor are too long or too thin. Each additional ohm of wiring resistance will increase the temperature reading by 2.5C. Using a 4 wire solution PT100 sensor will improve this, If you only have a 2 wire P100 sensor you can still improve the accuracy by using 4 wires for the majority of the distance as []