Author Topic: 'Real' RS232 USB Interface  (Read 2616 times)

0 Members and 1 Guest are viewing this topic.

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
'Real' RS232 USB Interface
« on: August 25, 2019, 05:30:38 pm »
I have a GPSDO that needs a 'real' (as in -ve and -ve voltages) RS232 and the Prolific cable that I bought causes all kinds of weird issues.  I looked around but real RS232 adapters are not easy to find and many have flakey drivers or fake FTDI chips.

I also use the USB-Serial Geekcreit style PCBs a lot (see picture) but I bought a bunch from Banggood and they all had the same serial number! - I ended up buying FT232 ICs (which cost more than the original PCBs) and replacing the fake ones.

So I came up with this project idea, it's kinda a 3 in 1:
1. Stand-alone replacement for the Geekcreit style board
2. Optional MAX3227 RS232 voltage IC
3. Optional to have 5V isolation of the 5V supply to the MAX3227 with digital isolators in the TX/RX lines (not yet shown on attached schematic)

I'm thinking that 2 & 3 will be on a snappable PCB extension and the isolators will be optional on that PCB.

This design includes a feature to allow use with Arduino where the DTR pin allows an Arduino target to auto-reset when a new Sketch is downloaded.

I will bring all pins out to 0.1" headers, not sure if I'll include a DB9 connector, maybe I'll include as I already have the footprint but if not, I'll have a hi-voltage 0.1" header.

Attached is the very first cut (vn 1a) of the schematic for consideration, let me know if anyone has suggestions, request for changes, errors spotted, etc.  I'm going to place a PCB order in about a week so please give me ideas & input ASAP.

[EDIT] I'm going to share this design with you guys for free use in case you were wondering. If anyone wants a PCB, let me know and can can order extra as needed.

Ted
« Last Edit: August 25, 2019, 11:36:27 pm by Gandalf_Sr »
If at first you don't succeed, get a bigger hammer
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: 'Real' RS232 USB Interface
« Reply #1 on: August 26, 2019, 02:18:02 am »
There are companies that sell real RS-232 adapters, such as Tripp Lite, which acquired the excellent Keyspan adapter line.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9320
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: 'Real' RS232 USB Interface
« Reply #2 on: August 26, 2019, 03:11:30 am »
I remember reading that very precise serial time references depend on low/predictable latency on a flow control line which a USB serial adapter will not do. There are PCIe serial cards available for fairly cheap that will work well for that.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 7005
  • Country: ca
Re: 'Real' RS232 USB Interface
« Reply #3 on: August 26, 2019, 03:13:58 am »
You have sp-800 usb rs232 cables, they have real ftdi chips and another chip who provide some isolation, they have voltages levels around 5.5 - 6 volts ??
https://www.adafruit.com/product/18

This cable  sp-880  was the best i've found, and we got one recently at my job, with this one i  left it connected to an mcu and i can use the instrument at the same time, other cables did not work well enough (ground issues)


Would it be simpler to interface a max232 ??  or adding an adum xxxx usb isolator ?
Not to be insulting,  but you have already made solutions ??

App notes
https://www.sparkfun.com/tutorials/215

SparkFun Transceiver Breakout - MAX3232
https://www.sparkfun.com/products/11189

« Last Edit: August 26, 2019, 03:21:46 am by coromonadalix »
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: 'Real' RS232 USB Interface
« Reply #4 on: August 26, 2019, 04:45:49 am »
I gave up trying to find USB to RS-232 converters which would work with my various Garmin GPS receivers even when the signal levels were correct.  My ultimate solution was to install a PCI or PCIe RS-232 adapter into my desktop computer and it just worked.
 

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: 'Real' RS232 USB Interface
« Reply #5 on: August 26, 2019, 09:03:09 am »
Thanks for the input so far. I know there are so-called real USB-RS232 cables available but it seems a complete crap shoot that anything works.  I get the requirement for low latency if you're actually worried about how long the signal takes to get from your GPSDO to the PC and that a PCI card is good for that.

