Author Topic: RS232/TTL to USB Isolator  (Read 16107 times)

0 Members and 1 Guest are viewing this topic.

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
RS232/TTL to USB Isolator
« on: June 02, 2015, 12:06:23 am »
As I just ordered a Manuyo M9812 EDL with a TTL RS232 interface, I decided to take the chance and design my own RS232/TTL to USB isolator.
I know this has been done a million times before, but firstly I kinda like doing stuff like this and secondly, I want to do it right.

FT232RL as USB converter and ADUM1201 as isolator are pretty much typical choices, so no surprise there.

While the M9812 has a 5V supply on pin 1, I added the option to put a 5V to 5V isolated DC/DC module to power the RS232 side . Which also opens the chance to power a small µC board via USB.
I'm, aware that there are ICs like ADUM 5201 or ADUM 6201 with an integrated DC/DC, but they are more expensive than an ADUM1201 plus a 3kV/200mA DC/DC which also seems a bit beefier.

There's also an option for a pull-up in case the device on the RS232 side has just an open collector for its Tx line. And I added a TVS diode array on both sides for additional transient/ESD protection.
Last but not least, the board is designed to fit in a Pactec CNM-0407 case (available at Mouser) for ~2€ which seems to be quite a convenient case for that sort of thing.

So, any blatant design issues?

[Edit]
Updated schematics and pictures: added decoupling capacitor to 3V3OUT, added power LED on TTL side to fulfill 10% minimum load for DC/DC. Some other minor things.
« Last Edit: June 04, 2015, 12:21:00 pm by 0xdeadbeef »
Trying is the first step towards failure - Homer J. Simpson
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28095
  • Country: nl
    • NCT Developments
Re: RS232/TTL to USB Isolator
« Reply #1 on: June 02, 2015, 01:19:44 am »
Why not just use 2 optocouplers? I think I posted a diagram in a Array 3710 thread somewhere.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4195
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: RS232/TTL to USB Isolator
« Reply #2 on: June 02, 2015, 08:44:05 am »
Why would you use that enormous db9 connector for ttl level?
http://jeroen3.nl/isoftdi

You can get cheap Silabs isolators instead of expensive Analog Devices. They're pin compatible  :-+
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: RS232/TTL to USB Isolator
« Reply #3 on: June 02, 2015, 10:23:53 am »
Well, in the end I need a DB9 connector on the Maynuo etc. and while I could of course assemble an RS232 cable I like the idea to have the connector on the PCB and then use a ribbon cable to the device. I'm also using this connector is because it fits the case.
Besides, I wouldn't really save something if I could make the PCB a bit smaller in this dimension. Getting the length (from connector to connector side) under 5cm would save a bit on the PCB costs.
Actually I created a 5cm version first with mini USB, ghetto style DB9 connector and without the TVS diodes and then decided to go this way to have a perfectly (?) fitting cheap case without tinkering.

The Silabs isolators are a good hint. I guess I could use a Si8422 or something like this instead. Problem is that I can only find them at Mouser while the ADUMs have better availability. So let's call it a placement option, but as I don't get into mass production, I'll probably stay with the ADUM for the moment.
« Last Edit: June 02, 2015, 10:28:03 am by 0xdeadbeef »
Trying is the first step towards failure - Homer J. Simpson
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4195
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: RS232/TTL to USB Isolator
« Reply #4 on: June 02, 2015, 10:41:03 am »
Si84's are NRND. Get Si86 instead, they are about half the price of ADuM with Farnell.

For robustness a box with db9 is better. But I only need one when debugging on bare boards. So I don't care much about the casing.
« Last Edit: June 02, 2015, 10:42:53 am by Jeroen3 »
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2315
  • Country: sk
    • My site
Re: RS232/TTL to USB Isolator
« Reply #5 on: June 02, 2015, 12:51:55 pm »
It's not very RS232 - RS232 has positive and negative signal voltages (+/- 3 to 15V with respect to ground) - to achieve those you need a level converter (MAX3222 and friends) or some creative ground shifting.

Also, if you connect a real RS232 device it won't be particularly happy about the TVS array on the input - The negative will be shorted alltogether, the positive will be clipped.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2315
  • Country: sk
    • My site
Re: RS232/TTL to USB Isolator
« Reply #6 on: June 02, 2015, 12:55:23 pm »
Also, the FT232 3V3OUT pin should have a decoupling cap on it.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: RS232/TTL to USB Isolator
« Reply #7 on: June 02, 2015, 03:10:49 pm »
It's called RS232/TTL since it's about TTL level RS232. Most bench devices with RS232 are isolated anyway. It's the China TTL level stuff that needs to be isolated.
I don't use the 3V3OUT so I assumed I don't need to a decoupling capacitor, but indeed you're probably right since despite of its name, this 3.3V seems to be mainly used internally.
« Last Edit: June 02, 2015, 03:18:51 pm by 0xdeadbeef »
Trying is the first step towards failure - Homer J. Simpson
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2315
  • Country: sk
    • My site
