RS232 vs "TTL Serial" and USB to serial converters confusion - Page 1
Forum section: electronics / general

author: Zbig
author_rank: Frequent Contributor
timestamp: August 30, 2016, 10:49:08 am
content: HiI have ordered an Array 3721A electronic load. While, theoretically, the manufacturer lists an USB comms option for 372x series, I don't think it's available. Everyone seems to be using these loads either with optional GPIB expansion or serial to USB converters. From thehttps://www.eevblog.com/forum/testgear/any-experience-with-scpi-and-chinese-dcprogrammable-loads/msg352717/#msg352717post and thanks to MarkL's investigation, we learn that 372x implements "real" isolated RS232 using MAX202 transceiver.First of, that's how I understand RS232 vs. "TTL serial" (please correct me if I'm wrong):RS232: +3V to +15V for logic "0"; -15V to -3V for logic "1"TTL serial: 0V for logic "0"; VCC (be it 3.3V, 5V, etc.) for logic "1"Now, searching for a USB to RS232 converter for controlling my future DC load with my laptop, I came across countless similar-looking adapters with converter circuitry hidden in the DB9 plug and a short USB-A lead sticking out; fair enough. But pretty much all manufacturers/resellers, if they elaborate on the converter chip at all, almost invariably mention some variant of FTDI232. I even managed to find some pictures of the insides of one of these gizmos and, sure enough, there was lone FTDI232, few passives and maybe an LED or two if they were generous. No MAX232 or equivalent voltage level shifter to be seen. How is that supposed to work? How an FTDI232 alone, being a "TTL serial"/UART to USB converter is coping with high, bipolar voltage levels allowed within RS232 standard, let alone driving them into serial line? Do they rely on some crude diode clamping on the input for receiving? Is there some non-written agreement/expectation that "driving" 0V on TXD still counts as "negative" (i.e. logic "1") on the receiver side (despite not fitting in the standard-defined voltage window)? I'm confused, that doesn't seem right at all. I use FTDI-based gizmo for interfacing UART port of my microcontroller-based projects to PC but I wouldn't at all feel comfortable hooking it straight to "true" RS232-talking device.To further add to my confusion, some resellers list Array 3312 adapter (http://www.array.sh/yq-fje.htm), clearly marked as "TTL level" by the manufacturer, as suitable for "true-RS232" 372x series DC-loads as well.Am I missing something? Where can I get a proper, standards-complying RS232 to USB converter?

author: tatus1969
author_rank: Super Contributor
timestamp: August 30, 2016, 02:28:38 pm
content: if your adapter has a DB9 connector, you can be sure that it produces RS232 compatible levels. These have a MAXxx equivalent level shifter in addition to a FTDI. If others still relate to RS232 they mean the data protocol only. You cannot directly hook up RS232 levels even with clamping, because the signal polarity also differs. TTL: high voltage is '1', RS232: low voltage is '1'.

author: Zbig
author_rank: Frequent Contributor
timestamp: August 30, 2016, 03:14:11 pm
content: Quote from: tatus1969 on August 30, 2016, 02:28:38 pmAs much as I'd like this to be the case, some more research on-line seems to confirm my fears but at least some of them are apparently designed properly:https://www.adafruit.com/products/18Just have a look at some of the image search results at the top:https://www.bing.com/images/search?q=rs232+to+usb&FORM=HDRSC2I'm sad to say it doesn't surprise me, really. I've had a brand-name powered USB hub that back-fed its externally provided voltage to the upstream USB port. I have another one that claims all kind of overcurrent/over-temperature/you-name-it protections while really it has 1:1 connection from the DC barrel jack to its downstream ports. I currently have no trust and no expectations when it comes to cheap electronic accessories/PC peripherals, etc. I'm now 100% sure that the manufacturers of these dodgy RS232 adapters, after they realized that it doesn't immediately blow up most of the connected devices and even works kinda-sorta-almost correctly with some of them, didn't have any second thought before pushing them to market.I ended up ordering this (listing in Polish) and support local small business:http://allegro.pl/show_item.php?item=5762475905It seems to be designed and implemented properly by using both FTDI232 for USB to TTL UART and then MAX232 for TTL UART to RS232. It also exposes TTL UART to the nice screw-less connector. RS485 is an added bonus - I'm pretty sure I'll find it handy sooner or later.It's similar to this one available on eBay:http://www.nbgelin.com/485.htmbut features TX/RX LEDs and uses double MAX232 for translating all the RS232 auxiliary signals.EDIT:Some more thoughts regarding the prevalent cheap "cheating" adapters: I'm not sure but maybe you can program FTDI232 to invert its TTL input/output? I.e. make TTL high a logic "0" and TTL low a logic "1"? Then count on the device interpreting TTL low (0V) as "close enough" to -15V - -3V and taking it for logic "1"? Ugly, messy and just wrong - sure, but not anything some anonymous cheap OEM would hesitate for a second in order to save 50 cents.

