Extending arduino cable

Hello everyone

I am trying to extend the cable from the arduino to the pc by about 30m. But i dont think usb will work very well for this. I have a pair of usb/ethernet extenders but dont know if they will provide a fast enough connection.
What would be the simplest way to extend the connection cable. (Has to be wired, not wireless)
Can i use the ethernet shield to do this or is there a simpler option?

Thanks

Have you actually tried your extenders to see if they work...? What is "fast enough"?

Thanks for the reply
Ive tried them with a webcam and a 10m ethernet cable. The feed is more like a slideshow though lol (very bad)
Is it possible though that thats the ethernet cables fault? Its a rather slow cable.... :-/
I also get a message saying this device could perform faster and thats why i was wondering if the connection would be fast enough but again this could maybe be the ethernet cables fault.
Do arduinos still function fully on a usb 1.1 port?
Thanks
Philipp

Never tried 30 meter so I think you should just try it if you have the cables. I can imagine that the 5V drops a little or maybe a little too much. So when the Arduino has a separate powersupply it may be possible. Furthermore the serial port may not be able to work at all speeds.

Let us know the results!

Can i use the ethernet shield to do this or is there a simpler option?

What is the purpose of the connection? Are you just trying to move data back and forth, or are you planning on being able to upload code revisions to the Arduino at that distance?

If its the former, then your most reliable option would be a wired ethernet shield (direct to the PC's ethernet card, or to a nearby hub/switch). There's more to do programming-wise on each end, but its not as terrible as you think.

If its the latter, then I would try your USB extenders first, with (as already noted) a separate power supply for the Arduino. If that doesn't work out for the speeds you are looking for (which you haven't stated, BTW), then you might have to look for another solution.

One option would be something like a MAX232 on the Arduino end, with a separate power supply (connected to pins 0/1), and a real RS232 serial-port card on the PC end (do they still make them? I haven't looked in a long while), and a cable in-between. Even so, whether you'd be able to get the speeds you are looking for at that distance, I really don't know...

Thanks for all the help :slight_smile:

The connection will be used to send inputs to the arduino via a joystick thats connected to the pc
I think ill just try the extenders with separate power first as it would probably be the simplest solution

The exact speed isnt really that important to me. I just want the connection to be fast enough to work lol :stuck_out_tongue:

"Controlling an Arduino" and "Using a Webcam" have entirely different bandwidth requirements. Just because it wasn't "fast enough" to stream full motion video, it does not mean the connection won't be fast enough to send serial data.

Yea, think about it this way

Your Arduino Sketch takes 32256 bytes as a max... a 10 second video clip takes a couple kbs

You may want to read this page - http://www.usb.org/about/faq/ans5

The first 2 questions mainly.

You can get USB signal boosters, such as this from Maplin http://www.maplin.co.uk/Module.aspx?ModuleNo=444544 there will be cheaper around.

Ultimately though, you would be better off using something like RS485, you should be good for 200 meters at 10Mbps or so with the right cable :slight_smile:

This might just be one of those situations where using RS232 is a good idea.

Worst case is that you might need to buy a USB-RS232 Adapter for the PC... but unlike USB... RS232 was designed for distance.

Thanks for all the helpful replies :slight_smile:

Well if the arduino doesnt use alot of bandwidth then the extenders will probably work :slight_smile:
Ill try those first before i look into other options

If i use RS232 would i have to get a arduino board with a RS232 connector (do these boards still have the same functions as the usb ones?)
or is there a converter i can plug into a usb arduino to convert to RS232, extend via that and convert back to usb at the pc?

Thanks

RS232 was designed for distance

From - RS-232 - Wikipedia
By using low-capacitance cables, full speed communication can be maintained over larger distances up to about 1,000 feet

There is also RS485 - RS-485 - Wikipedia
This allows EIA-485 to implement linear topologies using only two wires. .... Maximum Distance 1200 metres (4000 feet)

maybe interesting - http://www.yerobot.com/arduino-io-expansion-shield.html

Thanks

Would I have to use full duplex converters or can I use a half duplex aswell for RS485
(arduino will recieve inputs from pc and send data from sensors to pc)
So I would have to use a usb to R485 converter at the pc and a RS485 to RS232 converter at the arduino end, correct?

Thanks

So I would have to use a usb to R485 converter at the pc and a RS485 to RS232 converter at the arduino end, correct?

yes, think the shield mentioned just does that.
Contact - http://www.yerobot.com/contacts/ to ask the details as the manual did not provide sample code for the shield :frowning:

Thanks

So if I use that shield does the RS485 just replace the usb connection.
Can it still receive and send commands and data via that without any limitations?

So if I use that shield does the RS485 just replace the usb connection./quote]
Don't know I couldn't find that info.

Can it still receive and send commands and data via that without any limitations?[

Of course there are limitations, the longer the cable the lower the baudrate. The manual just does not give enough information.

You need to contact the dealer of the shield with the detailed questions I'm afraid..

Thanks

To use a RS485 connection (not using that shield, just using ar arduino with RS232 connector instead of usb and connecting a RS485 converter to that) would the converters have to be half duplex or full duplex?

I was considering use the following converter
http://aquaticus.info/rs485_to_rs232
But im not sure if it will work since it says its half duplex

Thanks