Connect with us

Thermostat with lm35: help finding out the error

Discussion in 'General Electronics Discussion' started by joerack, Jun 14, 2016.

Scroll to continue with content
  1. joerack

    joerack

    4
    0
    Jun 14, 2016
    Hello all

    I'm trying to build a thermostat with 2 opamps, the first amplifies the analog voltage and the second as a comparator. the comparator should give me a v output whenever the ref (coming from the voltage divider) is higher than what's coming out from my Lm358 configured as hysteresis comp

    so the first part of the circuit works, but measuring from the lm393 I'm always getting -9v

    please help

    https://www.dropbox.com/s/utah1nbrmgwtfxd/IMG_20160614_092224.jpg?dl=0
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,505
    2,849
    Jan 21, 2010
    can you post the schematic here? I can see it on dropbox but I can't zoom in on it to see what's going on.
     
  3. joerack

    joerack

    4
    0
    Jun 14, 2016
    done
     

    Attached Files:

  4. joerack

    joerack

    4
    0
    Jun 14, 2016
    I inverted a polarity (duh!)

    so I'm getting a constant +4/5v from the first opamp, and a constant 8.45 from the second (obs: I'm not using a 1m pot as in the scheme, but a 100k)
    I need to make the comparation work so that when the temp is lower than the voltage divider, nothing comes out of the lm393
     
  5. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,505
    2,849
    Jan 21, 2010
    Remember that the LM393 has an open collector output. You will need to add a 2.2k resistor (or similar) from the output to the +ve supply to enable the output to go high.
     
  6. hevans1944

    hevans1944 Hop - AC8NS

    4,683
    2,192
    Jun 21, 2012
    Expanding on Steve's comment in post #5: The LM393 has an open-collector output that will sink (typically) 16 mA when the output is "low" and will present an open-circuit when the output is "high". To drive the relay coil, you connect one side of the coil to +V and the other side to the LM393 output. A reverse-biased diode across the relay coil is recommended to absorb back-emf produced when the coil is turned off, i.e., LM393 output "high". Make sure your relay coil will operate on 9 V DC at less than 16 mA actuation current!
     
  7. AnalogKid

    AnalogKid

    2,621
    758
    Jun 10, 2015
    As noted, a 393 has an open collector output that can only sink current, not source it.

    1. IF (big if) the relay coil current is less than 50% of the 393 max rated output current, then it is safe to have the 393 drive the relay coil directly (with an added suppression diode across the coil. IF NOT, then an external driver transistor is needed, and this will change the polarity of the input connections. So, figure out the output first and post an updated schematic, then the input can be straightened out.

    ak
     
    hevans1944 likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-