On Off at output

Discussion in 'The Projects Forum' started by rsfoto, Jul 3, 2013.

  1. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Hi,

    Does the circuit below make sense ?

    If the input Voltage is below the refence voltage I want to have the Output 7 of the OnOffB open.

    Is this correct ?

    I guess I can make it somehow easier but at the moment just, I think at least, having learned a bit of comparataros I thought I use a LM393 as a switch.

    Thanks for every tip in advance

    regards Rainer
     
    Last edited: Jul 3, 2013
  2. Jony130

    AAC Fanatic!

    Feb 17, 2009
    3,957
    1,097
    rsfoto likes this.
  3. LDC3

    Active Member

    Apr 27, 2013
    920
    160
    Since 4 is the ground pin and 5 is connected to 4, pin 5 is also at ground all the time. This means that pin 7 will be low and never change. If you are using it as a comparator, there does not need to be any feedback. The LM393 requires a pull-up to get a positive signal.
    You also need to tell us a few things: What you voltage supply is so we can determine what the voltage is on pin 3. What is the purpose of the input of 1.5V?
     
    rsfoto likes this.
  4. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Hi,

    Thanks to both.

    Yes I read this page many times http://www.bristolwatch.com/ele/vc.htm but looks like I missed a lot. :)

    Supply voltage is 12 V and the input labeled with 1.5 is the one which changes. I should have not left there 1.5V as this was just a help to think about the function for the output.

    I need a switch that when input is Lower then 1 V or whatever opens the output.

    So far as I have read, using just half LM393 makes the opposite. When the +Input voltage is lower then the -Input the output goes LOW eg. the swtich cloeses and I want the opposite.

    I was thinking about this for 2-3 days until I came up with the above circuit which seems to be nonsense :D

    So I will keep studying more the website mentioned. I read about the window but that made not much sense having a window as for me putting ref1 and ref2 at the same voltage would not do what I want. Allow me to study that better. I want a clear cut off when the input voltage goes over or under 1 volt but while writing this, ¿ what happens if the input voltage is also 1v all the time ?

    Thanks again.

    regards Rainer
     
  5. LDC3

    Active Member

    Apr 27, 2013
    920
    160
    If you reverse the inputs to the comparator, then it will be on when the input is lower than the reference like below.
     
    rsfoto likes this.
  6. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Hi,

    What I want is that is the input voltage is higher then the reference the output is on.

    Maybe I should have told more about the input. The input is a clear water high shining green LED. It is rated at 3.2V and 100mA consumption. Using it as a sensor it delivers from xxxmV up to maximum 2V in full sunshine. Looks like it is also Infrared sensitive :mad:

    OK. I got some LM393 and built a circuit on the breadboard and interestingwise it works as expected. See the circuit below.

    Having set the reference voltage at 1.8V and shining on the sensor LED, specs as mentioned above, the circuit closes eg. the control LED lights up.

    But now comes a problem. If I go down with the reference voltage to let me say 1V the circuit closes even the lED is only delivering let me say 500mV.

    Now comes the interesting thing.

    I connect a Multimeter for measuring the reference voltage and another Multimeter for measuring the LED voltage and there I can get it to work even with a reference voltage down to the measured voltage the sensor LED is delivering and that is what I do not understand.

    I appreciate every help for solving this as I do want to open the line when the sensor LED voltage is less then 1 Volt or whatever value I want to adjust.

    Thanks
     
  7. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Hi,

    2 and a half hours later now it works like expected.

    I can now adjust any refecence voltage using the 10K pot and when the voltage of the sensor LED is over the refecence voltgae the cricuit closes.

    I added a 10K resistor between +12V power supply and output 1 as well as a 1MΩ resistor, 10nF capacitor parallel to the sensor LED.

    I have NO idea why it works but it works as I want :confused:

    I read somewhere about the resistor between output and voltage supply and the 10nF capacitor and 1MΩ resitor comes from the solarseeker circuit.

    Now I have to test it directly under the Sun.

    Look at the attached new circuit image.
     
    Last edited: Jul 5, 2013
  8. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    This is starting to be a self conversation :D

    I noticed that when the voltages came very near Ref <> Input the control LED started to flicker. Remembering having read something about Hysteresis I just added a 1MΩ between PIN 1 and 3 as I found it in a datasheet for this LM393 here

    http://www.chipswinner.com/ends/LM393.pdf

    Page 6. I think what I have now is an Inverting comparator with Hysteresis.

    Anyhow now when the input voltage is above the reference voltage I have a nice clean switching of the control LED, no flickering anymore :D.
     
    Last edited: Jul 5, 2013
  9. wayneh

    Expert

    Sep 9, 2010
    12,120
    3,046
    I knew you'd get here. Well done.

    One other odd thing about comparators that might help you, is to learn what happens when both inputs are at either rail, due to internal offset. I forget exactly the result but I was surprised that the comparator was in one state or the other when I had expected the opposite. I had to readjust my circuit so that the input that I thought should be at the rail was actually biased a bit away from it. I hope that makes sense. The take-home lesson was to always take control of the inputs and don't rely on being locked to the rail unless you've tested that to confirm it works, that the comparator will be in the state you expect.
     
    rsfoto likes this.
  10. rsfoto

    Thread Starter Member

    May 14, 2013
    134
    1
    Thanks :D

    Sorry, I do not understand this ...

    To what do you refer when you talk about a " Rail "¿?

    This circuit is only using half the LM393 ...

    Now I will start to think what t do with the other half of the LM393. Perhaps wire it so that I use 2 sensor LEDs and if both detect high or low light use the outputs in series to make it more sensitive ¿?

    The only accident that happened is that I smoked a 10K pot. Those bugs with 3 feet laying on the board and brown coloured (those made of carbon). Perhaps I just put a 1.2 KΩ fixed resistor on the leg connected to +12V and so if I accidentally turn it to the end I still have 1.2 KΩ resistance in front of it as security.
     
  11. wayneh

    Expert

    Sep 9, 2010
    12,120
    3,046
    The opposite poles of the power supply (to the relevant IC) = "the rails"
     
    rsfoto likes this.
Loading...