Which USB to serial UART pins are still relevant/useful? - Page 1
Forum section: electronics / beginners

author: cigmas
author_rank: Regular Contributor
timestamp: August 19, 2020, 12:06:27 am
content: I'm looking to get a UART USB to serial device and currently just need the RXD, TXD, and GND pins. Some devices have additional pins, and I wonder if they are still relevant considering the age of the RS-232 protocol, and for what.Specifically, comparing these two which use the recommended FTDI FT232RL chip:https://www.amazon.com/DSD-TECH-SH-U09C3-Isolated-Featuring/dp/B07TS3GPQ1/https://www.amazon.com/DSD-TECH-SH-U09C5-Converter-Support/dp/B07WX2DSVB/The first has a USB isolation module for protecting the computer, which is great for peace of mind.The second has more voltage levels, 1.8V and 2.5V in addition to the 3.3V and 5V common to both, as well as more pins:SH-U09C3 Pin Definition: RXD,TXD,GND,VCC,P30(P30 is only for STC MCU)SH-U09C5 Pin Definition: CTS,RTS,RXD,TXD,GND,VCC,DSR,R1,DCD,DTR,RESETWhat applications are the CTS,RTS,DSR,R1,DCD,DTR,RESET pins used for?Since I don't buy this type of device often, if there is even a remote potential usefulness of those pins to me, I think it will be good to have them for future versatility.Otherwise, if the RXD, TXD, GND pins are generally sufficient, the isolation module of the SH-U09C3 is rather appealing.Given my lack of familiarity, I would be grateful for the feedback from folks experienced in this topic.

author: digsys
author_rank: Unknown
timestamp: August 19, 2020, 12:34:13 am
content: Of the many dozens of RS232 <> X systems I've worked on / designed / serviced etc over the last many years, and several already this year, I have nearly always encountered / used the CTS and RTS lines as well. I always include them in any design I ever do. They may not be used in their traditional roles, sometimes security / handshaking / control etc etc, but one or both are often encountered. I even find them in "pseudo" multi drop RS232 networks. On a FEW occasions, I also find one more line - DTR ? or similar. Is is rarely critical, and can often be tied off / tied to RTS etc etc, but it is used. Again rarely. The extra 2 lines are especially useful if you ever need to include RS485 in the mix.

author: cigmas
author_rank: Regular Contributor
timestamp: August 19, 2020, 02:01:06 am
content: Hmm. What kind of systems are those?In your opinion do the additional pinouts and voltages offer more value than the isolation module?

author: digsys
author_rank: Unknown
timestamp: August 19, 2020, 05:01:23 am
content: Depending on the application - isolation is a separate question. Vehicle / HV control etcdefinitelyNEED isolation !! I have both types of converters.If I was to chose only one type - 100% isolation ! No reason you can't have both types? These things are pretty cheap to make / buy.For different voltages - many comms ICs can usually work over a wider range these days - 3.3V and 5v definitely, I don't come across the other voltages, but I'm sure there's ICs that can handle more than the 2 main ones.I work on ALL sorts of stuff - vehicles, power systems, security etc etc IF the device I'm repairing requires CTS, RTS etc etc I HAVE to have an adapter to handle it. One of the last jobs was a CURTIS wheelchair controller - not only did it do a RTS-CTS handshake, but the bugger timed it AND inverted it as well :-) So most my converters have invert option jumpers on ALL signals. You can't decide what signals and how they're configured on stuff you get in for repair etc and on MORE than one occasion I've had to make custom pinouts on systems that were deliberately non-standard configured to stop foreigners like me (us) from repairing them, or at least make it much harder.Depends on what your future plans are. Bottom line - it's not a big deal to have them anyway - bugger all extra cost.

author: cigmas
author_rank: Regular Contributor
timestamp: August 19, 2020, 05:56:42 am
content: Ok, there's no way I'm touching vehicles or high voltage. My initial inclination was towards the isolation module, then your comment about commonly encountering CTS and RTS started swaying me towards the device with more pinouts, and your prioritization of isolation sways me back.I'm most likely to be dealing with just consumer electronics and possibly flashing firmware, and the immediate motivation for the purchase is to troubleshoot a faulty router. Considering how most of these types of converters don't have an isolation module, I'll likely be fine without it. On the other hand, with a computer costing one or two orders of magnitude more than the converter and device being debugged, I figure it's not a bad insurance policy.No doubt, both satisfy the initial purpose. I'm trying to use some forethought and pick the one that offers the most future utility. Or I might just flip a coin.

