Skip to content

PCF (PiCoolFAN4) dynamic cooling for Raspberry Pi 4

Notifications You must be signed in to change notification settings

beinardus/pcf-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pcf-node

PCF (PiCoolFAN4) dynamic cooling for Raspberry Pi 4. Control fan speed based on CPU core temperature. Based on the documentation in: PICOOLFAN4 DAEMONS, AND PYTHON SCRIPTS

Required hardware

  • PiCoolFAN4 for Raspberry Pi (The Pi Hut)
  • Raspberry Pi 4

Raspberry configuration

The Docker container runs in privileged mode to access the fan as a I2C device. I2C is disabled by default, so it needs to be enabled on the Raspberry itself:

  • Run sudo raspi-config
  • Go to the Interface Options menu
  • Select I2C and enable the interface

Now, the I2C devices (starting with i2c-) are listed among the other devices:

ls /dev

Docker

Using a Docker image for easy installation as a service and to hide the low level libraries that are required.

cd ~
git clone https://github.com/beinardus/pcf-node.git
cd pcf-node
docker build -t pcf-node .
docker run -d --restart always --privileged --name pcf-daemon -v $PWD/config/default.json:/usr/pcf-node/config/default.json pcf-node

Configuration

Edit the config file ~/pcf-node/config/default.json:

param description default
maxTemperature Upper limit of the temperature 63
interval Interval in ms to check the temperature 1000
verbose Verbose logging true or false false

Restart the Docker container after changes to the config are made:
docker restart pcf-daemon

Watch the output:
docker logs --follow -n50 pcf-daemon

About

PCF (PiCoolFAN4) dynamic cooling for Raspberry Pi 4

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published