Light Dependent Resistor Circuit
The Light Dependent Resistor and a trimpot form a voltage divider which is used to apply bias to a transistor. As the LDR changes resistance the change in potential is detected by the circuit and the relay is activated. The PCB-mounted switch just interchanges the trimpot & the LDR as far as the detection circuit is concerned. So a dark activated switch becomes a light activated switch or vice versa. This is the figure of the circuit;
An LED with current limiting resistor is in parallel to the relay to give a visual indication of when the relay is turned on. The relay (Use a 5A/250VAC) can be connected to a light bulb and power supply which will light up when the environment is bright or vice versa. This circuit is satisfactory if the changes in light level to be detected are large and the transition is quick - for example, a person walking past a doorway. An inherent problem of the circuit is chattering of the relay for slowly changing light levels just at the transition point between turning on/odd and vice versa. This leads to the relay chattering as it rapidly turns on/off. This problem can be overcome in by having a hysteresis circuit using an op-amp or a Schmidt Trigger.