Electronic – Recommendation of a USB-to-RS-232 chip for an industrial environment

computersconverterftdirs232usb

I have bought a device which has an ATmega microcontroller and an FTDI chip which connects to a computer through USB. The FTDI is used only as an RS-232-to-USB adapter.

My problem is that this device hangs up the PC when some of the machines are running. I changed the cables to thick, heavy-shielded ones. Also the cable is in a steel conduit. And the device itself is inside a 2 mm stainless steel casing. The case connected is to ground.

Amazingly, the problem is not present when working with this device, but with a plain RS-232 version. (The RS-232 version works even with el-cheapo cable. no problems.)

My questions are:

  1. Is the problem related to a poor design of the device or is the FTDI chip fault? I am now confident that it was due to a bad design of the converter.
  2. What would be the best pick for a chip to convert RS-232 to USB in an industrial environment?
  3. How much work is it to use a microcontroller with a built-in USB port, for example an Atmel microcontroller? Will it be cheaper and faster?

The only requirement is that there must be drivers both for Windows and Linux for the converter.

Best Answer

At my last company we found that USB-to-RS-232 converters can have a problem when they expect an almost instant responce from the RS-232 device. I was advised by the design engineer for our equipment that USB uses data packets. So when using USB, unless the software/drivers force a USB packet of data to be sent, the USB driver can hang around for more than a second (5000 ms) waiting for the packet to be filled before sending the incomplete data packet.

This meant that a lot of older DOS/Windows programs where they monitored RS-232 status lines would time out. The older programs often used timing loops based on looping a certain number of times... So as the PCs got faster, the polling got faster. As the length of time the polling continued to effectivly get shorter, USB came along.

The polling effectively became a memory location... (The drivers are usually optimised for maximum data packet throughput and didn't pass the status information on, because it was waiting to fill a packet). The drivers can sometimes be adjusted to help with this. FTDI drivers can adjust a lot of values in their configuration file. (Great for non-standard data rates.)

This meant we often had to run programs on desktops with RS-232 ports or drag the laptop base station out to the equipment to get it to work.

Additional information

See page 6 of the application note Advanced Driver Options for USB time out adjustments...

And for odd baud rates up to 3 Mbit/s, see Configuring FT232R, FT2232 and FT232B Baud Rates.