# What is Thermal Runaway Protection?

What is Thermal Runaway Protection (TRP) and why should I enable it?

How does one do so in Marlin?

# What is TRP and how does it work?

Thermal runaway protection is basically self-explaining; it is protection against the temperature getting out of control. Essentially, the firmware checks whether the measured output of the thermistor (What is a thermistor? A thermistor is basically a temperature sensor; it is an electrical component (more specific: a resistor) that has a large reduction of its resistance when heated; it is frequently used for measurement and control as you can link the resistance to the temperature via a table or a curve) is within an expected range for a certain target value within a certain timeframe when heating the hotend or the heated bed.

E.g. When you request the hotend or heated bed to a certain temperature, the heater elements are being scheduled/switched on to increase the temperature. If the temperature increase as a result of scheduling the hotend or heated bed are not met in time (settings in the firmware configuration), the printer will halt and heating of the heater elements will stop. The printer needs to be reset after such a failure.

## What triggers TRP?

Common problems that trigger the thermal runaway protection are:

• a faulty thermistor,
• an incorrectly placed thermistor (e.g. not making good enough contact with the heater block),
• including falling out
• a loose heater cartridge,
• including falling out
• faulty connectors,
• faulty or partially broken wires,
• basically, anything that interrupts either heating or the measurement of the signal.

## Why should TRP be active?

Thermal runaway protection is mainly meant to prevent fire hazards by stopping the heater cartridge when it might have fallen out of the heater block and is trying to set the whole surroundings on fire.

To illustrate the point: This happens if Thermal Runaway Protection is disabled, and the associated story. Luckily this one did not result in a loss of life and home, but it could have - and the owner was able to do some forensic examination on what caused the fire.

## How to activate TRP in Marlin firmware?

Please make sure that you have the configuration lines in the Thermal Runaway Protection section (466-485) of your Configuration.h file uncommented (no // in front of the lines starting with #define THERMAL_...).

//===========================================================================
//======================== Thermal Runaway Protection =======================
//===========================================================================

/**
* and fire. Marlin always includes safe min and max temperature ranges which
* protect against a broken or disconnected thermistor wire.
*
* The issue: If a thermistor falls out, it will report the much lower
* temperature of the air in the room, and the the firmware will keep
* the heater on.
*
* If you get "Thermal Runaway" or "Heating failed" errors the
* details can be tuned in Configuration_adv.h
*/

#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
#define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed


This should generally be enough to enable TRP on your printer, fine tuning can be done by changing the time constant and the temperature increase in the file Configuration_adv.h in the section:

//===========================================================================
//=============================Thermal Settings  ============================
//===========================================================================


However, it is advised to not change these values unless you are absolutely certain; e.g. if your heating cartridge is not powerful enough and you are getting printer halts. When getting false-positive printer halts according to the Marlin firmware you could:

* If you get false positives for "Thermal Runaway", increase
* THERMAL_PROTECTION_HYSTERESIS and/or THERMAL_PROTECTION_PERIOD 

## How to test if TRP is active on my printer?

To test if thermal runaway protection is enabled on your printer, you can disconnect the heater element of the hotend or the heated bed while printing a print or sending temperature commands to the printer over USB using a terminal to send commands directly to the printer. You can disconnect the heater element while the printer is cold (before start) and also when the heater element is heating up. No heating of the nozzle will take place, so after the period defined by the time constant set in the firmware, the printer will halt if thermal runaway protection is enabled. Power down the machine and reconnect the wires, it is not advised to put them back in; when the printer halted, you should power down or reset the printer anyways. If the printer did not halt, power it down as quickly as possible.

## Further Considerations

Besides activating thermal runaway protection, it is always a good idea to install a smoke detector and a fire extinguisher in the surroundings of the 3D printer: the smoke detector over it, the extinguisher within arms reach of the door leading to the room.

• A common special case of "incorrectly placed thermistor" is when it literally falls out of the hole in the heater block.... – TextGeek Mar 14 at 13:58
• @TextGeek that, of the heater cartridge. – Trish Mar 14 at 14:16
• Your first paragraph is wrong. Checking whether the reported temperature is within range is handled by the "over-temperature" and "under-temperature" checks. TRP is about making sure the temperature is doing the right thing: specifically, that if electricity is being applied to the heating element, the temperature is going up. If the temperature isn't increasing, it might mean that the heating element is broken, but more often, it means the temperature sensor isn't reporting what the heating element is doing. – Mark Mar 14 at 22:28
• @Mark No it is not, I'm not referring to min and max temperature, but the measured temperature is checked to fall in the expected range for a certain target value within a period of time. I'll make it more clear. – 0scar Mar 14 at 23:07
• @Mark a broken heat element (just like thermosensor) should always trigger TRP (as in the "I can't reach temperature, I would power so much into it it might cause a fire, so I stop! or "I heat up way too hot, that thing must be defective, so I stop before I set it on fire!) – Trish Mar 16 at 15:16

## What is Thermal Runaway?

Let's look at a Thermal Runaway Test (#2) performed by some Chris Bate.

In this video the experimenter drove the heating element non-stop until disaster. The Nichrome wire in the heating element melts at about 1,400 °C. Only once it melts the circuit will break and the current will stop. The aluminum heating block however, melts at 660.3 °C, far before that is reached.

## Thermal Runaway Protection

Thermal runaway protection is a piece of code in the firmware of the printer that checks to make sure that once power is being applied to the heater, the thermistor's resistance is changing within a specified frame (time and amount). This is the basic form of a control loop.

If the control system is implemented mechanically then it is called a thermostat, usually via a bimetal strip.

• A good basic primer. You might enhance the answer a little by providing how TRP can be activated - iirc it is just flipping the correct bit. – Trish Mar 14 at 14:31