Electronic – Dark sensor using relay

ldrlight-sensorrelay

Trying to develop a dark sensor. Have successfully made it but with a major problem. As you can see the circuit here:

dark sensor relay

When the LDR is covered the LED lights up using the relay NO terminal. However the problem is that with slight disturbance of light falling on the LDR the relay triggers on and off very quickly and that makes the LED blink rapidly.

I want to slow down the switching speed. ie, the relay coil only turns off if the LDR is illuminated for atleast a second or so.

Note that I need a high current to run the LED in high brightness. I need around 450-500mA current through it. That is the reason I have used a relay.

Best Answer

Here's a circuit that should give you a few seconds' time-delay (you can adjust the time-delay by changing the value{s} of R2 &/or C1), some hysteresis to reduce cyclic switching, and should consume a little less power, due to the use of a comparator & a mosfet, instead of the 3 BJTs.

schematic

simulate this circuit – Schematic created using CircuitLab

NOTE: As @Trevor pointed out on laptop2d's answer, you could remove the relay & freewheel diode, then simply ground the LEDs through the MOSFET (same as how the relay is grounded through it now) to switch them.