Before you start
You'll need a Raspberry Pi with an accessible 40-pin GPIO header, a compatible cooling fan with connection wires, and Raspberry Pi OS installed and updated. Most Vilros cooling fans use a 2-pin power header (red and black wires) with an optional 3-pin configuration that adds OS control (blue wire).
Always shut down your Pi and disconnect power before connecting or disconnecting any wiring. Making connections while powered on risks damaging the board and accessories.
01 Connect the fan
Shut down the Pi and disconnect its power supply. Connect the fan's red wire to physical pin 4 (5V) and the black wire to physical pin 6 (GND). Seat both connectors fully.
For fans with a third (blue) control wire, connect it to physical pin 8 (GPIO 14). This enables OS-controlled temperature thresholds. Without it, the fan runs continuously whenever the Pi is powered on.
Physical pin numbers and GPIO numbers are different. Use the pins shown above. Do not reverse red and black wires, and ensure the 5V wire does not contact ground pins or other connections.
02 Test basic operation
- Reconnect power and boot your Pi normally.
- The fan should start spinning immediately after power is applied. If you connected the blue wire to GPIO 14, the fan may remain off until the OS loads and applies the default configuration.
- Listen and feel for airflow to confirm the fan is running. A spinning fan that produces no airflow may be mounted in reverse; check the fan housing for directional arrows.
At this point, the fan runs whenever your Raspberry Pi is on. To configure temperature-based control, continue to the next section.
03 Configure temperature control
If you connected the optional blue wire to GPIO 14, you can configure the fan to turn on only when your Pi reaches a temperature you specify. This keeps the fan off during light use and activates it for demanding tasks.
Before configuring fan control, update to the latest Raspberry Pi OS to ensure you have the most recent configuration tool. Open Terminal and run sudo apt update && sudo apt full-upgrade. Reboot after the update finishes. For detailed update instructions, see How to update a Raspberry Pi.
- Open the Raspberry Pi Configuration tool: click the Raspberry Pi icon in the top-left corner, select Preferences, then Raspberry Pi Configuration.
- Select the Performance tab.
- Next to Fan, click Enabled.
- If you connected the blue wire to pin 8 as described above, the default Fan GPIO value of 14 does not need to be changed. If you used a different GPIO pin, enter that BCM GPIO number here.
- Set the Fan Temperature threshold. The default is 80°C, which prevents thermal throttling on demanding tasks without running the fan continuously. Lower values (such as 60°C or 70°C) turn the fan on sooner for quieter sustained cooling. Higher values run the fan less often.
- Click OK to save. The fan will now turn on automatically when the Pi reaches your chosen temperature and turn off when it cools below the threshold.
For more details, see the Raspberry Pi Foundation documentation on cooling.
If it doesn't work
- Fan does not spin at all: Confirm power is connected, the red wire is on pin 4 (5V), and the black wire is on pin 6 (GND). Check that the wires are fully seated. Try a different 5V and ground pin pair to rule out a damaged pin.
- Fan spins but produces no airflow: Check the fan housing for directional arrows and confirm the fan is oriented correctly. Some fans are reversible; flip the fan or adjust its mounting if needed.
- Temperature control does not work: Verify the blue wire is connected to pin 8 (GPIO 14), the fan is enabled in Raspberry Pi Configuration, and the GPIO number matches your wiring. Reboot after changing the configuration.
- Fan is too loud: Confirm you are using a 5V fan on the 5V pin. Connecting a 3.3V fan to 5V causes it to run faster and louder than intended. Check your fan's specifications and use the appropriate power pin.
Need help with your cooling setup?
Tell us your Pi model, fan model, and which pins you used.
Contact Vilros Support ↗