Square connector at the rear of the Blade

The square connector at the end of the Blade main purpose is to connect a Fan Unit. The output is 5V and should work with any fan that supports 5V. The speed of the fan can be controlled with PWM.

But it can be used to control any 5v PWM fan. Or as an additional UART port (UART5 on CM4)

Take care when wiring into this connector!

UART connection (Smart Fan Unit)

On the Blade Add to Config.txt

dtoverlay=uart5

Console:

sudo apt-get install cu
sudo chmod 666 /dev/ttyAMA1
sudo cu -l /dev/ttyAMA1 -s 115200

Fan Unit code:

https://github.com/merocle/FanUnit

Notes:

to close cu session:

~.

to check if session in the background (in case “cu: /dev/ttyAMA1: Line in use” error):

jobs -l

to return to current opened session:

fg

PWM fan (non-smart Fan Unit)

When using a dumb Fan Unit the fan is controlled from the left blade in the pair

Examples:

wget https://raw.githubusercontent.com/DriftKingTW/Raspberry-Pi-PWM-Fan-Control/master/read_fan_speed.py

You need to change in the script: TACH = 13

Run the script:

python read_fan_speed.py

Fan Control example:

wget https://raw.githubusercontent.com/DriftKingTW/Raspberry-Pi-PWM-Fan-Control/master/fan_control.py
python fan_control.py

You need to change in the script: FAN_PIN = 12

to run the script in the background quickly, run

nohup python fan_control.py

Links: https://blog.driftking.tw/