Automatic light/dark activated systems have very common utilities in day to day life. For example, street lighting at night, morning alarm, automatic emergency light, dark activated buzzers and so on. The project explained here can be used in several such systems. This circuit has a sensor component which works in response to the ambient light condition. The output of this sensor is compared with a set reference value and whenever the light condition changes from dark to light or light to dark, the output goes high.
In this project, the surrounding illumination is observed by a light dependent resistor (LDR) which acts as a sensor for the circuit. The voltage drop across this LDR corresponds to a particular intensity of light. This value can be taken at the inverting input of a comparator of LM339 (at pin6). The resistor R3 (1k), along with LDR, forms a potential divider at this input. The non-inverting input (pin7) is connected to a variable resistor (preset) which is used to set the reference voltage of the comparator.