Intro: Build a Versatile USB Power Cable for Your Arduino Projects
Pretty much all small mobile electronics projects need power. Often 5 volt power works well for micro controllers and sensors. My favorite source for mobile 5V power are power banks. They come in lots of shapes, sizes and capacities, are rechargeable and fairly cheap.
Unfortunately not everything that needs that power has a convenient micro USB connector especially breadboards. I hacked together this simple cable and have since found them incredibly useful. I also use the same process on my battery boxes that have plain wire leads so I have flexible battery solutions from 1.5V to 12V.
The 22 gauge wire is strong enough to jam into breadboards, easy for screw terminals to grab and fits well in female headers and jumper cables. Because the wires are stiff and held in place with heat shrink tube they are much less likely to accidentally short together.
These power cables will work with screw terminals, breadboards, Arduino headers, alligator clips, jumper wires and more.
Step 1: What You Will Need
- USB cable
- 22 Gauge solid wire
- Heat shrink tube or electrical tape
- Scissors or wire cutter
- Something to strip your wires
- Soldering iron
Find a USB cable you don't mind cutting up, I recommend one with a standard USB type A male connector on one end.
Heat shrink tubing, 2 sizes one size for the individual wires (1/16 inch) and one size (3/13 inch) for the USB cable. You also want a way to tell the difference between positive and negative wires (I used traditional red and black tubing). Obviously you will need a heat source to shrink the tubing. You could also use electrical tape
Scissors or wire cutters to cut the wire and USB cable
22 Gauge wire, other gauge may work this is just what I had and it seems to be a good size, you don't need much. The wire I used was "floral wire".
Step 2: Prepare the Cable
Once you have picked your cable, decide if you plan on using both connectors. Then decide how long you want your cable to be. For my little projects about 6 inches work for me.
- Cut your USB cable to size
- Trim the outer insulation back about 1/2 inch or so
- Find the red and black wires and separate them from the other 2 wires
- Cut off the other 2 wires leaving the black and red power wires
- Strip some insulation off the black and red wires
Give yourself enough wire to work with when cutting off the outside and individual wire insulation, you can always cut off the excess. The first time I tried this I experimented on the end of the USB cable I wasn't planning on using.
Step 3: The Secret Sauce
Because these cables get used on mobile projects they get bent around and abused. We need to make them more rugged. We can do that using the 22 gauge wire. Make sure the wire extends down to the insulation to help make a good physical connection, soldering the power wires will give us a good electrical connection. The 22 gauge wire also works well in breadboards.
- cut 2 pieces of 22 gauge wire about an inch long
- push one end of the wire down to the insulation
- Wrap one of the stripped power wires around 22 gauge wire
- repeat with the other piece of wire and the other power wire
Once again it's fine if your wire is too long, we can cut it off after we get everything put together.
Step 4: Bring the Heat
We will solder the wires for a good electrical and physical connection then we will use shrink tubing to make the connectors more rugged and give the project a finished look.
- Solder the power wires to the 22 gauge wires they are wrapped around
- Slide the proper color of heat shrink tube over each wire
- Apply heat to shrink the tubes around the individual wires
- Position the larger heat shrink tubing over the outer insulation and make sure it covers the bottom of your 22 gauge wire
- Apply heat to shrink the tube around the insulation and wires
- If your cable has a fabric sheath your may need to trim it to get the tubing over it.
- Optional - add a 2nd piece of tube to better hold the 22 gauge wire in place and seal the outer fabric covering if your cable has one
When you solder the wires make sure there are not an large lumps of solder because it might make it hard to get the heat shrink over them. Also make sure there are not any sharp points of solder sticking out.
It's very important to keep the red/black wires identified. You don't want to mix them up when powering your project.
We want to secure the bottom of the 22 gauge wires with the heat shrink tubing to make sure they don't poke through the insulation when we are pulling on the top of the wires plugging them into various connectors.
Having power wires beefed up like this makes it quick and easy to supply power no matter what the connector the project needs. They are a good tool to have in your box of cables and connectors. I hope you give them a try.