loading

BACKGROUND:

I will start by explaining my motivation for making this device, I am an automation engineer and recently was asked to develop a SCADA system as a replacement for an end of life system that is still in use. The PLC in the network only has a single RS232 output which is connected to the existing SCADA. As the PLC system is old and the structure of the program is not 100% clear due to lack of documentation, it was desirable to hook up the new SCADA in parallel with the existing system as a monitor for verification prior to taking full control of the process.

THE PROBLEM:

The problem arises that RS232 is a point to point protocol, this means that there can only be one device on each end of the cable, for further nodes in the network, you must have multiple serial ports and a device capable of mapping the data onwards.

THE SOLUTION:

The RS232 spy shown here allows a second device to be introduced as an RS232 monitor (no ability to write to the device), perfect for my application.

Step 1: Getting Started

WHAT YOU WILL NEED:

  • 1 junction box
  • 1 male D-SUB 9 connector
  • 2 female D-SUB 9 connectors
  • 1 2.2k OHM resistor (colour code red, red, red)
  • 1 diode 1N4148
  • Assorted wire
  • Solder
  • Soldering Iron
  • Wire Snips

Step 2: Mounting the Connectors

I like for the D-SUB connectors to be fitted nicely into my creations, for this I keep the housing from an old connector to hand, I use this as a template for marking the cutout.

I start by laying the connector down and drilling out the 2 mounting screw holes.

I then bolt the housing in place and colour in the inside with a sharpie.

I remove the housing and repeat for each of the required connectors, I then remove the template and carefully expand the marking depending on the type of connector going in.

If the connector is to be female, I make the opening a little larger, this is because the male connector has a screen that comes around the outside of the female connector, the larger opening stops the backing material from holding the connector out.

Using a drill I remove as much material as possible and finish the edge by hand with a small file.

Step 3: Wiring

Using the wiring diagram above we can create a straight through connection to interrupt the cable but maintain comms with the main computer.

However, tapping off the TX line from the slave (PLC in this case) we can create a monitor output as well. We use a diode and a resistor to protect the comms network from crosstalk (no more than one master) and the resistor protects against an excessive load.

Step 4: Test

I have tested this device and the monitor machine can see data coming from the PLC to the master SCADA system, the new system cannot send data to the PLC as the setup described is Half-Duplex (one-way comms). Also, the new (monitor) SCADA system does not take part in a handshake with the PLC so without the master, no comms will initiate.

Be sure to mark the com and the monitor as connection to the wrong ports will prevent proper operation of your devices.

<p>Been there! Automation engineer here too. I solved the same issue of &quot;spy&quot; serial line with only one serial port using (3) 232 to RS485 converters! (i'm plenty of them). That day have no resistors, diodes, or components like that, only converters. I arrange them in a sort of star topology and worked pretty well!</p>
<p>Nice work, I've used these in the past, there is also a way to set them up to look at the half duplex in each direction. I don't need it here and I only have one serial port to do it on this machine. Maybe with a brainbox or something similar I will run at monitoring both directions.</p>

About This Instructable

1,205views

15favorites

License:

Bio: I am an automation engineer but I will give anything a go. I don't know if you call if pessimism or just being an ... More »
More by smurray2:Cordless/Corded Drill Battery Operated Fish Tank Pump/Filter RS232 Serial Spy 
Add instructable to: