Smoothieware/Smoothieware — pull request #438 by mhackney (2014-06-21 18:24:57+00:00)
Title: Added the TemperatureSwitch module

This is the TemperatureSwitch module that monitors one or more hot end temperatures on a 3D printer (although it could be used on other devices to turn something on/off based on temperature). If any of them go above a specified threshold temperature, the switch (one of the small MOSFETS) is automatically turned on to turn on a cooling fan or a water pump to cool the cool zone of the hot ends. Then, when the heaters are turned off and cool down below the threshold temperature, the switch is turned off.

The module is completely configurable to specify which switch, the threshold temp and the heat up and cool down polling frequencies to help minimize processor overhead. For example, when the printer is cold, the frequency is short (15 sec default). This has no impact on the print since it wouldn't be printing but it insures that the cooler comes on before the temp rises too quickly (which can happen in 30 seconds for some hot ends). Once the switch has been turned on (cooling on), the polling frequency is decreased to 60 seconds by default. This offloads processing impact and turning off the cooling device isn't as critical as turning it on as long as it is below the threshold temperature.