Skip to main content

How to Make a Simple LED Automatic Day/Night Lamp

In this post we learn how to make a transformerless automatic day night 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 AND THEREFORE IS LETHAL, IF TOUCHED IN POWERED ON CONDITION WITHOUT A PROPER ENCLOSURE.

tramsformerless darkness triggered automatic LED lamp

Modifying the Above Design for Activating a 220V Lamp with a Triac

day night switch with triac circuit solid state


The above triac based design can be further improved by using an opamp controller for achieving a cleaner switching action of the lamp, as shown below:

opamp amp controlled darkness detector lamp circuit



Need Help? Please leave a comment, I'll get back soon with a reply!




Comments

  1. What is mov spare this circuit

    ReplyDelete
  2. it's a current surge suppressor.

    ReplyDelete
  3. sorry sir! I don't understand about 2 transistor? can you tell me about the value or name of them?

    ReplyDelete
  4. sir can we implement automatic alarm in this circuit?if can please help me

    ReplyDelete
  5. sir can i implement automatic alarm in this circuit???? if can please help me...

    ReplyDelete
  6. pousia, please explain your requirement more elaborately, what do you want the alarm to warn you about?

    ReplyDelete
  7. can i use 8 1-watt led in this circuit

    ReplyDelete
  8. No, 1 watt leds will not illuminate brightly.

    ReplyDelete
  9. 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?

    ReplyDelete
  10. 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

    ReplyDelete
  11. hi wat is the watts of resistors
    kindly help
    dr yudhvir singh
    yudhvir0039@gmail.com

    ReplyDelete
  12. 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

    ReplyDelete
  13. 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.

    ReplyDelete
  14. Dear Anish,

    All resistors are 1/4 watt rated, preset is normal type.

    ReplyDelete
  15. 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?

    ReplyDelete
  16. Alex, you can use the same circuit, just use three LEDs on each string and a 150 ohm resistor.

    ReplyDelete
  17. 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.

    ReplyDelete
  18. 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

    ReplyDelete
  19. 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://homemade-circuits.com/2015/01/calculating-capacitor-current-in.html

    ReplyDelete
  20. Sir mov ki koi value hoti hay kia ya 1 hi value ka hota hay?

    ReplyDelete
  21. 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

    ReplyDelete
  22. Sir what is 10 k present? And what is 2k7?

    ReplyDelete
  23. it's a 10k preset or 10k variable resistor.

    2k7 is 2.7k resistor

    ReplyDelete
  24. Sir mov meri taraf available nahi hay is ki jaga koi or component laga saktay hain like zener diode?

    ReplyDelete
  25. 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.

    ReplyDelete
  26. What is the value of ntc? Where i can place ntc in diagram?

    ReplyDelete
  27. you can use a 300V NTC and replace it with the 10 ohm/1watt resistor

    ReplyDelete
  28. Sir jb ntc laga dain ge tu mov ki zarurat nahi hay?

    ReplyDelete
  29. yes that's right, no need of putting both.

    ReplyDelete
  30. 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://homemade-circuits.com/2013/02/using-ntc-resistor-as-surge-suppressor.html

    ReplyDelete
  31. 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..

    ReplyDelete
  32. 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.

    ReplyDelete
  33. 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?

    ReplyDelete
  34. OK great, thanks for updating the info...

    ReplyDelete
  35. 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?

    ReplyDelete
  36. 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

    ReplyDelete
  37. 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

    ReplyDelete
  38. Sir zener diode ko kis position me lagana hay bridge k baad?

    ReplyDelete
  39. Syed, the black band side terminal will connect with the positive rail, and the other with the negative rail

    ReplyDelete
  40. Thanks sir thank u very much you are great person

    ReplyDelete
  41. thanks Syed, the pleasure is all mine!

    ReplyDelete
  42. Sir mene ye circuit banaya hay laikin led tk charge nahi aaraha?

    ReplyDelete
  43. 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

    ReplyDelete
  44. I want a circuit that flashes mounted on a tall red LED lamp 10 LEDs 220VAC. THANK you

    ReplyDelete
  45. Sir what is the power consumption of this circuit in watts?

    ReplyDelete
  46. if it's red LED 5mm then 80mA is correct

    ReplyDelete
  47. multiply its current by 4 to get the total current consumption

    ReplyDelete
  48. 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 .

    ReplyDelete
  49. Gurmel, you can try 200K, but I think it won't be as responsive as a 10K preset.

    ReplyDelete
  50. 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?

    ReplyDelete
  51. 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

    ReplyDelete
  52. 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 ?

    ReplyDelete
  53. 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

    ReplyDelete
  54. 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

    ReplyDelete
  55. 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....

    ReplyDelete
  56. 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?

    ReplyDelete
  57. 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.

    ReplyDelete
  58. 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?

    ReplyDelete
  59. Gurmel, you can probably use a TDA7052 IC circuit or any similar circuit for the amplification.

    ReplyDelete
  60. 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.

    ReplyDelete
  61. Just add a 100uF/25V capacitor across the base/emitter of the right side BC547. Your problem will be solved

    ReplyDelete
  62. correction: add the capacitor between its base and ground line, not emitter

    ReplyDelete
  63. Is this electrolyte capacitor?
    The capacitor one end will be connected with bc 547 base and other end will gate of bt136?

    ReplyDelete
  64. 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.

    ReplyDelete
  65. 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.

    ReplyDelete
  66. capacitor positive pin should go to the base, and negative pin to the negative supply line.

    ReplyDelete
  67. 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.

    ReplyDelete
  68. I will make the exact same circuit and show you how to do it soon...

    ReplyDelete
  69. 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

    ReplyDelete
  70. Hi did u develop better circuit for overcome flicking issue of lamp?

    ReplyDelete
  71. 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

    ReplyDelete
  72. May I use Ic 555 as an alternative of Ic 741? In my location Ic 741 is not available now.

    ReplyDelete
  73. 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.

    ReplyDelete
  74. May I use LM358 IC as an alternative of Ic 741 in 3rd circuit diagram? If yes what will be the pin configuration?

    ReplyDelete
  75. 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.

    ReplyDelete
  76. 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.

    ReplyDelete
  77. There is no 555ic circuit diagram. Please share it.

    ReplyDelete
  78. 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.

    ReplyDelete

Post a Comment