DIY USB Extension Cable




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.

Full Spectrum Laser Contest 2016

Participated in the
Full Spectrum Laser Contest 2016

Be the First to Share


    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Make It Bridge

      Make It Bridge
    • For the Home Contest

      For the Home Contest


    Fatima LaherI
    Fatima LaherI

    4 years ago

    Thank you for this post. I needed to extend my usb port from behind my TV so I used an old phone charger cord, cut off the phone connection end and soldered a female usb port to it. I did not use a perfboard. I double and triple checked the wire connections. I even tested each cable end to end with a multimeter to ascertain that the were no short circuits or breaks in the wires. The extension is just less than a meter long and it does not work when i plug it into my pc with a flash drive. What could possibly be wrong?


    7 years ago

    somehow I always find myself needing a longer usb cable. great idea and simple enough :) well done


    Reply 7 years ago

    thank you, you can do this with cat5 cable which have 4 pairs of wires, so you can extend 2 usb ports in one cable.