Zero Crossing Transformerless Power Supply

The post explains the importance of a zero crossing detection in capacitive transformerless power supplies in order to make it completely safe from the mains switch ON inrush surge currents. The idea was proposed by Mr. Francis.

Technical Specifications

I have been reading about the transformer less power supply articles on your site with great interest and if I am understanding correctly the main problem is the possible in-rush current in the circuit upon switching-on, and this is caused because switching-on does not always occur when the cycle is at zero volts (zero crossing).

I am a novice in electronics and my knowledge and practical experience are very limited, but if the problem can be solved if zero crossing is implemented why not use a zero crossing component to control it such as an Optotriac with zero crossing.

The input side of the Optotriac is low power therefore a low power resistor can be used to lower the mains voltage for Optotiac operation. Therefore no capacitor is used at the Optotriac’s input. The capacitor is connected on the output side which will be switched on by the TRIAC which turns on at zero crossing.

If this is applicable it will also solve high current requirement problems, since the Optotriac in turn can operate another higher current and/or voltage TRIAC without any difficulty. The DC circuit connected to the capacitor should no longer have the in-rush current problem.

It would be nice to know your practical opinion and thank you for reading my mail.


The Design

As rightly pointed out in the above suggestion, an AC input without a zero crossing control can be a major cause of a surge current inrush in capacitive transformerless power supplies.

Today with the advent of sophisticated triac driver opto-isolators, switching an AC mains with zero crossing control is no longer a complex affair, and can be simply implemented using these units.

About MOCxxxx Opto-couplers

The MOC series triac drivers come in the form of optocouplers and are specialists in this regard and can be used with any triac for controlling AC mains through a zero crossing detection and control.

The MOC series triac drivers include MOC3041, MOC3042, MOC3043 etc all these are almost identical with their performance characteristics with only minor differences with their voltage spces, and any of these can be used for the proposed surge control application in capacitive power supplies.

The zero crossing detection and execution are all internally processed in these opto driver units and one has to only configure the power triac with it for witnessing the intended zero crossing controlled firing of the integrated triac circuit.

Before investigating the surge free triac transformerless power supply circuit using a zero crossing control concept let's first understand briefly regarding what's a zero crossing and its involved features.

What is Zero Crossing in AC Mains

We know that an AC mains potential is composed of voltage cycles which rise and fall with changing polarity from zero to maximum and vice versa across the given scale. For example in our 220V mains AC, the voltage switches from 0 to +310V peak) and back to zero, then forwarding downwards from 0 to -310V, and back to zero, this goes on continuously 50 times per second constituting a 50 Hz AC cycle.

When the mains voltage is near its instantaneous peak of the cycle, that is near 220V (for a 220V) mains input, it's in the strongest zone in terms of voltage and current, and if a capacitive power supply happens to be switched ON during this instant, the entire 220V can be expected to break through the power supply and the associated vulnerable DC load. The result could be what we normally witness in such power supply units.... that is instant burning of the connected load.

The above consequence may be commonly seen only in capacitive transformerless power supplies because, capacitors have the characteristics of behaving like a short for a fraction of a second when subjected to a supply voltage, after which it gets charged and adjusts to its correct specified output level

Coming back to the mains zero crossing issue, in a converse situation while the mains is nearing or crossing the zero line of its phase cycle, it can be considered to be in its weakest zone in terms of current and voltage, and any gadget switched ON at this instant can be expected to be entirely safe and free from a surge inrush.

Therefore if a capacitive power supply is switched ON in situations when the AC input is passing through its phase zero, we can expect the output from the power supply to be safe and void of a surge current.

How it Works

The circuit shown above utilizes a triac optoisolator driver MOC3041, and is configured in such a way that whenever power is switched ON, it fires and initiates the connected triac only during the first zero crossing of the AC phase, and then keeps the AC switched ON normally for rest of the period until power is switched OFF and switched ON again.

Referring to the figure we can see how the tiny 6-pin MOC 3041 IC is connected with a triac for executing the procedures.

The input to the triac is applied through a high voltage, current limiting capacitor 105/400V, the load can be seen attached to the other end of the supply via a bridge rectifier configuration for achieving a pure DC to the intended load which could an LED.