author: tatus1969
author_rank: Super Contributor
timestamp: August 30, 2016, 11:06:16 pm
content: can you list one device that proves to have DB9 but no level translator? you cannot tell from a picture, could be double sided boards.@USB hubs back powering, this is really bad but in fact most self powered hubs for <50$ do it wrong. Can destroy your computer.

author: Zbig
author_rank: Frequent Contributor
timestamp: September 01, 2016, 12:59:20 pm
content: You may be right - there could be something on the underside of the PCB. Right now I don't have any proof that they might be cutting corners this bad (i.e. omitting the level shifter altogether). I decided to play it safe and ordered one with all the ICs clearly visible. I might, however, get some other one in the future and poke it with a scope.

author: tatus1969
author_rank: Super Contributor
timestamp: September 01, 2016, 06:48:07 pm
content: lets cross fingers that you got one with a genuine FTDI chipThere is an increasing share of fakes out there, and those are known to be unstable.And even with genuine chips, I could never achieve 100% stability. Keep having lost characters, and even random data spit out that definitely has not been transmitted by my controller at the other side. Meanwhile I tried several different ones. The Profilic chips seem to be worst, including Windows BSOD.Part of the problem seems to be the Windows USB stack itself. At work we made tests with deliberately disturbing USB transmissions, and it appeared that this was not recovered by initiating proper retransmissions. Linux would behave better there.For hobbyist projects still okay though, but for systems requiring high reliability like industrial control, I always strongly hesitate using USB. Better stick a PCI based RS232 card into a computer, that has proven to be rock solid for decades.

author: Quiggers
author_rank: Contributor
timestamp: September 15, 2016, 11:30:49 am
content: Any recommendations of a good PCIe card, I've been eyeing up one from Advantechhttp://buy.advantech.eu/Industrial-Communication/Serial-Communication-Cards-PCI-Express-Communication-Cards/model-PCIE-1602C-AE.htmWe were using 2 ftdi cables on a test rig, one 485 one 232, but windows7 kept dropping/swapping com IDs , so production would crawl at about 10 units per hour and a very frustrated operator.Even managed to brick one unit when the 485 swapped with 232 and a binary file wrote 485 coms to a processor.

author: tatus1969
author_rank: Super Contributor
timestamp: September 15, 2016, 01:26:46 pm
content: we have been using these in my last company. Rock solid 24/7 with stuff like 50kW VFD next to them.http://www.meilhaus.de/ME-9000-2+PCI+2-Port+serielle+Interfaces.htm

author: Quiggers
author_rank: Contributor
timestamp: September 15, 2016, 02:50:18 pm
content: Danke schön.the MIX version looks like a perfect fit for my needs.

author: tatus1969
author_rank: Super Contributor
timestamp: September 15, 2016, 08:35:16 pm
content: Quote from: Quiggers on September 15, 2016, 02:50:18 pmyou're welcome. They have different other types with up to 8 individually opto isolated ports, targeted at industrial automation.

author: TheBay
author_rank: Unknown
timestamp: September 16, 2016, 10:31:11 am
content: I use a Startech PCIe "Native" 2 port serial card. Its amazing, everything works, every pin on the DB9 connectors, also has the option to supply 5v or 12v on one of the DB9 pins.StarTech.com 2 Port Native PCI Express RS232 Serial Adapter Card with 16950 UARThttps://www.amazon.co.uk/dp/B001H3KG6W/ref=cm_sw_r_cp_apa_lR82xbGFPYEF6For USB to RS232 I use a Startech with a genuine FTDI chip and it has a level converter. Again works perfectly. Made in Taiwan.StarTech.com 1 Port FTDI USB to Serial RS232 Adapter Cable with COM Retention - USB to RS232 Serial Port Adapterhttps://www.amazon.co.uk/dp/B004ZMYTYC/ref=cm_sw_r_cp_apa_8R82xb76JCKAXAs I use serial a lot I have tried lots of adaptors etc in the past and even resorted to building an old PC with on board serial for fussy things. But these Startech devices both work perfectly and top quality. Cannot recommend enough.

author: ebclr
author_rank: Super Contributor
timestamp: September 21, 2016, 03:11:00 pm
content: Buy the real thinghttps://world.taobao.com/item/42542997296.htm?spm=a312a.7700714.0.0.2305Zq#detail

author: Zbig
author_rank: Frequent Contributor
timestamp: September 22, 2016, 09:08:22 am
content: Quote from: ebclr on September 21, 2016, 03:11:00 pmLike I said in my first post, that's actually a "TTL serial" to USB, not "true RS232" to USB. It's meant for their other/older devices that use TTL comms. They do such a poor job (not) explaining that, even some stores list that as compatible with 372x e-load series. That, and it has a downstream USB A receptacle for connecting to hostEDIT:I got this:http://allegro.pl/show_item.php?item=5762475905and it works fine.