Main Content

Simple ATtiny85 fan controller to turn a fan on/off based on temperature. Includes an LED as a temperature indicator. LED is dim at start of fan on temperature and blinks when above a max temperature. Fan is not PWM controlled since I am using a small 5V fan which is quiet running at 100%. The controller is in sleep state while the temperature is below the minimum threshold and wakes up every ~8 seconds to recheck the temperature. When temperature is above minimum threshold, the controller will stay awake checking every second till the temperature falls below the minimum threshold. The code uses ds18b20 library by Davide Gironi. I want to make a 12V power supply for external hard drives. I have a bunch of external hard drives running that are connected to the router, media center, and a Raspberry Pi. The 12V wall warts are taking up way too much space. The fan controller will be used in the power supply enclosure. I’m not sure if the power supply will need a fan but I figure since I’m learning how to use microcontrollers might as well build something I will put to use. My choice of parts were left overs from other projects. You will need to change things up to suite your needs. Make sure to use a logic level N-MOSFET that can handle the requirements of your fan. Follow the schematics in the KiCad in the GitHub repository. There is PCB diagram that fits a perfboard if you want to follow the layout I made.”

Link to article