项目作者: pilotak

项目描述 :
Raspberry Pi variable speed cooling fan controller
高级语言: Python
项目地址: git://github.com/pilotak/docker-rpi-fan.git
创建时间: 2020-03-07T22:00:52Z
项目社区:https://github.com/pilotak/docker-rpi-fan

开源协议:MIT License

下载


Raspberry Pi variable speed cooling fan controller

Docker Build Docker Pulls Docker Size

Docker container that keeps the CPU temperature at desired level with PWM enabled fan based on http://www.sensorsiot.org/variable-speed-cooling-fan-for-raspberry-pi-using-pwm-video138/

Docker-compose

  1. version: "3.7"
  2. services:
  3. fan:
  4. container_name: fan
  5. restart: always
  6. image: pilotak/rpi-fan
  7. environment:
  8. - DESIRED_TEMP=45
  9. - FAN_PIN=12
  10. - FAN_PWM_MIN=25
  11. - FAN_PWM_MAX=100
  12. - FAN_PWM_FREQ=25
  13. - P_TEMP=15
  14. - I_TEMP=0.4
  15. devices:
  16. - /dev/gpiomem

Environmental variables

Bellow are all available variables

Variable Description Default value Units
DESIRED_TEMP Temperature it tries to keep it at 40 °C
FAN_PIN PWM pin where is mosfet driver or load-switch connected to 13
FAN_PWM_MIN Minimal duty cycle to turn the fan on 20 %
FAN_PWM_MAX Maximal duty cycle of fan 100 %
FAN_PWM_FREQ Broker address 17 Hz
P_TEMP Proportional constant 18.0
I_TEMP Integral constant 0.3
READ_INTERVAL How often read the temperature 2 seconds