author: magic
author_rank: Super Contributor
timestamp: August 19, 2020, 06:43:25 am
content: Quote from: cigmas on August 19, 2020, 05:56:42 amIf you just want to get a serial terminal on some embedded CPU you will not need flow control.I have done it on a few routers and DSL modems, an oscilloscope, a hard disk. They only used GND/TX/RX.Look up tutorials on hacking similar devices, you will only see more of that.Isolation can be handy because if you lose GND connection there is a real risk of damage to the serial dongle or to the other serial device if both ends aren't mains-earthed. I have blown a GPS receiver module that way (and yes, it also didn't use flow control).One caveat: the isolated dongle may require external power supply to the isolated side. You will need to bring 3.3V from your router. Usually it is provided.

author: gooligumelec
author_rank: Contributor
timestamp: August 19, 2020, 06:45:53 am
content: Quote from: blueskull on August 19, 2020, 06:20:48 amActually I'd argue that "for most daily usage", you only need TxD, RxD and GND.Sure, I can come up with examples where I've needed CTS/RTS for hardware handshaking, or DTR/DSR for higher-level "I'm here/ready" signals (also seen DTR used to supply power on good old fashioned +/- 15V RS232).But most of the time, three wire serial is all you need.And sometimes, if the transmission is one-way, e.g. monitoring the console log on the dev board I'm working with, you only need two - RxD and GND!

author: digsys
author_rank: Unknown
timestamp: August 19, 2020, 06:59:25 am
content: Well, as mentioned before - Non-isolated, Rxd-Txd only 5V-3V3 only > $10+/- parts. Add all the I/O > +$3-4. Add isolation > +$10+/-If you go full options, you still won't need a bank loan and you can't be caught out one day :-)

author: cigmas
author_rank: Regular Contributor
timestamp: August 19, 2020, 03:45:42 pm
content: I'm sure a custom-built solution would be great to get all the features, but I'm not at that level. I'm just choosing between the DSD Tech SH-U09C3 (isolation) and SH-U09C5 (more pins) models linked in the first post.Thank you all so much for the input. It's great to have such experienced people responding. I think I will go for the model with isolation.

author: BrianHG
author_rank: Super Contributor
timestamp: August 20, 2020, 04:19:36 am
content: My projects only use TXD/RXD. I've built into my com protocol handshaking capabilities which tame the system.Notes: with FTDI, do not burst more than 2048 characters at a time, otherwise without CTS/RTS, it may occasionally drop characters even though they boast a 4096 character buffer when running at their top safe '921600' baud.Also, if you are not using handshaking, make sure your peripheral can always respond unless you do not care about lost incoming data.

author: mansaxel
author_rank: Super Contributor
timestamp: August 20, 2020, 09:50:21 am
content: "it depends"As always. But I second the need for hardware handshake. There's always that strange device that wants to honour DTR och CTS/RTS. RING is the one I'd ignore ;-) mostly because the things I do serial with most of the time, Cisco gear, omits it to get the console port into an 8p8c ("rj45") jack.I've sort of started sketching a design for an insulated converter with most signals populated, since I need one for interfacing to my geothermal heater. My idea is to do MAX232ish interface circuit towards RS232, and optocouplers towards a FTDI chip, obviously going USB to host. To power the MAX232, an insulated 5V DC/DC converter across the optocoupler gap.

author: wizard69
author_rank: Super Contributor
timestamp: August 21, 2020, 04:02:13 am
content: Quote from: cigmas on August 19, 2020, 03:45:42 pmFor a slightly different view. I make use of USB to RS232 converters almost on a daily basis working in automation. That can be a hook up to a barcode scanner one minute and a servo drive a bit later. Most of this type of equipment you can do fine with a 3 wire interface, that is GND, TXD & RXD. However there are always gotchas and some time you will need hardware handshaking. The bigger problem is that it seems like almost nothing these days implements a 9 pin D connector, this leads to may adapter cables.So what I do is use a more standard RS232 dongle with a 9 Pin D connector. That cable is supplemented but gender changers, null modem changers, 9 pin to 25 pin adapters (both straight and null) and a variety of custom cables For RJ, and a bunch of other sockets. Oh by the way you absolutely need to label these. In any event with the right cable you can walk up to XYX widget and plug in and be communicating with in minutes. This saves a lot of grief and the need to keep connection notes on every device you need to lug into.So in simple terms most of the stuff I connect to is either straight or null modem 3 wire interfaces. Often these device plugged into has a non standard socket for communications thus a proliferation of adapter cables. Hardware handshaking is not a big deal anymore but ti does crop up.Now for one other tidbit. Having access to the hardware control lines gives you a make shift digital output if you need to trigger something from the computer. While it was some time ago i did use this hack to drive an optical isolator. So yeah having the control pins gives you a dirt cheap I/O bit. How much of a problem this owuld be with modern OS's is unknown, that was in the early windows l DOS time frame. But hey it worked.

