5/9/2026 at 11:56:29 PM
FTDI (the company practically synonymous with TTL serial adapters) uses 3.5mm tip-ring-sleeve connectors for this. In other words, a common headphone jack.I added one to my single-board computer enclosure, following FTDI's wiring. Now I can easily connect whenever I need to use the serial console, and a standard 3.5mm audio extension cable will let me reach across the room without moving my main computer. Replacement parts, if I ever need them, are cheap and easy to find.
Here's the pinout:
https://www.ftdichip.com/Support/Documents/DataSheets/Cables...
by foresto
5/9/2026 at 11:59:22 PM
That really sucks for hotplugging since TRS connectors sliding in basically make random connections before seating properly.Granted, you shouldn't hotplug TTL serial, but everyone™ does it anyway. (In some situations you're even forced to, to avoid reverse powering something.)
by eqvinox
5/10/2026 at 2:36:19 AM
I've been using this ftdi cable too for the last 15 years or so and, while trs isn't a great connector, I haven't had any issues in practice.It works well for capturing serial logs, a console or software updates in development. The advantage i saw was that I could order 50 cables from a distributor and give one to everyone that works on the device.
If someone needs one on the other side of the world, they can get one from a local suppliers.
Hot plugging hasn't been a problem in my designs, I add a series resistors to the uart net and ESD protection if software developers will use it.
When I use it for other devices, like routers, SBCs and IP cameras I avoid hot plugging and leaving it connected when the device isn't powered.
by foder
5/10/2026 at 12:01:05 AM
They're not random connections; they're predictable. I'm not worried about Tx briefly touching Rx or ground in these devices.by foresto
5/10/2026 at 12:04:42 AM
Random in the time sense. You'll get junk on your serial line, depending on the scenario that can matter a lot.by eqvinox
5/10/2026 at 12:34:44 AM
My scenario is connecting terminal emulators to getty or u-boot, which I think is a common one. A blip of line noise when plugging in would be barely considered an annoyance, easily cleared by pressing Backspace.But yes, if someone happens to be using their serial line for some kind of sensitive signaling, then I would agree that choosing a more isolated connector (or just avoiding hotplug) would make sense.
by foresto
5/10/2026 at 3:55:26 AM
There's a small risk of CPUs and I/O pins getting fried if GND levels aren't equalized first and instead that equalizing force would go through those pins. One could argue that it's hardware designer's responsibility to save users from such things, but then again, using a better connector than TRS can be one of them.by numpad0
5/10/2026 at 12:37:40 AM
Thing is, for a serial TTL connector to become ubiquitous, it needs to cover at least something like 99% of scenarios. Or maybe 95%. 3.5mm TRS ain't that, and thus just increases general diversity in connectors.by eqvinox
5/10/2026 at 1:09:49 AM
In my experience noise on hot-plugging the serial adapter is a complete nonissue. I'm sure it matters for you, sometimes. But for this kind of embedded work, I'd say it's important far, far less than 1% of the time.by exmadscientist
5/10/2026 at 2:56:06 AM
In my experience with... it's maybe 20? ... embedded boards, junk during boot breaks the boot flow for about half of them. And attaching quickly after target powerup is very often the crux of the exercise, to get to the bootloader fast enough before it moves on, but also you don't have the shifters (or Vref pin) in place to be able to attach beforehand...by eqvinox
5/10/2026 at 6:54:21 AM
Since I once had the case where junk on the line (from a wiggly connection) caused Magic Sysrq requests I'm fully on your side. No junk tolerated for potential hot plug connections.by jaeckel
5/10/2026 at 8:19:10 AM
What byte sequence on a Tx/Rx/Gnd serial line can trigger Sysrq key sequences?by foresto
5/10/2026 at 10:10:18 AM
It's not a byte sequence, it's a BREAK == pulling the line low for longer than a byte, i.e. invalid serial framing on the stop bit.by eqvinox
5/10/2026 at 5:33:20 PM
I'm aware of serial breaks, but this is the first I've heard of them being interpreted as SysRq by Linux. That could be handy. Thanks for the tip.I assume the possibility of spurious Rx state is why FTDI chose to wire Rx to the tip pin of the female TRS connector: It's the last pin to make contact with anything when plugging in, and therefore least likely to be bridged to ground. I suppose the mechanical design of any particular jack would determine whether it's possible at all.
by foresto
5/10/2026 at 7:31:08 AM
Using a male TRS 3.5mm audio connector is something you should do with care. When you hotplug that connector the plug's tip (T) may first make contact with the sleeve (S) of the receptible, then briefly hit the ring (R) until it finally lands on the tip connector. Same goes for the plug ring (R) which may have contact with the sleeve (S) of the receptible.So expected are:
T → T
R → R
S → S
and what can happen briefly is: T → S
T → R
R → S
Depending on what you're using the connector for, that can ruin your day. Likely this isn't an issue on serial connections, but I have seen people use that connector for power..On audio systems this is typically not an issue, since tip and ring carry signals that on any gear worth anything should have an output stage that can easily handle a connection to ground.
by atoav
5/10/2026 at 4:33:04 AM
Every vendor defines their audio jack connector serial port differently. It is very dangerous to use 3.5mm jack. There is no pinout standard of using 3.5mm.Even as pure audio jack, the 3.5mm connector has two standards, with the difference on ground and mic.
by ycui7
5/10/2026 at 8:35:14 AM
Well, not every vendor does it differently, because there are far more vendors than possible wiring permutations on a 3-contact connector... but I understand what you mean.The same issue applies to PCB header pins.
And the same goes for 25-pin D-sub connectors, which have been widely used as RS-232, parallel printer, and SCSI ports.
Voltages vary, too.
This is why we check before wiring them to other things.
by foresto
5/10/2026 at 11:22:25 AM
Funny - in the retail industry, we use a 1/4" jack instead that runs straight RS232 level traffic (for "DEX" - data exchange - typically sending invoices to a merchant from a route driver, or pulling data from vending machines on a route)......... and the DEX pinout has Rx/Tx in reverse (our tip receives and our ring transmits) in comparison to the FTDI TTL setup. Wellp!
by kotaKat
5/10/2026 at 9:09:05 PM
This one?https://en.wikipedia.org/wiki/DEX_(protocol)
by foresto