Live data from Hacker News

The Serial TTL connector we deserve

kohlschuetter.github.io

71–80 of 80 posts

Re: The Serial TTL connector we deserve

#71
post #22

TagConnect or EdgeConnect ftw.

Is there a standard for TTL-serial pinout on those? I'm not aware of one, only for SWD…

Yes. For about 98% of embedded, you want the pinout for the TC2030-FTDI-C232HD-DDHSP-0-DTR cable that has DTR and RTS on it for STM32, ESP32, and Arduino-style bootloaders. It's 3.3V only iirc. Power is delivered by the cable on pin 1 so leave that terminal disconnected if it's an issue.

You can "break glass" and get the off the shelf cable delivered overnight (and you can spec it if you need a spec cable) or you can make an adapter for the 6-pin tag-connect cable and the TTL-serial adapter that you have.

Re: The Serial TTL connector we deserve

#72
post #5

I cannot count how many PCBs I did with various quick connect ideas to have a fast way to debug.. - Chop a PCI connector and have edge fingers on the PCB - Skedd connectors - Micro usb with a toggle switch or solder blob to switch between SWD/UART or USB - Low profile usb-c and have D+/- as normal, and RX/TX over the accessory pins (like audio) - Pogo pin clips - GH1.25 connectors - Tag-connect meh - If thickness of…

How did the skedd connectors work out? I assume Wuerth redfit? I'm looking at ordering some to try them.

Re: The Serial TTL connector we deserve

#73
post #63
post #59

Earlier quoted context omitted.

What byte sequence on a Tx/Rx/Gnd serial line can trigger Sysrq key sequences?

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.

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.

Re: The Serial TTL connector we deserve

#74
post #67
post #8

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. Replacemen…

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!

This one?

https://en.wikipedia.org/wiki/DEX_(protocol)

https://www.cable-tester.com/dex-connector-pin-out/

https://www.storedex.com/abcs-of-dex

Re: The Serial TTL connector we deserve

#76
post #5

I cannot count how many PCBs I did with various quick connect ideas to have a fast way to debug.. - Chop a PCI connector and have edge fingers on the PCB - Skedd connectors - Micro usb with a toggle switch or solder blob to switch between SWD/UART or USB - Low profile usb-c and have D+/- as normal, and RX/TX over the accessory pins (like audio) - Pogo pin clips - GH1.25 connectors - Tag-connect meh - If thickness of…

How did the skedd connectors work out? I assume Wuerth redfit? I'm looking at ordering some to try them.

They are ok, put them into production for around 250units. Was very excited about them, but plugging and unplugging is not as graceful, and sometimes you stab yourself with their sharp pins. I'm going back to mounting a usb-c connector on the pcb me thinks.

Re: The Serial TTL connector we deserve

#77
post #16

I always wonder why Molex makes only black and white connectors. This makes it needlessly difficult to use different connectors for different purposes. Same with phoenix contact but there it's mostly green terminal blocks. Is it so difficult to just offer some more colors?

You can solve that problem with a bit of heat shrink if you really want to.

Re: The Serial TTL connector we deserve

#78
post #11

Nice but it’s huge! I’d prefer something smaller like these 3 pin magnetic connectors from Aliexpress. https://a.aliexpress.com/_c4CtK0gj

And where do I put Vref, RTS, CTS, and plug detect? That's 7 pins ;) Less of a joke though: those aren't polarized, how do you not accidentally 180° them? Are they magnetically polarized or what? [ed.: I didn't initially see it, they're mechanically polarized, one "short end" is flat, the other rounded.]

For a minute there, I was picturing a connector with an odd number of pins (3), and was actually hoping that they were indeed non-polarized. This would allow for ground to be on the middle pin and for directional signals to radiate outward from there.

So, for example, with 3-wire serial and a non-polar 3-pin connector: TXD and RXD backwards (again) so nothing talks? No worries: Flip the connector 'round 180 degrees, and it works.

Same goes for CTS, RTS, DTR, DSR, and so on.

Re: The Serial TTL connector we deserve

#79
post #19
post #18

I would tell anyone who is doing a new traditional serial connector/cable to add the following - 1. Automatic DCE-DTE detection and an interface which will rewire itself as needed to be the correct way, or you automatically know DCE vs DTE by connector gender. 2. Automatic Voltage Detection - 232 levels, TTL 5v, TTL 3v - and interfaces that are isolated enough to deal with the wrong voltage (clamping diodes or whatev…

At that point it's not a debug connector anymore. Note there's a pseudo-standard for V.24/RS232 on RJ45 already, and nobody uses it for debug connectors since (a) you'd need a RS232 transceiver and (b) RJ45 connectors are honking huge. The point is to shave off the last cent, which is why you get a possibly-unpopulated 1×4 or 1×3 2.54mm header. Bonus points if the manufacturer designed series resistors into the board…

> the point is to shave off the last cent

A Tag-Connect footprint has a BOM cost of zero. (Though not a TCO of zero in a closed enterprise ecosystem, as everyone needing to debug the devices needs to buy a stupid $60 pogo-pin cable.)

Re: The Serial TTL connector we deserve

#80
post #46

Earlier quoted context omitted.

You'll be wanting these: https://www.digikey.com/en/products/detail/edac-inc/686C0731... And yes, they're magnetically polarized according to the datasheet. To answer the sibling comment, they're through-hole soldered but frustratingly are 2.7mm not 2.54 so you'd be squeezing a little into an existing header (ignoring clearance on the side anyway). I'm not sure why the 7-pin is obsolete, they make up to 5-way active.…

Yes, yes :). I was really joking with the 7 pins. It would be amazing though to make it a hermaphroditic 4 or 6pin connector. With a pinout like this: GND TX [VrefTX VrefRX] RX GND So it always plugs at a 180° rotation, connecting RX to TX. And any cable also rotates 180°. Since you always have an odd total of (connections + cables), you always get the right connection...

Frankly I'm amazed that a solution exists that isn't hundreds of dollars. Some of these niche connectors can be really spendy.

I think rotation is a bit extra though. The frustration with the dupont/0.1" headers is that they're not polarized. As soon as you add a key (or a literal magnetic polarity here), that problem goes away.

There are possibly ways to handle orientation in software. If you did a 4-pin and include VCC, the pinout on the pi is hi-lo-tx-rx, so you could look for hi-lo-hi-hi and wait for some period to identify any logic transitions on the tx pin. There should always be a period where that pattern is correct, because either the output is idle (high) or it's sending a bit sequence which will also involve a high somewhere. If you ever see the "2nd" pin high, you know it's not ground. Then your serial transceiver needs some way of setting up rx/tx or tx/rx (either you remap the pins, software serial, or use an analog multiplexer).

Post reply on HN