Re: RS232/TTL to USB Isolator
« Reply #8 on: June 02, 2015, 03:18:03 pm »
Even if you do not use the 3V3OUT, the internal regulator does - the datasheet states:
Quote
+3.3V output from integrated LDO regulator. This pin should be decoupled to
ground using a 100nF capacitor. The main use of this pin is to provide the internal
+3.3V supply to the USB transceiver cell and the internal 1.5k? pull up resistor on
USBDP. Up to 50mA can be drawn from this pin to power external logic if
required. This pin can also be used to supply the VCCIO pin.


As to
Quote
What is unclear about RS232/TTL? And I don't use the 3V out.
Sorry, I focused on the RS232 part of the text. RS232 implies the voltage levels as well as the data transfer logic. The proper name for a device like this would be USB->Serial, USB->USART/UART converter or similar.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: RS232/TTL to USB Isolator
« Reply #9 on: June 02, 2015, 03:19:27 pm »
Edited, but you were faster ;)
Trying is the first step towards failure - Homer J. Simpson
 

Offline DutchGert

  • Frequent Contributor
  • **
  • Posts: 257
  • Country: nl
Re: RS232/TTL to USB Isolator
« Reply #10 on: June 02, 2015, 04:42:34 pm »
If u use a ADuM3482 and a REG710-33 as regulator u can make a UART -> USB convertor that is powered from the host and accepts 1.8V to 5V logic levels.....

I just happen to be making sothing like that right now as a kind of internal universal 'debug' interface within our company.

?I can share if anyone likes?
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28095
  • Country: nl
    • NCT Developments
Re: RS232/TTL to USB Isolator
« Reply #11 on: June 02, 2015, 04:52:38 pm »
I just happen to be making sothing like that right now as a kind of internal universal 'debug' interface within our company.
I'm about to finish the first production run for a similar device. Not isolated but rugged for USB to UART-TTL and RS485 (short range) and it has a nice casing. Since USB is differential you can allow some ground bounce between the device and the host.
« Last Edit: June 02, 2015, 04:56:15 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: RS232/TTL to USB Isolator
« Reply #12 on: June 02, 2015, 04:59:18 pm »
It's called RS232/TTL since it's about TTL level RS232.
UART/Serial is the name for the interface, RS232 is a very specific implementation of that interface with defined voltage levels.  This is an isolated USB->UART bridge, the term "RS232" shouldn't be anywhere near this device, it just adds to the confusion.
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: RS232/TTL to USB Isolator
« Reply #13 on: June 02, 2015, 06:01:33 pm »
If u use a ADuM3482 and a REG710-33 as regulator u can make a UART -> USB convertor that is powered from the host and accepts 1.8V to 5V logic levels.....
Well, mine is powered from the host as well (with the DC/DC placed) and depending on the DC/DC I guess I also come out a bit cheaper.

I'm about to finish the first production run for a similar device. Not isolated but rugged for USB to UART-TTL and RS485 (short range) and it has a nice casing. Since USB is differential you can allow some ground bounce between the device and the host.
What case do you use? I searched quite some time to find something that's cheap and somewhat available.

UART/Serial is the name for the interface, RS232 is a very specific implementation of that interface with defined voltage levels.  This is an isolated USB->UART bridge, the term "RS232" shouldn't be anywhere near this device, it just adds to the confusion.
IMHO RS232 is an interface that also includes the physical layer while UART in its literal sense is a transmitter - which means I would use it for a implementation/circuit and not for the interface. If you have a RS232 interface on a DB9 connector with the typical pin2/3 layout and everything apart from the voltage level is RS232 why would you call it a transmitter and not RS232/TTL? Well, rhetorical question. I don't really want to argue.
Trying is the first step towards failure - Homer J. Simpson
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: RS232/TTL to USB Isolator
« Reply #14 on: June 02, 2015, 06:20:30 pm »
UART/Serial is the name for the interface, RS232 is a very specific implementation of that interface with defined voltage levels.  This is an isolated USB->UART bridge, the term "RS232" shouldn't be anywhere near this device, it just adds to the confusion.
IMHO RS232 is an interface that also includes the physical layer while UART in its literal sense is a transmitter - which means I would use it for a implementation/circuit and not for the interface. If you have a RS232 interface on a DB9 connector with the typical pin2/3 layout and everything apart from the voltage level is RS232 why would you call it a transmitter and not RS232/TTL? Well, rhetorical question. I don't really want to argue.

http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter

It is, by definition, a UART (or if you like, a TTL UART).  The "RS232" standard simply tacks on voltage specifications, which you're not meeting, so it's not RS232.  "RS232/TTL" is an oxymoron, you're specifying two contradictory voltage standards.

