How do I prevent this circuit from becoming "Active" during power-up?

Thread Starter


Joined May 17, 2019
I am working on an IP Mains Switch. The circuit shown below is my version of the example given in Figure 15 of the MOC30xx datasheet.

My problem is that occasionally, I notice that the Load (the 3W LED bulb) will flash as I apply the 240VAC to power-up the circuit?
While it does not matter for this use case. If I was driving a motor or cutter it would matter if an operator had their fingers in the "sharp bits".

I had read in my searching for a solution, that TRISCs in this type of configuration "could" conduct for the first half-cycle before switching off at the next zero crossing. However, can the human eye see a 0.01Sec flash?

I am fairly sure that the issue is on the TRIAC side of the optocoupler, because even with the input (pin 1) to the MOC3043M grounded, I still see this flash during power-up.
Last edited by a moderator:

Thread Starter


Joined May 17, 2019
Thanks Dave,
Moving the load will be a bit difficult. So, I'll try your 470nF tip first.
Can you expand the spec.? Type & voltage? I've got some 470nF 25v ceramics to hand. Any good? If not, I'll need to order some.


Joined Jun 22, 2012
470nF 450V or 630V AC, works out at 6.7K ohms. Loads should always be in the MT2 side (Live), its probably because the Led bulb is high resistance so putting a low resistance in the load will improve it.

Thread Starter


Joined May 17, 2019
470nF 450V or 630V AC, works out at 6.7K ohms
I'm sorry to keep asking.... But I don't understand what you are telling me.
Are you saying that the 470nF that I could try placing across R7 (in my schematic, above) should have a voltage rating of 450v or 630v? Looking on Farnell web site the only 470nF/630v caps are multilayer ceramics at ~£3 each?
Secondly, what does the "6.7K ohms" parameter relate too? I can not find a resistance figure quoted on the TDK or KEMET datasheets for the 20 or so 470nF/630V caps shortlisted on the Farnell site.


Joined Jul 11, 2016
the triggering depends on gate current
if the terminal voltage rises the channel conduction depends on "forward" current

if your load is small - so the required forward current is never reached - you need to keep the gate current up ← but this condition may set high wattage on the conducting triac

your issue comes simply from not switching at zero crossing

otherwise you have to tweak out your startup condition following the datasheets of your triacs
but as in the link in prev. post - lowering the gate shunt resistor may be 1-st thing to try
(it is usually said in d/s whether there is a built in one ← in which case you should try something else)

there is plenty of materials on the web about , etc.
There are no snubbers (RC combination) across your triacs. They can turn on based on exceeding dv/dt like at turn-on.. For very light loads, you might want to make sure it exceeds the minimum load.

Thread Starter


Joined May 17, 2019
There are no snubbers (RC combination) across your triacs.
In the early versions of this design, I did follow the many examples of this type of circuit and included a snubber.
I used a RE12001 (0.01uF/120R) and RE120033 (0.033uF/120R) dedicated OKAYA Quencher. However, with them in circuit, it would not turn off!

Since starting this thread, I have replaced the BT137 with a BTA06 (snubberless triac) which has reduced the start-up flashes.
I have also reduced the value of R7 to 390R which is also helping. I have Dodgydave's caps on order and will give them a try when they arrive.

I would like a bit of theory if anyone has a moment more?
As I understand the circuit (and as you can tell, that has limits!), R8 is there to limit the turn-on gate current. While the function of R7 is to reduce/drain any residue charge on the gate once the optocoupler has turned off.
So, given that the control signal from the ESP32 can be removed (turn off) at any time, which in turn will stop the current flowing through the optocoupler (pins 6 to 4) to the gate. Thus, once any charge has dissipated, the gate/R7 section of the circuit is effectively open-circuit?
What is the voltage across R7 when the optocoupler is off?


Joined Feb 20, 2016
If this is an safety requirement, add some sort of watch dog interlock so if the processor crashes, the load is turned off.
For example, something like this...
The GPIO pin must generate a pulse train to generate the DC bias to turn the transistor on. The pulse is not from built in hardware pulse gen, but code in the program loop.
When the loop crashes, the pulses stop and the transistor will turn off.
This will also fix your startup problem if it is coming from the opto input side as you will have to run the pulses for the opto to be enabled.
This is a good idea to add to anything that can cause damage or danger if the program dies for any reason.


Joined Mar 10, 2018
There is the problem of false triggering in a triac or SCR, google
"false trigger triac", a number of discussions.

Not all processors power up in a known GPIO state over the power supply ramp up.
Scope on one shot capture can help determine this.

Regards, Dana.


Joined Jul 11, 2016
Below is the extracts from the d/s -s
the point is the higher the device temp the better it stays on

I.GT = 5...50 / 25...100 mA // 28mA ← math. avg. (geo mean) /!\
I.H = 10...50 / 25...50 mA // 28mA + /!\ also check the test-conditions from d/s these numbers correspond to
I.L = 10...80 / 40...100 mA // 42mA

I.GT = 5...30 / 35...100 mA // 27mA ← math. avg. (geo mean) /!\
I.H = ... 5 ... / 20...40 mA // 12mA
I.L = 5...16 / 20...60 mA // 18mA

Last edited:

Thread Starter


Joined May 17, 2019
Not all processors power up in a known GPIO state over the power supply ramp up.
Thank you Dana,
As mentioned above, the "left-hand side" of the circuit (by grounding input to optoisolator) has been eliminated as the cause of this problem.


Joined Nov 14, 2019
The brief flash is likely due to dV/dT limit being exceeded for the TRIAC. A capacitor across R7 should help, a capacitor across the load likely will not help and may make the problem worse.

The dV/dT rating of the MOC is a lot higher than the chosen TRIAC, given that the load is*tiny* the MOC can probably drive it all on its own. 20mA is not a lot.

You can easily establish if you can eliminate the unwanted initial triggering by removing the MOC and shorting R7. (The suggested addition of a capacitor across R7 acts a lot like a short circuit)

I noticed that you have omitted the RC snubber across the TRIAC, you should add it when driving more substantial loads especially motors. This could lead to your LED load being permanently dimly lit, but you can counter this with a small X class capacitor across the load.

A different TRIAC may work better, you don't really need a 4Q sensitive gate device, what you want is a low hold current high dV/dT device.

[warming the TRIAC will make it more likely to flash on turn on which can help with tedious on off testing.]