Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yet another PWM mod #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Yet another PWM mod #15

wants to merge 3 commits into from

Conversation

r-or
Copy link

@r-or r-or commented May 13, 2023

Same idea as the other PRs, with a twist:

This takes into account that PWM doesn't work with just any fan consistently, and on top of that often introduces audible whine, as we're throwing a rectangle waveform onto a electromechanical transducer ;)

Almost any capacitor should fix this, but has implications on the PWM frequency, as well as the minimum PWM value the fan can take; generally higher PWM frequency means a higher PWM cutoff value for minimum fan speed.

E.g. for a 100uF Cap, 500 Hz corresponds to a min PWM of .64 in my case, while for 10kHz the value was around .8

This also includes an exponential fan curve that tries to keep the PWM as low as possible over a wide temp range, as in my experience the lowest possible fan speed is often enough to keep the Raspi cool.

In the end this is the priority list when it comes to fan speed for me:

  1. Keep the thing off in idle state at all costs!
  2. If loaded, fan is okay, but DO NOT switch the fan on and off repeatedly
  3. Only if those are a given, we can modify the fan speed, so it is as quiet as possible
  4. Keep it as quiet as possible for as many operating modes as possible

This PWM control addresses all those requirements. For 2) and 4) we need to enter a steady state within a given operating mode (e.g. file transfer if you use the Raspi as a NAS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant