ESP32-S2 PWM Fan Controller for server racks (ESPHome, 4 channels)

I’m running a 12U network rack with a NAS and a few SFF servers running ML workloads. For this, ventilation was needed. Running fans at a constant low speed led to high temperatures, especially in the summer. Running the fans at 100% kept the rack (and especially the NAS disks) cool but was rather annoying. There is a prebuilt fan unit made by the manufacturer of my Rack - Digitus DN-19 FAN-2-HO - but that unit is expensive, ugly and analog only.

My solution:

ESP32 + 12V PWM Fans (Arctic P12 Max) screwed into the fan cutouts at the top of the rack. PWM control allows full stop support - depending on the fans (not all fans turn off at 0% PWM). This integrates nicely into Home Assistant, allowing temperature tracking via the onboard HDC1080 sensor and warning notifications. This setup is silent at idle and only gets louder when really needed.

After building a hand-soldered prototype, I decided to go for a professionally produced PCB with onboard temp sensor, RGB status LEDs and Qwiic expansion. The setup is as follows:

  • ESP32-S2 as the brain
  • ESPHome on the device
  • (obviously) Home Assistant on the Backend
  • 12V Power Brick - Barrel Jack
  • 2x 120mm fans at the rack exhaust
  • RGB status LEDs on board and fan ports - quick visual check without opening HA
  • Board on its own only draws 0.25W - less than the NAS status LEDs.

The result:

Temperature stable at 25°C +/- 0.5°C, more PID tuning needed. No matter if everything is idle or AI training is running - the temperature stays constant.

The hardware setup and ESPHome yaml packages are documented on WiFi Fan Controller | WiFi Fan Controller Full Schematic on GitHub - it’s mostly datasheet reference designs.

Now I’m still tuning the fan curves. Currently, they’re only reacting to rack temperature alone. Thinking about adding cellar ambient temperature or UPS power draw as inputs. Anyone done anything similar?