__Beware, this is a rudimentairy implementation. Further features are planned, see GitHub Project Board - Features__
A hardware schematic could be found in the folder 'doc' It is recommended to use a CMOS converter for the PWM line. To keep it easy this converter is currently not part of the schematic. Is the signal line used without converter the measured current was for me 255,5µA. There is no guarntee that the Raspberry Pi will not destroyed (may over time).
The scripts requires Python >= 3.6
Tested pigpio version: 79
Run the following command to install:
apt update && apt install pigpio python3-pigpio
.
The requirements.txt contains all required Python modules. All listed modules can be used with install the following command:
pip3 install --user -r requirements.txt
The desired fan behaviour could be defined via the file config.toml
.
Copy all files (*.service) from folder 'Systemd Service Unit Files' to /etc/systemd/system.
If the fan controller python script are NOT located in '/home/pi/pwm_fan_control_pi4/' the .service-files must be adjusted!
Modfiy the access rights for the systmd files as following
chown root:root /etc/systemd/system/fan_control.service /etc/systemd/system/pigpiod.service
chmod 644 /etc/systemd/system/fan_control.service /etc/systemd/system/pigpiod.service
Execute the following command and check with top or htop that the service is running
systemctl start fan_control.service
If everything works as expected enable the autostart for the fan controller
systemctl enable fan_control.service