karplus4arduino

2011 July 11

Long USB cables

Filed under: Robotics,Underwater ROV — gasstationwithoutpumps @ 01:20
Tags: , , ,

One of my Arduino projects is not really mine: I’m coaching a high-school robotics club that is building an underwater remotely operated vehicle for the MATE contest.

They had barely gotten a vehicle assembled (and not yet tested) for last year’s competition, so they decided to work on it over the summer.  Their goal is to have an Arduino and  motor controller in a dry box on the vehicle, and have digital signals sent to the Arduino over low-power cable, with just one power cable for their 12v motor power.

One of the first concerns I had was communication with the Arduino.  The USB standard limits cable length to 5m, and the tether for the ROV needs to be at least 10 and probably 15m.  (The best explanation of the reason I’ve found is on a USB developers’ FAQ.)  I was hoping we could stretch that a bit, as we do not need high-speed communication.  So today, the students chopped up a cheap USB cable (after first making sure it worked) then soldered in 33 feet of cable in the middle.  We tested the cable for continuity and shorts, and everything looked fine from a DC standpoint.  When we plugged it into the laptop, the Arduino power light lit up and the TX and RX lights blinked in the normal way for startup.  That meant that the laptop was probing the Arduino and it was responding.  Unfortunately, the laptop did not recognize that there was a USB slave device present, probably because the ringing in the long cable was causing too much signal interference (the reason for the cable length limitation).  So it looks like the USB standard really is pretty strict about the cable length, even if you only need low-speed communication.

Since we don’t want to put boosters in the tether every 5m (sealing underwater electronics is a pain), we’re going to need a different method.  The USB developers’ FAQ says:

Q:  I really need to put a USB device more than 30 meters away from my PC. What should I do?

A:   Build a USB bridge that acts as a USB device on one side and has a USB host controller at the other end. Use a long-haul signaling protocol like Ethernet or RS-485 in the middle. Using cables or short-haul fiber, you can get ranges upwards of a kilometer, though there’s no reason why the long-haul link in the middle of the bridge couldn’t be a pair of radio transceivers or satellite modems. Embedded host solutions capable of doing this already exist. Also, two PCs connected via USB Ethernet adapters are essentially a slave/slave version of this master/slave bridge.

The RS-485 or RS-422 standards are simple low-speed connections, and it is easy to get a USB-to-RS-485 or USB-RS-422 converter. The RS-485 is a 3-wire half-duplex system (differential signal and ground), while the RS-422 is a 5-wire, full-duplex system (2 differential pairs and ground). Unfortunately, these are all designed to plug into a computer as the master.  I’ve not found one designed to hook up a USB slave device (like the Arduino) to an RS-485 bus.

Converting to Cat5 cable seems like the more popular choice.  For about $8 I can get a USB-Cat5-USB end-to-end solution that is supposed to work for up to 150 feet.  That looks like it may be my best bet, as I already was planning  for them to use a cheap CAT5 patch cable as the digital part of the tether.  There are a few different converters on the market in the $8 price range (here’s another USB-CAT5-USB adapter pair), and the main limitations seem to be  speed (USB 1.1 speeds only) that they need for the USB slave device to have its own power.  Both of those are fine for this application, so we’ll try them out.

Advertisements

2 Comments »

  1. […] posted a couple of days ago about determining that the USB cable-length limit is real, and needing to get a USB-CAT5-USB converter. I found a couple for only $8 (and free shipping) from […]

    Pingback by Long USB cable problem solved « karplus4arduino — 2011 July 12 @ 22:07 | Reply

  2. […] Long USB cables « karplus4arduino Description : (The best explanation of the reason I’ve found is on a USB developers’ FAQ.) I was hoping we could stretch that a bit, as we do not need high-speed communication. So today, the students chopped up a cheap USB cable … http://karplus4arduino.wordpre .. […]

    Pingback by usb cables - CABLE TYPES – CABLE TYPES — 2011 July 31 @ 14:40 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: