This transformerless solid-state automatic night lamp operates without using bulky transformer, and automatically switches ON some LEDs during night, and switches them OFF during day.
In this post I have explained how to make a transformerless automatic darkness activated LED lamp circuit, using a couple of transistors and capacitive based power supply, eliminating the use of any bulky transformer.
Compact Transformerless Design
Although the concept may look pretty familiar and common, the main feature of the circuit is its low current consumption and compactness.
The power supply used here is a capacitive type, thus no transformer is incorporated making the circuit very compact and fixable in any small corner of the particular premise.
Why use LEDs
The use of LEDs in place of a filament bulb makes the application very power economic and efficient.
The proposed LED automatic day night lamp switch circuit diagram shows red LED being used, however white LEDs would suit the application better, as that would help illuminate the area better than the red LEDs.
How to Install the LDR
The LDR must be positioned such that the light from the LED does not fall on it, only the ambient light which is to be sensed is required to reach the LDR.
How the Entire Circuit Works
The proposed transformerless automatic day night LED lamp circuit may be understood through the following points:
The input 220 V mains suply is applied across the 10 Ohm resistor and the other neutral point.
The 10 Ohms resistor helps to cancel out the initial surge or the voltage rush that might otherwise be potentially harmful to the further stages of the circuit.
The MOV or the varistor placed after the 10 Ohm resistor enhances the protection feature of the unit and grounds all surges that might sneak in after the 10 Ohm resistor.
The capacitor drops the mains voltage current to lower levels and the bridge rectifier made up the four diodes rectify the voltage to DC.
The 1000uF capacitor filters the rectified voltage and the smooth DC is applied to the control circuit consisting the two transistors.
The first transistor is wired up as a comparator, which compares the potential difference across the variable resistor and conducts when the voltage across it rises to saturation levels.
The above rise in the voltage level takes place when the relevant magnitude of light falls on the LDR surface.
Once the resistance of the LDR falls below the set threshold due to higher ambient light, the transistor conducts.
The collector of the above transistor instantly grounds the base of the next transistor and switches it OFF.
The associated LED lights connected to the collector of the second transistor are also immediately switched OFF.
The opposite reaction takes place when the light over the LDR falls below the set threshold, probably during dusk when the sun sets.
The LEDs light up again and remain switched ON until the day beaks and the ambient light over the LDR reaches the set high threshold level.
The following figure shows a simple LED automatic day, night lamp circuit.
WARNING: THE CIRCUIT IS NOT ISOLATED FROM MAINS AC AND THEREFORE IS LETHAL, IF TOUCHED IN POWERED ON CONDITION WITHOUT A PROPER ENCLOSURE. YOU ARE RECOMMENDED TO EXERCISE EXTREME CAUTION WHILE HANDLING THIS CIRCUIT.
Parts List
- Resistors are 1/4 watt, 55 CFR unless specified.
- 10 Ω 1 watt = 1
- 1 MΩ = 1
- 1 kΩ = 2
- 330 Ω = 4
- 2.7 kΩ = 1
- 10 k preset = 1
- LDR any standard = 1
- Capacitors
- PPC 0.22 µF / 400 V = 1
- Electrolytic 1000 µF / 50 V
- 12 V zener diode 1 watt (to be connected parallel to the above 1000 µF capacitor) = 1
- Diode 1N4007 = 4
- LEDs white high bright 20 mA, 5 mm = 20
- Transistors BC547 = 2
- 300 V MOV (optional) = 1
Modifying the Above Design for Activating a 220V Lamp with a Triac
Parts List
- Resistors are 1/4 watt, 55 CFR unless specified.
- 10 Ω 1 watt = 1
- 1 MΩ = 1
- 1 kΩ = 2
- 330 Ω = 4
- 2.7 kΩ = 1
- 10 k preset = 1
- LDR any standard = 1
- Capacitors
- PPC 0.33 µF / 400 V = 1
- Electrolytic 1000 µF / 50 V
- 12 V zener diode 1 watt (to be connected parallel to the above 1000 µF capacitor) = 1
- Diode 1N4007 = 1
- Triac BT136 = 1
- Transistors BC547 = 2
- 300 V MOV (optional) = 1
The above triac based design can be further improved by using an opamp controller for achieving a cleaner automatic switching action of the lamp during darkness, as shown below:
Abu Saeed says
I have developed the last one circuit but the response is poor than 2nd one. Last one circuit is sensing 18w AC LED bulb brightness as a dark state!!! Ambient light sensor capability is Worst.
Swagatam says
Nothing is “worst” in electronics. You will get the response as per your circuit settings and adjustments. In schematic you can only get the general view not the exact view of the design. A circuit will need to be tweaked and fine-tuned to make it work accurately.
The last 555 circuit has been tested by me thoroughly and it works superbly.
Abu Saeed says
There is no 555ic circuit diagram. Please share it.
Swagatam says
I have already provided it to you in one of my earlier comments, i thought you were referring to that circuit, by the way IC 741 will also work great, it a is a simple comparator design, the LDR quality should be good, having a resistance less than 30 k at ambient light.
Abu Saeed says
Hi did u develop better circuit for overcome flicking issue of lamp?
Swagatam says
Hi, you can the refer the last updated diagram in the above article.
First try it with a 12V AC/DC adapter, once confirmed then you can replace it with a caapcitive power supply
Abu Saeed says
May I use Ic 555 as an alternative of Ic 741? In my location Ic 741 is not available now.
Swagatam says
you can try the last circuit from the following article
https://www.homemade-circuits.com/how-to-make-light-activated-day-night/
you can remoev the relay and configure pin#3 directly with the triac gate, no need of any transistor.
Abu Saeed says
May I use LM358 IC as an alternative of Ic 741 in 3rd circuit diagram? If yes what will be the pin configuration?
Swagatam says
yes you can!
Abu Saeed says
I have developed ur 2nd one circuit successfully but one problem is exists. That is in the mid point of light and dark my 18w AC LED bulb is continuously flicking. I have tried to set tripping point by 10k potentiometer but problem is not solved. In case of full sun light bulb off nicely. Please give me any solution of it.
Swagatam says
Just add a 100uF/25V capacitor across the base/emitter of the right side BC547. Your problem will be solved
Swagatam says
correction: add the capacitor between its base and ground line, not emitter
Abu Saeed says
Is this electrolyte capacitor?
The capacitor one end will be connected with bc 547 base and other end will gate of bt136?
Swagatam says
capacitor positive pin should go to the base, and negative pin to the negative supply line.
Abu Saeed says
I just add 100uf/25v electrolyte capacitor one end in the base of the right side of bc 547 transistor and other end connect in the negative of 1000uf/25v capacitor. But the Lamp flickering problem is not solved. Pls solve the issue.
Swagatam says
Increase the value 1K at the base of the same transistor to 22K or 33K, simultaneously you can also try increasing the 100uF to 220uF or 470uF…make sure the lamp light does not reach the LDR, otherwise the lamp will keep flickering forever.
Abu Saeed says
After implements of 33k the lamp didn’t off. I have tried all way which u said but lamp flicking not solved. Please try to remodel ur circuit diagram with cool brain.
Swagatam says
I will make the exact same circuit and show you how to do it soon…
Swagatam says
By the way the lamp will flicker a bit during twilight with a triac, because it is simple transistor based circuit, you may have to use a relay based circuit or a IC 555 based circuit, to get a perfect ON/OFF switching
gurmel says
yes i did it allready
connected a diode across relay .
sir i have a off topic Q . can we increase volume of earpiece of nokia 225.
it has very low volume output for calls .
is there any small circuit to use for this purpose?
Swagatam says
Gurmel, you can probably use a TDA7052 IC circuit or any similar circuit for the amplification.
Gurmel singh says
sir is there any alternative to 10 k preset because i dont have it but i have 10 k resistor and 200k vari pot. please suggest me .
Swagatam says
Gurmel, you can try 200K, but I think it won't be as responsive as a 10K preset.
Gurmel singh says
okk
sir can u tell me wht is use of preset
Q1. is it used for dividing resistance between ldr and ground and givings commen point to base of bc547.
Q2. can i connect ldr's lower terminal directly to base through 1k R and also commen point of ldr and 1k Resistor,connect to ground through 10k variable Resistor.?
Q3. i m using 6v or 12v relay does i need current limiting resistance to prevent excessive current flow and heat through 2nd bc547 if yes than wht will be rating of R to be used?
Swagatam says
1) yes 10k preset is used as a potential to set the tripping moment of the LEd at the preferred time of evening
2) no that will not be good and cause very early tripping of the leds because LDR resistance is much higher than 10K, but 220K preset may work
3) relay will not with the shown 0.22uF capacitor, you may have to use a 105/400V cap instead…and use only 12V 400 ohm relay with this, 6V will not work.
you can replace 1K with 10K for the second BC547 if a relay and 105/400V are used.
and make sure to use a 15V 1 watt zener after the bridge
Gurmel singh says
sir i built circuit according to your systematic provided and use 12v relay . circuit working fine but it have one issue that when sun goes down in evning than for fraction of 1min my output 20watt led bulb flicker due to constant triping of relay for around 10sec .i think this problem causes due to slowly decreasing or increasing brightness of
outdoor environment.
and this problam can damage my led bulb .
so do u have any solution for it ?
Swagatam says
Hi Gurmel, you are right, it's due to the slow transition which causes the problem, and the remedy is simply to add a 10uF or a 22uF or a 100uF capacitor between base/ground of the second transistor which is driving with the relay, this will effectively take care of the issue
gurmel says
does sudden discharge of capecitor,damge the 2nd transistor .bcoz capacitor discharge at high current i think.does i need current limiting resistor in between capacitor and 2nd transitior ?
plz clarify about how capacitor discharge and behave with ac or dc charging… it will help me alot
Swagatam says
gurmel, the relay coil must have a freewheeling diode otherwise the associated transistor will instantly get damaged, the base capacitor will not damage the transistor….
gurmel says
according to you connect capacitor in base and ground of 2nd bc547 but i think to i need to connect diode in between 1k R and joining point of base and capacitor ie. ,base of 2nd bc547. bcoz when capacitor will discharge when darkness occur than that charge can go through 1st bc547 and it can be damaged by discharge of capacitor if we didn’t connect the diode in between 1k R and joning point of 2nd bc547 base and capacitor.
wht do u think about it?
Swagatam says
you must connect diode across the relay coil, did you do that? otherwise the driver BC547 will quickly get damaged…the base capacitor will not effect at all, not to worry about it.
Syed Ameer Hamza Askari says
My led is blue
Swagatam says
multiply its current by 4 to get the total current consumption
Syed Ameer Hamza Askari says
Sir what is the power consumption of this circuit in watts?
Swagatam says
equal to LED consumption
Syed Ameer Hamza Askari says
Means 80 mili amps?
Swagatam says
what is your LED specs?
Swagatam says
if it's red LED 5mm then 80mA is correct
Syed Ameer Hamza Askari says
Sir mene ye circuit banaya hay laikin led tk charge nahi aaraha?
Swagatam says
Syed, the leds will illuminate only when the LDR is in full darkness, if there's even slightest bit of light on the LDR then the LED will not illuminate
Syed Ameer Hamza Askari says
Thanks sir thank u very much you are great person
Swagatam says
thanks Syed, the pleasure is all mine!
werechai1 I like DIY. says
I want a circuit that flashes mounted on a tall red LED lamp 10 LEDs 220VAC. THANK you
Syed Ameer Hamza Askari says
Sir zener diode ko kis position me lagana hay bridge k baad?
Swagatam says
Syed, the black band side terminal will connect with the positive rail, and the other with the negative rail
Syed Ameer Hamza Askari says
Sir mene ye circuit banaya hay laikin 2.7k resistor bohot hot ho raha hay or smell bhi aarahi hay koi problem tu nahi hay?
Swagatam says
Syed, which capacitor did you use at the input?
0.22uF would not burn a 2k7 resistor
try using a 15V 1 watt zener across the bridge output
Syed Ameer Hamza Askari says
I am using 474/400v capacitor
Syed Ameer Hamza Askari says
Is 15v zener diode compulsory?
Swagatam says
15V zener will help to keep everything under control and will not heat any parts unnecessarily
474 is OK but 0.22uF will be better as it will generate less current and keep things cooler.
10k preset is for setting the LED ON/OFF threshold
bimo Sugianto says
I've check it again, I've missed to place the 1K resistor on the base, And it work fine just getting warm. Thank you for the circuits.
Swagatam says
OK great, thanks for updating the info…
bimo Sugianto says
I'made the circuit with several improvement. Am using 105uf mains dropper cap. I add 39V MoV between + and – of the bridge.am using 2caps (1,8uf & 2.2uf all 400V)at the same point of MOV. Am using 2 string with 12LED on each.
My question is the LED gets extremely hot when the day come and mulfunctioning occure, why is that happen..? Any suggestion to repair this.? Thank you..
Swagatam says
How can the LEDs get hot during day, because during day time current is supposed to drop for the LEDs….do you mean to say the transistor which is driving the LEDs gets hot??
Please clarify?
Syed Ameer Hamza Askari says
Sir mov meri taraf available nahi hay is ki jaga koi or component laga saktay hain like zener diode?
Swagatam says
you can use an NTC or you can use a coil wound over an iron bolt or screw using any thin (0.3mm) copper wire with 200 turns, and insert this coil between the bridge positive and the LDR.
the wire must be a super enameled type copper wire which are used in transformers.
Syed Ameer Hamza Askari says
What is the value of ntc? Where i can place ntc in diagram?
Swagatam says
you can use a 300V NTC and replace it with the 10 ohm/1watt resistor
Syed Ameer Hamza Askari says
Sir jb ntc laga dain ge tu mov ki zarurat nahi hay?
Swagatam says
yes that's right, no need of putting both.
Syed Ameer Hamza Askari says
Thanks Sir
Syed Ameer Hamza Askari says
Sir 300v k ntc ka koi code hay?
Swagatam says
Syed, actually MOVs are identified with their max voltage rating while NTCS are specified with resistance value at normal temperature.
In your case a 5 ohm NTC would be fine.
you can use the one that's explained in the following article:
https://www.homemade-circuits.com/2013/02/using-ntc-resistor-as-surge-suppressor.html
Syed Ameer Hamza Askari says
Sir what is 10 k present? And what is 2k7?
Swagatam says
it's a 10k preset or 10k variable resistor.
2k7 is 2.7k resistor
Syed Ameer Hamza Askari says
Why 10k preset is used?
Syed Ameer Hamza Askari says
Sir mov ki koi value hoti hay kia ya 1 hi value ka hota hay?
Swagatam says
it's identified by its clamping voltage value, or the voltage at which it is supposed to activate and conduct
for 220V mains it should be around 300V
Swagatam says
the capacitor value is not important, anything above 1000uF will do the job…but higher values will give better ripple correction.
0.22uF ill work only with one channel of LEDs, but for 4 channels as give in the diagram , you might need 1uF/400V
more info can be studied here:
https://www.homemade-circuits.com/2015/01/calculating-capacitor-current-in.html
Unknown says
Sir, what if i want to use 12v battery or 12v ac/dc adapter what should i remove? and how many LED arrays can i add?
Swagatam says
Alex, you can use the same circuit, just use three LEDs on each string and a 150 ohm resistor.
Anish says
Dear Sir, I'm a computer engg and interested in Electronic circuits. Im refering your blogs, thanks for such elaborated comments. You are explaining and teaching us.
From your comment, i have changed the Capacitors 25V1000uF to 50v1000uF & 105/400V to 474/400V.
Could you pls tell "the watts of 1M Resistor", "whats 2K7 Resistor", "10K preset".
Awaiting your feedback, thanks.
Swagatam says
Dear Anish,
All resistors are 1/4 watt rated, preset is normal type.
cpj says
hi wat is the watts of resistors
kindly help
dr yudhvir singh
yudhvir0039@gmail.com
Swagatam says
all are 1/4 watt rated except the 10 ohms, please use a 0.47/400V instead of the shown105/400V at the input for a reduced safe current
Riccardo Moretti says
Hi,
I built the circuit and it works,
however I think I have something wrong, the 25v cap gets very hot and if i measure the voltage out of the bridge rectifier it's 46V, whilst the leds are off, when when the leds are on measures 21 V should this be changed to at least a 50V cap?
Swagatam says
Hi, yes that's right use a 50V rated capacitor and also try reducing the 105/400V cap to 474/400V for keeping things cooler and safer
John Lam says
Here is an interesting scenario.
Suppose 1uF is used for the current-limiting capacitor, with 220V mains, the maximum current the circuit can supply is roughly 69mA. There are four LED strings, each connected to a 330Ω resistor. As measured by Riccardo, the voltage drop is 21V. Ignoring the voltage drop across the rectifier, the voltage at the input side or across the 1uF capacitor is (220V – 21V) = 199V. This means the current that can be supplied by the circuit when the LEDs are ON has been reduced to 199V / 3.183kΩ (reactance of the 1uF capacitance) = 62.52mA; meaning 15.63mA will flow through each LED string. Voltage drop across the 330Ω resistor is I x R = 5.16V, plus the 15V across the 5 LEDs, the total voltage drop is 20-21V that matches the measurement of Riccardo. Ignoring the minute power consumed by the transistor portion, total power consumption by the four LED strings = (21 x 62.52)mW = 1.31W.
When the LEDs are in OFF state, the measurement from Riccardo is 46V. That means the current supplied by the circuit is (220V – 46V) / 3.183kΩ = 54.67mA. This translates into a power consumption of (46 x 54.67)mW = 2.51W.
If Riccardo's measurements and my calculations are both correct, that means the power consumed when the LEDs are OFF is actually twice as much as when they are ON.
The purpose of an automatic night-light is to save power in addition to its automatic feature. Using a capacitive transformerless power supply does not gain both edges.
Swagatam says
thanks, yes that's why a 0.22uF is used in the present design…
capacitive power supplies become very efficient if the load voltage spec is selected to match the output of the power supply
bhargav says
can i use 8 1-watt led in this circuit
Swagatam says
No, 1 watt leds will not illuminate brightly.
manhcuong says
sorry sir! I don't understand about 2 transistor? can you tell me about the value or name of them?
Swagatam says
those are BC547
pousia. s says
sir can we implement automatic alarm in this circuit?if can please help me
pousia. s says
sir can i implement automatic alarm in this circuit???? if can please help me…
Swagatam says
pousia, please explain your requirement more elaborately, what do you want the alarm to warn you about?
arun kumar says
What is mov spare this circuit
Swagatam says
it's a current surge suppressor.