The problem is that when I set the LDR on my car and stop for a short time near street lighting my headlights from the car are switched off. I made a circuit simulation, when I click 4 times for the light increase button in the simulation, the relay switches off, how to change circuit to switch off the relay after 7 clicks and more. I'd like the relay to turn off in a bigger light.

My LDR is GL5539 5mm

enter image description here

enter image description here

  • 2
    \$\begingroup\$ As I explained in the comments your previous question which you deleted, R1 and LDR1 form a potential divider. You adjust the threshold by adjusting R1. Please just edit your question rather than delete and repost. \$\endgroup\$ – Transistor Jul 6 at 17:26
  • \$\begingroup\$ A well designed circuit may also be able to discriminate between steady daylight and AC-powered streetlights, most of which will have a 100 or 120 Hz flicker due to their AC power source and a different spectrum of light. \$\endgroup\$ – Transistor Jul 6 at 17:37
  • \$\begingroup\$ @Transistor Do you have a circuit that recognizes street light and daylight? \$\endgroup\$ – Smekeri BezPrezimena Jul 6 at 17:39
  • \$\begingroup\$ No. You'll have to search. \$\endgroup\$ – Transistor Jul 6 at 17:42
  • \$\begingroup\$ I, for one, have become frustrated with questions that rely on Proteus simulations. As in this question "click 4 times for the light increase button"...what the devil does that mean in the real world? Proteus seems to have invented its own conventions for component symbols and special indicators, which makes it difficult for the rest of us to help. I humbly suggest that you use a proper SPICE simulator in the future. \$\endgroup\$ – Elliot Alderson Jul 6 at 17:49

This circuit may operate with the darkness. But your circuit is not suitable for your application. Because the light condition is rapidly change with the time when you riding in a street. I suggest you may need some delay between switching.

The requirement is..

  1. When you go into dark, you need your lights immediately.
  2. When you go into light, you don't need to turn off your light suddenly. You should apply a delay and then turn off the light.

To achieve that, your circuit need some modification. Try some other circuit using 555.


reduce R1 by some amount, maybe try 10K or 22K there instead,

a iM variable resistor between pin 7 top end of LDR would allow some control of the amount of hysterisis


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.