ESP32-C3 based PWM fan controller with web interface and RPM monitoring.
- PWM Speed Control: 0-100% with 25kHz frequency
- RPM Monitoring: Real-time tachometer readings
- Web Interface: Remote control via WiFi
- Speed Persistence: Settings saved to EEPROM
- Serial Commands: Direct control via USB
- Board: Adafruit QT Py ESP32-C3
- Fan PWM: Pin 9 (25kHz, 8-bit)
- Tachometer: Pin 8 (interrupt-based)
- Power: 5V via USB-C
-
Install PlatformIO
pip install platformio
-
Configure WiFi
cp include/config_example.h include/config.h # Edit config.h with your WiFi credentials -
Build and Upload
platformio run --target upload
-
Upload Web Files
platformio run --target uploadfs
- Connect to the IP address shown in serial monitor
- Adjust fan speed with slider (0-100%)
- Monitor real-time RPM
speed <0-100>- Set fan speed percentagestatus- Display current speed and RPM
ESP32-C3 PC Fan Header External 12V PSU
-------- ------------- ----------------
Pin 9 → PWM (Blue)
Pin 8 → Tach (Yellow)
GND → GND (Black) → GND (-)
+12V (Red) → +12V (+)
Note: Fan requires external 12V power supply. ESP32-C3 provides PWM control signal only.
GET /- Web interfacePOST /setSpeed?speed=<0-100>- Set fan speedGET /status- JSON status response
MIT License