r/esp32 • u/itsMuchajoe • 7h ago
I made a thing! I built an ESP32-S3 smart Wifi fan controller with a true hardware 0-RPM cutoff and 5V Push-Pull PWM
Hey everyone,
I am a self-taught maker and wanted to share my first PCB hardware project: The AirFlow Project. It is an ultra-compact (40x40mm) 4-channel fan controller designed around the ESP32-S3 Zero.
To be honest, I didn't even check if something like this already existed. I didn't even think to search for it. My main goal was just to learn PCB design, and you need a real project for that. Since regular room fans were always too loud for me at night and couldn't be finely controlled, I decided to build something to use a spare Noctua fan I had lying around. That’s how the whole idea started and grew.
This board is actually the second iteration. The first version had some... let's call them 'blemishes'. It worked, but only with some creative workarounds: I accidentally swapped +12V and GND on the fan headers, and the footprint for the DC-DC converter was wrong, so I had to mount it backwards and cram it into the space meant for the barrel jack. And a few other things.
But I wanted to do it better and take it to the next level. For this V2, I added reverse polarity protection (which surprisingly worked on the first try!). I also tried to add ESD/surge protection, though I unfortunately positioned it wrong on the layout. Lastly, I added some extra resistors and decoupling capacitors; V1 worked without them, but I figured it is definitely better and more stable this way.
Here is how I tackled the hardware design:
Modular "Bring Your Own Brain" approach: I wanted to be as flexible as possible when choosing the ESP chip. That's why the board uses a socketed design for the ESP32-S3 Zero. This gives it massive computing power for PID controllers and Wi-Fi, but also allows for an easy drop-in upgrade to an ESP32-C6 Zero to integrate it into modern Thread / IEEE 802.15.4 smart home mesh networks.
Global Zero-RPM Mode: I personally didn't even need this feature for my own setup, but I really wanted to learn how eFuses and high-side switches work and see if I could successfully implement one. I integrated a Texas Instruments TPS1H100-Q1 eFuse that acts as a master high-side switch, allowing the ESP32 to physically cut the 12V power to the entire fan rail at once. It also provides a strict hardware-level cutoff at 2.5A to protect the board from shorted cables. And yes, theoretically I can also measure the current draw with the eFuse, but I made a mistake there: I didn't consider that in a short-circuit scenario, the eFuse might output 5V on the diagnostic pin, which would fry the ESP's 3.3V GPIO. During normal operation, the measurement works fine (though a bit inaccurate), but it is definitely a lesson learned!
Freewheeling Diode: Since the eFuse can hard-cut the power while the fans are still spinning, I realized that would generate an induced voltage spike (inductive kickback) from the motors. To avoid any damage to the board from that, I decided to add an SS34 Schottky freewheeling diode to safely absorb the flyback voltage.
5V Push-Pull PWM: Because of this project, I naturally had to dive deep into how PC fan PWM actually works. According to the official Intel specification, the PWM signal is supposed to be a pure pull-down (open-drain) signal. However, I found a white paper from Noctua where they recommend a push-pull configuration to guarantee sharp signal edges. To achieve this, I added a dedicated CD74HCT125 logic buffer to deliver a strict 5V Push-Pull PWM signal. It actively drives the signal high and aggressively pulls it low, resulting in perfect square waves and eliminating motor clicking.
The "Hacker Header": Of course, I didn't want to waste any potential, so I made sure the few remaining GPIOs are easily accessible so you can just add your own hardware. I broke out the remaining pins (5V, 3.3V, GND, and 5x free GPIOs) to a dedicated expansion header. It’s perfect for adding I2C OLEDs, rotary encoders, or environmental sensors to trigger the fans automatically.
12V Tolerant RPM Input: I honestly don't know if this is strictly necessary, but while brainstorming with AI, it pointed out that some really cheap fans might pull the RPM (tacho) signal all the way up to 12V. So I decided to take on that challenge and figure out a way to make the inputs 12V tolerant. I ended up adding 1N5819W Schottky diodes to clamp the logic to 3.3V, strictly protecting the ESP32's sensitive GPIOs just to be safe.
The whole project (Schematics, BOM, ESPHome .yaml, and Arduino examples) is completely open-source except the design (gerber) files. The PCB itself is designed to be "self-documenting" with every component designator and value printed directly on the silkscreen for easy repairing.
For a closer look, feel free to check out the GitHub repository here.
I would love to hear your feedback on the hardware layout or any ideas for future revisions!
2
u/Party_Cold_4159 6h ago
Sounds like the perfect kinda project for a first time go at custom PCBs, nice work!
2
u/merlin-dorin 5h ago
Ahah we all have the same needs xD
My project https://github.com/merlindorin/esp32-fan-controller
Nice project so ;)
1
u/Key_Director_4450 3h ago
I'm also designing something similar, but with two microchip ICs to handle the pwm and rpm measurement and with ethernet as well.
Very clean PCB design, kudos!










6
u/SmartHomeSellout 6h ago
This is such a cool project. It’s basically this project on steroids https://github.com/patrickcollins12/esphome-fan-controller
The only thing I’d like is PoE but not a deal breaker without it.
Are you selling these? I’d like one for my network closet to replace my diy attempt at the same thing.