The ESPHome-Fan-Controller was built gor a very specific purpose. To limit the noise while keeping the DeskPi rack cooled to a set temperature.
My minilab is located in the bedroom and tucked away in such a way that I need good airflow at the lowest possible noise. To achive this i decided to use ESPHome to control a few 5V fans which can be mounted in the vented blanks available.
The schematics and ESPHome configuration is derived from https://github.com/patrickcollins12/esphome-fan-controller and the only original work is the PCB layout to fit the specific envelope in the vented blank.
- The KiCad schematics
- The KiCad PCB layout
- The KiCad Project file
- BOM and CPL for production at JLCPCB
- The ESPHome yaml files for manual control via either ESPHome webserver interface or Home Assistant
- The automation for Home Assistant to change fan speed based on Server CPU temp using Glances integration
- The controller is based on the ESP32-S3-MINI-1-N4R2
- The controller fits neatly in a 40mm fan slot (32x32mm M3 screw holes) and features a vertical USB-C connector for programming and power.
Change the friendly name to your liking and set the wifi-ssid and password.
- Install ESPHome and build (Install) the yaml file.
- Choose plug into computer option.
- Plug the controller into your computer and hold down the boot button WHILE selecting the Jtag in the pop-up window.
- Wait for the firmware to install
If ESPhome returns an error before installing the firmware, try to hold the boot button WHILE plugging it into the computer. I'm not sure what order is required - Maybe see the documentation.
Check that the installation works by going to the name you choose .local

Install the ESPHome integration in Home Assistant. Add a device and point to the local address of the Fan controller OR the IP-address.
I have 4 automations controlling the fans:
- Setting the base speed at 7am to 60% (it gets warmer in the day)
- Setting the base speed at 7.30pm to 30% (lower the noise in the night)
- Set HIGH speed if the temperature goes above a certain temperature (See High-speed.yaml)
- Set LOW speed if the temperature goes down again (See Low-speed.yaml)
You can order boards in EU from me on Tindie: https://www.tindie.com/products/holber/minilab-esp-home-fan-controller-40x40mm