forums
new posts
donate
UER Store
events
location db
db map
search
members
faq
terms of service
privacy policy
register
login




UER Forum > Private Boards Index > Tech Talk > USB over UTC Cat5 fck up. (Viewed 3156 times)
trent 

I'm Trent! Get Bent!


Location: Drainwhale hunting
Gender: Male
Total Likes: 9 likes


Not on UER anymore.

 |  |  | infinitedecay
USB over UTC Cat5 fck up.
< on 11/1/2010 5:14 PM >
Reply with Quote
Posted on Forum: UER Forum
As a fun geek project I'm working on extending my old early 2000's USB webcam's length by about 30 feet by splicing it into CAT5 and then re-splicing it back into a USB connection. I'm actually mounting it into the peephole on the door of my apartment. However, I can't get the USB cam to detect in Windows when extended with my setup. Device works fine and is detected when not extended.

When it comes to electricity I only know the basics. That is why I don't know where my error is and I'm begging here for help or ideas.

I understand that USB simply cannot be lengthened by using a long cable. You'll have voltage drop and the device at the end will then fail. You can use repeaters and actual devices electronic devices to extend it though. But that costs money and no longer makes it a fun project to learn from. There are also devices to convert USB to actual ethernet and back to USB, but i'm not using ethernet, I'm just using a cat5 cable for it's wires and am not attempting to use any ethernet protocols or anything, just extending a serial cable.

From reading on the internet, sometimes you can get lucky and extend it with Cat5 depending on the circumstances: http://www.instruc...out-USB-using-UTP/ Also, someone looks like they began on here: http://forum.allab...thread.php?t=35780 but the discussion sidetracked.

My setup is this:

Device minus it's USB cable (using it's USB pins on circuit board) <---> 10' cat5 patch cable <---> 20' cat5e cable <--> USB cable with male end <---> Computer.

I'm just trying to keep USB as USB and extend it by sneaking some cat5 in the middle of the span. Sorry if this is tedious to read, but I decided it'd be best to include all details.

THE CAMERA:
-The camera's USB cable connects to the camera's board via a plug and socket. The wires in that USB cable appear to use official USB wire colors which is a clue to what the pins on the camera's board do by seeing what colored wire goes to what pin.
-It has 6 pins (and wires). 5 of which are in a socket on the board which the USB cable plugs in to and a 6th pin/wire which is a ground directly to the board out side of the socket.
-Here is a breakdown of the pins:

Note: Pin numbers are pins on the device, not official USB pin numbers.
Pin 1 - Red - Vcc +5v (confirmed with multimeter while connected to computer)
Pin 2 - Black - Assuming Gnd
Pin 3 - Green - Assuming Data-
Pin 4 - Black - Assuming GND (Another one?!)
Pin 5 - White - Assuming Data+
Pin 6 - Fat Black - GND (The above 5 pins goto a socket on the board of the camera. I think it connected to the shielding of the USB cable which connects to this board)


CONNECTION TO CAT5:
Since this cable is intended not to be multi-purpose and only for this camera I decided to solder my cat5 directly to the bottom of the board instead of using the camera's existing USB cable and going from there. Then I can solder wires onto little points on the back of the board which correspond to the pins sticking out from the front side of the board and I won't mess the pins soldering in case I want to revert. I also needed to do it this way so the unit will fit in my doors peephole.

At first I used these instructions from Instructables site to convert from USB on the board to wires in the Cat5:
USB Color to CAT5 Color
red --> white/orange & orange,
white --> white/green,
green --> green,
black --> all the rest

However since I had 6 pins on my camera board (not 4) like in the Instructables converion I had to do something else. I assumed all 3 of the black wires were grounds. So my conversion from device to cat5 looked like this to use all of the ground wires:

