-
1Step 1
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.
-
2Step 2
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.
-
3Step 3
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.
-
4Step 4
Create a new output state rule.
- Set the output state to -1 (Toggle).
- Create a condition to internally trigger every 1 second.
-
5Step 5
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.
-
6Step 6
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.
-
7Step 7
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.
-
8Step 8
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
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.