Electronic – TRIAC switching problem

motor controllertriac

enter image description here

I have a speed control circuit for a 230V AC motor. It has a BTA16 TRIAC for phase control and it is driven by an optocoupler MOC3021. The trigger signal is coming from a PIC16F676 microcontroller. The trigger signal is given according to an input event to the microcontroller.

The problem is the TRIAC is getting switched on automatically sometimes when I turn on mains. I found that is because somehow the TRIAC driver gets the drive voltage from the microcontroller. But it is not happening always and I cannot change anything in hardware. I also tried in software not to trigger the TRIAC for 2 seconds from power on but still the problem persists. Is there anything that I should try to get around this problem?

Best Answer

You already appear to have sufficient snubberring around the TRIAC which should eliminate DV/DT based switching (the TRIAC turning itself on due to noise on the gate lead) which I believe that your issue is on the micro side of things.

I think your issue is as follows. When the micro is in reset, all of its pins are inputs. This isn't quite the same thing as having the left side of R1 disconnected since the micro also probably has internal pullups. These pullups are too weak to drive the opto LED strongly, but I bet if you put a meter across R1 you will see maybe a few dozen to a hundred microvolts. That might be enough to trigger that opto.

I would rework the micro side of your circuit so that the anode of the optocoupler LED goes to +V and the cathode goes to your micro through R1; your micro will then have to drive the output LOW to turn on the TRIAC, but it will eliminate that brief moment where the micro comes out of reset and the pin is an input and drives the LED weakly.

I would also add an external pull-up resistor just because you're working with line voltage and I like the assurance of a stronger pull-up resistor to make sure the opto stays off. I would also investigate the larger TRIAC to see what exactly its switching characteristics are. If it's a sensitive-gate TRIAC and you have a noisy environment you may need to take a closer look at your snubberring.

The other issue I see is that in your schematic you show a zero-cross detecting opto. You won't be able to phase control with that.