How Surge Current is Controlled

Whenever power is switched ON, initially the triac stays switched OFF (due to an absence of the gate drive) and so does the load connected to the bridge network.

A feed voltage derived from the output of the 105/400V capacitor reaches the internal IR LED through the pin1/2 of the opto IC. This input is monitored and processed internally with reference to the LED IR light response.... and as soon the fed AC cycle is detected reaching the zero crossing point, an internal switch instantly toggles and fires the triac and keeps the system switched ON for the rest of the period until the unit is switched OFF and ON yet again.

With the above set up, whenever power is switched ON, the MOC opto isolator triac makes sure that the triac is initiated only during that period when the AC mains is crossing the zero line of its phase, which in turn keeps the load perfectly safe and free from the dangerous surge in rush.

Improving the above Design

A comprehensive capacitive power supply circuit having a zero crossing detector, a surge suppressor and voltage regulator is discussed here, the idea was was submitted by Mr. Chamy

Designing an Improved Capacitive Power Supply Circuit with Zero Crossing Detection

Hello Swagatam.

This is my zero crossing, surge protected capacitive power supply design with voltage stabilizer,i will try to list all of my doubts.
(I know this will be expensive for the capacitors,but this is only for testing purposes)

1-I'm not sure if the BT136 haves to be changed for a BTA06 for accommodating more current.

2-The Q1 (TIP31C) can handle only 100V Max. Maybe it should be changed for a 200V 2-3A transistor?,like the 2SC4381.

3-R6 (200R 5W),I know this resistor is pretty small and its my
fault,i actually wanted to put a 1k resistor.But with an 200R 5W
resistor it would work?

4-Some resistors have been changed following your recommendations to make it 110V capable.Maybe the 10K one needs to be smaller?

If you know how to make it work correctly,i will be very happy to correct it.If it works i can make a PCB for it and you could publish it in your page (For free of course).

Thank you for taking the time and viewing my full of faults circuit.

Have a nice day.


Assessing the The Design

Hello Chamy,

your circuit looks OK to me. Here are the answers to your questions:

1) yes BT136 should be replaced with a higher rated triac.
2)TIP31 should be replaced with a Darlington transistor such as TIP142 etc otherwise it might not work properly.
3) when a Darlington is used the base resistor could be high in value, may be a 1K/2 watt resistor would be quite OK.
However the design by itself looks like an overkill, a much simpler version can be seen below



Zero Crossing Circuit

Need Help? Please send your queries through Comments for quick replies!


Swagatam said…
Thanks a lot dear June1969,

If time permits I'll surely want to try out the circuit myself, although I am quite positive as far as its working is concerned.

Putting date on a diagram is a valid suggestion if the diagram is an updated one in response to a viewers suggestion, otherwise the article post itself could be referred for the time stamp record.
Swagatam said…
....the night lite that you are referring to is an extremely crude version of a capacitive transformerless power supply, it might be escaping from damage because of a relatively smaller input capacitor and a higher resistor value with regards to the LED wattage.

you can use the following design for making it:

replace C1 with a 0.22uF/250V cap, remove the zener diode, and connect a 5mm LED at the output for the desired results
Francis said…

Thank you so much for taking the time and effort to produce and publish a circuit with a good and detailed explanation from the suggestion I put forward. I have read the article with great interest. If allowed following are my personal novice opinions and views on possible further improvements to the presented circuit.

Point 1 - The object of my suggestion was to eliminate the possibility of any inrush or surge currents form the circuit. As presented and from my little knowledge I see that the input of the Optocoupler (pin 1) is being taken from the 105/400V (1µF 400V) Capacitor output. I would say that any inrush or surge currents can destroy the Optocoupler. As I see it the DC load will be protected from inrush and surge currents but the optocoupler input is not.

