I need to connect a pin to ground based on temperature

Discussion in 'The Projects Forum' started by Thorbo, Jul 19, 2011.

  1. Thorbo

    Thread Starter New Member

    Jul 19, 2011
    2
    0
    I’ve got one of these. Please ignore spelling error in title :).

    [​IMG]

    It’s a solar tracker from Heliotrack (works great). To get the thing to track off the sun when it gets too hot, they said I need to connect the DOS (drive off sun) pin to the GND pin. To do this based on temperature I need a temperate sensor, a potentiometer, and a voltage comparator.

    I believe using the +5v and the potentiometer will let me set a reference voltage and then when the temperature sensor voltage gets too high it'll trigger a relay or something that will complete the circuit. That's my take, but I have no idea how to implement this.

    I don't have much electronics experience, but if I know what parts I need and how to hook them up I can probably do what needs done. I'm assuming I'll need some soldering done which I can handle.
     
    Last edited: Jul 19, 2011
  2. wayneh

    Expert

    Sep 9, 2010
    12,087
    3,027
    Look at the LM35 thermometer IC. It outputs 10mV per °C and requires only a single power supply, eg. 5v, as long as your temperature range is above 0°C. Note that you'll need to supply it more than 5v if you want to read temperatures approaching 50°C.

    Here's an example of a simple thermostat using the LM35:
    Picture 4.png

    If you have the regulated 5v supply, you can just ignore the 7805. You can also ignore the TEC driven by the MOSFET, and all the indicator LEDs with their resistors. I guess I should draw up the really simple version of this.
     
  3. Thorbo

    Thread Starter New Member

    Jul 19, 2011
    2
    0
    I like the idea. Can you explain further how I could get this to connect the gnd and DOS pin when this reaches say 49c? That is around where I'd like this to happen.
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,087
    3,027
    Imagine your DOS pin in place of the low-voltage side power pin of the TEC in my diagram. When the MOSFET is on, it will ground that pin. It's essentially a switch, on or off.

    If you're operating at 49°C, you'll need to read up on the specs of the LM35 (whether it can get that close to the 5v supply voltage - I think not) or better yet, supply it more than 5v. Give it 12v and it'll be good to over 100°C.

    Another point: Reduce the value of the 5M feedback resistor to increase the hysteresis of the comparator. This will make it a little less jumpy, which I think is better for your application. You'll need to decide how to deal with what happens when the the thing cools a bit and the thermostat un-grounds the DOS pin.

    And another: If you're going to use a MOSFET, it's gate needs to go full on and with a normal MOSFET, this requires at least about 10v as I've shown it. So that's another reason for a higher voltage supply. A logic level MOSFET would allow you to use a 5V supply to turn it full on.
     
    Last edited: Jul 19, 2011
  5. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    Oddly, the LM35 seems to be able to operate at between 4V - 30V where the LM34 lists in at 5V - 30V. If it's only the ambient temperature the OP is measuring then the issue of reduced functionality at 0C is not an issue.

    The LM35 output is a linear voltage of 10.0 mV/degC [.01V x 49degC = 0.49V] Thus a voltage devider across the inverting input of the LM339 will need to match this 0.49V. So if R10 = 200 Ohms, R9 would have to be 1.841K, in which case you could use a 2K or 5K linear pot to obtain a precise resistance value. The 200 Ohm(R1) and 1uF(C2) are present to suppress stray capacitance.
     
    Last edited: Jul 19, 2011
  6. wayneh

    Expert

    Sep 9, 2010
    12,087
    3,027
    I wanted to use the LM34 for two simple reasons: Higher sensitivity (10mV/°F is 1.8X more than 10mV/°C) and lower temperature at zero volts (0°F < 0°C). But, it's hard to find the LM34 and it's more expensive when you can find it. I guess it would be worth it in the right app, but I think most folks work around it.
     
  7. wayneh

    Expert

    Sep 9, 2010
    12,087
    3,027
    Right, I chose the values shown to be "ideal" for ~15°C. The OP can choose a different divider arrangement to center at 49°C (0.49v at the comparator input). This choice will depend on the voltage of the starting reference. Mine was 5v, but the OP might do better with 12v.
     
Loading...