Currently, we are trying to extend the wire attached to our webcam (Microsoft Lifecam HD-3000) by about 8 feet with 22 AWG wire. Our end goal is to be able to attach the camera to the top of our elevator. We have ensured that the wires are not broken, and that the wires are connected correctly; however, the roboRIO does not pick up on the camera. Additionally, the blue light on the camera does not turn on (before we extended the wire, the blue light turned on and the roboRIO picked up on the camera just fine).
While I’m always a fan of trying to create an in house solution in order to save money, the best thing to do here is probably to buy a USB female to USB male adapter. Here is one that isn’t that expensive, and is 9.8 feet long.
If you do continue with the 22AWG wire and it does work, please post photos here. I would love to see them!
We have done this exact thing many times over the past few seasons. As long as you keep the color code the same and use good soldering practices you shouldn’t have any issues with ~8ft extension. With USB baud rates I would avoid trying add connectors and solder the wires directly to each other.
A few quick web searchs on the camera and USB specs that it uses, which is High-speed USB2.0 help narrow down the possible issues.
The maximum cable length for USB 2.0 is 16 foot 5 inches…
USB2.0 Cabling and Specs http://www.usb.org/developers/docs/ecn1.pdf
The camera has about a 5+ foot cable and you are adding “approximately” 8 foot.
So you are close to the maximum specified cable length, not accounting for wire gauge change and possible connector resistances.
Let alone knowing actual USB output of your RoboRio…
Not knowing the full design of the cable you are making leaves many questions.
Such as, are you properly twisting and sheilding the cable, solding/crimping/connecting at the end, resistance of said cable, etc.
It is very possible there isn’t quite enough current to run the camera with your custom cable.
I think the easiest solution is to install a small USB powered hub between the camera and extension cable.
Something like this will work very well.
Its A/C adapter outputs 5vdc @ 2amp. Which is what the VRM can output, so easy intergration.
This way you can also use premade shielded cables at even a bit longer length.
While the spec does state that length, people routinely go well past it without an issue. I know of a couple robots that use USB for a 30+ foot long tether cable.
Another (easier) solution rather than a hub is a USB Active extension cable, or USB repeater cable.
The USB specification (usb_20.pdf inside that zip file), in section 6.1 sayeth:
High-speed (480 Mb/s) and full-speed (12 Mb/s) require the use of a shielded cable with two power conductors and twisted pair signal conductors. Low-speed (1.5 Mb/s) recommends, but does not require the use of a cable with twisted pair signal conductors.
If you extend the cable with plain wire, you’re gonna have a bad time. The higher the signal rate (and a USB video camera isn’t running at the 1.5 Mb/s rate) the more susceptible the cable is to interference. Using a twisted pair reduces that, and the shield (metal foil or braid) reduces it further. The interference will keep the USB tranceivers on either end from properly reading every bit of the transmitted signal. If a packet isn’t read correctly, it gets thrown out. USB was never intended to be an interference-tolerant channel.
Save yourself the headache and use a properly-manufactured USB A-to-A extension cable. Amazon and Monoprice sell them cheap.
We have put soldered our camera wire back together, this time without the sketchy homemade extension, and instead used a proper USB cable extender I found in a bag in the corner of our shop. The camera works just fine now.