I was interested to see how to control a simple fan in software. To date my RPi4 seems to run comfortably cooler than the throttling temperature, but having developed a way to mount a fan in my 'stack' inside my amplifier, I was keen to see if I could leave it permanently connected but only have it running when needed.
My simple 2-wire fan draws about 45mA on 3.3V, which is too much to drive directly from a GPIO pin. So I wired up a little transistor to switch the GND side of the fan according to the state of a GPIO pin. I made it so that it simply plugs into the existing fan wiring. [image: http://www.cjh.me.uk/MyPhotobucket/cache/DIYHifi/Transistor%20wiring_480.jpg] [image: http://www.cjh.me.uk/MyPhotobucket/cache/DIYHifi/Transistor%20fan%20control_480.jpg] Then I made a script to turn the fan on and off according to temperature. I set the 'off' temperature one degree below the 'on' temperature to reduce the frequency that it turns on and off. Here's the result from an idling pCP (no LMS, no Squeezelite) in the open air. When running at 3.3V the fan takes about 5 minutes to pull the temperature down from a resting 56 degrees to the 40 degrees that I set. It struggles to get much below that. Running on 5V it cools faster and lower, but it becomes audible. [image: http://www.cjh.me.uk/MyPhotobucket/cache/DIYHifi/Fan%20with%20GPIO%20control_480.jpg] ------------------------------------------------------------------------ chill's Profile: http://forums.slimdevices.com/member.php?userid=10839 View this thread: http://forums.slimdevices.com/showthread.php?t=110690 _______________________________________________ discuss mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/discuss
