A USB-based fan hub using Raspberry Pi Pico that controls 6x 4-pin PWM fans and is hwmon-compatible under Linux.
-
6x 4-Pin PWM Fan Connectors
- PWM control (25 kHz standard)
- Tachometer signal evaluation (RPM measurement)
- Individual control of each fan
-
RGB LED Control
- Addressable RGB LEDs (WS2812B/NeoPixel)
- Linux-compatible standards
- Programmable effects
-
Linux hwmon Integration
- Standard hwmon interface for system monitoring
- Compatible with lm-sensors and other tools
- Userspace driver for easy integration
-
USB HID Interface
- Plug & Play under Linux
- No kernel modules required
- Standardized communication protocol
├── firmware/ # Raspberry Pi Pico Firmware (C/C++)
│ ├── src/ # Source code
│ ├── include/ # Header files
│ └── CMakeLists.txt # Build configuration
├── software/ # Linux software
│ ├── driver/ # hwmon-compatible driver
│ └── tools/ # Configuration tools
├── hardware/ # Hardware design documentation
│ ├── pinout.md # Pin assignments
│ └── schematics/ # Schematic suggestions for KiCad
└── docs/ # Additional documentation
- RP2040 microcontroller
- USB 2.0 Full Speed
- Sufficient GPIO pins for 6 fans + RGB
- Pin 1: Ground (GND)
- Pin 2: +12V (Power)
- Pin 3: Tachometer (Tacho) - Open-collector output
- Pin 4: PWM - PWM control (25 kHz standard)
- Level shifter (3.3V → 5V) for PWM signals
- Pull-up resistors for tachometer inputs
- Optocoupler or Schmitt trigger for tachometer filtering
- 12V power supply for fans
- MOSFET or logic-level shifter for RGB LEDs
This project uses GitHub Actions for automatic building and testing:
- Firmware Build: Every push to
main,develop, orcursor/**branch automatically builds the firmware - Python Tests: Automatic tests for Python 3.8, 3.9, 3.10, 3.11
- Releases: Automatic release creation on Git tags (
v*.*.*)
After every successful build:
- Go to Actions
- Select a successful workflow run
- Download artifacts:
pico-fan-hub-firmware-vX.X.X- Firmware binariespython-packages- Python wheel & source distribution
Automatically with tag:
git tag v1.0.0
git push origin v1.0.0Manually via GitHub Actions:
- Go to Actions → Release
- "Run workflow" → Enter version
- Release will be created automatically
cd firmware
mkdir build
cd build
cmake ..
make# Put Pico in BOOTSEL mode (hold BOOTSEL button while connecting USB)
# Then copy .uf2 file to RPI-RP2 volume
cp pico_fan_hub.uf2 /media/$USER/RPI-RP2/cd software/driver
pip install -e .After connecting the fan hub, it will automatically be recognized as an hwmon device:
# Show fan speeds
sensors
# Manually interact with sysfs
cd /sys/class/hwmon/hwmonX/
cat fan1_input # RPM of fan 1
echo 128 > pwm1 # Set PWM to 50% (0-255)For details on the USB HID protocol, see docs/usb_protocol.md
For details on RGB control, see docs/rgb_control.md
See LICENSE
🚧 Project in active development