4
\$\begingroup\$

I have to control a device with a C++ application (Windows) via RS-485. I'm wondering, which would be the best way to connect it. Should I use a USB-RS485 adapter (which would be the most flexible solution) or a RS232-RS485 adapter? Any other recommendations?

I am especially concerned about the speed, I used to work with a USB-RS232 adapter, which was very slow (OK, was also cheap).

At the moment, I'm considering buying a NI adapter. Any other recommendations?

Thanks.

\$\endgroup\$
4
  • \$\begingroup\$ 'best' is a tricky phrase: you must decide which factors are important! (cost, reliability, optical isolation, long term availability, etc). I think I would prefer a solution that needs no baudrate-dependent trickery to switch the transceiver's direction (e.g. an FT232 chip has a dedicated output for this). \$\endgroup\$ Commented Jul 6, 2012 at 8:49
  • \$\begingroup\$ Reliability would probably be the most important one. \$\endgroup\$
    – Simon
    Commented Jul 6, 2012 at 9:03
  • \$\begingroup\$ Lol, your computer has a serial port? I thought that standard died out last millenium (except for slow to change industrial automation relics). \$\endgroup\$
    – Vorac
    Commented Jul 6, 2012 at 10:12
  • 2
    \$\begingroup\$ @Vorac, still very common actually. It has very low latency that does not vary like USB will. We had to use one at my last place of employ because USB just could not give us the dependable latency we needed. \$\endgroup\$
    – Kortuk
    Commented Jul 6, 2012 at 15:39

4 Answers 4

6
\$\begingroup\$

I'm not going to give any specific device recommendations but I will offer some advice.

As you say, a USB-RS485 adapter is the best solution. Adapters which use an RS232 port are available but these have some disadvantages. First, these devices generally use the RS232 RTS line to control data direction. If the windows RS232 drivers is used, you may find timing issues (because the RTS line was not intended for this purpose) although some adapters have their own device drivers to circumvent this problem.

Other adapters claim to have 'automatic' direction control. The ones that I have seen do this by connecting the transmitted data to the data-enable line of the driver chip so that when the 485 line should be driving the line to the high state, it actually goes tri-state and relies on pull-up/pull-down resistors to 'drive' the line. This solution gives poor drive capability and slow risetimes (which may be the cause of your slow speed experience).

One other potential problem is power. Since RS232 ports do not have power as such, RS232 adapters get their power from data or flow-control lines. One adapter I know of has a curious 'bootstrapped' internal power circuit (I won't bore you with the details) which relies on some transmit data transitions to 'kick it off' so it is completely 'deaf' until some data is transmitted.

\$\endgroup\$
1
  • \$\begingroup\$ This is a great list of real-world gotchas that are never discussed on product spec sheets. I have had projects fall victim to a few of these issues and it has cost weeks of debugging time. \$\endgroup\$
    – spearson
    Commented Jul 6, 2012 at 15:18
2
\$\begingroup\$

You definitely want USB-RS485 not RS232-RS485, as the latter cana control teh data enable much more precisely - this can become very significant at higher baudrates. Easysync make a range of cased USB-485 products, some based on FTDI's board-only products.

\$\endgroup\$
0
\$\begingroup\$

I will also recommend RS232 to RS485. In case if you are looking for module sort of solution which converts usb to rs232 and rs485, have a look at eDAM modules.

\$\endgroup\$
0
\$\begingroup\$

Edit:
Since you talked about RS232 converter I presumed you had RS232 available. As it appears you haven't the obvious choice is USB-RS485.

If you're using just the TxD and RxD of the RS232 I would suggest the RS232-RS485 adapter. Both standards are just about the physical layer of your connection, and transforming voltage levels is completely transparent; your data format remain untouched. USB would add an unnecessary level of complexity, just for transport, since on the PC you'll probably use a virtual COM port driver to get UART data on the USB bus

The USB-RS485 bridge will also be more expensive.

\$\endgroup\$
3
  • \$\begingroup\$ Well, this device should be used on a bunch of different computers and not all of them have a RS232 interface anymore. \$\endgroup\$
    – Simon
    Commented Jul 6, 2012 at 11:09
  • \$\begingroup\$ Aha, but you should have said that! :-) In that case the choice is obvious, isn't it? \$\endgroup\$
    – stevenvh
    Commented Jul 6, 2012 at 11:12
  • \$\begingroup\$ The choice which computers we use depends a little, if we need RS232. If possibloe, we would like to avoid needing RS232. Sorry, should have stated that clearer :) \$\endgroup\$
    – Simon
    Commented Jul 6, 2012 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.