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

No more noisy fans! #4

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

Conversation

RafaelZasas
Copy link

The program now ramps up the speed of your fan as and when it needs!
This drastically reduces the noise as the fan seldom ramps up past 60%.

The OUTPUTS and TEMPS variables are meant to be tweaked according to your wants and needs.

Its my first time contributing to anybody else's code so all criticism is welcome :)

Changed the controller to dynamically update the speeds based the temperature
fancontrol.py Outdated

time.sleep(SLEEP_INTERVAL)
time.sleep(SLEEP_INTERVAL)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see here I didn't leave a line at the end of the code and its raised an error. What is the reason for needing a new line at the end of the code?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a standard for most programming languages. It helps ensure proper parsing on all platforms. Here's one explanation: https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file

Added new line at end of file
Added Better Documentation
Copy link
Author

@RafaelZasas RafaelZasas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive just uploaded a new version with the corrections

Copy link
Author

@RafaelZasas RafaelZasas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did add the blank line at the end of the file I'm not sure why it isn't showing.

@geoffoxholm
Copy link

I did add the blank line at the end of the file I'm not sure why it isn't showing.

That change is showing. The icon at the end says no-new-line, that is missing from the newest version.

image

@stantond
Copy link

Is this configurable, and off by default? As some fans won't work well with this feature.

@stantond stantond mentioned this pull request Oct 26, 2020
Copy link
Contributor

@josephtyler josephtyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this a lot, but it would be good to know if this will work for all fans. I saw a comment suggesting it wouldn't. If that's the case, we should add this as a feature, but leave it disabled by default.

Thanks for contributing btw, and good work. Sorry for the delay!

fancontrol.py Outdated
SLEEP_INTERVAL = 5 # (seconds) How often we check the core temperature.
GPIO_PIN = 17 # Which GPIO pin you're using to control the fan.
SLEEP_INTERVAL = 3 # (seconds) How often we check the core temperature.
GPIO_PIN = 18 # Which GPIO pin you're using to control the fan.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the pin need to change here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it does as not all GPIO pins are PWM enabled.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RPI manual will tell you which of the pins are PWM enabled. They aren't all but there are a few

@RafaelZasas
Copy link
Author

Good point- I'm not sure if any fans would be affected I followed your tutorial and it worked okay. I'll go back and add the option though!

@jlcvp
Copy link

jlcvp commented Oct 9, 2021

There are some fans that need a "kick" to start using 0.5 values on PWM. I think a good approach would be to set the output to 1.0 briefly (about 1 second or so) when cold starting.

@RafaelZasas
Copy link
Author

Hey, I finally set up a new pi and needed to use this again- I left an option to choose between using threshold and variable speeds.

@RafaelZasas
Copy link
Author

Hey, anything I need to add or fix to get this approved?

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.

5 participants