I have a USB camera that I have been wanting to mount on the outside of my house with a computer controlled tilt/twist base. The first thing I did was go out and choose a usb camera. I found a great deal on one in radioshack and snagged it. Plugged it into my computer, works fine. Cord will have to be a lot longer, though, to reach the outside of my house.
The next thing I did was build the base. It's a very simple design. It's made out of wood, and 2 servos, and controlled by a board with an atmega8, just like the board used in the $50 robot tutorial. The two servos are controlled by uart. No autonomous control whatsoever. One servo controls the left/right twist, and the other servo controls the up/down tilt. So I got that all put together, started up a hyperterminal, and it worked like a charm first try.
So the next thing to do was make the cords long enough to go from my computer to outside of the house. I thought this would be the least likely place where I would hit a snag. But I did. I went to lowes and picked out a very well priced 22/4 wire (4 wires inside, each at 22 gauge). It needed to be 25 feet, but I needed one for the uart cable, and one for the camera, so I got 50 feet with the intention of cutting it in half. 50 feet of 22/4 wire only cost around $8.50.
When I got it home I cut into the camera's 6 foot cord, ready to extend it to more like 25-30 feet. I cut back the shielding, and cut and stripped each of the 4 wires inside the usb cord on both sides, soldered 50 foot wire to it (the colors worked out great, considering the original usb cord had red, black, green, and yellow, while the new cord I bought had red, black, green, and white). Instead of immediately cutting it to 25 feet, I instead decided to see if it would work at 50 feet. So I soldered the other end of the 50 foot wire to the other half of the camera's usb cord (the side that plugs into the computer) and plugged it in. So at this point the setup was the camera, with the wire coming out of it soldered into one end of the 50 foot wire, the other end of the 50 foot wire was soldered onto the wire coming out of the usb plug. I plugged it into my computer, hoping it would work. But instead it said unrecognized USB device. This was the point where I started to think it might not work.
Then I decided it might just be too long, so I went ahead and cut the 50 foot cord in half like I originally intended. I resoldered the usb plug onto the end of the now 25 foot cord coming out of the camera, and plugged it in again. This time the computer recognized that it was a camera, but whenever I try to get any sort of image from it, the computer just locks up. At this point I thought I might have damaged the camera somewhere along the lines. Just to make sure the camera still works, I removed the 25 foot cord completely, and resoldered the usb plug back into the original cord coming out of the camera and plugged it in. Then the camera worked fine.
So here's how it looks. The camera works fine, even if the cord has been cut and resoldered. It does not, however, work if there is a 25 or 50 foot cord being used to extend the original cord. There must be some sort of data loss happening because of an excessively long cord. What can I do to fix this?
I have not yet tried extending the uart cord that will be going into the turn/tilt base.