temperature controller

Discussion in 'General Electronics Chat' started by JGVerells, Oct 16, 2013.

  1. JGVerells

    Thread Starter New Member

    Oct 16, 2013
    6
    0
    Hello,
    My question is which direction should I go to build a temperature control unit which will accept two input sensors and compare the difference between the two and turn on a fan when the difference is greater then what I have programed into the unit. The key is I don't want the unit to care what the temperatures are, just the difference of the temperatures.
    As an example one room is 68 degrees F and the other is 76 degrees F so the fan would turn on if I have programed the unit to a 8 degree difference.

    I thank you for your help.
    JG
     
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    Sounds simple enough.

    I have some experience with Arduino microcontroller board (uC). Two LM34 (LM34 for Farenheit) attached to Analog to Digital Converter on the uC. One PWM output on uC to simulate dc voltage to control fan speed. I hope you will have fan that has dc voltage control circuit built-in.

    I used Arduino Due which produced 3.3 volts for PWM. Our fan used 0-1 volts for Stand By, 1-10 volts for various speeds. Since my uC using PWM could only simulate dc voltage 0-3.3 volts, I used op-amp to scale the 0-3.3 volts to 0-9.9 volts, gain of 3. Pretty simple.

    You don't need all the features of Due. A simpler (and less expansive) Arduino uC board, that uses 5 volts would be even better for you. So you need board with:
    2 ADC
    1 PWM
    Nothing fancy, I think most Arduino uC boards have those features.
    And check the fan for the speed control information. If it uses dc 0-10 volts, you just use op-amp to make gain 2 amplifier.

    Here temperature code:
    http://learn.adafruit.com/tmp36-temperature-sensor

    Here is how to simulate dc voltage using PWM:
    http://arduino.cc/en/Tutorial/PWM
     
  3. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    Or leave out the microprocessor and its programming, and look at Fig. 20 of the application note.
     
  4. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    That is pretty sweet. Only need 1 ADC instead of 2 I was thinking about.

    So the temperature reached difference of 8 °F, the output of the circuit in Figure 20 is 800 mV (0.8 V). Use it to activate a transistor switch to turn on the fan?
     
  5. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    Or you could use a comparator and make it adjustable with nothing more than a potentiometer. Doesn't need any analog to digital converters, microprocessors, programming, pulse width modulation, etc.

    When an analog circuit can be used, it usually kicks the butt of a microprocessor for simplicity, and it can be repaired without needing a computer and a programming language.

    Here's a chip that will work.
     
    Last edited: Oct 17, 2013
  6. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    Right. The circuit in Figure 20 is already a comparator. My question is how to use the output to turn on the fan. If we have 8 degrees difference, the output is 800 mV. Send it to NPN BJT that acts as a switch?
     
  7. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    No, the circuit in Fig. 20 is not a comparator. It is a differential amplifier. You have to add the comparator to make it have an adjustable set point and switch hard at the set point.

    Now, if the original poster will join the conversation and tell whether he has enough information to build it...
     
  8. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    Oops. You are right, had to re read the description.

    What about negative difference? That will need to be accounted for too...
     
  9. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    No, there is no negative reference. It is impolite to hijack other peoples conversations. Please start your own thread if you want to know how to build a simple circuit without using a microprocessor.
     
  10. JGVerells

    Thread Starter New Member

    Oct 16, 2013
    6
    0
    I thank both of you for your imput. I will work on this and let you know how the project is advancing. #12 I do prefer to go with analog if possible because what little knowledge I have is mostly in analog. I'm afraid Im an old guy and digital is OK but analog I understand a little better, thank you for your knowledge sharing.
     
    Last edited: Oct 17, 2013
  11. wayneh

    Expert

    Sep 9, 2010
    12,153
    3,059
    +1
    That's how I'd do it. That's a strong endorsement for the simplicity of the strategy. If I can do it, anyone can.

    FWIW, the LM35 (°C version) is easier to find, so that's what I use. You can expect precision to better than 1°C with a control based on a comparator and a LM35. ±0.2°C wouldn't surprise me. If you need better than that, you have to use an op-amp to amplify the LM35 output before it hits the comparator.
     
  12. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    Personally, I despise everybody throwing a microprocessor into every little thing because they are unrepairable for most people. I even had the bad fortune to buy a flashlight with a microprocessor in it!!! Instead of "on, off, on off" you have to go through, on, off, flash slowly, off, red beacon, off, back to on...and these people think they improved it??? If my head ever explodes you will probably find my body laying beside a pocket knife with 3 microprocessors in it.

    So...I recommend you skip the evaluation board kit, learning a programming language, installing a compiler, etc. and build this thing for less than $20.
     
    Last edited: Oct 17, 2013
    absf likes this.
  13. BobTPH

    Active Member

    Jun 5, 2013
    785
    114
    Unless you happen to have the tools, are expert in using them, and have an assortment of microcontrollers lying around (as I do). To a software engineer like me, less hardware and more code is simpler.

    Although I agree that for this project it would be tossup for me.

    Bob
     
  14. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    I just finished "programming" the circuit.
     
  15. JGVerells

    Thread Starter New Member

    Oct 16, 2013
    6
    0
    I can not say how much I appreciate the assistance I have received here on this forum. Thank you #12 for the drawing and hopefully my old knowledge will kick in and I'll have this going once I have gathered the components.
    Again thank you, I enjoy your message end statement.
     
  16. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    The picture of a $53 Arduino Due shows about 44 parts. The analog method requires about 20 parts. That's less than half the parts and no code for half the price.

    It is not a tossup for me.
     
  17. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    Due is way way Waaaaaaaaaaaaaay overkill for this.

    I used one because we had ambient temp. sensor, fan speed control voltagel, LCD using I2C, 2 vapor temp. sensor using SPI, 2 pressure sensors.

    Nobody is forcing anybody to use Due. There are plenty cheaper options. Or not use uC at all, like you pointed out yesterday.
     
  18. JGVerells

    Thread Starter New Member

    Oct 16, 2013
    6
    0
    I apologize for my ignorance but I don't know what the symbols with the solid arrow heads in the lower right corner of he schematic are indicating. Would you please explain?
     
  19. #12

    Expert

    Nov 30, 2010
    16,343
    6,828
    I gave you 3 output options: relay, triac, and opto-isolator.

    As long as you do not tell me what kind of fan, I can't nail down what you need to switch it on and off, so I just threw in 3 options. Right now, it's up to you to come up with a 5 volt power supply and a choice of output switches.
     
  20. JGVerells

    Thread Starter New Member

    Oct 16, 2013
    6
    0
    Thank you, FYI I will be using this device with a relay to energize ceiling fans for maintaining near consistent temperature in a small retirement home I am building by hand which has a bedroom loft. The home will be mainly heated by a fireplace on the main level. I live in central lower Michigan and the winters get chilly but would rather not have it like an oven in the loft.
    The reason I didn't want the device to care what the actual temp. is, only the difference, so it will activate in the same manner wether the average temp. is 60 degrees or 72 degrees.
    I used the 8 degree difference only as an example. I figured in practice I would set the difference to a level which works OK without the fans running constantly.
     
Loading...