Using thermocouples with the Duet and RepRapFirmware
This page describes the support for thermocouple temperature sensors in RepRapFirmware version 1.09r-dc42 and later with Duet electronics. For PT100 sensors, see Using PT100 temperature sensors with the Duet and RepRapFirmware instead.
The thermocouple must be electrically isolated from the hot end heater block. If the thermocouple has a bare junction, you will need to insulate it, for example with high-temperature sleeving. You can buy cartridge-type insulated thermocouples from E3D.
The thermocouple leads should be long enough to reach your printer electronics, so that the cold junction will be at the thermocouple interface board.
To connect a thermocouple to the Duet, you will need a thermocouple interface board based on the MAX31855 chip.
The Duet WiFi supports up to two MAX31855-based daughter boards for supporting thermocouples. Each daughter board supports two K-type thermocouples. These daughter boards can be purchased from Duet distributors and from Think3DPrint3D.
Connect the thermocouple leads to one of the two terminal blocks on the daughter board. If your thermocouple has standard white and green wires, the white wire goes into the left hand terminal, looking from the wire into the terminal block. The terminal blocks labelled 1 and 2 will be channels 100 and 101 respectively. If you stack two daughter boards, the terminal blocks on the upper board will be channels 102 and 103.
Duet 0.6 and Duet 0.8.5
Purchase a third-party MAX31855 board. The Duet uses 3.3V signalling, so get one without 5V level shifters. These boards are readily available on eBay. You will need one MAX31855 for each thermocouple you want to connect. You can also buy boards with two or four MAX31855 chips, providing two or four channels.
Make sure that the board has a capacitor connected across the thermocouple terminals. This is normally a ceramic chip capacitor placed between the MAX31855 and the terminal block for the thermocouple. If your board has only the MAX31855 chip and one capacitor on board, that capacitor is the supply decoupling capacitor and you will need to add the other one. A 10nF ceramic disc capacitor is suitable. It can be soldered on the underside of the pins of the terminal block used to connect the thermocouple.
The MAX31855 chip is available in variants for different types of thermocouple. The most common variant is the MAX31855K. Assuming that is what you have, buy K-type thermocouples.
Connect the thermocouple leads to the terminal block on the MAX31855 board. Connect the MAX31855 board(s) to the Duet 0.6 or 0.8.5 as follows:
|MAX31855 signal name||Duet signal name||DuetExpansion connector pin||DueX4 expansion connector pin|
|CS (see below)||NPCS0,NPCS1,TXD1,RXD1||27,26,11,12||20,11,6,7|
Connect the CS pin to one of the pins listed above, a different one for each MAX31855 board. The pins listed are for temperature sensor channels 100, 101, 102 and 103 respectively. If you have Roland mill support enabled in the firmware, only two channels (100 and 101) are available because the mill uses the other two pins.
To tell the firmware to use a thermocouple channel for one of the heaters, use the X parameter in the M305 command for that heater to specify the required channel (100 to 103). For example, M305 P1 X100 tells the firmware that for heater 1 (which is normally the first hot end heater) it should sense the temperature using the thermocouple board whose CS pin is connected to NPCS0.
If you have difficulty getting correct readings from the thermocouple board, try connecting a wire link between the two terminals of the terminal block instead of a thermocouple. This should produce a room temperature reading.
If the temperature readout decreases when you heat the thermistor instead of increasing, swap over the thermocouple wires in the terminal block.
If you get wildly inaccurate or fluctuating readings, check that the thermocouple wires are securely connected in the terminal block, and that there is a 10nF capacitor in parallel with the terminals.