The voltage regulator IC (78xx series) provides a constant output voltage, as opposed to a widely fluctuating input supply, when the common terminal is grounded. Any voltage approximately 0 volts (ground) connected to the common terminal will be added to the output voltage. This means that the voltage increase at the common terminals will be reflected in the output. Otherwise, if the common terminal is disconnected from ground, the full input voltage will be available at the output.
This characteristic is used in the current circuit. When the common terminal is grounded, the output of the regulator is equivalent to the rated voltage, and as soon as the terminal is disconnected from ground, the output will rise to the input voltage. The common terminal is controlled by a transistor that functions as a switch on the terminal. For automatic lighting control, a light dependent resistor (LDR1) is connected to the base of the transistor. This way the voltage regulator can automatically operate the bulb depending on the ambient light.
To derive circuit power, the 50 Hz, 230 V AC power supply is step down by transformer X1 to provide a secondary output of 12 V, 250 mA. The secondary output of the transformer is fed to a bridge rectifier consisting of diodes D1 to D4, filtered by capacitor C1 and sent to the input of the regulator (IC1). The common pole (pin 2) of IC1 is connected to the ground wire of the circuit through Transistor BC557 (T1). The transistor is biased by R2, R3, VR1 and LDR1. The grounding of IC1 is controlled by transistor T1, while LDR1 detects light. Using the VR1 preset, you can adjust the light detection level of the T1 transistor.
The output of IC1 is sent to the base of transistor T2 (through resistor R4 and Zener diode ZD1) and relay RL1. LED1 is connected to the positive power supply line and ground acts as a power-on indicator. Normally, the resistance of LDR1 is low during the day and high at night. During the day, when light hits LDR1, the pnp transistor T1 conducts electricity. The common terminal of IC1 connects to ground and IC1 outputs 6V. As a result transistor T2 doesn't conduct and the relay still loses power. The bulb remains off because the connection to the mains is not broken through the relay contacts.
At night, when no light hits LDR1, it creates a high resistance at the base junction of transistor T1. As a result, the bias is greatly reduced and T1 does not conduct electricity. This will, in effect, remove IC1's common pole from ground and switch all DC inputs to outputs. Transistor T2 conducts electricity and the relay supplies power to light the bulb when the power connection through the relay contacts is disconnected. Since LDR1 is in parallel with the combination VR1+R3, it only applies half of the total resistance of the network formed by R3, VR1 and LDR1 to the junction at T1 in complete darkness.
In bright light, it greatly reduces the total effective resistance at the junction. This circuit is simple and can be assembled on a small general purpose PCB. Use heatsink for IC1. Make sure LDR1 and bulb are clearly separated. This circuit can be used for street lights, tube lights or any other household electrical lighting system that needs to be automated.