How do I make a custom serial cable?
June 13, 2022 7:24 PM   Subscribe

I've got a computer with a serial header on the motherboard, and I'd like to add a serial port to it. I'd like to make it an RJ45 port, and need some guidance on constructing the appropriate cable.

The obvious solution is to just use one of the readily available header to DB9 adapters, but I'm not doing that for two reasons:
a) The pin output of my header is the less common of the two standards which is surmountable but
b) I've put the computer in a tiny case that has no place on the back for a PCI shield, the usual way those work.

I do have some empty rj45 spots on my back panel, and I've been looking into wiring up an RJ45 serial port following Cisco's standard, which I believe will let me use a console cable to hook up from there to USB. I've been collecting various crimping tools and planning how to make this thing, and I've got one part I'm undecided on, and one part I don't know how to solve.

First, what kind of cable will be easiest to adapt? The two options I can see are a ribbon cable or a twisted pair cable. Advantage to the ribbon cable is that IDC connectors look really easy to crimp. On the other hand, the twisted pair would be what normally goes with an RJ45 port? But I'd have to use a different and more labor-intensive method for hooking up the header end of things. I wasn't sure about the ribbon cable to rj45 jack end of things, but I'm thinking it's probably pretty easy to split the cables out individually there with just a boxcutter or something.

But either way I handle that, I've got a problem with ground. The pin arrangement for this calls for two ground pins on the RJ45 port, but I've only got the one on the header. I don't know how to take one wire and connect it to two pins on the RJ45 jack. I don't expect it'd be too tricky, but I don't even know what terms I should be searching for.

So: how do I split one wire to two spots on the RJ45 jack? It's a relatively small amount of space within the jack itself, so I'm guessing to make it work out it'll be a split hanging out the back? That's fine of course, I'm just vaguely uncertain about making sure it all fits in the end.

Alternatively, will this not work at all for some reason I haven't considered? I don't think so, but I'm pretty new to this kind of thing. Or maybe there's some other option I've missed?
posted by vibratory manner of working to Computers & Internet (14 answers total) 1 user marked this as a favorite
 
Best answer: It sounds like you may not be too experienced making cables, so unless part of your intent is to get better at making DIY cables, why not just invest in a USB to serial adapter?

If you're committed to learning this: I think your instinct to use an IDC and a ribbon cable is correct. RJ45 is usually meant for Ethernet, which has a whole physical/electrical specification for twisted pair in order to maintain signal integrity at high speed. For serial, you need none of that, and trying to do it won't gain you anything.

Do you have wire strippers and a soldering iron? You'll want them.

