switch in the darkness and deactivate it in light.
The circuit is very simple and using only five components. It is also using an LDR. An LDR or photoresistor is a device which decreases its resistance when light falls on its surface. Almost all dark and light sensor circuits use LDR to sense light but some circuits also use solar panel to sense light for example automatic solar garden light. The circuit is also using a 20K variable resistor from which you can adjust the amount of dark / light on which you want to activate or deactivate the 12 volt relay. You can also use the circuit with 6 and 9 volts but make sure to use the same voltage relay.
Here is a very simple dark activated relay switch using NE555 IC. NE555 is a well known IC comes in eight pin dip package. This IC can be used to build a very efficient dark detecting circuit. The circuit shown here can automatically activate any DC or AC device connected with the relay