The circuit idea may be understood with the below mentioned points:
- Transistor T1 alnog with R3, C6 and the LDR itself forms a simple light sensor stage.
- The LDR is connected across the base of the transistor and the positive supply such that when light falls over the LDR, T1 receives the required base bias and conducts.
- When T1 conducts, the high potential at pin 14 of IC1 is pulled to logic low. However since a logic low wouldn't effect pin#14, IC1 does not respond as yet.
- The moment light on the LDR is switched OFF, T1 is switched OFF and pin#14 now instantly receives a subsequent logic high via R5.....now IC1 responds, and shifts it's output from pin#3 to pin#2. This makes pin#3 logic low, activating T2, and the preceding relay driver stage.
- The above condition persists until the LDR is illuminated again with a flashlight or with a laser beam.
- The above operation alternately toggles the output ON and OFF providing the required toggling actions to the connected load.
- The LDR must be covered inside an opaque pipe, about an inch long so that the ambient light stays obstructed from the LDR.
- The angle of the pipe should be kept in a such a way that it facilitates easy focusing of the light beam toward the LDR.
- C6 ensures that the system does not respond to accidental spurious light beams in case it finds its way inside the pipe, and over the LDR.
T1 = BC547,
T2 = BC557
IC1 = 4017
IC2 = 7812
ALL DIODES = 1N4007
C6,C7 = 10uF/25V
C8 = 1000uF/25V
C10 = 0.1uF