author: westfw
author_rank: Super Contributor
timestamp: August 24, 2020, 02:10:50 am
content: QuoteThese days, CTS and RTS are normally for "hardware flow control", DTR and DSR for "modem control." (DTR indicates that you're "ready", DSR indicates that there is a "call" in the other direction.)DCD and RI are essentially obsolete modem control. RI ("Ring Indication") would have been an actual indication of the "Ring" signal on a phone line, happening before the equipment asserted DTR and DCD would have indicated detection of a carrier/modem negotiation later in the call negotiation phase...RESET is not a standard comm signal, and I don't know what it's connected to on the board you linked. There's a RESET signal on the FT232RL chip itself (which I don't think is useful?), and many Arduino-compatible boards uses a capacitively coupled signal to DTR to reset the target chip (but you shouldn't need a separate signal on the converter for this, if it has DTR.)QuoteHeh. I designed that pinout, a couple of decades ago (after prior experience with pinouts and connectors that worked less well.)It got remarkably few complaints over the years... (Biggest complaint: in standard rj45-to-building wiring, the pairs that get twisted together are "wrong" WRT best possible signal integrity...)

author: mansaxel
author_rank: Super Contributor
timestamp: August 24, 2020, 01:44:43 pm
content: Quote from: westfw on August 24, 2020, 02:10:50 am(this is a "I met Lassie" moment, as it is called when we in Sweden meet someone famous and brags about it. )Cool! I remember the first time Iunderstoodthe 1-8 -> 8-1 flip and its implications. Today, it's sort of a greybeard ritual ;-) mostly because the closest people get to it isthis little implementationand then they tend to use plain USB instead.Sidetrack: Think of the naïveté of the USB designers when they decided to not do a standard device class for serial ports, and now, 20+ years later, there's still new gear built with RS232 ports.

author: oPossum
author_rank: Super Contributor
timestamp: August 24, 2020, 03:38:10 pm
content: Quote from: mansaxel on August 24, 2020, 01:44:43 pmThey did. The Communication Device Class. The Abstract Communication Model (CDC ACM) is used for "serial" or "COM" ports. Unfortunately the handshakes lines have limited support.https://usb.org/document-library/class-definitions-communication-devices-12

author: TK
author_rank: Super Contributor
timestamp: August 24, 2020, 04:18:10 pm
content: I think the signals available on the FTDI cable is what makes sense today: RX TX CTS RTS. The pinout is also kind of a standard and available in many development boards

author: helius
author_rank: Super Contributor
timestamp: August 24, 2020, 05:49:31 pm
content: The "full" RS-232 signals are numerous, including "main and auxiliary" data channels, in and out clock signals, etc. But the common subset for asynchronous communications is about 10 pins in the DB-25 connector, and the later DE-9 connector has all of those except for protective ground.The "modem control" signals: RI, CD, DSR, DTR; The Hayes AT command set made RI and DSR obsolete, but CD and DTR were still necessary for answer-side use with BBSes and the like. CD going from high to low meant that the connection dropped and the answering software should reset to its answer loop. Without using CD, the software would be unable to tell different callers apart. DTR was used to tell the modem to return to its command state, in preparation for hanging up, renegotiating speed, etc.

author: mansaxel
author_rank: Super Contributor
timestamp: August 24, 2020, 05:57:56 pm
content: Quote from: oPossum on August 24, 2020, 03:38:10 pmExcuse me for poor wording; what I meant was that the interface is so unspecified so as to require a chip-specific driver, which for instance is typically not required for HUD class devices (mice/keyboards), nor for mass storage, audio devices, et c. I think it was unfortunate.

author: Renate
author_rank: Super Contributor
timestamp: August 24, 2020, 06:43:37 pm
content: I think Ring Indicator is the most important signal.Just kidding.My $0.02: I just need TXD, RXD, Gnd.It's nice if the UART has various voltage levels, 5 V, 3.3 V, 1.8VFor me, absolutely required, USB UARTs with real unique USB identifiers.Buy fake FTDIs and some program you have will open the wrong UART if you moved the UART on a hub or plugged in another.Always put it in your udev rules:Code:SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A50345BI", MODE="0660", GROUP="plugdev", SYMLINK+="doomsday"