LDR1 acts as a light-dependent switch to turn on the lamp (LED2 through LED7) when the ambient light in the room drops below the preset level. Transistors T1 and T2 (BC547) are used to switch on the lamp. The base of transistor T1 is connected to the voltage divider comprising LDR1 and preset VR1.
When light in the room is sufficient, the resistance of LDR1 is low. This results in a high voltage at the base of T1, driving it into saturation. When transistor T1 conducts, transistor T2 is cut off. This disconnects the power supply to all the white LEDs (LED2 through LED7). LED1 (green LED) glows as it is forward-biased, indicating the standby mode.
When it is dark, or the ambient light in the room is lesser than the pre-determined level set by VR1, transistor T1 is cut off and T2 conducts. All the white LEDs glow with sufficient brightness as these are connected to the power supply through series dropper resistors R2 through R7. These resistors are used to limit the current through white LEDs to a safe level.
White LEDs are arranged in parallel as each white LED requires a minimum of 2V. Preset VR2 is used to set the base voltage of transistor T2. Adjust preset VR2 until the white LEDs turn off in the preset light intensity level during the day.
Assemble the circuit on a general-purpose PCB and enclose in a suitable case. Power to the circuit is obtained from the USB socket using a USB cable. You can use an old USB cable for the purpose. Cut the ends of the USB cable to get the red and black wires for positive and negative supplies of the circuit. Cut the green and white wires of the USB cable and solder the red and black wires to the PCB. Use the USB plug at the other end to draw power from the USB socket. Fix the unit near the keyboard so you can see the key buttons easily.
For more exciting circuit articles: click here