USB Color to CAT5 Color
Pin 1 Vcc (red) --> white/orange & orange(twisted),
Pin 2 GND (black) --> white/brown
Pin 3 D- (green) --> green
Pin 4 GND (black) --> brown
Pin 5 D+ (white --> white/green
PIN 6 (big black) --> blue & white/blue

I decided to use all of what I think are grounds and bundle them into one wire/connection down to the end of this cable. Possibly this is what is leading my to failure.


CAT5 BACK TO USB:

At the other end of the Cat5 I then converted back into a male USB cable so that for example on the male usb pin 1 is red and carries 5v from the computer to the device. I'm not going to list the exact conversion here, but basically the Vcc, D- and D+ run through the entire setup from device to male USB plug in the correct pinouts at the at male usb plug. I've triple checked that I haven't reversed my pin orders or anything. As for the grounds, they're all consolidated into one wire/connection to the correct pin for GND on the male USB plug.


RESULTS:
All throughout the process I was checking my work for stupid mistakes using a multi-meter. That means none of my soldering was messed up and I was able to trace a connection from the device to the end of my extended cable on each pin.

BUT when plugging in the device I am getting USB Device Not Recognized popup in Windows. Without my extension the device connects and detects perfectly.

So my first check was voltage to the device to see if that evil voltage drop got me. When plugged in and measured on the board of the device it metered to 5.13 volts. Isn't that exactly what USB outputs by default? I think I should be good there.

So my next check was resistance (which I have a very basic understanding of) on the data+ and data- wires which weren't doubled up. I am not sure of the correct units, but on my meter I was getting these ohm values:

Touching 2 contacts of the meter together as a test: 0.2
Length of original USB cable on device: 0.4 to 0.5
Full extended length (D+ / D- pins): 1.8ish

I was concerned about the increased resistance introduced with my added cable. Possibly that is what was breaking my connection? I then learned (well re-learned) that if your increase the cross section of the wire it reduces resistance. I decided to take my blue wires (blue and white/blue) and instead of using them for the big ground on the board I would instead use them to double up my D- and D+ pins down the length of the cable assuming that the remaining brown wires (brown & white/brown) can still cover the two small grounds.

The result for doubled up D-/D+'s was down to 1.1 resistance. Getting closer to the same as the original USB cable (0.4 resistance). Does it work?! No, of course not.

In retrospect though, I might have found an error. I'm not sure. The two sets of wires each carrying the D+ and D- signals aren't twisted pairs. They're mixed sets of the blue and brown pairs. I understand that twisted pairs act as shielding possibly even lessening resistance? Perhaps if I use proper twisted pairs instead of mixing and matching wires on the D-/D+ it might work?


Things on my 'things to still try' list:
-Use twisted pairs on D- and D+.
-Shorten the length of my cable. I'm at about 35 feet. I'm going to try to trim off 5-10 feet if possible if I can still reach between my door and computer.


Things I'm not sure about:
-Is my wiring from the device to cat5 correct? I'm confused by the multiple (and two types) of Ground instead of just one ground pin and how I should properly handle multiple grounds them.
-Am I missing another concerns besides voltage, resistance, and length?
-My cat5 is actually a blend of two cables soldered together. One white so it matches my wall around my door-frame which leads to a ugly green one for the rest of the length to hide behind furniture. The white cable is a patch cable and each individual wire in it is made of multiple small 'threads' of copper. However, the green cable is from a spool and meant for serious wiring and each of its individual wires are solid copper. Even though they're both cat5, would it cause any problems? Of course everything is soldered nicely (err I mean effectively) and verified with a multimeter.
-Other things?

The main thing that is confusing me is that where ever I read about extending USB the voltage drop is the main issue people bring up. However for me (by luck) my voltage is perfect. What am I fucking up here?

Thanks for any ideas, or even just replying!
-t



Edit:
Ultimately what I'm trying to make is these:



Edit2: I've confirmed that the multiple grounds on the device all interconnect. So I hope to assume that a ground is a ground. I feel better about bundling all 3 black wires from the device into one line for the usb end.





[last edit 11/1/2010 9:53 PM by trent - edited 3 times]

He who rules the underground, rules the city above.
trent 

I'm Trent! Get Bent!


Location: Drainwhale hunting
Gender: Male
Total Likes: 9 likes


Not on UER anymore.

 |  |  | infinitedecay
Re: USB over UTC Cat5 fck up.
< Reply # 1 on 11/1/2010 11:30 PM >
Reply with Quote
Posted on Forum: UER Forum
I've started from scratch again and stripped all wires off the device. I've confirmed the device still does work on its factory usb cable and I haven't melted it yet with my soldering iron.

I then broke it all down the 4 basic USB pinouts (Vcc, D-, D+, GND) on the device to each run through it's own twisted pair of cat5 and ultimately to back to male USB.

After this new setup, which also fails with the device popping up as not recognized. Below are the below and after voltages and resistances on the 4 main wires both as with the basic factory cable or my [crappy] extended cable.


USB Basic V Extended V Basic R Extended R

Vcc 5.10v 5.13v 0.4 1.0
D- 0.88v 0.00v 0.5 1.2
D+ 2.28v 3.05v 0.6 1.1
GND -- -- 0.3 0.9

After the extension, I'm not sure if the D- being 0.0v is because the device is not functioning properly so there is no return data from the computer (assuming D+ sends out of the device and D- receives) or the voltages has dropped to zero. I'm assuming it didn't drop since D+ increased in voltage.

Ideas?

Oh, I still need to shorten the run of the cable too. Maybe it will magically work then.




He who rules the underground, rules the city above.
AnAppleSnail 


Location: Charlotte, NC
Gender: Male
Total Likes: 49 likes


ALL the flashlights!

 |  |  | AIM Message | My Flickr Page
Re: USB over UTC Cat5 fck up.
< Reply # 2 on 11/2/2010 1:03 AM >
Reply with Quote
Posted on Forum: UER Forum
USB is meant to be used over short distances. Long conductors act very differently. In summary, electricity has a speed (Rather slower than light). If the time for the bit (High=1 or low voltage=0) to travel through each wire is shorter than the time between bits, all is well and it behaves simply. If that travel time is too long, you start having issues of electrical signals mixing. The first 'symptom' is slow connections which signal a high error rate. The next one is the computer giving up on the USB protocol and complaining about a nonworking device.




Achievement Unlocked
jacunda 


Location: Toledo area
Gender: Male
Total Likes: 12 likes




 |  |  | Yahoo! IM
Re: USB over UTC Cat5 fck up.
< Reply # 3 on 11/2/2010 12:07 PM >
Reply with Quote
Posted on Forum: UER Forum
Posted by AnAppleSnail
USB is meant to be used over short distances....


I would tend to agree with this and possibly the higher values for Extended R indicate this. The closest I ever got to a project like this was linking an old Apple IIc and a PC via serial so I could rip images of the Apple software for an archive.

I would suspect there is some type of handshaking that is going on before the 'data' starts to flow. Perhaps this is where the problem might be?




jacunda 


Location: Toledo area
Gender: Male
Total Likes: 12 likes




 |  |  | Yahoo! IM
Re: USB over UTC Cat5 fck up.
< Reply # 4 on 11/2/2010 12:15 PM >
Reply with Quote
Posted on Forum: UER Forum
I also found this:

Q2: Why can't I use a cable longer than 3 or 5m?
A2: USB's electrical design doesn't allow it. When USB was designed, a decision was made to handle the propagation of electromagnetic fields on USB data lines in a way that limited the maximum length of a USB cable to something in the range of 4m. This method has a number of advantages and, since USB is intended for a desktop environment, the range limitations were deemed acceptable. If you're familiar with transmission line theory and want more detail on this topic, take a look at the USB signals section of the developers FAQ.

http://www.usb.org/about/faq/ans5




trent 

I'm Trent! Get Bent!


Location: Drainwhale hunting
Gender: Male
Total Likes: 9 likes


Not on UER anymore.

 |  |  | infinitedecay
Re: USB over UTC Cat5 fck up.
< Reply # 5 on 11/2/2010 4:57 PM >
Reply with Quote
Posted on Forum: UER Forum
The for the info guys.

What I'm confused about though is how they can sell those extenders over cat5 and say it can go up to 150 feet. In internet comments people say it really doesn't work to 150 feet, but it still does extend a reasonable difference. I think some of it just depends on the device. I've seen a few people mention that they could get a flash drive working, but not something like a came even though both were using the same extended cable. Might just be one of those things where you're pushing it to the limit extending usb and sometimes you can get lucky, most of the time not.

I took a look at shortening the cable, but it only took about 3' feet off. I doubt that could cause much of an improvement.




He who rules the underground, rules the city above.
AnAppleSnail 


Location: Charlotte, NC
Gender: Male
Total Likes: 49 likes


ALL the flashlights!

 |  |  | AIM Message | My Flickr Page
Re: USB over UTC Cat5 fck up.
< Reply # 6 on 11/2/2010 5:03 PM >
Reply with Quote
Posted on Forum: UER Forum
Posted by trent
The for the info guys.

What I'm confused about though is how they can sell those extenders over cat5 and say it can go up to 150 feet. In internet comments people say it really doesn't work to 150 feet, but it still does extend a reasonable difference. I think some of it just depends on the device. I've seen a few people mention that they could get a flash drive working, but not something like a came even though both were using the same extended cable. Might just be one of those things where you're pushing it to the limit extending usb and sometimes you can get lucky, most of the time not.

I took a look at shortening the cable, but it only took about 3' feet off. I doubt that could cause much of an improvement.


You'll pretty much need a signal repeater to reliably work over longer distances. Without 'em (and maybe even with them) connection is iffy and read/write speed will probably be slow. I haven't tested that though. I know printers with long shitty USB2.0 cables don't print.




Achievement Unlocked
UER Forum > Private Boards Index > Tech Talk > USB over UTC Cat5 fck up. (Viewed 3156 times)


Add a poll to this thread



This thread is in a public category, and can't be made private.



All content and images copyright © 2002-2024 UER.CA and respective creators. Graphical Design by Crossfire.
To contact webmaster, or click to email with problems or other questions about this site: UER CONTACT
View Terms of Service | View Privacy Policy | Server colocation provided by Beanfield
This page was generated for you in 109 milliseconds. Since June 23, 2002, a total of 739212568 pages have been generated.