My AV receiver was running really hot so I wanted to add a cabinet fan before the summer heat. At first I tried finding a 5-12v DC source on the outside of the receiver that is powered up only when the receiver is on, but could only find a few places inside the receiver. I also wanted the fans to run for a while after the receiver is powered off, and sizing capacitors for that was starting to get tricky.
I looked at temperature controlled fans on amazon and they all seemed more expensive than I thought they should be. They were all over $30 and were basically just a fan, temp probe, and a relay...I looked in my parts bin and already had all that stuff.
First I wrote up a small sketch for a $2 Chinese Arduino Nano. Added a DHT11 temperature sensor and a 5v DC relay and it worked like a charm.
Next I had to find some old PC fans that would spin up and move air on just 5v since I wanted the whole thing to be powered by an old USB phone charger. I found two 80mm and one 120mm fans that still moved enough CFM at 5v and stayed under 200mA, so I cut off the molex connection and wired them up as USB.
Everything was working on the breadboard, so I ended up adding some status LEDs and a piezo buzzer for an overheating alarm. It all fit nicely into a small project box that I had.
Controller goes through a startup POST to show all fans, LEDs, and piezo alarm are working
The controller takes the average temperature over a 30 second span. If it's over 95F, the fan kicks on for 5 minutes before checking again. If the temp is over 120F, then the alarm sounds while the fans continue to run. Alarm sounds every 30 seconds until the temp is back under 120F.
In practice, the fans kick on about 2 minutes after the receiver is turned on and will run the whole time it's on. After powering down the media center, the fans run for at least 5 minutes before the temp gets below 95F. So far the overheating alarm has not been triggered.
If I were doing this project over, I would look into replacing the Arduino Nano with an ATtiny85 and the relay with a MOSFET. This would be a much smaller form factor and also allow me to use PWM to control fan speed.