This is the wiring scheme I'm using to carry RS-232 signals over 8P8C (eight pin, 8 contact) modular connectors. These are often referred to as RJ-45 connectors, though they're technically a different animal. I'm doing this because it's easy (with a crimp tool) to make 8P8C patch cords of any length quickly. With an assortment of adapters (male and female, "A" and "B" pinouts, 9-pin and 25-pin), I can whip up a cable of either gender and pin count on each end, straight-through or null modem, of any length in a few seconds. I can also instantly repatch connections by swapping modular plugs. It would be easy to implement an RS-232 patch panel using this scheme as well.
I'm using commercially available 8P8C to DB-25 and DE-9 adapters. These come with the 8P8C already wired with color-coded wires, terminated with the D-sub pins and connector shell. All that is required is to stuff the pins in the shell in the configuration you want, and snap the shell into the hood. These cost about $2 each individually, and can be had in bulk at lower cost. They are available in a variety of colors, so you can use different colors for different wiring variants, or you can color code by function, or whatever you wish.
The wiring scheme here was chosen for specific reasons. I wanted to be able to use existing phone wiring to patch RS-232 connections, without needing special adapters. So I pinned-out the connections to allow even a minimun configuration (one pair/two wires) to be useful.
Phone wiring starts at the center and works out. So I took the center pair, and made it a one way circuit (data and ground). In the phone company tradition, this pair is colored red and green. For mnemonic reasons, I made green ground (GND), and red receive (RX, or transmit/TX for the other end).
The next pair out I used to flesh out a 4-wire, two-way circuit. I added Transmit (TX) and Data Terminal Ready (DTR). Note that an ordinary 8P8C modular phone plug will fit and work in the 8P8C jacks I'm using here, allowing a 4-wire phone circuit and ordinary modular phone cord to hook up a remote terminal.
The next pair out I used for the other common signalling leads, Carrier Detect (CD) and Data Set Ready (DSR). With this six-wire configuration, you can run most modems without hardware flow control.
The last pair contains the hardware flow control leads, Request To Send (RTS) and Clear To Send (CTS).
This is the arrangement of colors in the adapters I use, viewed from the wiring end. I haven't given pin numbers, as 8P8C pin numbering is done at least three different ways that I know of. For example, the phone company numbers them from the center out (75312468) and DEC numbers them serially (12345678). I've also provided the signal names I've assigned for the two pinouts I use most often.
o o o o GRY YEL RED ORG CTS TX RX CD o o o o BRN GRN BLK BLU DSR GND DTR RTS
o o o o GRY YEL RED ORG RTS RX TX CD o o o o BRN GRN BLK BLU DTR GND DSR CTS
Here's the breakout of the color to pin arrangement for both pinouts:
The mystery behind the "A" and "B" variants is the ability to build straight-through or null-modem cables efficiently. The two pinouts differ by swapping the signals that are swapped in a null modem cable. Therefore, if you build a cable with "A" adaptors on both ends, it's a straight-through (pin 2 to pin 2, 3 to 3, etc.) cable. If you use an "A" on one end and a "B" on the other, you get a null modem (pin 2 to pin 3, 3 to 2, etc.) cable. Using "B" on both ends also yields a straight-through cable, just with the signals on different colored wires than the A-A cable. This can be extended by making custom pinouts for equipment that needs different connections (i.e. CD to DSR), and marking those adaptors with another letter (such as "C") or code for the equipment in question (maybe "HP 26XX" or "Atari 850"). An electronic labelmaker makes nice neat labels, a sharpie works well and won't peel off, but is less useful on dark-colored adaptor housings. You can also color code them, but I've found this isn't practical for the small numbers I use, as I'll need another 9-pin female "B" and only have the blue housings when I've been using grey for "B". And if you stick to one color, you can just stock that, and buy in bulk.
Here is the same data, rearranged to show which pins I've crossed for null modem purposes. Note that this is the area where you'll get the most variability. For some equipment, you'll have to cross different pins, connect certain pins together, and/or loop back various signals locally. This lashup is fairly generic and works well for my with most of my hardware.
Here's the view (again, from the wiring side) of the colors going to the pins for straight through connectors. These are the diagrams I use most of the time when actually assembling adaptors. All the thinking has already been done, so you can just pop in the pins and be done.
(8) (7) (6) (5) (4) (3) (2) (1) ORG GRN BRN GRY BLU RED YEL (20) BLK
(1) (2) (3) (4) (5) (6) (7) (8) YEL RED BLU GRY BRN GRN ORG (20) BLK
This is the same information for the "B" adaptors.
(8) (7) (6) (5) (4) (3) (2) (1) ORG GRN BLK BLU GRY YEL RED (20) BRN
(1) (2) (3) (4) (5) (6) (7) (8) RED YEL GRY BLU BLK GRN ORG (20) BRN
And for the DE-9 connectors:
(1) (2) (3) (4) (5) ORG RED YEL BLK GRN (6) (7) (8) (9) BRN BLU GRY
(5) (4) (3) (2) (1) GRN BLK YEL RED ORG (9) (8) (7) (6) GRY BLU BRN
(1) (2) (3) (4) (5) ORG YEL RED BRN GRN (6) (7) (8) (9) BLK GRY BLU
(5) (4) (3) (2) (1) GRN BRN RED YEL ORG (9) (8) (7) (6) BLU GRY BLK
[home] [howto]John Rehwinkel