Introduction: DB-9 RS-232 Loopback Plug: Windows and OS X

About: With over 15 years experience working in IT and customer service positions, I have gained a unique perspective into the relationship between highly technical systems and their users. I have specialized in …

An RS-232 loopback plug is a simple diagnostics tool for checking the functionality of a serial port. The following guide will walk you through the creation of a DB-9 RS-232 loopback plug for testing serial connections on Windows and OS X computer systems.

Step 1: Understanding the Technology

The above tables and wiring diagram outlines the required connections to create a loop back plug. It is important to understand the purpose of each connection for troubleshooting serial connections.

Path 1: Carrier Signal

This path is primarily used for modems. The modem will use pin 1 (CD – Carrier Detect) to tell the computer that there is a carrier tone detected or it has made a connection with a second modem. The computer will then use pin 4 (DTR - Data Terminal Ready) and pin 6 (DSR – Data Set Ready) to create a handshake between the computer and modem. This handshake, for the most part, just verifies that the modem, or other DTR / DSR enabled device, is turned on and active.

By connecting pins 1, 4, and 6, we are taking the DTR signal and sending it to the DSR pin and the CD pin allowing us to verify that the computer is able to communicate with a modem.

Additionally, you can connect pin 9 (RI - Ring Indicator) to this path to verify that the computer is able to detect when a call is coming in from the modem.

Path 2: Transmit / Receive

This path handles the actual information being transmitted across the serial connection. By connecting pin 2 (Rx- Receive Data) to pin 3 (Tx- Transmit data), we are able to verify that the computer is able to send and receive information through a serial connection.

In most applications, you will only need to connect pins 2 and 3 to test the functionality of a DB-9 serial port.

Path 3: Request to Send / Clear to Send

This path handles the flow of information between the computer and device, similar to path 1. In a normal RS-232 connection with hardware flow control checked, the computer will use pin 7 (RTS – Request To Send) to tell the connected device when information can be received. Likewise, your connected device will use pin 8 (CTS - Clear To Send) to tell the computer when information can be sent.

By connecting pins 7 and 8, we are sending the RTS signal to the CTS pin allowing us to verify that the com port is able to handle hardware flow control. In most circumstances, this path is not required because the use of software flow control is common with most modern serial devices.

Step 2: Gather Materials

You will need the following:

- Soldering Iron kit and solder

- Female DB-9 connector

- DB-9 Hood

- Various lengths of wire

- Wire Strippers

- Small screw driver

- Computer with a DB-9 serial port or a USB to serial adapter

- Serial port terminal application such as Putty for Windows systems or CoolTerm for OS X or Linux systems

Step 3: Prepare the Female DB-9 Connector

Fill the solder tabs for pins 1,2,3,4,6,7, and 8 on the back of the female DB-9 connector as shown above. You will want the solder to have a shine and be contained to each individual tab.

If your solder has a dull glaze, you will want to remove the solder from the tab and tray again. Dull or weak solder joints are brittle and can easily be broken or removed from the solder tab and are caused by over heating the solder.

Step 4: Prepare the Wires

Cut 4 wires to approximately 1" and strip each end of all 4 wires 1/8". Tin the wires by applying solder to the exposed ends.

Step 5: Create the First Path

Take 2 wires and solder them into pin 1 of the DB-9 connector. Solder one of these wires to pin 4 and solder the second wire to pin 6.

Pins 1,4, and 6 should now be connected.

Step 6: Create the Second Path

Take another wire and solder it to pin 2 and pin 3.

Step 7: Create the Third Path

Take the final wire and solder it to pins 7 and 8.

Step 8: Attach the Hood

Assemble the hood with the DB-9 connector inside.

Step 9: Windows Systems: Verify the Com Port

Connect the loopback plug to your computer.

Open Device Manager and expand the Ports (COM & LPT). Verify that your serial port is listed and take note of the com port number. The picture above shows the USB serial port as COM 3.

Step 10: Windows Systems: Create a Serial Connection

Open Putty and select the Serial option on the right side of the window.

Change the Serial line text box to the correct com port.

Press Open

Step 11: Windows Systems: Test the Serial Connection

Type into the terminal. If you can see the characters, the connection is working and the loopback plug is functional.

Step 12: OS X Systems: Verify the Com Port

Connect the loopback plug to your computer.

Open System Preferences.

Click Network.

Click the + button on the lower left hand of the window.

Using the drop down menu for Interface, verify that you can see your serial connection, as shown above.

Step 13: OS X Systems: Create a Serial Connection

Open the CoolTerm application.

Click the New button.

Select Serial Port from the list on the left side of the window.

Use the drop down menu for Port and select your serial port as shown above.

Press OK.

Step 14: OS X Systems: Test the Serial Connection

Press the Connect button.

Type into the CoolTerm window. If you can see the characters, the connection is working and the loopback plug is functional.