Would it not be best to eliminate this possibility and have Pin 1 connected before the 105/400V Capacitor (ie directly across the 230V? I would also prefer to have the Diode across the input of the optocoupler (pins 1 & 2) instead of in series with the input and the limiting resistor connected in series to the Hot terminal and not to the Neutral (that’s only my personal opinion).

Point 2 - I agree the MOC series of Triac Optocouplers have good specifications but my idea was to have a low power input control. What do I mean to say. Well the input of the MOC series varies between 5mA and 60mA (max), therefore the input limiting resistor of the optocoupler needs to be of 1W or more, (5mA at 230V require 1.15W while 15mA require 3.45W resistor). Although slightly more expensive I would look at lower input requirements such as the BRT22F 1.2mA (1.2mA at 230V require 0.276W resistor) and the IL4116 1.3mA (1.3mA at 230V require 0.299W resistor), both optocouplers have high input sensitivity and have zero crossing Triac output which can easily handle 230VAC.

Point 3 - Further more the LR645 (3 terminal type Linear Regulator) can be used with the BRT22F and the IL4116 optocouplers instead of the limiting resistor. The LR645 (3 terminal type Linear Regulator) gives 5V at 3mA which is more then the optocouplers requirements. A small resistor will be required to reduce the 5V to the required input voltage of the optocoupler, and here instead of a 1W or more resistor a 1/4W resistor can be used. The Diode is always required else the optocoupler will be destroyed. Or maybe a Zener Diode would be better?

The LR645 High to Low Voltage Linear Regulator IC has been reviewed on this site and a circuit with an explanation has been published on 11 March 2012 with the heading “Make this Simplest Transformerless Power Supply Circuit Using IC LR645”

Point 4 - The 39R resistor in the presented circuit has an asterisk (*) next to it what does this asterisk refer to?

What are your comments and obviously expert advice and opinions on the above?

Best Regards,
Swagatam said…
Thank you, Francis, for your keen observation, and opinions. I appreciate it.

As for driving the opto LED is concerned the diagram shows the most favorable option of doing it by connecting it after the 105 capacitor, because the surge is not developed by the capacitor rather it's controlled by the capacitor by dropping the current.

The surge happens only because the capacitor acts like a short at the onset when power is switched ON, but quickly recovers and inhibits the surge within milliseconds.

If the input to the opto is taken directly from the mains would subject the opto with a continuous non-stop surges making the 10k resistor red hot.

In contrast to this the initial few millisecond surge from the capacitor is easily negated by the 10k resistor and after that it's all smooth sailing fro the opto LED.

When it comes to transformerless power supplies folks always want these to be bare simple and yet robust. The above design is on a verge of getting complex, so we wouldn’t want to add anything more than what’s been proposed in the article, otherwise people would rather opt for an SMPS for the same instead of going for this rather inefficient surge free power supply.

Adding the LR645 appears to be a good idea but it may not be required, same applies for the opto coupler brand which is very standard, easily available and suits the purpose perfectly without any complication.

The asterisk beside the 39 ohm resistor suggests replacing it with a larger resistor if the load is highly inductive, which seems to be irrelevant for the proposed transformerless power supply application

Anyway, thanks so much, if you have further question please feel free to update them here.
Wong Trumph said…
Im not sure if earlier comment is published. so I wrote again :)
Hi Swagatam,
Your diagram stated MOC3041M. However, many shops in my area dont sell MOC3041M. Only MOC3041. Any unwanted result between these two?

Swagatam said…
Hi June,

the suffix "M" is not important, if you are getting MOC3041 that would be fine too, you can go ahead with it.
Hausner said…
Hi swagatam, what is the max current this circut will output? In my 5v atmel project I need at least 2 Amps to drive alot of 240v relais.
Swagatam said…
Hi Hausner, for 2amp output you may have to increase the input capacitor value upto 25uF/400V which doesn't look like a reasonable idea, so I think the better idea would be to go for an SMPS based adapter instead of a capacitive PS.
nestico2000 said…
OK. All your posts are 220/230V projects. What about 110/120V - 60Hz? My country(Colombia) works with 120 VAC only. Can I use this design in country? Can you design all your project for both(120VAC & 230VAC)? Thanks. ;)
Swagatam said…
you can use the above circuit with a 110V input also through a couple of minor modifications:

replace the pin6 resistor (360 ohm) with a 180 ohm resistor, and pin4 resistor (330 ohms) with a 1K resistor.

however most of the other circuits will work with both mains inputs without changing in the design
nestico2000 said…
OK. All your designs are cool. Thanks. ;)
Patricia said…
Dearest Swagatam,

I'm assuming that the output of this circuit is more-or-less governed by the Zener Diode near the output. If one used, say, a 5W Zener at a desirable voltage, and upped the power ratings accordingly, could one get, say, 13V @ 375 mA??
Swagatam said…
Dearest Tom, you are correct, it's entirely regulated by the zener diode...and it can be upgraded to 5 watts for accommodating more current from the capacitor.
Rogelio Ruiz said…
Hi, I'm about to try this power source, this is the list of components I am thinking of using:
BT136S-600D for the triac, 1N5349BG for the zener and 105MPR400K for the capacitor and I have a doubt on the other capacitor because I don't know if its on uF or pF. I will use this to power a 3.3v microcontroller and three 5v relays (with their respective regulators). the total power consumption will be about 200/300 mA. Is this setup suitable for this purpose? Thank you very much for your amazing contributions.
Swagatam said…
Hi, I won't recommend this power supply for an MCU based circuit...moreover a 105 cap will not allow more than 70mA may have to increase the value of the cap to higher ranges for achieving 300mA, increasing the stress on the zener diode...definitely not a good idea.

You must go for an SMPS adapter instead which are rather very cheap and safe nowadays.
Odie D.Santos said…
Im Planning to built this zero crossing transformer less Power supply. what will be the modification if i used this to my requirements for 15-17v @250ma. The list of components values is alright for my output requirements.? what is the substitute for BT136?
thanks for your nice blogsite.
Swagatam said…
for 15V or 17V you may replace the shown zener diode with a 15V or a 17V zener diode (1 watt).

rest would be as given, no changes would be required.

BT136 can be replaced with any other equivalent triac which may be rated to handle 400V @ 1amp or as per the load spec requirement.
Odie D.Santos said…
Hi Swagatam,

Thanks for the reply.
In the Present schematic above, how much amps do i get and how to test the amperes output.
Thanking in advance.
Swagatam said…
Hi Odie,
each 105 capacitor will produce around can confirm it by directly connecting your ammeter in the DC 10amp range across the output of the circuit
Odie D.Santos said…
Hi Swagatam,

Ok thanks. but how to increase the amp output? Do i need to Parallel some capacitors?
i need the output amps around to 250-300ma. if possible.
thanks in advance..
Swagatam said…
yes that's right Odie, current can be increased by adding more capacitors in parallel, but that would also increase a lot of stress on the zener...somebody suggested to use an inductor based shunt resistor and use it instead of the zener, that's an impressive idea and can be tried for getting much reliable results
Swagatam said… can try 4nos of 105/400V capacitors for getting 280mA output approx
I have 105j/250v I cant use this for c1?? thanks
Swagatam said…
if your input is 220V then it should be rated at above 300V for better safety
emmantrop said…
Hello sir, please can u give me an idea of "inductor based shunt resistor" circuit diagram on how it will look like. And does work exactly like zener diode.

Swagatam said…
Emmantrop, inductor cannot be used like a resistor or a zener in DC circuits.
emmantrop said…
ok, but please how can I obtain 700MA with help of Zener diode. However, since Zener diode current cant give such current.

Swagatam said…
you can replace the zener with the following concept
nikhiltricks said…
Hi Swagatam,
i want a power supply to run a microcontroller,3 7-segment led display and one relay.
so can i use "Zero Crossing Controlled Surge Free Transformerless Power Supply" to run the circuit.
Swagatam said…
Hi Nikhil, the above design is not isolated from mains, so I won't recommend this for an MCU application, the best option would be to use a cellphone charger unit as the adapter in conjunction with a 7805 IC at the output for the regulation....
nikhiltricks said…
thanks for reply

actually for my application, isolation is not needed and i want to design the product at very low cost, so SMPS circuit is quite costly for me.

also wanted to know, is this circuit capable to drive all the components and does it survive from all the voltage fluctuation and how much is the durability of this circuit.
nikhiltricks said…
one more doubt, if i want 5V output so what changes i have to make in this circuit and what is the maximum current provided by this circuit because here only one 105/400V capacitor is used.
nikhiltricks said…
Hi sir,
i would also like to ask that do you have any blog on SMPS circuit of rating 5V,2Amp?
Swagatam said…
since the above circuit has a zero crossing detection feature it should be able to safeguard the circuit from switch ON surges and the fluctuations

