Introduction: DIY USB Extension Cable
USB extension cables are must have cable in everyone’s cable bin. It can be used to reach unreachable USB ports back of computers, to extend the reach of USB game controllers till couches and can also be used for USB 3g dongles to throw them out of window to get those extra two bars of signal.
In my case, I have made an Arduino based night light a while ago, problem with it is the photoresistor value is varying based on its location. So I have to fix the setup permanently before setting its threshold limits and debugging. So I need a long USB extension cable to connect my laptop to the device.
Extension cables can be bought fairly cheaply anywhere online, but what’s point of buying it online when I have bunch of useless USB cables lying around, so I decided to make my own. This is fun project which can be done in an hour in the evening.
Step 1: Parts Needed
- USB cable (from any broken device)
- USB female jack (can be salvaged from any broken charger)
- Small Perfboard (if available)
- Soldering iron
Step 2: Know the Pinouts of USB
Standard male USB port usually have 4 pins.
From left to right (as shown in image) -- ground, data+, data-, 5volts
But usually good quality USB cables will have 5 wires going from end to end.
Four are usual USB lines and one extra one is for shielding ground which connects to the computer cabinet or metal case which usually connects to electrical ground. Shielding ground wire will be black color and thicker than other wires in the cable.
color coding of wires in typical usb cable
Red -- 5V
White -- Data-
Green -- Data+
Black -- Ground
Black(thick wire) -- Shielding ground
Note: Do not mix USB ground with shielding Ground.
Step 3: Making
First solder female USB port to small piece of perfboard to an edge.
Next solder the wires of USB cable (or the connector as I did) on the other side of perfboard.
Make appropriate connections from cable to USB female port. Connect shielding ground wire to outer metal case of female USB port.
Test the connections by connecting any USB device like flash drives. If it was recognized by windows then you wired it correctly.
Make connections strong by hot gluing and heat shrink tubing or general electrical tape.