Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
/ radiator Public archive

树莓派通过PWM控制CPU风扇转速.

License

Notifications You must be signed in to change notification settings

mycrl/radiator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Radiator

获取树莓派Soc温度并通过PWM引脚发送占空比控制风扇转速.

device

温度控制策略

  • 当温度<= 40度时,风扇保持最低转速.
  • 当温度>= 60度时,风扇达到最高转速.
  • 树莓派自身温度策略为60+之后开始降频,所以这里的目的是尽量让树莓派保持最佳性能.

安装

注意: 请将风扇连接到硬件PWM引脚: GPIO-Pinout.png

然后你需要通过环境变量指定风扇PWM引脚和工作周期(秒):

export RADIATOR_PIN=12
export RADIATOR_DELAY=10

为了避免树莓派每次重启之后都需要手动启动进程的问题, 你可以使用自动化脚本安装服务:

./install.sh
systemctl status radiator.service

服务将自动安装并保持开机自动启动.

License

MIT Copyright (c) 2020 Mr.Panda.