however according to me the following design is even more rugged and foolproof as far as surge inrush control s concerned
Swagatam said…
Nikhil, I think the article titled "12V 1 amp smps" could probably be optimized for delivering the mentioned output V and I, by suitably modifying its secondary winding...
Swagatam said…
..remember all these designs will give you a nasty lethal electric hock if touched anywhere within its layout
Swagatam said…
for 5V just change the 12V zener with a 5V zener
Swagatam said…
Hi, yes it was tested and then dismantled quickly since I wanted to use the same parts for another project.

the zener can be removed if the input capacitor is rated to produce not more than 100mA..may be a 2uF/400V will be enough
Swagatam said…
Thanks Sumit,

The 10k resistor completes its cycle through the 105/400V capacitor, which itself drops the mains input current to 50mA. so the 10k has to control an input of 50mA.

2) the zener will shunt the excess voltage above its rating, thus making sure that the output is never over its rated value of 12V....this will not affect the current, only the voltage will be shunted.
Swagatam said…
Hi Sumit, that's the reason why I always advise everyone that they should first understand a given circuit design and then begin working on it, otherwise no matter how well it may have been tested it will still create problems for the user.

The LED can NEVER burn because the 105/400V capacitor is present in series, but remember your LED must have its own current limiting resistor because the 50mA from the capacitor could be still very high for the LED. Are you sure they are rated at 100mA??

Second, the 105 capacitor value also needs to be selected with respect to the LED current, if the LED current is 20mA then it must be changed with a 474/400V and so on.

The circuit needs no modification, it's actually as good as a ordinary capacitve power supply with an additional zero crossing feature.

also check all the connections, because a single wrong connection can make a fatal difference.
Swagatam said…
Hi Sumit, I think you failed to understand my point.

I was referring to the understanding of the circuit design and the related parameters.... not the LED datasheet.

Did you read my previous comment??

As stated earlier, the 105/400V capacitor itself acts like a "resistor" during the normal operations, except during the power switch ON. During switch ON this capacitor will act like a short-circuit (although only for some microseconds) and as soon as it charges up it will begin "resisting" current to its specified limit.

Also since the initial surge exists only for microseconds the LED might burn only occasionally... and never always.

I have used homemade capacitive LED drivers with absolutely no protection yet my LEDsc could survive 5 times out of 10 switch ON surges?

In the above the switch ON surge cannot happen because every time power is switched ON the triac conducts only after the zero-crossing of the phase, which makes sure that the 105 charges gradually eliminating all chances of a surge, that's the main reason behind involving the IC.

The limiting resistor needs to be of a small value and this will never dissipate any current, this small value is only for inhibiting the inital microsecond inrush, so this resistance can never a problem.

The zener could dissipate some power but it's doing it only for the excess voltage which needs to be eliminated anyway.

This zener also makes sure that your LED can "never burn" because if the voltage is allowed to exceed above the FWD drop of the LED, that ensures a perfect safety for the LED, I hope you have selected the zener value as per the LED V specs.

If you want a complete lossless circuit then probably you may have to go for a buck converter circuit.

Alternatively, If you want to eliminate the zener as well as the resistor, then probably you could go for an NTC at the input which would limit the current during power switch ONs without causing any further dissipation during the normal course of operations.

you can refer the following article for an NTC circuit

In fact with an NTC included the zero crossing IC becomes immaterial and can be simply eliminated
Swagatam said…
...I have not shown a resistor in the above design because resistors can be of different specifications for different LEDs, but it's an understood fact that a resistor is always mandatory with an LED.....unless the zener is selected precisely as per the LED fwd voltage rating
Swagatam said… the way 8mm LeDs are also available with 20/30mA current...
Hi Swagatham,

I simulated the above mentioned circuit in LTSPICE IV. It seems it is not working. Following are my doubts

1. The 1N4007 diode for the IR LED of MOC should be connected before the main capacitor (105/400v).

