Introduction: Temperature Controlled Fans
In this demo I'm going show you how you can use the Smart Servo Controller to turn on and off fans with a temperature sensor. The project will use two fans connected to two different relays. The relays will connect to the Smart Servo Controller. An IC temperature sensor is connected to the SSC (Smart Servo Controller). A blinking LED is also connected just for fun.
For more information on the Smart Servo Controller check out the kickstarter campaign here: https://www.kickstarter.com/projects/143152889/smart-servo-controller
Step 1: System Overview
We are going to have the LED blink at about on and off on one second intervals (0.5Hz). Fan 1 will turn on at 46C temperature. Fan 2 will turn on at 60C temperature. To have some hysteresis both fans will turn off at 30C temperature.
Step 2: Connect the Circuit
Connect the Microchip MCP9700 temperature sensor up to input channel 1 on the smart servo controller.
- Pin 1 is +5v
- Pin 2 is Signal
- Pin 3 is 0V.
- Connect the LED to output channel 1. Add a 0.5K resistor between the LED and 0V. The resistor is to limit current through the LED.
- Connect the relays to outputs 2 and 3. Add free wheeling diodes across the relays to suppress back EMF.
Step 3: Set the Inputs and Outputs
Go to the IO Setup Tab,
- Set the channel 1 input to Analog.
- Set the output channels 1-3 to Outputs. Set the default state to -1 (off). This will keep the output at the current state even when no rules are active.
Step 4: Make the LED Blink
Create a new output state rule.
- Set the output state to -1 (Toggle).
- Create a condition to internally trigger every 1 second.
Step 5: Turn on Fan 1
Create a new output state rule that will turn fan 1.
- Add a channel and set it to 2, set the value to 1. 1 is for true/on.
- Create a condition so that the rule will only be active when the temperature sensor is above 46C. From the data sheep for the sensor we calculate that 46C is 0.96 volts.
Vout = Tc * Ta + V0C where
Tc = 10.0mV/C
V0C = 500mV
Ta = Temperature
Vout = Output voltage.
Step 6: Turn Off the Fans
This step we are creating a rule that turns off the fans.
- Add an output state rule and add channels 2 and 3.
- Set the values for both to 0 for off.
Create a condition that only activates this rule when the temperature is below 30C. This works out to 0.80 V.
Step 7: Turn on Fan 2
This is similar to how we turned on fan 1 except with a higher turn on voltage.
We are going to turn it on at 60C or 1.10 volts.
Step 8: Program and Test
Now we program and test to make sure the circuit works the way we want it to.
- The LED should be blinking on and off every second.
- When we heat up the temperature sensor Fan 1 will turn on first.
- As temperature increases Fan 2 will then turn on.
- When we remove the heat source both fans will turn off when the temperature falls below the threshold.
Check out the youtube video for a demonstration of this in action:
If you found this interesting please follow us on facebook here: https://www.facebook.com/smartservocontroller
And support our kickstarter for the Smart Servo Controller here: https://www.kickstarter.com/projects/143152889/smart-servo-controller
Thanks,
Mark