So, call me a masochist if you like but, I have added the extra stuff and will go ahead with the board design.  I've been able to fit the DB9 header on the PCB with the actual connector hanging over the edge to keep the PCB small.  I'll add a picture when I'm done, hopefully later this week.  Any input or suggestions are still welcome.

Ted
If at first you don't succeed, get a bigger hammer
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 7005
  • Country: ca
Re: 'Real' RS232 USB Interface
« Reply #6 on: August 26, 2019, 10:42:59 am »
If you manage to get or build a reliable solution for you and many peoples,  go for it,   i  had this problem in the past too,  finding a good cable is hard,  bought many models

Ftdi originals, Ftdi clones, ch340, and other chipsets  ....   until i grabbed the sp-880 and one industrial Din mount optoisolated from polland (Fleabay) a little to big  loll


I do hope  it work for you
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: 'Real' RS232 USB Interface
« Reply #7 on: August 26, 2019, 10:56:03 am »
I remember reading that very precise serial time references depend on low/predictable latency on a flow control line which a USB serial adapter will not do. There are PCIe serial cards available for fairly cheap that will work well for that.
The annoying thing is that a USB serial adapter could do that if it wanted to. USB audio and video interfaces require low and predictable latency, too, and that's why USB 2 added isochronous transfers (an idea borrowed from FireWire). So a motivated chip and driver developer could produce such a thing.

At this point, it'd probably be easier to just make a Thunderbolt version instead, for laptops and other devices without internal expansion slots, since you'd just use an existing PCIe chip and Thunderbolt bridge.
 

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: 'Real' RS232 USB Interface
« Reply #8 on: August 26, 2019, 11:51:12 am »
Hmmm, a Thunderbolt version! That sounds interesting but would be limited to devices that have that port (not so many I fear).  What about USB Type C?  My Dell laptop has that and it's crazy-fast plus it's gaining in popularity.

Also saw that Cypress has a CY7C65213 which Sparkfun makes a breakout board for.  A bit of research shows that this has a neat utility for Windows.

Tooki
I have some good technical connections into Cypress, I think I'll ask them about USB 2 isochronous transfers and whether that can be added to their driver.
If at first you don't succeed, get a bigger hammer
 

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: 'Real' RS232 USB Interface
« Reply #9 on: August 28, 2019, 10:08:32 am »
Apart from a few small tweaks around the LED drive, the basic design is done.  I have decided to make the 'real' RS232 part as a piggy back PCB as most people will want the FUNctionality of the basic USB-Serial.  The features of this design are:

1. Multiple voltage power supply with a (total) 600 mA capability; you can use the 5V, 3.3V, and 1.8V supplies and select one of them as VIO.
2. You can feed your own VIO into the board.
3. The 6 pin connector is set up for Arduino reset
4. All signals and power supplies are brought out to the headers

The piggy back 'real' RS232 (+ve and -ve voltages) will include full isolation, an isolated 5V power supply and digital isolators on the signal lines.

If at first you don't succeed, get a bigger hammer
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 7005
  • Country: ca
Re: 'Real' RS232 USB Interface
« Reply #10 on: August 28, 2019, 10:30:48 am »
would it be safer to add an polyfuse (auto resettable)  for the vcc supply line ?? in case of excessive currents or a short ?
 

Offline delfinom

  • Regular Contributor
  • *
  • Posts: 136
  • Country: 00
Re: 'Real' RS232 USB Interface
« Reply #11 on: August 28, 2019, 12:36:43 pm »
I have a GPSDO that needs a 'real' (as in -ve and -ve voltages) RS232 and the Prolific cable that I bought causes all kinds of weird issues.  I looked around but real RS232 adapters are not easy to find and many have flakey drivers or fake FTDI chips.

FTDI literally makes their own completed adapters you can then source from Digikey or other legit distributors....

