Arduino working like a switch

Hey. guys! I am new in electronic circuit development with IoT and like it I am having some problems. Let me explain the circuit of the photo: I want to turn a universal motor on through a TRIAC triggered directly by Arduino UNO. Just it. I do not want to use optocouplers or transistors between TRIAC gate and Arduino as it would elevate the cost production and I already have seen this kind of circuit applied in a professional PCB board before. My arduino program is setting pin 6 HIGH during 3 seconds, then setting pin 6 LOW during more 3 seconds. Then it keeps repeating it. In my mind the circuit should trigger the TRIAC gate only when the pin 6 is HIGH but this is not happening. Whatever value the pin 6 assume (HIGH or LOW) the TRIAC is ever being triggered. The motor never stops until I phisically disconnect the pin 6 from point 1 (open the circuit at point 1). It is like the Arduino was a simple switch allowing the current flow or not flow through the TRIAC gate circuit.

I am thinking if that behavior has to do with impedance in Arduino pins.

Is there anyone that can help me?

Does the motor turn on and off if you disconnect the connection to pin 6 and connect it to 5V or GND ?

Which way round is the triac? You have not labelled MT1 and MT2 in your schematic. The connection to ground should be MT1, with MT2 to the load. Get them reversed and it will do strange things.

What is the capacitor for in series with the gate resistor?

UKHeliBob:
Does the motor turn on and off if you disconnect the connection to pin 6 and connect it to 5V or GND ?

Hey, UKHeliBob! When I disconnect the circuit from pin 6 the motor stops. But when I connect it (pin 6) to any other arduino pin (like GNG, AN0,etc) the motor come back to work again. I am starting to think if it can be a hardware problem.

PerryBebbington:
Which way round is the triac? You have not labelled MT1 and MT2 in your schematic. The connection to ground should be MT1, with MT2 to the load. Get them reversed and it will do strange things.

What is the capacitor for in series with the gate resistor?

Hi, PerryBebbington! In fact I connected the TRIAC reversed! The photo was updated.The capacitor is to isolate a little bit the control circuit from the power circuit. Thank you a lot!

The capacitor doesn't make sense. That the triac was reversed and you got strange results makes perfect sense.

Glad you got it sorted.

Nice death trap! You’re well on your way to kill yourself or anyone else touching the Arduino under the wrong conditions. When that triac fails, and it will, that thing is going to blow up in your face.

All for the sake of an proper optocoupler. What’s a life worth? I guess not much by your standards.

OP, look at Opto Isolation.

WattsThat:
Nice death trap! You’re well on your way to kill yourself or anyone else touching the Arduino under the wrong conditions. When that triac fails, and it will, that thing is going to blow up in your face.

All for the sake of an proper optocoupler. What’s a life worth? I guess not much by your standards.

Hi, friend. I really apreciate your comment, but It seems You could not understand the whole problem. But thanks to try it.

larryd:
OP, look at Opto Isolation.

Hi, friend! Thanks a lot! I do not want to use optocouplers as It will increase the production costs. But thank a lot!

PerryBebbington:
The capacitor doesn't make sense. That the triac was reversed and you got strange results makes perfect sense.

Glad you got it sorted.

Thank you so much, friend. I will make the change tomorrow and update you!

luckaumzo:
Hi, friend! Thanks a lot! I do not want to use optocouplers as It will increase the production costs. But thank a lot!

Hum . . .

An MOC3021 is ~ $0.50 each.

How much is your life worth ?

YOU NEED TO ISOLATE THE ARDUINO GROUND FROM A C M A I N S

DC doesn't flow through a capacitor, maybe you need to apply a pulse train to pin 6 with the tone function, about 600Hz.

Will be interesting to see where this goes.

luckaumzo:
I really appreciate your comment, but It seems You could not understand the whole problem.

The problem here is that the application has simply not been adequately described by any means,

"You can lead a horse to water..."

Hey, guys! I just resolved my problem. I want really thank to PerryBebbington for his tip in relation to the terminals MT1 and MT2 order. The Load should be connected to MT2 and the Arduino reference must be connected to MT1. I googled and could not find any answer for it, even in the TRIAC datasheet.
For those that did not understand the application of capacitor in series with resistor I am doing it because I am applying a 980Hz and 0.5 duty cycle signal (5 V) to generate currents pulses to trigger the TRIAC.

Thank you all for help me.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.