Here we describe a very simple, economical and light-weight automatic nightlight that runs on 230V AC mains and can be used as a deluxe gizmo in the sleeping room of your kids. The arrangement proposed by the author is shown in Fig. 1.
Circuit and working of Little Nightlight
Circuit diagram for the nightlight is shown in Fig. 2. It is built around three resistors (R1 through R3), two light-emitting diodes (LED1 and LED2), a light-dependent resistor (LDR1), a BC548 transistor (T1) and a capacitor (C1). Here LED1 is blue and LED2 is RGB with rainbow effect.
The circuit operates off 230V AC, consuming very little current. The generic 5mm LDR drives the rainbow LED (LED2) through npn transistor T1. Series resistor R3 (150-ohm) limits the current through LED2. The sensor circuit ensures that the rainbow light switches on when it gets dark and off when there is ambient light. If desired, you can change its detection threshold by varying the value of 47-kilo-ohm resistor R2.
Resistor R1 (100-kilo-ohm), 1N4007 diode D1, and 4.7µF, 16V electrolytic capacitor C1 are used to down-convert the 230V AC input supply to a very low-value DC supply. The 5mm blue LED (LED1) not only works as an always-on pilot lamp but also keeps the voltage across buffer capacitor C1 close to around 3V. When the circuit is in active state (that is, in darkness), LED1 also produces a waving effect in tune with the current consumption of the entire circuitry.
The rainbow LED is a low-cost flashing LED with inbuilt driver chip. When power is applied, it flashes red, blue and green colours each for several seconds, then it slowly mixes these colours together to form other colours. Fig. 3 shows the author’s lab experiments.
Construction and testing
An actual-size PCB layout for the little nightlight is shown in Fig. 4 and its components layout in Fig. 5. After assembling the circuit, enclose it in a suitable box.
Download PCB and component layout PDFs: click here
Fix CON1 so that you can connect 230V AC easily. Connect LDR1 such that light from LED1 and LED2 doesn’t fall on it. After proper assembly and connections, your little nightlight circuit is ready to use. Proposed enclosure is shown in Fig. 6.
It’s a good one
What modifications should I do if I want to make use of regular bulb(100w) instead of LEDs
@ Rakesh K R This circuit will switch on the Led while the room light is off and switch off while room light on . If you connect 100 w bulb in the place of LED then it is better not to switch off the room light i hope u understood . And still you searching to connect 100 W bulb, i will help. see BC 547 has some voltage limitations . CE voltage should not exceed 30V so you cannot conect 100W bulb their directly it is better to use optocoupler / relay to drive the load
hi, from where i can get Rainbow LED? Can you pls. help me by sharing any link or contact no. ?
Here is the reply from author T.K. Hareendran: “I bought those LEDs from Banggood (https://www.banggood.in/300Pcs-F5-5mm-Slow-Flash-RGB-Rainbow-Multi-Color-Light-Emitting-Diode-Round-LED-Full-Color-p-1435954.html)”
What is CON1?
CON1 is 2-pin connector for 230V AC mains
What happened if the blue led removed or damaged?