Electrical – Triac BTA316 does not turn off

triac

I had a look to other posts about Triac and I am pretty sure my problem was not in there.

The goal of my system is to realized a controlled switch for home appliance. Then I designed a power supply system (non isolated) that supply energy to my microcontroler (STM32F030C8T6). It is all working fine.

I would like to controlled a triac (NXP BTA316-800E) with one of the logical output of the STM, then I realized this circuit:
enter image description here

NOTE: The earth symbol is a mistake, it is a 0V point of the circuit.

As I would like to control every types of appliance I add a snubber circuit for inductive load.

To turn on the applicance I set the STM32 output (logic 1 : 3.3V), and I clear this output to turn off the appliance (logic 0; 0V). This ouptput is a push pull type.

My problem is : The appliance is always ON. I can see that logic levels are well applied (at the output of the STM32), however, here is what I get at the Triac gate, when output is 0:
enter image description here

I guess the short 1.8V spikes keep the triac on, but I don't know why these spikes are present.

Anyway, I tried to remove R2 and tied T1 gate to ground in order to be sure that no current is flowing through but the appliance is still on.

Do you have any idea?

Thank you very much.

IMPORTANT: This circuit is dangerous (deadly) as you deal directly with main power. All care has to be taken to experiment.

Best Answer

Test whether the triac is OK by leaving its gate floating. It shouldn't conduct.

You can put the control signal to high impedance state, this should kill the triac at the end of the period.

OT: be very careful if you really must have the power supply referenced to the line (as is on the picture).

Edit: the schematic is not wrong as others claim - it is possible to use line as reference, but one has to keep in mind that the moment the GND connects to neutral you got a short circuit. And it is all too easy to happen in this setup. For example, if you connect to grounded lab instrument (oscilloscope) you get a short. I've been using similar setup in a project that measured noise on the power lines. There you need it if you have non-isolated supply. I knew the risks, but I still managed to burn the prototype, the programmer and my computer. Also, don't let me start on the fireworks it caused..