This project gives you a simple temperature controlled fan. If the difference between real temperature and the user temperature is high then the fan will run at full speed and if the difference is low then the fan will rotate at slow speed. The speed of the fan varies with the temperature.
The user can enter the temperature limit through the keypad.
The speed of the fan is adjusted by using the PWM.
Download the code from here