0
\$\begingroup\$

I have an external consumer product what I try to automate by connecting my Arduino to its push buttons. This device uses internally 5V, I can get this voltage on the switch buttons as well.

push

My goal would be to automate this without relays to keep my circuit small and quiet.

I have tried 2 methods so far:

http://www.instructables.com/id/Small-Triac-Switch/

-Connecting the buttons to the triac

-Connecting the buttons to the MOC directly

The results were the same. For the first time the switch works (device turns on) but any other attempts are ignored. I would like to understand why and how to modify my circuit to work possibly with the components I have on hand (TIC206 or MOC3041).

I got the triac in high power switching in mind because I didnt know what the device uses internally until I disassembled it but I would say the MOC should be good enough for switching 5V.

If I use a relay or just sort the wires by hand that works 100%.

moc

\$\endgroup\$
1
\$\begingroup\$

You mention "TRIAC".

A TRIAC is a double thyristor and a thyristor is a switching transistor type device that you can switch ON by providing a current through it's gate but you can only switch it OFF if you interrupt the current that it is switching !

I think you are switching a DC signal (the 5 V you measure) so even if you turn the gate signal off (like you do) it will stay ON no matter what. TRIAC switches are for switching AC currents, not DC !

I suggest you get an optocoupler with a phototransistor, not one with a TRIAC / thyristor !

\$\endgroup\$
0
\$\begingroup\$

The opto-triacs are intended for switching alternating current and are a poor choice for this application. You need to use a transistor type opto-isolator.

The two most likely swithing arrangements of your "external consumer product" are shown in Figure 1 and 2.

schematic

simulate this circuit – Schematic created using CircuitLab

Figures 1, 2 and 3.

A transistor type opto-isolator will work for either pull-up or pull-down circuit.

  • Connect the opto-transistor collector to the positive side of the button.
  • Connect the opto-transistor emitter to the negative side of the button.
  • Connect the opto-LED as shown to your Arduino.
\$\endgroup\$
  • \$\begingroup\$ Thanks for the diagram, can't I use the MOC3041? It is supposed to be an opto isolator.. \$\endgroup\$ – munin24 Mar 31 '16 at 10:56
  • \$\begingroup\$ Fairchild say, " MOC3041M 6-Pin DIP 400V Zero Crossing Triac Driver Output Optocoupler" and I imagine they should know. Yes, it's an opto-isolator but as three of us have told you this is the wrong type of opto-isolator. It's for switching AC. You are switching DC. \$\endgroup\$ – Transistor Mar 31 '16 at 11:05
0
\$\begingroup\$

A Triac with Zero-Cross detection works by turning an AC signal on or off at the Zero Crossing point. A DC signal does not have a Zero-Cross point.

You can use a dc optocoupler (4N35 is commonly used), or if you don't care or need isolation, a simple transistor.

schematic

simulate this circuit – Schematic created using CircuitLab

R1 is a simple pull-down to prevent a floating base from turning the transistor on.

\$\endgroup\$
  • \$\begingroup\$ Hello, please suggest some specific models I can buy from digikey/ebay then for optocoupler. Is there a stability issue with using regular npn transistors for switching? Is there a possibility the device can turn on due to some error? I would like to avoid that. With a relay there is no possibility for that, its either off or on. Thanks \$\endgroup\$ – munin24 Mar 31 '16 at 12:08
  • \$\begingroup\$ The 4N35 is a common one for something like this. And no, a regular NPN wouldn't have any stability issues, as long as you don't leave the base floating. A Pull-Down resistor of 10~47kΩ from base to ground would do that. An Opto-coupler is basically an led with light sensitive transistor in a box anyway. @munin24 \$\endgroup\$ – Passerby Mar 31 '16 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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