If you're anything like us, you have an extensive collection of cables. In our case, it's an excess of USB A to micro b cables.
If you can't find the cable you want... make the cable you want.
In this example, we've made one of our many many USB A to micro b cables into a USB A to JST connector cable.
You will need:
- A USB A to micro b cable
- wire cutters
- wire strippers
- solder and a soldering iron
- heat shrink tubing (2 x small diameter, 1 x wide diameter)
- hot air gun or similar
First, use the wire cutters to chop off the end you don't want - in our case the micro b end. (Top tip from Simon Walters - cut in the middle of the cable and then you can reuse the micro B end at a later date!)
Next, carefully strip off the outer casing, revealing the wires inside the cable. You might get a variety of results at this point.
We found data wires as well as power wires, but the only ones we're interested in are the black (ground) and red (power) wires. The mini printer we have runs off 5V, but only comes with a JST to JST connector, so we chopped the end off that wire too!
Strip the coating off the end of the black and red wires, and bend the others out of the way.
Hopefully you can see what we need to solder together now! But wait! If we want to cover up the joints with heatshrink, the little tubes of heatshrink need to go on before we solder the joints.
We pushed a large black one over the whole cable, a small red one onto the red wire, and a small black one onto the black wire.
Now, solder the red wire to the red wire, and the black wire to the black wire.
Push the small red and black heatshrink down so it covers your solder joints, and heat it until it shrinks tight. (This is just before we shrunk it.)
Finally, place any spare wires to the sides of the others, and pull the large black heatshrink over everything. Heat it to finish the cable.
As with all electrical connections, you can damage electrical equipment by using the wrong supply, so check and double check that things are correctly wired. We only recommend doing this with clearly marked 5V or lower cables.
And if in doubt - we sell cables with all different ends such as the Sparkfun Hydra or many more!