Set PWM mode and frequency for quieter fan #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using an oscilloscope and my sensitive hearing ;), I achieved much lower noise and slower minimum speed, by setting the PWM mode and frequency to "Mark-Space" and 25KHz respectively. This is with 30mm & 40mm fans mounted on a RPi-4b Hat.
The wiringPi library defaults to "Balanced Mode", and a resulting high frequency signal at the PWM controller input. By changing the frequency close to the more standard 25KHz, and using a fixed square-wave, the resulting noise artifacts are considerably reduced. I am also able to achieve very low minimum fan rotation speeds under these conditions.
Note, this should be a backwards compatible change with any existing configuration in /etc/conf.d/kvmd-fan, as the default 1024 Range is not changed here. Any user that has specified a different value for --pwm-high, was not changing the actual signal.
I'm using this - https://www.tindie.com/products/jeremycook/ez-fan2-tiny-raspberry-pi-fan-controller/
as my controller interface between the RPi GPIO PWM signal, and the two-wire fan.
I'm running kvmd-fan on a PiKVM clone (Geekworm PiKVM-A3), but I believe this change would be applicable to any small fan PWM controller.