A quick video showing the single channel fan controller I made with an arduino. When I get the code simplified I will make this a 4-channel device and use it on my PC to control the fans for the liquid cooling loops.
Credit on the circuit goes to Oscar Gonzalez @ bricogeek.com. He designed the circuit using a CNY75 optocoupler to isolate the Arduino from the 12V that is needed to run the fan. From there, I used a 2SC1384 transistor to amplify the PWM signal from the optocoupler. My fan doesn’t like PWM output and makes a high-pitched whining noise, so I used a 220uF capacitor across the motor leads to flatten the PWM output. Not a great solution, but it will work until I can find something better.
Temp sensing comes from an LM35, however since I mostly deal in Fahrenheit, an LM34 would have worked better and eliminated some code for conversion. Trip points are set at 75 for fan shutoff, 85 for fan startup, and 90 for maximum. Once the temp has reached 85, it is dynamically adjusted from 15% – 100% between 75 and 90. Once it drops below 75 it shuts down.
I have modified the circuit a bit to drive a larger load using a MOSFET instead of the 2SC1384 NPN Transistor. By increasing the PWM frequency of the ATmega’s timer1 frequency to 31.25kHz the fan whine has been eliminated.
Source code can be found here:
Post time: Oct-12-2017