2. The 105/400v capacitor should be connected at the MT1 of the TRIAC not at the MT2. Because the the voltage at MT2 is 220*Ic where Ic is the current through the capacitor. So the voltage at MT2 is 220 * .07 = 15 V.

3. The 10K resistor is 1 Watt, since the current to trigger the TRIAC with MOC3041 requires minimum 15 mA. This 15mA current will pass through 10K which needs to be 10000*.015*.015 = 2.25 W

4. It is possible to use .22uf instead of the 10K resistor for IR LED of MOC. If capacitor is used then there is no wastage of power in 10K resistor.

Please correct me if I am wrong.

Swagatam said…
Thank you Prabhu,

The 105 capacitor is used just to drop the input current, so with the 105 included it's like feeding a low current 220V to the MOC IC.

Therefore according to me it shouldn't make any difference whether it's connected at MT1 or MT2, the capacitor simply has to be in series with the mains supply line.

the 10K resistor was selected arbitrarily by me...if it's value is not sufficient to drive the IR LED then it could be reduced to 1K.

A 0.22uF can be also used but that's costlier than a 1K resistor, so a 1K looks a better choice.

On other hand if the 10K was connected before the 105 would make it extremely hot and might burn it, so that cannot be correct.

You can confirm the results by building it practically.
CH IV said…
Hi Swagatam.

I modified this circuit to make it High Current capable and added some fuses.

Im not pretty sure if the circuit works so i want you to see it and maybe publish it if works.

I dont know if i can publish it right here or you may give me a mail to send it.

It had been adapted for 110V by the way.

I'll be waiting for your answer.

Have a nice day.
Swagatam said…
Hi CHIV, you can send it to admin (@)
Unknown said…
hai swagatam

what are the modification to be made in this circuit to produce 45v 200ma.
I was thinking of making an led bulb which contains 12 8mm leds in series
thanks in advance
Swagatam said…
Hi, you will have to increase the input capacitor value to 4uF/400V and increase the zener value to 45V/2 watt
Swagatam said…
you can ry the following simpler deign also
Unknown said…
thanks for your fast reply :)
the circuit you suggested is good and simpler than this circuit,for the voltage and current needed should i increase the capacitance value as well or just the voltage of capacitor and the zener value which comes after the scr ,and the resistors value
thanks again
Swagatam said…
thanks, yes for increasing current only the value of the input capacitor must be increased, not the voltage...but the zener voltage determines the output voltage level so it must be selected identical to the required output voltage
Swagatam said…
the resistors could be replaced with 4k7 for the specified 45v
Unknown said…
Thanks swagatham
I will try to build it then :)

Aik_Musafir said…
Please redesign the circuit to understand clearly.
I am unable to see the main connection points.
Swagatam said…
the circuit is correct, click on the diagram to enlarge it.
Electro Whizguy said…
Dear Sir,
I need your permission to make a youtube video of your circuit. I have made a pcb version of the circuit. Can I use your circuit diagram please?
Swag said…
Dear EW, you have the permission, just make sure to give a credit with a backlink to the relevant article.
RodB said…
I have a somewhat contrary view. I'm designing a transformerless power supply using a 0.33uf/330VAV capacitor (14.5mA output) on 120V mains. I calculated the initial inrush current to be 21Amps and last for about 20usec. The circuit components that could be subject to this inrush are a 1amp fast fuse, bridge rectifier, zener diode, electrolytic filter capacitor, LEDs and resistors. All, except possibly some resistors, can handle this surge current, power, or I^2(t). The filter capacitor, zener, LEDs and resistors each only get a portion. All of the components will be under their voltage maximums. I do not see the necessity, in regular situations, for the complex triac/optocoupler circuitry to limit the in-rush current. Thoughts?
Swag said…
The mentioned zero crossing based concept may be required if the input capacitor is as high as 1uF, for lower values like 0.33uF this may be not required, but other forms of protection should be employed, such as an NTC or an MOV, otherwise occasionally you may find the resistors, or the filter capacitor and even the LEDs busted

Contact me for Customized Circuits


Email *

Message *

 Follow on G+  Follow on Facebook   Follow on Tweeter  Follow on G+  Follow on G+