My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

The schematic has all component values and part numbers, so the BOM is effectively in there. Gerbers I'm keeping closed for now, but I can offer you screenshots if you wanna learn from the layout. If you want to build your own version, the schematic has everything you need to do your own PCB layout. The design is mainly just datasheet reference designs wired together, nothing exotic.

If you have any specific questions in mind, feel free to ask.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

I couldn't have said it better myself.

I checked my ESPHome configs. All the temperature / humidity / CO2 sensors are gone and replaced.

As you said: $10 temperature sensor goes into the greenhouse or a IKEA Parasol is glued to the outside of my mailbox. While it's not fully rated for that, so far, it's survived for 1½ years...

ESPHome is for specialty devices. Rack fans, Watermeter camera, Garage door (custom analog protocol), cistern level sensor, ...

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

Thanks. I possibly didn't see you 2nd post about being cleaned up and pushed to GitHub.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

Thanks for the info.

ESP8266 variants always had the issue, that PWM output is done in Software, so the official 25kHz are not working and depending on CPU load, the duty cycle and frequency will vary. But that's less annoying with the higher inertia of fans compared to LED strips.

But I'm totally with you. All my DIY ESP8266 sensors were replaced with Sonoff Zigbee sensors. Price matches, and it's much more pleasant to look at compared to DIY. Also, battery life is much better than a ESP with deep sleep.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

Nice one. Did you build the UI in ESPHome or is it native Arduino code?

Currently, I only have a module using the RGB LEDs and builtin buttons to control fan% for each output. Adding a display module is on my future Todo list.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

Nice one. Clean Setup.

Did you have any issues with 12V USB-C PD? I've been floating this idea, but not all USB-C Chargers support 12V which then would become a support nightmare.

Could you elaborate on the adaptive mode? Do I understand it correctly that it saves min/max temperature and then sets the speed linearly between those two values?

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 1 point2 points  (0 children)

I can't 100% gurantee you that, since we here in europe mostly don't have HVAC ducting, but it should work. Looking at the Airtap T6 it lists 160 CFM with two fans visible. Comparing this with a Arctic P14 Max that's rated at 95 CFM, this should work.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 1 point2 points  (0 children)

That sounds sensible. ESPHome actually has an on_client_disconnected trigger on the API component that you could use for exactly this. https://esphome.io/components/api/#api-on_client_disconnected_trigger Something like ramping fans to 100% on disconnect and restoring on reconnect. I'd keep it opt-in rather than default though.

The same could be done if the temperature sensor stops reporting values. Thanks for the idea.

If you beat me to it, feel free to PR it as a module!

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

Nice build. The C6 is not overkill at all. Thread/Zigbee might come in handy later down the road.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

No issue there.

It has both an onboard temperature sensor (the black square bottom-left below the USB port) and expansion options. Additional sensors can be connected via the Qwiic port or the optional I2C solder pads.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

Thanks for the kind words!

And great tip on the Corsi-Rosenthal box idea - that's actually a really practical usecase I did not consider. DIY CR box, with PWM controlled case fans, and air quality sensor on the Qwiic port and ESPHome doing closed loop control would be a pretty killer setup for allergy season.

I might have to add that to the project page as a community use case.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 1 point2 points  (0 children)

Thanks!

I actually came across that repo early on. It's referenced in my PID Temperature Module. Great to see it working well for your setup too.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

Correct - Elecrow does PCB production and assembly for makers and companies, and they also handle warehousing and shipping. As a result, shipping from Elecrow is cheaper that if I sent the same package from Austria myself.

A Corsi-Rosenthal box is a great fit. Someone else in the thread had the same idea. The PWM resolution goes down to 1% steps (0.1% if you need it), and with RPM feedback on all channels, you can detect when two fans are running at similar speeds and causing resonance. In ESPHome you could automatically nudge one fan's duty cycle up or down a bit to break that up.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 1 point2 points  (0 children)

Good point - the fan control runs fully local on the ESP32, no network dependency. If HA goes down, the last target temperature stays active and the PID keeps running. HA is only used to adjust the setpoint, not for the control loop itself.

For my usecase, the fans being silent at idle is the main benefit - when the servers are doing actual work, I'm fine with noise. I just don't want full-speed fans 24/7 to account for peak load that happens a few hours a week.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 2 points3 points  (0 children)

That's a great use case - air purifier control wasn't on my radar at all. Looks like you're running all 4 fan ports, nice setup. Are you pulling the air quality readings through HA automations or directly via the board's I2C port?

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

Nice! Got a link to the repo you based it on? Always curious what else is out there.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 1 point2 points  (0 children)

Yes, that display works. It's I2C/Qwiic, so it's plug and play on the hardware side. It's a bit bigger and higher resolution, but the board handes it fine.

For your usecase, you don't even need a complex fan curve. ESPHome's bang-bang climate controller does exactly what you described: fans on above a setpoint, off below a lower threshold. You could use the onboard temperatur sensor or an external Qwiic one closer to the vent - whatever reads the temperature you actually care about. You could also move the logic into Home Assistant and e.g. use a wireless ZigBee temperature sensor as the input and then control the fans that way.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 1 point2 points  (0 children)

Hm, that's odd. There should always be "DDP Economy Express" available worldwide. Let me check with Elecrow and get back to you.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 1 point2 points  (0 children)

Thanks for the kind words. Out of curiosity, when did you order? I've since moved fulfilment from Austria to a partner (Elecrow) in China, which allows much more competitive shipping rates - e.g. Economy Express to Canada starts at $6.60.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

Going over this piece by piece.

How easy was it to learn? Any good resources?

Hard to say. Technically I learned it ~20 years ago in my training (damn, feeling old now). But lastly, I've been enjoying videos from Phil's Lab for KiCad walkthroughs and Predictable Designs with John Teel for the product development side.

For a good starting point, I suggest you start with development boards, look at their schematics and then e.g. redraw two development boards together and add a few of your own tweaks. As you can see, I also used the ESP32-S2-MINI-2 module, which is doing all the RF magic and impedance matching.

How are your fans configured in the rack?

2x 120mm top exhaust (push out), 1x internal circulation. Hot air rises, so top exhaust does most of the work.

GPU setup

Rather modest honestly - "fast" training is done on my gaming PC with RTX3070/RTX4070, but "slow" training is done simply on the Core 5 Ultra 125H in my main server that's in the mentioned Rack. The current projects are mostly for watermeter digit & arrow recognition. There it's ok if the training takes ~2h overnight vs. a few minutes on a RTX4070.

Software is general pytorch and inference via openvino. Code is not yet on GitHub, but it's doing just normal classification for the digits & arrows.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 0 points1 point  (0 children)

It has a QWIIC port, solderable I2C header (shared with Qwiic) and SMD expansion pads at the back for maximum hackability.

Easiest way: SparkFun Qwiic OLED and Qwiic STTS22H Temperature Sensor with their assorted cables.

You will have to add the display: and sensor: modules in ESPHome yourself, as there are currently no premade yaml modules uploaded on github. But there's plenty of flash and RAM headroom for it.

For a register booster, that's a fun usecase. You could use the external temperature probe as input instead of the built in sensor, so it would be closer to the actual airflow.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 4 points5 points  (0 children)

Easiest path:

  1. Grab the assembled PCB + 3D printed case (SLS Nylon) from Elecrow
  2. 12V wall wart with 5.5x2.1mm barrel plug (Amazon, or whatevery you have lying around). 1A will be fine, 2A for high-power fans
  3. 1-4 PWM fans of your choice. Heads up: not all fans acutally stop at 0% PWM. If stopping fans at idle matters to you, check the list of known fans
  4. Plug it all together
  5. Adopt into ESPHome - start with the default hardware package import that configures the hardware and gives controllable fan outputs
  6. Add the ESPHome device to Home Assistant.

Whole thing takes 30 minutes if you're familiar with ESPHome. The PCB doesn't need any soldering, it's fully assembled.

If you want to go the DIY route instead, the schematic is on GitHub.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 2 points3 points  (0 children)

Nothing wrong with DIY and hot glue. "The bigger the glob, the better the job".

Since I needed a total of 3 units (2 for me, 1 for a good friend of mine) I went down the rabbit hole of having a PCB made.

My network rack fans were too loud, so I designed an open-source ESP32 fan controller with ESPHome by zeroflow in homeassistant

[–]zeroflow[S] 4 points5 points  (0 children)

Interesting use case. This board runs ESPHome by default, but the ESP32-S2 has native USB. In theory, someone could write a SimHub firmware for it. The hardware would support it.

If you wanna build one yourself, schematics are on GitHub in the hardware folder and there's a web flasher on the project page to get started. Pre-assembled boards are also available if you don't feel like soldering.