https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/UC232R-10/768-1014-ND/1836392
https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/UT232R-200/768-1084-ND/2441372
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: 'Real' RS232 USB Interface
« Reply #12 on: August 28, 2019, 01:45:32 pm »
I remember reading that very precise serial time references depend on low/predictable latency on a flow control line which a USB serial adapter will not do. There are PCIe serial cards available for fairly cheap that will work well for that.

Almost all USB/UART bridge ICs support RTS/CTS flow control.  It is even sometimes mandatory to be used for high baud-rates, as the slow shit-turd-USBVCP drivers may not keep up with the incoming traffic.

Problem also is, that surprisingly a lot of devices use the other 232 control lines (RTS, CTS, DCD, DSR) for additional arbitrary purposes  in software bit-banged modes, that simply do not work over USB-VCP.
« Last Edit: August 28, 2019, 01:48:48 pm by Yansi »
 
The following users thanked this post: tooki

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: 'Real' RS232 USB Interface
« Reply #13 on: August 29, 2019, 12:02:50 am »
I have a GPSDO that needs a 'real' (as in -ve and -ve voltages) RS232 and the Prolific cable that I bought causes all kinds of weird issues.  I looked around but real RS232 adapters are not easy to find and many have flakey drivers or fake FTDI chips.

FTDI literally makes their own completed adapters you can then source from Digikey or other legit distributors....

https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/UC232R-10/768-1014-ND/1836392
https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/UT232R-200/768-1084-ND/2441372
In my experience, about 2/3 of the FTDI USB adapters out there use fake chips and although this FTDI cable is supposed to be by FTDI, it doesn't provide the same flexibility of my design.
« Last Edit: August 29, 2019, 12:21:33 am by Gandalf_Sr »
If at first you don't succeed, get a bigger hammer
 

Offline delfinom

  • Regular Contributor
  • *
  • Posts: 136
  • Country: 00
Re: 'Real' RS232 USB Interface
« Reply #14 on: August 29, 2019, 12:17:50 am »
I have a GPSDO that needs a 'real' (as in -ve and -ve voltages) RS232 and the Prolific cable that I bought causes all kinds of weird issues.  I looked around but real RS232 adapters are not easy to find and many have flakey drivers or fake FTDI chips.

FTDI literally makes their own completed adapters you can then source from Digikey or other legit distributors....

https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/UC232R-10/768-1014-ND/1836392
https://www.digikey.com/product-detail/en/ftdi-future-technology-devices-international-ltd/UT232R-200/768-1084-ND/2441372
In my experience, about 2/3 of the FTDI USB adapters out there use fake chips.

These are manufactured as official products by FTDI and sold via major electronic component distributor.
You are basically saying that Digikey is somehow getting fake chips from FTDI themselves. DigiKey has a standing policy where they will only source from the manufacturer OR from distributors specifically indicated as legitimate by the manufacturer.
« Last Edit: August 29, 2019, 12:24:09 am by delfinom »
 
The following users thanked this post: tooki

Offline Gandalf_SrTopic starter

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: 'Real' RS232 USB Interface
« Reply #15 on: August 29, 2019, 09:27:58 am »
would it be safer to add an polyfuse (auto resettable)  for the vcc supply line ?? in case of excessive currents or a short ?
Done.  I added the PTC on the underside of the PCB with a trace through it so it can be added as an option, cut the trace and fit the PTC.

Thanks  :)

Just waiting on the board house to verify the files

Ted

[EDIT] PCB is now ordered, it was only $10 more for 50 vs 25 so I ordered 50, PM me if you want a bare PCB (I'm thinking US$4 shipped in USA which is basically cost to me) but you will need to be able to work on small SMT parts, there's a tiny dual N FET that's SOT 563 which I added to allow the LEDs to run off the 3.3V rail but still have the circuit cope with low VccIO which can be 1.8, 3.3, or 5.0 volts.

I'm travelling until Monday so I won't be able to post (slightly) updated schematic, PCB, and BOM.
« Last Edit: August 30, 2019, 12:15:31 pm by Gandalf_Sr »
If at first you don't succeed, get a bigger hammer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf