This project is based on 3ative's PWM Fan Controller schematic with the following modifications:
- 3-position switch added (O / I / II = Off / Auto / Boost)
- 3x fan headers instead of 1
- DS18B20 temperature probe on D6 instead of a thermistor
| Component | Details |
|---|---|
| Microcontroller | Wemos D1 Mini (ESP8266) |
| MOSFET | IRLZ44N (logic-level, fully opens at 3.3v) |
| Temperature Sensor | DS18B20 stainless steel probe |
| Pull-up Resistor | 4.7kΩ (data line to 3.3v for DS18B20) |
| Switch | 3-position latching (O / I / II) |
| Fans | Up to 3x PWM fans (tested with Noctua, 0.34A each) |
| Power Supply | 12v 2A (or appropriate for your fans) |
The bare probe has 3 wires and requires a 4.7kΩ pull-up resistor on the data line. Without it you'll get nan readings or intermittent dropouts.
| Wire Colour | Connect To |
|---|---|
| Red | 3.3v |
| Black | GND |
| Yellow (data) | D6 + 4.7kΩ resistor to 3.3v |
⚠️ If you're using a DS18B20 module on a PCB it likely already has the resistor built in — check before adding another one.
| MOSFET Pin | Connect To |
|---|---|
| Gate | D2 (enable) via 100Ω resistor |
| Drain | Fan negative / GND side |
| Source | GND |
The IRLZ44N is a logic-level MOSFET — it fully opens at 3.3v gate voltage, making it ideal for the D1 Mini without any level shifting.
The PWM speed signal goes from D3 to the blue PWM wire on all fan headers. All fans share the same PWM signal so they all run at the same speed.
Connect the blue tach wire from one fan only to D7. Leave the tach wires on the other fans disconnected. The internal pull-up on D7 handles the open-collector tach signal — no external resistor needed.
⚠️ If D7 is left floating (nothing connected) it will pick up noise from the PWM switching and show garbage RPM readings (30,000+). Either connect one tach wire or disable the RPM sensor in the YAML.
| Switch Position | D4 | D5 | Result |
|---|---|---|---|
| O (Off) | LOW | LOW | Fan off |
| I (Auto) | HIGH | LOW | Temp-controlled |
| II (Boost) | LOW | HIGH | Full speed |
Both pins use internal pull-ups and inverted: true in ESPHome so they read correctly.
ℹ️ D4 note: D4 is also the onboard LED on the D1 Mini. When the switch is in position I (Auto), pressing it briefly lights the LED — this is harmless and purely cosmetic.
| Pin | Function |
|---|---|
| D2 | MOSFET Enable (Fan Power) |
| D3 | PWM Signal (Fan Speed) |
| D4 | Switch Position I (Auto) |
| D5 | Switch Position II (Boost) |
| D6 | DS18B20 Temperature Sensor |
| D7 | Fan Tach / RPM |
| GND | Common ground for switch |
Full pin reference including boot state restrictions: pins.md