ldr circuit

Discussion in 'The Projects Forum' started by ol'trusty, Jan 8, 2013.

  1. ol'trusty

    Thread Starter Member

    Sep 9, 2009
    48
    0
    Hello
    I have wired this circuit and the problem I am having is that it wont go off when dark.
    It goes on when light but doesnt release the relay when dark..
    What am I missing?
    :cool:
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,055
    That old op-amp may not be able to take its output voltage low enough to release the relay. You could try a more modern amp with a rail-to-rail output (or at least to the negative rail) or look at ways to pull the output lower to turn off that transistor. [edit] Or you could use a dual supply to power the op-amp.
     
  3. ol'trusty

    Thread Starter Member

    Sep 9, 2009
    48
    0
    Which opamp would you reccomend?
    Can you explain dual supply?
     
  4. KnRele

    New Member

    Jan 7, 2013
    20
    8
    The 741 isn't able to move its output above about 7.5V or below 4.5V. When the LDR is in the dark, the output will go to somewhere around 4.5V, which will still drive the transistor with around 3.8 mA (4.5V - 0.7 V across 1 kOhm) -- so it will still be in saturation and keep the relay turned on.

    To make this work you might want to use a different op-amp, such as one half of a LM358 which can go all the way to the negative rail, or a real comparator such as the LM311 which also is likely to be able to drive your relay. Not all op-amps can do service as comparators; watch out.

    I also recommend you put a diode across the relay to protect the transistor from the voltage spikes that appear when the relay is turned off: place its cathode to the +12V line and the anode to the collector.
     
  5. wayneh

    Expert

    Sep 9, 2010
    12,145
    3,055
    A dual supply gives 2 voltages versus ground, one positive and one negative. They're usually the same, for example ±5 volts, but they don't have to be. The op-amp sees the combined (10v) voltage for it's power, and then has no problem pulling the output voltage to zero or below. It can't get any closer to the negative rail, but now that rail is below the center voltage. Sometimes it's as simple as using a diode or two to give a "center" voltage above the negative rail.
     
  6. ol'trusty

    Thread Starter Member

    Sep 9, 2009
    48
    0
    Thanks for the replies I now understand the problem
    I still havent understood the dual voltage but I will read up on it
    ;)
     
  7. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,871
    1,393
    The LM741 is old and obsolete, but it will do the job with a single supply. See the attached schematic.
     
  8. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    No.
    MOST old 741 opamps will not work in the circuit, a few might if you are lucky to get one.
    also you selected a Mosfet that needs a very low gate voltage to turn off which rarely happens in the circuit.
     
  9. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,871
    1,393
    Well, I built it and it worked flawlessly with the first LM741 and the first MOSFET I tried. Here are photos of the breadboard.
     
  10. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    SOME but all Mosfets do not turn off when their gate voltage is only 2V from the output of an obsolete 741 opamp.

    Use obsolete 741 opamps and modern Mosfets together if you like to gamble.
    I NEVER gamble with my circuit designs. ALL of them work and I have had tens of thousands made.
     
  11. NFA Fabrication

    Member

    Aug 12, 2012
    104
    3
    I did this recently with an LM393 Comparator, and it worked great.
     
Loading...