Here's how to make a USB power cable when you need to power something from USB but you don't have a cable with the right connector for whatever you want to power.

USB power cable after changing on the other connectors.
USB power cable with a new connector.
USB cable before with the original connectors.
USB cable with original connectors.
The new USB power cable connected to a phone charger and to a Maestro motor controller board.
The new USB power cable in use.

In my case I wanted to power a Maestro motor controller board to control some servo motors. My power supply was a RavPower USB phone charger/battery bank. The board had some male pin headers for the 5 volt input. So I went to a thrift/second-hand store and got a USB cable with a connector that would plug into the power supply. Then I replaced the other end of the cable with a female pin header to plug into the board.

Just before plugging in the cable.
Just before plugging in the cable.
Plugging the cable into the motor controller board.
Plugging the cable into the motor controller board.

Making the USB power cable

The first step was to cut off the unwanted connector. Then I used a sharp knife to make a slit along the jacket, being careful to not damage any wires inside. Be careful to not cut yourself. Then pull back the jacket. In my cable the wires were further covered by mesh and foil shielding.

Cutting the unwanted connector using wire cutter pliers.
Cutting the unwanted connector.
Making a slit in the cable's jacket using a knife.
Making a slit in the jacket.
Peeling back the jacket on the USB cable, exposing the insides.
Peeling back the jacket.

I pulled back the shielding to expose the wires inside.

Pulling back the mesh shielding.
Pulling back the mesh shielding.
Pulling back the foil shielding.
Pulling back the foil shielding.

There are two power wires (red and black) and two data wires (white and green). Inside the USB connector, the power pins are the outer two and the data pins are the inner two.

Showing the red and black power wires and the white and green data wires in the USB cable..
The power and data wires.
Showing the power and data pins inside the USB connector.
The power and data pins.

Using the knife again, I carefully cut a short length of insulation from the end of the red and black wires, and pulled it off. I did it using a knife because the tool I normally use for trimming wires doesn't work with such small diameter wire. If your tool does then you can use that instead.

Carefully cutting the insulation on a wire in the USB cable using a knife.
Cutting the insulation.
Pulling off the insulation off the wire in the USB cable.
Pulling off the insulation.
Showing the metal wire exposed after the insulation has been removed.
The insulation removed.

As I said, in my case I needed to plug into the two pins of the type shown below, called a male pin header. To do that I got a female pin header and cut out a two-pin header from it. If you're not familiar with doing that then see this page all about working with pin headers.

The two pins of the male pin header on the Maestro motor controller board.
The two pins.
Female pin header - side view.
Female pin header - side view.
Female pin header - showing the two holes.
Female pin header - showing the two holes.

In preparation for soldering the pin header to the two data wires, I first cut some heat shrink tubing for both wires and and slid them onto the wires.

I then soldered the red and black data wires to the pin header, being careful to keep the heat shrink tubing away from the heat since I didn't want them to shrink while I was still soldering.

Cutting heat shrink tubing using scissors.
Cutting heat shrink tubing.
Sliding heat shrink tubing onto a wire in the USB cable.
Sliding heat shrink tubing onto a wire.
Soldering the wires of the USB cable to the female pin header.
Soldering the wires to the female pin header.

Then I slid the heat shrink tubing over the exposed metal where I'd done the soldering, and used a heat gun to shrink the tubing over the metal, insulating it.

Using the heat gun to shrink the heat shrink tubing.
Using the heat gun.
Close-up of heating the heat shrink tubing using the heat gun.
Close-up of heating the heat shrink tubing.

While I could still see which wire was red, and therefore which of the two connector holes was positive, I wanted to mark red on the connector somehow. One good trick is to use red nail polish, but I didn't have any. So instead I cut a strip of white tape, put it on the red-wire side of the connector, and painted it red using a red pen. If I'd had red tape then I could have used that instead.

The connector with a red mark on one side.
The marked connector.
Cutting a narrow strip of white tape.
Cutting white tape.
The white tape on one side of the connector while we use a red pen to color it red.
Marking it red.

Since the data wires aren't needed, I cut them short. I could have left them like that but I wanted no chance of the metal in those wires touching together and sending a false signal. So I covered their ends in heat shrink tubing too.

Cutting the white and green data wires.
Cutting the data wires.
Putting heat shrink on the data wires.
Putting heat shrink tubing on the data wires.

To finish up the end of the cable, I first cut some foil from a roll of the type of aluminium foil found in grocery/food stores normally used in the kitchen for wrapping food. I wrapped that around the wires since the original foil was no longer long enough.

Then I pulled back the mesh and the jacket.

Cutting around 3/4
Cutting some aluminium foil.
Wrapping the foil on the wires of the USB cable.
Wrapping the foil on.
Putting the foil, mesh and jacket back over the ends of wires for the USB power cable.
Putting the foil, mesh and jacket back.

However, that didn't cover the whole thing very well anymore, so I slid on a big diameter piece of heat shrink tubing that covered everything, and used the heat gun again to shrink it on.

Putting a big heat shrink tube to cover everything.
Putting on more heat shrink tubing.
Shrinking the heat shrink using a heat gun.
Shrinking the heat shrink.

And here's the finished modified USB power cable.

Showing the finished USB power cable with the new connector on one end.
The finished USB power cable.

And here I plug one end into the phone charger/battery bank, and the other end with the new connector into the Maestro motor controller board.

Plugging the USB power cabled into the phone charger/battery bank.
Plugging into the phone charger/battery bank.
Plugging the USB power cable's new connector into the motor controller board.
Plugging the new connector in.
The USB power cable in place taking power from a phone charger/battery bank to power a Maestro motor controller board.
The USB power cable in place.

Video - Make USB Power Cable

The following video shows all the above steps. It also shows using a meter to demonstrate which pins the power and data wires go to in the USB connector.

More topics

rimstar.org - Share your project on rimstar.org - About - Privacy policy - © 2020 Steven Dufresne
Contact: