This is a recap of my thinking about the design of this project. Some of it I've mentioned or hinted in earlier project logs, and some has lived only in my tiny brain.
- For the software framework, I plan to use ESPHome. I've used that already for several projects. Except for the aggravations inherent in YAML, it's very easy to work with, and it's very reliable. ESPHome will take care of a lot of plumbing work (WiFi, sensor readings, and more) so I don't have to worry about it.
- Using ESPHome makes it very simple to hook into my Home Assistant server. I'm not sure yet what I want to do via Home Assistant. I know I don't want to make it a "must have" part of the system, but there are lots of "nice to have" possibilities.
- The microcontroller in the project will be a 38-pin ESP32-DevKitC. It's arguably overkill for this design, but it has plenty of available GPIO pins for what I want to do. They are widely available for US$10-15 or so. It has several kinds of communications capabilities to give me some flexibility for as-yet-unplanned user interface possibilities.
- Although I'm using "quiet" fans, they could still be startling when they switch on in a quiet bedroom in the dead of night. Fan noise itself, at low levels, is not disturbing. It's the sudden change from silence to something audible that pokes our sleeping brains. To ease the transition, I plan to ramp up the fan speeds from dead stop to my target speed. When turning them off, I'll also ramp back down. I'll have a later project log about this ramping.
I've started working on a schematic and PCB layout to hold all this. It provided me a chance to finally try out KiCad (which is going pretty well; the Freerouting plugin has already saved me hours and hours of time). Even with all the stuff I'm about to describe, it all fits onto a double-side board that is less than 75 mm square. Partly for philosophical reasons and partly for practical reasons, I'm designing some flexibility options into the PCB. I'm only planning to make at most 4-5 of these devices, but the PCB fabrication places generally include 10 copies of the board. When ordering from Asia, shipping is a non-trivial percentage of the cost of getting the boards in your hands, so I might order more than 10 copies once I'm confident in my PCB design. It will be nice to have other uses for them. My experience with the PCB prototyping services is that the boards are pretty darned nice.
- For my house, I'll be using three 92 mm fans. I have enough ESP32 pins available, so the board allows for four fans. I'm planning some software help to automatically detect which of the four fans is actually present at boot-up. Things will probably work OK if 3-pin non-PWM fans are used, though some of the beauty of the overall design will be lost.
- Fan #1 must always be present, but all other fan positions are optional. I plan to control all the fans individually, but there are jumpers on the board so that everything (well, PVM control lines and power) can be wired to be controlled by whatever happens to Fan #1.
- Most fans do not turn off completely, even at 0% PWM duty cycle. I plan to handle that by controlling the 12v supply to the fan with a MOSFET. The particular part I'm using is something I had used in a previous project, and I still had a couple on-hand. It's N-Channel, which to my non-EE brain is slightly confusing because you end up switching the "ground supply" to the device. Yeah, yeah, I know it works, and I prototyped it on a breadboard to make sure I got it right. It will be possible to omit the MOSFETs and use a wire jumper between pads to always have power supplied to the fans.
- There are current-limiting resistors on the signal going to the MOSFET Gate. I'm not really sure they are needed. If not, they can be replaced with wire jumpers.
- The temperature sensor, which controls when the fans need to turn on or turn off, will be off-board but connected via I2C. Since I2C devices can chain together using exactly the same 4 wires, I'm putting some extra connectors on the PCB for additional I2C devices. In addition to standard 100 mil (2.54 mm) pin headers, I'm also putting pads for JST PH 2 mm pitch and JST SH 1 mm pitch 4-pin connectors (which are compatible with Adafruit's original STEMMA and STEMMA QT, SparkFun's QWIIC, and Seeed's Grove). I don't have any specific plans for those extra connectors and might not even populate them on the boards I build, but it's easy to put the pads on the PCB.
- There are some pins on the ESP32 not used in this design. For that, and for possible re-purposing of extra boards, I've put down pads for a strip of pin headers on both sides of the ESP32 to give easy access to everything.
- The ESP32 will be powered by the same 12v input that powers the fans. I originally thought I could step that down to 7v or so with a resistor divider. When I tried that it and it didn't work, I found out that it was just another case of my ignorance of EE fundamentals, and it was never going to work. The ESP32 handles the 12v input on the 5v pin without much hardship. I've run it that way for hours and the components only get mildly warm. I'm leaving the pads in place for the resistor network. To directly use the 12v supply, a jumper will replace one of the resistors. If the voltage going to the ESP32 needs to be stepped down, the pads can be used to intercept the power and condition it with something.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.