Splitting one wire to two is as simple as soldering 3 wires together (one from your ribbon cable; two that go to the two ground pins on the RJ45 jack). Do you have a hot air gun? Heat-shrink is great for this application -- get a discount pack of shrink tube, slide it over the two conductors before you solder everything together, then slide the heatshrink over the joint and hit it with the hot air gun. I got a cheapo hot air pencil that's I think supposed to be used with Shrinky Dinks or some kind of art supply, but it works for this application; I make a lot of custom little wiring harnesses for DIY things. I tend to use a modified lineman's splice (twist the two cables forming the top of the Y together, then do a lineman's splice between that pair and the bottom of the Y). I'm sure someone will have tips on something that works better, but I've made lots of CAN and serial and I2C type cables like this.
posted by Alterscape at 8:45 PM on June 13, 2022 [3 favorites]


FWIW, most people when asked to connect a modern PC to the RJ-45 port of a Cisco or similarly managed router, get a
USB Console Cable

And Cisco has its own cable converter accessory kit (ACS-2500ASYN) so you can connect the router's RJ-45 to a regular serial port, if you want to take advantage of your existing serial header. No fancy custom wiring needed.
posted by kschang at 9:42 PM on June 13, 2022 [1 favorite]


Alterscape said pretty much everything I was going to say. Ribbon cable will make this as easy as it's going to get (ideally RAINBOW ribbon cable so you can keep which is which straight without having to count over every time) and you will have a better time using heat shrink tubing than trying to wrap your solder joins in tape.

But that said, your time is almost certainly worth way more than what you'd pay for someone else to have already manufactured this! Especially if you end up needing to buy tools or supplies. This is fiddly work and I'd never have tackled it if it hadn't been my literal job. Look a little longer to see if someone sells what you need.
posted by potrzebie at 10:18 PM on June 13, 2022


Response by poster: > It sounds like you may not be too experienced making cables, so unless part of your intent is to get better at making DIY cables, why not just invest in a USB to serial adapter?

You're right about the experience, but yeah, it seemed like a fun skill to learn.

I've got a USB to serial converter already, but it's no good to me here because I don't have a DB9 port to plug it into - just the 10-pin header on the motherboard itself. I can find a header to DB9 adapter with the right pin layout, but there's nowhere to put it on the case I've got even if I had it.

That wouldn't stop me from being able to just open up the case and plug it in when needed, but realistically: I don't need this at all. The computer has a perfectly functional IPMI console which gets me everything the serial console would, plus I can access it over the network. Getting a physical serial port is just for fun, not out of necessity.

I really appreciate the advice so far!
posted by vibratory manner of working at 10:46 PM on June 13, 2022 [1 favorite]


Good for you!

Wish I had the confidence to even try this kind of stuff. But, it seems pretty straightforward. Solder this wire here. There has to be an insane amount of documentation on this on the internet. Go for it.
posted by Windopaene at 10:51 PM on June 13, 2022


>>there's nowhere to put it on the case I've got even if I had it.

You would use this item here:

https://www.startech.com/en-us/cables/plate9m16

Undo one of the slots in the back and put this in its place.
posted by kschang at 10:54 PM on June 13, 2022


Response by poster: Yeah, no. I am well aware of those, I have a couple already (although in the wrong pinout), but I have a very tiny case with no PCI slots. Short of doing surgery to either the i/o shield or the side of the case, I have nowhere to put a DB9 port, let alone a PCI slot shield containing a DB9 port.

Could I solve this by using a different case? Sure, but that's not the question.
posted by vibratory manner of working at 11:15 PM on June 13, 2022


Best answer: it's probably pretty easy to split the cables out individually there with just a boxcutter or something.

Nearly all rainbow ribbon cables can be split using just your fingernails. Which has the advantage that there's almost no chance you'd be damaging the cores.

What I'd do: put an IDC connector on a rainbow ribbon. Note the marking on the IDC (usually a triangle or arrow) and line up the black wire with that. Punching down the connector works best with a bench vise or pliers with parallel jaws. Split out the other end of the rainbow over two inches or so, take the wire that's ground on the IDC/header, cut it shorter by one inch and strip the end. Solder two lengths of wire to it as Alterscape describes, then lay down the wires into the RJ45 socket's punchdown "forks" and press them down.
posted by Stoneshop at 2:11 AM on June 14, 2022 [1 favorite]


One of the things William Gibson got right in Neuromancer was the "OMG find the right dongle" bit. Serial is trivial once you know what you are doing.... 25 pin, 9 pin, RJ-45, it's rather simple. Go for it.

Tech Stuff - RS232 Cables and Wiring

1 DSR/RI 6,9 Data set Ready/ring indicator
2 DCD 1 Data Carrier Detect
3 DTR 4 Data Terminal Ready
4 SGND 5 Signal Ground
5 RD 2 Receive Data
6 TD 3 Transmit Data
7 CTS 8 Clear to Send
8 RTS 7 Request to Send

Don't get me into the backpack full of dongles for different devices and whether or not you need a crossover cable to make things work. Bless you that you're not dealing with 25 pins.

Not hard at all. And BTW a lot of those USB serial things duck balls.

Do It!
posted by zengargoyle at 3:33 AM on June 14, 2022


It wasn't clear to me from the initial question that you're trying to add a serial port to access IPMI from outside your PC, not trying to add a serial port for your OS! That neatly explains why USB-to-serial is not useful here. Thank you.

Suspect this is totally within your capabilities to learn, though you may need to spend more money on tools than you consider worth it for one project. You'll want wire strippers, wire snips, a soldering iron, some solder, probably a pair of pliers for crimping down the IDC onto the ribbon cable.
posted by Alterscape at 7:15 AM on June 14, 2022


Best answer: Re: your question on grounding, it's OK to connect multiple grounds together. On the other hand, I think there is only one ground pin on RJ45 serial, on pin 4.

If there's room inside your case, you could take a DB9 to motherboard connector of its backplate and then connect it to your motherboard and USB adapter, stuff the whole thing inside the case, and snake the USB end out the back. You could also buy something like this to accomplish the same thing w/o the DB9 connector in the middle - if you go that route, make sure whatever you get is 5V tolerant like this one is. Most of the USB-to-serial converters that end in pin headers want 3.3v instead. That's not as fun as building something, though.

I'm really surprised what you want isn't available as an off-the-shelf part already, but I haven't been able to turn anything up. I've seen lots of other adapters available for purchase that make way less sense.
posted by jordemort at 8:48 AM on June 14, 2022


Okay, Mini-ITX board and NO I/O other than what's available on the backplane? Personally I'd just go with the USB console cable, since you won't be able to add anything to the backplane without some serious Dremel (tm) time anyway, or leave a loose plug with cable sticking between the backplane and the case. Doesn't look very good, but perfectly functional as long as they're not stressed.
posted by kschang at 9:22 AM on June 14, 2022


Response by poster: > since you won't be able to add anything to the backplane without some serious Dremel (tm) time anyway

The i/o shield for my motherboard is shared by a couple different models, so I've got some unused punchouts for extra rj45s already on there, no dremel required.

I think my mental block was that I was just looking at crimping guides and not considering soldering to join the extra wires together. It's not the only thing I could use a soldering iron for, so I'll be heading in that direction next. Much appreciated, everyone! If I get it done before the 30 days is up I'll come back with a picture.
posted by vibratory manner of working at 5:02 PM on June 14, 2022


Best answer: since you won't be able to add anything to the backplane without some serious Dremel (tm) time anyway

Nonsense. These I/O panels are paper-thin metal, and you can cut holes in them using a chisel. A Dremel? Just wave it in the general direction of the panel. Two minutes, tops. Including finding the damn thing and a cutting bit.

Much appreciated, everyone!

One small suggestion still: the pin header on the mainboard has one missing pin in addition to the marking indicating pin 1; close the matching hole in the IDC connector using a drop of glue to prevent one of the ways of putting the cable on the wrong way.
posted by Stoneshop at 12:04 AM on June 15, 2022


« Older Home teleprompter?   |   Accessible travel at NC's Outer Banks Newer »
This thread is closed to new comments.