selecting converter for serial communications - Page 1
Forum section: electronics / general

author: Kittu20
author_rank: Regular Contributor
timestamp: April 30, 2023, 12:42:47 pm
content: Hi thereI came across three types of converters USB to TTL, UBB to R232 and USB to RS485 converter.I am interested to learn more about converter and related protocol. I guess selection of any converter depends on the specific communication distance between two devices.Which converter would you select for 1 feet distance? USB to TTLWhich converter would you select for 30 feet distance? USB to R232Which converter would you select for 3000 feet distance? USB to RS458

author: peter-h
author_rank: Super Contributor
timestamp: May 01, 2023, 12:41:31 pm
content: Look at thesehttps://www.kksystems.com/usb-convertersMade in the UK, not chinaFor "TTL" you just use RS422 and use whichever of the two (A or B) wires gives you the desired polarity.RS458, I think you mean RS485.There is no "protocol" implied. These are merely interfaces. The protocol is whatever the application software (driving the virtual COM port) implements with the device at the other end.

author: Kittu20
author_rank: Regular Contributor
timestamp: May 01, 2023, 03:57:12 pm
content: I think selection of a converter depends on the specific communication distance between two devices.For a distance of 1 foot, a USB to TTL converter should be sufficient. TTL (Transistor-Transistor Logic) is a low voltage protocol that can transmit data over short distances, usually up to a few meters.For a distance of 30 feet, a USB to RS232 converter should be used. RS232 (Recommended Standard 232) is a serial communication protocol that can transmit data over longer distances, up to 50 feet or more. It uses voltage levels ranging from -15V to +15V for data transmission.For a distance of 3000 feet, a USB to RS485 converter would be the best option. RS485 is another serial communication protocol that is designed for longer distances, up to 4000 feet or more.

author: Kim Christensen
author_rank: Super Contributor
timestamp: May 01, 2023, 04:30:23 pm
content: Quote from: Kittu20 on May 01, 2023, 03:57:12 pmNot entirely. If the other device has a RS485 interface, but is only located 25 feet away, you'renotgoing to use the "USB to R232" converter!

author: fchk
author_rank: Frequent Contributor
timestamp: May 01, 2023, 05:24:00 pm
content: Quote from: Kittu20 on May 01, 2023, 03:57:12 pm"Protocol" is the wrong word.You need to differentiate the physical layer (voltages, currents) from the logical (data) layer.You can send the string "HELLO\n" over all three interface types.- TTL 0V/5V or 0V/3.3V- RS232: +12V/-12V- RS485: A>B/A<B (only voltage differences count, not the actual voltages).A protocol defines how data is formatted, headers, checksums, addresses etc.RS485 is not a protocol. MODBUS/RTU is a protocol.fchk

author: NorthGuy
author_rank: Super Contributor
timestamp: May 02, 2023, 03:27:57 pm
content: Quote from: Kittu20 on May 01, 2023, 03:57:12 pmThe selection (of anything) depends on the problem that your design needs to solve. The "selection of a converter" is too restrictive in that sense. You may use USB directly without any converter, or you may not use USB at all.

author: GromBeestje
author_rank: Frequent Contributor
timestamp: May 03, 2023, 09:55:39 am
content: What are you trying to accomplish?Are you designing a product that needs a form of UART communication, and you need to determine what signal levels?What is the role of USB in the story? Do you need to connect some kind of device to a PC?

author: TomS_
author_rank: Frequent Contributor
timestamp: May 04, 2023, 11:44:01 am
content: Quote from: Kittu20 on May 01, 2023, 03:57:12 pmTheres more to it than distance because you can, of course, use RS485 to connect two devices only a couple of centimetres from each other.Consider the speed at which the two devices are going to communicate, and which of the 3 standards are more or less appropriate to handle higher speeds.Also consider the environment the communication is going to happen in, and how electrically noisy it is, and which of the 3 standards are better suited to survive in such an environment.

author: jwet
author_rank: Frequent Contributor
timestamp: May 05, 2023, 03:08:45 pm
content: Like others have said "it depends" - which is half of engineering really. These physical layers were all designed to address various problems. Your initial 1 foot, 30 feet, 3000 feet is a reasonable start. A good place to start might be wikipedia for each.TTL interfaces are just IC to IC communication on the same board. The name is used very loosely, there is little TTL still in use. A high is > 2.4v and a low is < .8 basically. Most can drive a few loads, perhaps a few mA or sink and source. Real TTL inputs actually require a sinking low and a near floating high. Its speed can be quite high but it has little "robustness" for noise and ground imbalance and shouldn't leave a box, its an internal interface.RS-232 is an ancient standard that uses bipolarity signals drives of +-5-15V highs and lows. (see the Wiki). Output Z of drivers is about 500 ohms and input Z's are 5k. The receive thresholds are +-3-15v. It was originally designed with a max speed of 19200 baud, but is commonly pushed much higher to fractions of a mega baud. Because of the bipolar signals and large noise margin (input thresholds smaller than output drive), it can be fairly robust and take a bit of ground imbalance and slop. 30 feet is official but in many applications, it is pushed to much farther.RS-485 is single supply differential signalling spec that uses two wires with opposing polarities (see wiki) and can be pushed to 10+ Mbaud. Output levels are 1.5v min differential and input thesholds are 100 mV. The common mode is -7 to +12 (+-7 on a 5v supply). It has very high noise margin and the differenetial signal and recovery is resistant to lots of types of noise and imbalances. Its also multidrop supporting star config (vs 232 point to point).This might get you started, there are volumes written on every physical standard and the evolve over time usually.Good luck.

author: peter-h
author_rank: Super Contributor
timestamp: May 06, 2023, 06:52:28 am
content: Most RS232 receivers have a +1.5V threshold, I think.

author: yar
author_rank: Contributor
timestamp: May 10, 2023, 04:11:19 am
content: Well, REAL RS-232's electrical traits - the kind you can run over twisted coat hangers and romex for 200 feet through a puddle :-) because you were feeding the UARTS through line drivers and receivers - has a swing of +/12V and thresholds of +/-3. In modern contexts where we are using RS-232's signalling (start bits, parity, framing, etc.) straight out of a glorified GPIO pin to talk to another TTL (if even that...) chip that's 2 inches away, we get much closer to that 1.5V mark. When our opposite signals are "almost ground" and "almost 1.8v", there's not a lot of headroom.That would, of course, not even have qualified as line noise when we had +12 and -12 marking our ones and zeros.So jwet is right in historic context and peter-h is right in the context of an arduino or robot or whatever someone here is likely to be working on. You can both have gold stars. :-) Actually, make that gold stars for everyone in this thread that's answer the question is unanswerable as it stands - there's WAY more information needed.[ ASCII Oprah "you get a gold star and YOU get a gold star" meme ]

author: westfw
author_rank: Super Contributor
timestamp: May 10, 2023, 05:17:45 am
content: QuoteFine answers for an exam, I guess.Reality is more complicated.TTL works fine over distances longer than 1 foot. FTDI's USB/TTL Serial cable is 3 feet long, IIRC.RS232 is useful for much longer distances than 30feet.Many of the "USB to RS232" converters you find in the market today don't actually implement rs232. You can get cheap converters that do little more than "inverted TTL." (which actually works fine, usually.)rs485 usually implies a half duplex 2wire system (this is what the common, cheap, USB/RS485 converters will do), perhaps multidrop, and a different "link level" protocol. The long-distance standard for "standard" serial communications would usually be rs422. (good luck finding USB/RS422 converters at reasonable prices, though.)