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

How does one do so in Marlin?


2 Answers 2


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 time frame 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.

Anet A8 that has caught 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 =======================

 * Thermal Protection provides additional protection to your printer from damage
 * 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

Note that Marlin 2.x has an additional protection for the heating chamber:

#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber

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

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 on a running machine, as one might touch the open wires; 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 - TRP is disabled.

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.


What is Thermal Runaway?

Let's look at a Thermal Runaway Test (#2) performed by one 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, will the circuit will break and the current stop. The aluminum heating block however, melts at 660.3 °C; long before the nichrome melts.

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.

  • 2
    $\begingroup$ 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. $\endgroup$
    – Trish
    Commented Mar 14, 2019 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .