Skip to main content

Standard

The Standard Fan Unit offers an easy out-of-box experience. The fan will run with no additional setup, however, you may control the fan via PWM.

Pins

The Compute blade uses GPIO12 and GPIO13 in their alternate PWM mode.

info

Only the Compute Blade connected to Port A of the Fan Unit can control the fan speed. However both blades can read the speed of the fan.

Pin Out Guides

Standard Fan Unit

Standard Fan Unit blade connecter pin out

Fan Header

Python

A simple Python script can control the PWM fan.

Setup

Start by cloning the scripts from the GitHub repository

git clone https://github.com/uptime-industries/compute-blade-pwm-fan-control.git
cd ./compute-blade-pwm-fan-control/

Install GPIO Zero, a simple interface to GPIO devices for Raspberry Pi

sudo apt install python3-gpiozero

The Github repo provides two scripts:

  • read_fan_speed.py - Prints the current fan Speed in RPM
  • fan_control.py - Controls fan speed based on CPU temperature Either script can be stopped at any time with CTRL + C

read_fan_speed.py

To use the read_fan_speed.py script run the following command:

python3 read_fan_speed.py

fan_control.py

To control the fan speed:

python3 fan_control.py