How do you enable the fan with the PoE HAT on a Raspberry Pi?
PoE Hat

How do you enable the fan with the PoE HAT on a Raspberry Pi?

To enable and control the fan on a Raspberry Pi with a Power-over-Ethernet (PoE) HAT, you'll need to configure the settings in the Raspberry Pi's operating system. Here’s how you can do it:

  1. Update your Raspberry Pi OS: Before you begin, ensure your Raspberry Pi OS is updated to the latest version. You can do this by running the following commands in the terminal:

    sudo apt update
    sudo apt full-upgrade
  2. Edit the configuration file: You need to edit the /boot/config.txt file to set the temperature thresholds at which the fan should turn on or off. Open the terminal and type:

    sudo nano /boot/config.txt
  3. Add fan configuration settings: At the bottom of the config.txt file, add the following lines:

    # PoE HAT Fan

    These settings configure the fan to turn on at different temperatures (measured in millidegrees Celsius). For example, poe_fan_temp0=65000 means the fan will turn on when the CPU temperature reaches 65°C. The hyst parameter sets the hysteresis, meaning the temperature has to drop by this amount before the fan turns off again.

  4. Save and exit: After adding the configurations, save the file by pressing Ctrl+X, then Y to confirm, and finally Enter to exit.

  5. Reboot your Raspberry Pi: Apply the changes by rebooting your Raspberry Pi:

    sudo reboot

After these steps, your Raspberry Pi should automatically control the PoE HAT fan based on the temperature thresholds you’ve set in the config.txt file. This ensures that the fan only runs when necessary, helping to manage the device's temperature efficiently.