The first ‘big’ project I tackled with my Arduino is a simple air conditioning system. Using an old computer fan and a TMP36 temperature sensor, I programmed the fan to turn on whenever the temperature gets to high. The Arduino’s 5v wasn’t enough power for the fan to spin effectively, so I used a transistor and a 9v battery instead of the digital output directly.
After getting the fan to work, I added an indication LED as well as potentiometer thermostat, which in my code sets the temperature between 50-100 degrees F. The LED turns on whenever the fan is on.
Here’s the code. Just copy and paste it into the Arduino IDE. Make any improvements that you like on it.
Build the circuit using the following schematic. You don’t have to add the LED or potentiometer, or even the 9v battery and transistor. Depending on your fan type you might be able to run the fan with the Arduino’s 5 volts.