You make an RS232 device by grabbing a UART and sticking an RS232 voltage driver on it.  Without the RS232 voltage driver/level shifter, it's just a UART.  That's all RS232 is really, a UART with +/-3 to +/-25v signaling.  Just like MIDI is an opto-isolated UART with 5v signaling, RS422 is a UART with differential signaling, etc.

Sticking a DB9 connector on there is even worse.  Somebody (maybe even you in a couple of years) is going to see "RS232" printed on the board along with the DB9 connector, plug it into an actual RS232 device, and possibly damage something.
« Last Edit: June 02, 2015, 06:56:57 pm by suicidaleggroll »
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: RS232/TTL to USB Isolator
« Reply #15 on: June 02, 2015, 07:19:58 pm »
"The RS-232 standard is commonly used in computer serial ports. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors."
I guess we can agree that we disagree. So please, let's drop this annoying "I am so clever and you are so dumb" game. I'm too tired and grumpy for this kind of crap right now.
Trying is the first step towards failure - Homer J. Simpson
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 28095
  • Country: nl
    • NCT Developments
Re: RS232/TTL to USB Isolator
« Reply #16 on: June 02, 2015, 08:47:35 pm »
I'm about to finish the first production run for a similar device. Not isolated but rugged for USB to UART-TTL and RS485 (short range) and it has a nice casing. Since USB is differential you can allow some ground bounce between the device and the host.
What case do you use? I searched quite some time to find something that's cheap and somewhat available.
A plastic one from Farnell's / Element14's own brand. Not as cheap & small as I had hoped because I need some openings for the connectors. The front & rear plates are lasercut from aluminium.
Initially I bought a bunch of these but it turned out it was too tedious to use because I also have a switch and a jumper on my board:
http://www.aliexpress.com/item/50-pcs-lot-abs-plastic-instrument-casing-or-abs-plastic-housing-for-electronics-diy-junction-box/32305084239.html
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Old Grey

  • Newbie
  • Posts: 9
  • Country: au
Re: RS232/TTL to USB Isolator
« Reply #17 on: January 28, 2018, 08:16:06 pm »
Is this ok to use for a USB?


Basically I have a Arduino based ECU that runs the car and is powered from the battery, and when I connect my laptop that is also running off the same battery the control program freezes. I was thinking about cheap isolation - $2 Ebay - because that is all I can afford.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2130
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: RS232/TTL to USB Isolator
« Reply #18 on: January 28, 2018, 10:31:21 pm »
Nope. That will work with TTL UART.

There does exists a USB isolator IC in the ADUM range - but it’s only good for 12Mbps (full speed?)
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: RS232/TTL to USB Isolator
« Reply #19 on: January 28, 2018, 10:50:52 pm »
True, for USB the ADUM3160 is needed which I used in another project.
Trying is the first step towards failure - Homer J. Simpson
 

Offline Old Grey

  • Newbie
  • Posts: 9
  • Country: au
Re: RS232/TTL to USB Isolator
« Reply #20 on: January 29, 2018, 10:07:56 pm »
Is the ADuM1201 quick enough for 115200 through a USB COM port.

It's only for the datalog stream from the ECU, and I don't think it's full USB2 or something like that because the program that receives it is set to RS232.
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: RS232/TTL to USB Isolator
« Reply #21 on: January 29, 2018, 10:51:57 pm »
115kBit/s shouldn't be an issue. Even the slowest 1201 version (AR) is specified for 1Mbit/s. BR (10Mbit/s) and CR (25Mbit/s) versions are even faster.
Still, for RS232 over USB you'll need an RS232 <-> USB converter as the FT232 used in the example in this thread.
« Last Edit: January 29, 2018, 10:54:19 pm by 0xdeadbeef »
Trying is the first step towards failure - Homer J. Simpson
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: RS232/TTL to USB Isolator
« Reply #22 on: January 30, 2018, 12:30:26 am »
Is the ADuM1201 quick enough for 115200 through a USB COM port.

It's only for the datalog stream from the ECU, and I don't think it's full USB2 or something like that because the program that receives it is set to RS232.

You cannot use the Adum1201 for USB isolation, full stop.  Data rate has nothing to do with it, the signaling is completely incompatible.
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1580
  • Country: de
Re: RS232/TTL to USB Isolator
« Reply #23 on: January 30, 2018, 02:20:22 am »
@Old Grey
Yeah, I'm also unsure if it's clear to you that USB uses differential lines. So D+ and D- are nothing like Rx/Tx on UART.
In a nutshell, if you want to use USB directly, try the ADUM3160, if you want UART over USB, you can use the ADUM1201 for isolation but you'll still need the USB/UART conversion.
Trying is the first step towards failure - Homer J. Simpson
 

Offline Old Grey

  • Newbie
  • Posts: 9
  • Country: au
Re: RS232/TTL to USB Isolator
« Reply #24 on: January 30, 2018, 04:10:19 am »
So the ATmega16U2 on the Arduino MEGA2560 changes it to USB communication and it won't work.

Oh well, back to the drawing board.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf