This circuit automatically turns on a night lamp when the bedroom light is off. The lamp stays on until the light sensor detects daylight in the morning. A super bright white LED is used as the night lamp. It gives bright and fresh light in the room. When the sensor detects daylight in the morning, a melodious morning alarm sounds.
The circuit is powered from a standard 0-9V transformer. The diodes D1 to D4 rectify alternating voltage and the resulting DC voltage is smoothed with C1. The regulator IC 7806 supplies 6 V DC current to the circuit. A battery backup is provided to power the circuit when the mains fails. When the network is available, the 9V rechargeable battery is charged through diode D5 and resistor R1 with a reasonably constant current. In case of power failure, the battery automatically charges the load without delay. The D5 diode prevents the battery from discharging backwards after the mains failure and the D6 diode provides the current path from the battery.
The circuit uses light-dependent resistors (LDRs) to detect darkness and light in the room. The LDR resistance is very high in the dark, which is minimized when the LDR is fully illuminated. LDR1 detects darkness, while LDR2 detects light in the morning.
The circuit is designed around the popular timer IC NE555 (IC2), which is configured as monostable. IC2 is activated by a low pulse applied to its trigger 2. Once activated, the output pin 3 of IC2 goes high and remains in that position until IC2 is activated again in its pin 2. When LDR1 is illuminated with ambient light In the room, its resistance remains low, which keeps trigger 2 of IC2 at a positive potential. As a result, output pin 3 of IC2 goes down and the white LED remains off. As the illumination of the sensitive window of LDR1 is reduced, the resistance of the device increases.
In total darkness, the specified LDR has a resistance greater than 280 kilo-ohms. As the LDR1 resistance increases, a short pulse is applied to the activation pin 2 of IC2 through resistor R2 (150 kilo-ohms). This activates the monostable and its output goes high, causing the white LED to glow.