Electronic – RS-232 switching

rs232

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.

Best Answer

Perhaps the conceptually simplest approach to disconnect the TX line from the modem is with a phototransistor optoisolator:

            +-------------+
            |             |
DCD----R1-+-|-+      |/---|----TX of server  
          D | LED >> |    |
GND-------+-|-+      |\---|--+-RX of modem (often confusingly labeled "TX")
            |             |  |
            +-------------+  +--R2--pulled LO (idle)

There's a huge number of such devices available that would be more than adequate. A brief inspection of the selection charts at my favorite suppliers seems to indicate that the Isocom H11AA4X, Isocom TLP521-4, Avago 4N35-000E, Lite-On LTV-816, etc. all seem adequate.

There are many devices that may sound like what you want, but they won't work for your application:

  • optotriac or optoSCR won't work for you: these are designed to work with AC circuits, turning on when commanded to and then turning off at a later AC zero-crossing at the output. Many people try to use them in DC circuits, where they turn on just fine, but it is difficult to get them to turn off, so those people usually end up switching from SCRs to transistors.
  • RS232 optoisolators do something completely different.