I'm using an opto triac, specifically the MOC3041, with a zero crossing circuit to switch the Tx pinout on an RS-232 interface.

I have no problems turning it on, but after I unload the input (no input current), the triac doesn't turn off. The load is standard RS-232 voltages (+/- 12V), speed 56k.

Do I need a snubber on the load? If so, how should I calculate the value of the snubber it?


I've already asked a question here on the site and I didn't get the answer.

Here is the original one:

"I have a modem connected to a server through RS232. The server is constantly sending data to the modem, whether the modem is connected or not.

When I try to connect to the modem with another modem the handshaking fails because the server is sending data that gets in the way.

I am looking for a way of stopping the communication between the server and the modem until the modem's DCD line is asserted.

What kind of device or component could be used to design a small passive (no power supply) circuit that could perform this operation?

As far as I can tell it is only the TX line that needs to be interrupted while the modem is off-line."



Hope it is more understandable. Thanks.

  • \$\begingroup\$ A triac will latch with a DC source. What is it you want to do? I don't think a triac is what you want. \$\endgroup\$
    – SteveR
    Commented Oct 28, 2011 at 15:15
  • \$\begingroup\$ You mentioned you have already tried using an OptoTriac, so the schematic of how you connected it, power source (e.g. voltage, whether it shares the same ground as the modem/PC) etc, is the kind of thing that would come in handy. The clearer the question the easier it is to give an accurate answer. \$\endgroup\$
    – Oli Glaser
    Commented Oct 29, 2011 at 2:47
  • \$\begingroup\$ If you continue asking questions in this manner people will get tired of trying to help you.|If you can say "I have no problems turning it on, but after I unload the input (no input current), the triac doesn't turn off." - you MUST have a circuit in mind and must have tried it or simulated it. To then just say "I have no schematics yet" (if you wrote that) is missing the point. | IF you tried using a TRIAC and IF it did not work then you will be able to provide a circuit diagram somehow, and should. If you won't do people the courtesy of doing that you'll rapidly lose people willing to help. \$\endgroup\$
    – Russell McMahon
    Commented Oct 29, 2011 at 10:14
  • \$\begingroup\$ I'm very sorry for my "comment". I'll show you what I did as far as possible. Thanks in advance. \$\endgroup\$ Commented Oct 29, 2011 at 17:12

4 Answers 4


This is what you call triac abuse; a triac is not made for this kind of application. Like Steve says, triacs remain switched on on DC loads. You may have zero crossings where they normally would switch off, but I'm not sure how the triac reacts to very fast switching, like in your 56k EIA-232 signal. The zero crossing may be too fast to switch it off.

I'd suggest an analog switch. Analog devices has zillions of them.


As mentioned showing your circuit would be useful, but if I am right about what you are trying to do I think an OptoMOS would do the job fine.
This will isolate and switch dual polarity signals.

Here are some more similar options.

EDIT - based on the schematic you added, you should be able to directly replace the OptoTRIAC with the OptoMOS suggested and achieve exactly what you want. I would add a diode (e.g. 1N4002) in series before the resistor and/or zener (say <4.5V) across the LED to prevent the LED reverse voltage (~5V) being exceeded when the DCD pin is at -12V. Or use a resistive divider. I am assuming the few mA of current drawn with either option continuously would not be a problem.

The one I linked to is surface mount (though with large enough pitch to solder wires to manually) but there are plenty of other options in the second link. Here is one in a DIP package

EDIT - here is another DIP part with 8V LED reverse voltage and ~3.5mA turn on worst case. This is a significant improvement on the other two.

  • \$\begingroup\$ Thanks for the answer. Just two questions... It doesn't need ext power supply, correct? Due to datasheet, it switches on/off ONLY based on input voltage, correct? It seems that it is ideal solution. Thank you. \$\endgroup\$ Commented Oct 29, 2011 at 22:21
  • 1
    \$\begingroup\$ No, it has no power supply pins - it works exactly like your OptoTRIAC with a small current applied (2mA min to 50mA worst case from one datasheet I looked at) through the input pins. The difference is the TRIAC is replaced by back to back MOSFETS, which don't need a zero crossing to turn off again. The DIP part linked to should be pretty reliable with a 1k resistor (~12mA) possibly much less (likely just take longer to turn on) but be aware of worst case scenarios. Careful with the LED reverse voltage (see above) \$\endgroup\$
    – Oli Glaser
    Commented Oct 29, 2011 at 22:35
  • \$\begingroup\$ I think that you gave me final solution. Anyway, thanks for help. \$\endgroup\$ Commented Oct 30, 2011 at 7:45

Note: Razed earth brigade :-) :
I can clear up the query oriented nature of this answer as things progress.
At present the comment fields are not an adequate means of obtaining and conveying information.

It is not usualt to use a TRIAC for this sort of application BUT
a TRIAC MAY be able to be used for your purposes.
BUT the circuit needs to be designed properly to make use of the TRIACs properties.

You MUST show us your circuit diagram for us to help you properly. It is very very very easy to misdescribe this kind of circuit. Please provide a circuit diagram.

If you cannot post a picture send a link to a webpage. if you cannot load to a webpage please advise and I will give you an email address that autoloads to a website.

Note that a TRIAC turns off when the current through it reverses polarity or falls to a very low level. In a true RS232 circuit where the signal varies +ve and -ve relative to ground it MAY be possible to use a TRIAC if it is properly positioned. Even if it is connected to one or other supply rail it may still be able to be used IF the circuit is properly designed.

There will probably be better devices for you task than a TRIAC. I would usually try and use a MOSFET but there are other things that will work. If you tell us all details about what you are trying to achieve then we can help.

An analog like Steven suggests may be the best choice, depending on what you are trying to do and what you have easy access to. We can only help if you tell us as much as possible.


You could use an RS232 transceiver such as the MAX3162. Tie the rs232 logic inputs/outputs to the adjacent channel logic outputs/inputs, then use the RS232 line inputs/outputs between the pc and your modem. Use the rs232 enable lines for those drivers for your DCD. Tie through any other handshaking lines as usual. This chip also does RS485, 422. I'm sure if you looked you could find one with just RS232 if you want.

I assume that in your schematic it is just a typo, but the tx lines from pc to modem do not connect together. It would be tx to rx, and rx to tx.

I would think although their would be an easy software solution that just enabled the tx on the pc side. I haven't programmed modems in a dogs age, but I seem to remember it being doable.

  • \$\begingroup\$ Thanks for answer. I've mentioned that I have request for no external power. I think that MAX need it. It has to be supplied directly from interface. If it is possible, of course. Tx on server interface and on the modem are the same... logic depends on DCE or DTE side. The cable from server to modem is straight, not null-modem. I can't change anything on server's side ( eg. software)... is it possible to configure modem to work properly, I don't know. I didn't find the way yet. \$\endgroup\$ Commented Oct 29, 2011 at 21:10
  • \$\begingroup\$ Oh, missed the part about being passive:) Can you steal 100ma from a USB port on the pc side? USB will default to 100ma without enumeration. \$\endgroup\$
    – SteveR
    Commented Oct 29, 2011 at 21:45
  • \$\begingroup\$ Maybe. But it is "dirty" solution. I have to find something more acceptable. \$\endgroup\$ Commented Oct 29, 2011 at 22:01

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.