🌬️ A multi-Pi dashboard to monitor and control CPU cooling fans using PWM, with real-time status, history graphs, and a responsive web interface.
💡 Recommended Hardware:
For best results, use Noctua NF-A4x10 5V PWM Fans.
This setup is designed specifically for controlling fans via the Raspberry Pi's GPIO pins using PWM.
✅ Designed for Raspberry Pi 3B and B+ along with Raspberry Pi 4
❌ Does not work with the Raspberry 5 fan header



- Wiring Guide
- Installer
- Dashboard Features
- Optional Terminal Alias
- Uninstaller
- License
- Credits
- More Details
Connect your 4-pin 5V PWM fan to the Raspberry Pi using the following pinout:
| Fan Wire | Connects To (GPIO Header) | Description |
|--------------------|--------------------------------|-------------------------|
| **Yellow (5V)** | Pin **2** or **4** | 5V Power |
| **Black (Ground)** | Pin **6**, **9**, **14**, etc. | Ground |
| **Green (Tach)** | *(NOT USED)* | *(NOT USED)* |
| **Blue (PWM)** | Pin **8 (GPIO14)** | PWM Control Signal |
✅ Only 3 wires are needed for this project: Yellow, Black, Blue
🛠️ A proper fan mount is required to securely attach your PWM fan to the Raspberry Pi or your case.
There are many 3D-printable and off-the-shelf options available depending on your Pi model and enclosure.
🔎 Tip: Search online (e.g., Thingiverse or Printables) for "Raspberry Pi fan mount" to find one that suits your setup best.
You can use the guided setup script to automatically install everything needed for your Pi Fan Dashboard.
Run this on any Raspberry Pi:
curl -LO https://github.com/JustASquirrelinAround/pifandashboard/releases/latest/download/fandashboardsetup.sh
sudo bash fandashboardsetup.sh
The script will guide you through:
- 🌀 Installing the fan controller and API for Pis with fans
- 🖥️ Setting up the web dashboard (on a main Pi or web-only Pi)
- 📦 Cloning only the required files
- ✅ Automatically handle DietPi or Raspberry Pi OS
- 🧼 Optionally cleaning up install files
To update the web interface, simply run the Web Only option in the setup script again. This will refresh the frontend files without affecting existing settings or the Pi list.
- ✅ Live CPU Temp & Fan Speed per Pi
- ✅ Pie chart for CPU & Memory usage
- ✅ Colored online/offline status dot
- ✅ Toggle line chart for historical graph
- ✅ Red shading on chart when Pi is offline
- ✅ Mobile-friendly Bootstrap layout
- ✅ Summary: Online/Offline count and last updated time
You can add a simple shell alias to quickly view the current CPU temperature and fan speed from the terminal:
echo "alias fanstatus='cat /var/log/fan_status.txt'" >> ~/.bashrc
source ~/.bashrc
Then just run:
fanstatus
Output:
CPU Temp: 40.9°C | Fan Speed: 28%
If you ever need to remove the Pi Fan Dashboard components, you can use the following uninstall script. This will allow you to selectively remove the fan scripts, Pi manager, and web interface depending on your setup.
Run this on the Pi you wish to uninstall from:
curl -O https://raw.githubusercontent.com/JustASquirrelinAround/pifandashboard/main/fandashboarduninstaller.sh
sudo bash fandashboarduninstaller.sh
This script will:
- 📋 Ask what you'd like to uninstall (Fan scripts, Pi manager, Web interface)
- ✅ Automatically handle DietPi or Raspberry Pi OS
- 🧼 Clean up related files and services
MIT License. Free to use, modify, and contribute.
- Fan control logic originally by Michael Klements (The DIY Life) & (Github Direct Link)
- Chart.js (chartjs.org), Bootstrap (getbootstrap.com), and DietPi (dietpi.com) for tools & ecosystem
See DETAILS.md
for a full explanation of how the system works, including:
- Architecture diagram
- Description of each script and service