let me clarify first than I'm no expert in electronics, so, I could be doing something really stupid here.

I want to replace the control board of my kitchen extractor motor with a custom version that can be controlled via ESPHome. I designed the full circuit, but I started implementing it by bits.

So this is my circuit: enter image description here

I assembled only the Optocoupler+TRIAC controlling part of the circuit, which is the one I'm more inexperienced in as AC and Mains are involved.

The motor is controlled by two different triacs, but I just built one to try it out before going for the whole circuit. Soldered everything on a perfboard for security reasons. Then connected a NodeMCU to the MOC3021. GPIO D2 -> 220 resistor -> Pin 1 and GND to pin 2. Double/triple checked for miswirings/shorts and everything is OK.

With the test assembly done, I connected everything to mains and the "LOAD" accordingly (I didn't connected the motor, but a LED lamp) in case something went wrong.

Right out the gate I noticed something "weird" as the LED lamp barely lit even if the triac was off. But I guessed it would be because the lamp was connected to mains and the "Neutral" was connected to the MT2 which is also connected to the snubber circuit that allowed enough current to bearly light the lamp. So far so good..

Then I proceeded to tell the microcontroller to drive HIGH the MOC's GPIO.. and the lamp lit up fully for just about a second and something went "click" and the lamp returned to the barely lit state. No more reaction to GPIO input.

Inspecting everything was normal, except R4 wasn't conducting anymore. It fried. I guessed "ok, 1/4w resistor isn't gonna cut it".. So I went with a 1/2W resistor and tried again. Same scenario. Only this time the resistor died more spectacularly, some sparks flew by and the perfboard got a nice "tan". I still don't know if the triac or the MOC are still alive, but I have brand new ones to try again.. I just wanted to be sure that's not a design flaw.

I've been googling around and saw just one place where they suggested a 5W resistor for R4, everywhere else even say that 1/4w resistor should do it... So, I'm really confused here. Any hints on what's wrong?


1 Answer 1


R4 and R6 are connected directly to L, so when you switch on the gate through the opto coupler, that voltage will be applied and many current will flow until next zero voltage cross. See modification of these resistors connection. In that way, once the triac is switched on, almost no power will applied to R4 or R6 (only the voltage drop of triac). Only a short pulse what is needed, it is recommended a small capacitor and a 360 Ohm resistor to provide enough peak current (see MOC3021 datasheet). enter image description here

  • \$\begingroup\$ Ok, I was suspecting about both things you mention. I trusted the sample application in MOC3021M's datasheet and it did connect the resistors to LIVE, but all the other examples were connecting the resistor in series with the motor.. I also thought maybe I only needed to send pulses even for 100% (no diming), just no delay after ZC, but saw several tutorials where they just "connect the gate with a switch".. so.. followup: do I need the ZC for this test, right? \$\endgroup\$
    – KnF
    Commented Mar 27 at 20:35
  • 1
    \$\begingroup\$ Universal motors are usually speed controlled with phase angle, in that case you use a variable delay from ZC to adjust the voltaje. If you only need to start a motor, then apply continuos signal to emitter, and the triac will be switched on every half cycle. It is like when you start a motor with a relay, you don't take care about ZC. \$\endgroup\$
    – Bravale
    Commented Mar 27 at 21:56
  • \$\begingroup\$ Ok so, with the modified circuit I can just pull the pin up and it won't blow up? I actually plan to use ZC and phase angle to regulate the speed, for this first iteration I was happy with just turning on the load \$\endgroup\$
    – KnF
    Commented Mar 29 at 3:09
  • \$\begingroup\$ Yaaaaay it works!! Thanks @Bravale! I also wired and tested the ZCD circuit and its working just fine.. now Software which is my strong hehe \$\endgroup\$
    – KnF
    Commented Mar 29 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.