Pi3 Fan control via temp
-
I've recently gotten a case for my pi3 that uses a fan to try and experiment more with overclocking.
The biggest problem is the 5v pin (I'm using pin4 grounded to pin6) is on when the pi is in it's soft "off" or standby mode.
Obviously, if I unplug the pi this isn't an issue, but I implemented this method to prevent having to unplug it anymore.Anyway, one of my favorite things about having a pi so far is all the learning I've been doing. It's been a blast. My next bit of learning will soon be with transistors and more python scripting as I've come across this method of having a fan be controlled by temperature readings from the processor.
Really I'm just curious if anyone's done something like this yet, what their thoughts on it are, and if they have any pointers going forward.
Looking forward to input.
-
@RandoCalrisian I have thought about doing this in software, but you would need something to measure the temp and a program to always mo itor it. I'm more inclined to use a temperature sensor the varies resistance and triggers the fan via a transistor. I just haven't taken the time to work out the math to get it to work. I am running a separate 12v fan so I can just unplug that.
-
Hi RandoCalrisian, I used the same code for getting a fan working, that code got some writting errors, I suggest you to read this post (at the end of it, it´s the corrected code):
https://retropie.org.uk/forum/topic/3514/fan-gpio-and-code-control
Anyway, I recommend you to think in put or not a fan. With that code, you always get the fan getting ON and OFF continuosly anytime when it reaches the programed temperature, and it´s a real chaos!!! (noisy), other option is to turn ON the fan permanently (I choosed that), and another option is to get an "instant time temperature reads" and get a code that moves it.
I saw something made with a sensor, maybe you should think to search in that direction.
Bb ^_^
-
@flop Thanks for sharing that read.
Okay, so, considering your input for the fan going off and on and all that, is there a simple way to just have the fun turn off when the system is in it's standby state?
I wouldn't mind a switch, but this fan will be on a pi that's in an arcade cabinet and won't have access to a switch to just turn the fan off.
I could make a switch externally available, but that's less user friendly for the end user, and as a result, they'd probably never turn the fan off.
-
If you use a transistor you can do what you want, it is said in the post (and the code it´s programmed for that):
pin = 18 # The pin ID, edit here to change it
https://retropie.org.uk/forum/topic/3514/fan-gpio-and-code-control
Other option is to get a switch, but, the transistor it´s like 0,10 €.
-
@flop I'll attempt to wire the pi with a fan and a transistor going to pin 12 (GPIO 18) and I'll report back with findings.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.