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. Most Raspberry Pi cooling fans use either a 2-pin power connection (red and black wires) or a 3-pin connection (red, black, and control wire—usually blue or yellow).
Always shut down your Pi and disconnect power before connecting or disconnecting any wiring. Making connections while powered on can damage the board and accessories.
For a more detailed guide that includes temperature control configuration, see Configure a Raspberry Pi cooling fan.
01 Connect the fan
Shut down your Pi and disconnect the power supply before beginning.
For 2-pin fans (power only)
- Connect the fan's red wire to physical pin 4 (5V power).
- Connect the fan's black wire to physical pin 6 (Ground).
- Ensure both wires are fully seated on the pins.
With a 2-pin fan, the fan will run continuously whenever the Pi is powered on.
For 3-pin fans (with control)
If your fan has a third wire (usually blue or yellow), connect it to physical pin 8 (GPIO 14). This enables operating system control of the fan based on temperature.
Important: Physical pin numbers and GPIO numbers are different. Use the physical pins listed above. Do not reverse the red and black wires—connecting red to ground or black to 5V can damage the fan or your Pi.
02 Test the fan
- Double-check all connections.
- Reconnect power and boot your Pi.
- For a 2-pin fan, it should start spinning immediately when power is applied.
- For a 3-pin fan, it may remain off until the OS loads or the temperature threshold is reached.
- Listen and feel for airflow to confirm the fan is working.
If the fan spins but produces no airflow, check its orientation. Cooling fans have a specific direction—look for directional arrows on the fan housing and ensure it's pulling air across the heatsink or pushing it out of the case.
03 Configure temperature control (optional)
If you connected the control wire to GPIO 14, you can configure the fan to turn on only when your Pi reaches a certain temperature. This saves power and reduces noise during light use.
For full configuration instructions, see the dedicated guide: Configure a Raspberry Pi cooling fan. That guide covers:
- Enabling the fan in Raspberry Pi Configuration
- Setting the GPIO pin number
- Choosing a temperature threshold
- Troubleshooting temperature-controlled fans
If it doesn't work
- Fan doesn't spin at all: Confirm power is connected correctly—red wire to pin 4 (5V), black wire to pin 6 (GND). Check that wires are fully seated. Try connecting the fan to a different 5V and ground pin pair to rule out a damaged pin.
- Fan spins but no airflow: Check the fan's orientation. The fan may be mounted backward. Look for directional arrows on the fan housing and flip it if necessary.
- Fan is too loud: Confirm you're using a 5V fan on the 5V pin. Connecting a 3.3V fan to 5V will cause it to run faster and louder than designed. Check your fan's voltage rating.
- Temperature control doesn't work: Verify the control wire is connected to pin 8 (GPIO 14). Follow the configuration steps in the Configure a Raspberry Pi cooling fan guide. Reboot after making configuration changes.
Need help with your fan installation?
Tell us your Pi model, fan model (if known), and which pins you connected the wires to.
Contact Vilros Support ↗