Thanks, I found this highly useful. As it happens, earlier today I finished my userspace solution for the same problem - a small C program which uses sysfs to monitor the temperature and adjusts the fan speed in almost identical fashion. I hoped for something like this to exist two weeks ago, but missed that commit by just a couple of days. Not that it matters, as it was fun to design the PWM control circuit and write the daemon.and the documentation https://www.raspberrypi.com/documentati ... al-control
As I have no idea what you have in front of you - and will not spend my time googling it - there is at least the chance that you may find this https://github.com/raspberrypi/linux/bl ... 1-L4112C76 useful.
It's an newly merged overlay, using a SW PWM for fan control.
Looks like I may get to hack it a bit as my circuit has the logic inverted - 0 % duty means full RPM. The idea is to have the fan at full blast when there is no control signal present, and once the software takes over, it can adjust the RPM to a more appropriate level. I know the Pi will survive just fine without any active cooling, but knowing that I designed it in a "fail-safe" manner makes me sleep 0.003 % better.
Statistics: Posted by onre — Sat Jan 11, 2025 3:01 am