Entertainment centers often trap heat given off by electronics; this can cause them to overheat which reduces their lifespan. This project can be used to regulate the temperature of an entertainment center by increasing air flow. It does this by allowing users to control two different fans and a servo. The fans will automatically turn on if a certain temperature is reached and the servo will turn 90 degrees. If a user knows they are about to generate a lot of heat they can switch to manual fan control by flipping a slide switch. Once this switch is moved, the fans will turn on one at a time with each click of a button switch and the servo will turn on the second click. Once the switch has been clicked three times, the fans will turn back off, and the servo will return to its starting position. This would help regulate the temperature of any device in an entertainment center without always running your fans which would reduce the life of your fans and waste electricity.
Step 1: Materials
1) Temperature sensor [TMP36] (250 mV output at 25°C)
2) Slide switch
3) Two 240Ω resistors
4) 100 uF electrolytic capacitor
5) Tactile button switch
6) Breadboard(I use an Explorer Board)
7) Two PWM controlled fans(I use two different sizes in my demo)
8) Small servo motor
9) ChipKIT WF32
Everything but the fans and the ChipKIT is included in the LabVIEW Interaction Parts Kit
Step 2: Setup
Connect power and ground to both sides of the breadboard. Place the pushbutton on the breadboard and connect one end to the 5V. On the other side of the switch, connect to ground through a 240Ω resistor. Connect this junction to digital pin 5 on the WF32.
Next step is to attach your slide switch, First place the 3 pin switch on the breadboard. Next run a wire from one of the outer pins to power and then place a 240Ω resistor between the opposite sides pin and ground. Finally run a wire from the center pin to digital pin 4 on the WF32.
Now you can insert male headers into the 3 or 4 female sockets on the servo motor and the fans(see figure above for fan pin instructions). For the servo connect the orange wire to power, and the brown wire to ground. Place a 100uF electrolytic capacitor across power and ground to smooth out any irregularities in voltage. Connect the servo's data wire(yellow wire) to pin 6 on your WF32. Repeat this procedure for each of the 2 fans connecting the data wire of one to pin 2 and the other to pin 3. Place the TMP36 on the breadboard (the order of the pins is important) connect the left pin of the flat facing side to power, and the right pin to ground. Connect the center pin to Analog pin 11(A11) of the WF32.
Step 3: LabVIEW Code
From the thermistors sensors datasheet, I found that every 10 millivolts of change from the sensor is equivalent to 1 degree Celsius. If you take the voltage, subtract 0.5, and multiply it by 100, you get the accurate temperature in degrees Celsius.
You can download my LabVIEW code by clicking on the "fan_control.vi" file below. If you followed my instruction above, then the default channel values are already set but if you used different channels you will have to change them. Also, if you are using a different servo, you will want to play around with the pulse width values for both positions. Otherwise, just follow the instructions given on the front panel and feel free to comment with any questions you may have.