11/12/2023 0 Comments Fancontrol config example# Export PWM channel 0 echo 0 > export # Set the period in nanoseconds echo 1000000 > pwm0/period # cd to the device location cd /sys/class/pwm/pwmchip0 Once you have installed and activated the pwm-with-clk.dtbo overlay linked to above, you should be able to test the PWM by doing (in a root shell): You could of course use a "soft" PWM instead, but these eat up precious CPU cycles, which seems unnecessary when you just want to change the speed of a fan - so this guide assumes the hardware PWM route. There is however an alternative Device Tree Overlay, which activates the hardware PWM clock for general use, see the following guide for how to install it: Using the Raspberry Pi hardware PWM timers. It is launched and runs independently, so that if Domoticz should stop running, for whatever reason, the script will continue to quietly do its thing, keeping your system cool.įirst you'll need to get the PWM activated, which unfortunately isn't as straightforward as one might think the hardware PWM clock is not initialised at boot, and by default only starts up when the on-board soundcard is in use. Note that this script is not dependent on Domoticz in any way other than for monitoring. The fan's status is monitored and logged in Domoticz (and in the syslog). If you're not using the on-board audio, you can take advantage of the hardware Pulse Width Modulation capabilities of the Raspberry Pi to control the speed of a small PC fan, based on the system temperature.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |