Skip to content

Temperature threshold

Stefan Hirschmann edited this page Aug 12, 2019 · 6 revisions

Defines how fast the fan runs at different temperatures.

Example:

<TemperatureThreshold>
  <FanSpeed>7.5</FanSpeed>
  <UpThreshold>63</UpThreshold>
  <DownThreshold>48</DownThreshold>
</TemperatureThreshold>

FanSpeed

The fan speed in percent.
Must be a floating point number between 0 and 100.


UpThreshold

NBFC will select a TemperatureThreshold as soon as the temperature exceeds its UpThreshold.
Must be an integer (unit: degree Celsius).


DownThreshold

NBFC will select the next lower threshold as soon as the temperature falls below the DownThreshold.
Must be an integer (unit: degree Celsius).

Example

Let's say you want to achieve the following behavior:

  • the fan is off as long as the temperature is below 60°C
  • at 60°C the fan starts with a speed of 10%
  • at 65°C the fan speeds up to 50%
  • at 70°C the fan spins with full speed

You would create the following thresholds:

This is how you would define the thresholds in XML:

<TemperatureThresholds>
  <TemperatureThreshold>
    <FanSpeed>0</FanSpeed>
    <UpThreshold>0</UpThreshold>
    <DownThreshold>0</DownThreshold>
  </TemperatureThreshold>

  <TemperatureThreshold>
    <FanSpeed>10</FanSpeed>
    <UpThreshold>60</UpThreshold>
    <DownThreshold>50</DownThreshold>
  </TemperatureThreshold>

  <TemperatureThreshold>
    <FanSpeed>50</FanSpeed>
    <UpThreshold>65</UpThreshold>
    <DownThreshold>56</DownThreshold>
  </TemperatureThreshold>

  <TemperatureThreshold>
    <FanSpeed>100</FanSpeed>
    <UpThreshold>70</UpThreshold>
    <DownThreshold>62</DownThreshold>
  </TemperatureThreshold>
</TemperatureThresholds>

The order doesn't matter, because NBFC will ensure that the TemperatureThresholds are sorted by their UpThreshold in ascending order before it applies them.

The FanSpeed-values, as well as the UpThreshold-values except the first one need no further explanation.

But what do the DownThreshold-values do?

The answer is simple: They define the temperature at which NBFC steps down to the previous TemperatureThreshold. By setting an appropriate DownThreshold, you can prevent the fan control logic from permanently switching back and forth between two TemperatureThresholds, which would be quite annoying.
It is recommended to set the DownThreshold to a value below the previous TemperatureThreshold's UpThreshold.

Now that you know how DownThresholds work, it should be easy to understand why the first TemperatureThreshold's DownThreshold is 0: Since there is no previous TemperatureThreshold which could be selected the DownThreshold is useless and will be ignored (0 is just a default value). Also, the UpThreshold is insignificant because NBFC will always select the threshold with the lowest UpThreshold if there is no better TemperatureThreshold to be found.

A final recommendation

If you want to create custom TemperatureThresholds, it's easier to modify the default thresholds, than to start from scratch.