Using Strato Pi Fan
The fan is directly controlled by the on-board temperature sensor. It is activated when the
measured temperature exceeds the configured TEMP_ON threshold value and, once
active, it is deactivated when the temperature goes below the configured TEMP_OFF
threshold value.
On Raspberry Pi OS, after installing the Strato Pi Fan kernel module, you can monitor the
system temperature by reading the file /sys/class/stratopifan/sys_temp/temp.
To set the TEMP_ON and TEMP_OFF thresholds write respectively to
/sys/class/
stratopifan/fan/temp_on
and
/sys/class/stratopifan/fan/temp_off.
All temperature values are expressed in °C/100, i.e. a value of
4050
corresponds to
40.5°C. Thresholds values range from -128°C to 127.5°C with a 0.5°C resolution.
If you want to manually activate the fan, simply set the TEMP_ON threshold to a value
lower than the current temperature.
The TEMP_OFF value should always be lower than TEMP_ON.
For usage examples go to:
https://github.com/sfera-labs/strato-pi-fan-kernel-module
I
2
C Control
Strato Pi Fan is based on the LM75ADP temperature sensor which monitors the
temperature and activates the fan based on configured thresholds.
The sensor can be directly accessed on the Raspberry Pi's primary I
2
C bus (i2c-1) at
address 0x48.
The relevant registers used for temperature reading and thresholds configuration are
described below.
Refer to the LM75ADP data-sheet for further details.
TEMPERATURE
Register 0
Bit 15-5
TEMP
: Measured temperature.
11-bit 2’s complement signed value with 0.125°C resolution.
ADDR
BYTE 1
BYTE 0
R/W
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0
TEMP
R
10
Strato Pi Fan User Guide