DIY custom cable
If you are familiar with soldering or have already built a keyboard, making a custom cable should be a piece of cake. Just wanted to try soldering? Making a DIY custom cable is an ideal beginner project.
- How hard it is?
- What if I mess it up?
- Tools needed
- Pre-made cables and kits
- Parts needed
- How much will it cost?
- Parts - detailed
- Making the cable
- Making the coil
- Conclusions
How hard it is?
OK, I try to be honest. There are easier soldering jobs than soldering to the tiny pads of those USB connectors. I find this part harder than soldering a switch to a PCB. But you only have 2x4 contacts. (4x4 if you use a detachable connector.) And c'mon, you are a keyboard enthusiast. You've already built a keyboard or will build one soon. You shouldn't be frightened by soldering.
What if I mess it up?
You won't. Even if you do, you make another cable. The part where things usually go wrong is the coiling. But you can easily reuse some parts from a messed up cable so not every investment is lost. If you mess up 9 cables but make a good one at your 10th try, you've still spent less money compared to buying a custom cable. See cost calculations.
Tools needed
If you already have a soldering iron, you probably have all the other necessary tools too.
You will need a soldering iron, wire cutter, wire stripper, plier, a lighter/candle - nothing fancy. Instead of a wire stripper you can use an exacto knife or a blade, but there are some cheap and good wire strippers (from $5) and they make your life a lot easier.
Tweezers come in handy too. I always have some around and use them to remove paracord core, help positioning the wires while soldering etc.
In case you want an aviator connector you'll need a small screwdriver.
If you want a coiled cable, you will need some kind of rod to wrap the cable around, adhesive tape to fix the cable ends to the rod and a hairdryer/heat gun/oven/bonfire etc.
Pre-made cables and kits
If you neither have nor want to buy the necessary tools (especially a soldering iron) or don't want to bother with learning soldering and ordering parts and materials, there are cable makers who can make your customized cable with the desired connectors and colors:
-
Zap cables (US, WI), CruzCtrl Cables (US, CA), Summit Cables (US, OR), Asceny.com (US), WestM Cables (CAN), Osiris Cables (UK), Spaztik Cables (?) etc.
If you are on a budget and have the tools anyway you may consider making your own cable, saving that money and paying with your time instead.
Parts needed
USB cable, solderable USB-A connector, solderable USB-C/micro connector, heatshrink, sleeving material.Optional parts: detachable connector (aviator/YC8/HL12/LEMO etc).
How much will it cost?
Making your own custom cable is very cheap (excluding your time and labour). I mean, the parts and materials to make a basic 1 m straight cable with paracord sleeving should cost less than $1. Cables like this are offered for $15 even on aliexpress, so with a little work you can save that money.
With ordering a kit you may spare some time and thinking, but you can easily source everything from local stores, online shops and aliexpress/amazon/ebay much cheaper.
Quick price overview
- 4-wire cable starting from $0.15/m in a local electronic shop.
- USB connectors from $1.3/10pcs from ali.
- Heatshrink: $0.4/m from ali.
- Paracord sleeving: $1.5/8m from ali.
- Aviator plug: from about $1-3 from aliexpress.
- Some quality sleeving from mdpc-x for $1/m.
Based on these prices, with an investment of $15, you can make 10 custom cables with aviator plugs, 2m each.
Bill of materials
The best place for ordering parts depends on your location. Shipping from the US to eg. EU countries costs a fortune. Most Aliexpress purchases on the other hand are shipped for free, but you have to wait for a month (my average). Only you can decide which is more important for you: money or time.
My latest order:
Part | Price | Source |
---|---|---|
4-wire 4x0.22 alarm system cable | $0.16/m | bought locally |
alternatively: 4-wire cable 28 AWG | $4.32/5m | in the last resort try this |
USB Type-A connector (code: USB19) | $1.23/10pcs | get it |
USB micro connector | $1.31+$1.32 shipping/10pcs | get it |
USB C connector | $7.28+$0.35 shipping/10pcs | get it |
aviator 4P GX12 | $0.63+$0.68 | get it |
heatshrink, 10 mm 2:1 | $0.4/m | get it |
paracord 550 | $1.65/8m | get it |
We have seen the $15 price of the 1 m plain custom cable. The table above lists all the parts needed for 10 such cable for $7 only.
Similarly, the price of a 2m coiled cable with aviator connector starts at about $25. All the parts to make 10 such cables would cost only $23.
Parts
Cable
You'll need a 4-wire cable. Cables with more wires may work too, just leave the excess wires unused.
For the USB cable you should scout your city/neighborhood. You can purchase it online, but because of the size and weight of the package, shipping will cost a considerable amount.
If you cannot source USB rated cable, ask for 4-wire alarm system cable in shops for electricians. Different gauges will be presented to you (4x0.14, 4x0.22).
These alarm system cables cost $0.16/m in a shop near my workplace. They are so cheap you can buy a few meters from different types and compare them at home (rigidity/flexibility, memory effect after heating etc.).
Cable thickness
Some cables are thicker or more rigid, others are thinner. You shouldn't exceed 4 mm if you want to use paracord 550 sleeving or 5 mm thickness if you want to use MDPC-X's smallest-size sleeves, but other than that, choose what you like.
I have used 3.2-4 mm cables combined with paracord and MDPC-X SMALL sleeves with success.
Cable length
As a general rule, USB specifications limit the maximum length of the cable to 5 meters (16 feet) and 3 meters (10 feet) for high and low speed devices respectively. A longer cable risks to fail transmitting properly.
With keyboards drawing more power (eg. lots of LEDs), a maximum length of 3 m or less is preferable.
Based on zapcable's testing there are some high-powered keyboards that require even shorter cables—like HHKB keyboards (2.4 m / 8 feet) and Input Club's K-Type or Massdrop's CTRL (2.1 m / 7 feet).
If calculating the length of a coiled cable seems confusing, I've made a tool for this purpose: coiled cable length calculator.
Cable shielding
USB specifications mention and cable makers usually offer shielded cables. The cheap alarm system cables are double shielded too. BUT! I've eviscerated multiple used keyboards and mice and not a single one used shielded cables. All USB cables were plain old 4-wire cables without any shielding and they did a perfect job for years. So if you can source only an unshielded cable, it should work fine too.
Sleeving: Paracord, Techflex, MDPC-X
Paracord
If you aim for the lowest price and don't mind waiting, paracord from aliexpress is the cheapest option. (For as low as $0.12-0.2/meter and free shipping.) Lots of colors and patterns, 100% coverage, the nicest feel on touch (like fabric) from all the sleeving materials imo.
Paracord 550 Type III has an inner diameter of 4 mm which fits an average 4-wire cable well. This may be a tight fit, I wouldn't experiment with Paracord 425 Type II (inner diameter: 3 mm) even with thinner cables.
Most paracords come with inner cores which have to be removed. There are coreless offers, but they come only in very limited colors.
Techflex
Techflex (US) has a lot of different braided PET sleevings. Usually, the 3.2mm (1/8") Techflex Flexo PET variant is used for double sleeving (not enough coverage by itself but looks good as a transparent or colored second layer). Apparently, it feels like plastic.
This size of Techflex will expand up to 6.4mm (1/4") in diameter, but this expansion makes it shorter. Order 10-15% more sleeving than your cable lenght to make sure it will be enough even if expanded.
For EU users shipping costs make this purchase unfeasible. Even Techflex Germany's shipping fees are ridiculous. (At this point I have to confess that I've never worked with Techflex because of this reason.)
MDPC-X
MDPC-X (EU-DE) is also braided PET. It's coverage is not perfectly 100%. The feel on touch is like plastic.
Great colors for about $0.9/meter. Shipping is somewhat cheaper than Techflex's fees, but still crazy compared to aliexpress sellers and the product price itself.
If the sleeving and base cable's color differ, you may need a paracord under the MDPC-X.
Sleeve coverage comparison
Paracord (top) has full coverage. While MDPC-X (bottom) is quite tightly woven, its coverage is not perfect. Almost full coverage on a straight cable...
...but the cable's base color will be revealed when stretched/coiled.
Sleeve price comparison
(2019/12, to EU/Hungary)
Sleeve | Source | Price | Shipping fee | Sum |
---|---|---|---|---|
10 m Paracord | ali | $1.3 | 0 | $1.3 |
10 m PET sleeving | ali | $3.7 | $1.5 | $5 |
10 m Techflex | ebay | $13 | $2 | $15 |
10 m MDPC-X | Germany | 8.2 EUR | 9.7 EUR | 17.9 EUR... |
10 m Techflex | DE | 5.6 EUR | 14 EUR | 19.6 EUR... |
10 m Techflex | NL | 9.4 EUR | 14 EUR | 23 EUR... |
10 m Techflex | UK | 10.7 GBP | 8.5 GBP | 19.2 GBP... |
USB connectors
On the device side you want most likely a solderable USB-A connector, and on the keyboard side a USB micro or USB-C. I personally use Pro Micros with USB micro connector, but choose what you have on your keyboard.
USB connectors in bulk are quite cheap: $1.2/10pcs USB-A connector, $2.6/10pcs USB micro from aliexpress. Feel free to buy it locally if you can and don't want to wait. Or order it from the webshop of your choice.
Heat shrink
Heatshrinks are used to cover and hide the connector-cable joints and soldered parts. There are heatshrinks with different colors, diameters and contraction ratios. Usually, you pay more for heatshrinks with larger contraction ratios: 2:1 < 3:1 < 4:1.
The most tricky part is the USB-A connector. You need a heatshrink which is large enough to fit the quite bulky connector (⌀10.5 mm) and at the same time the cable outer diameter (⌀4-5 mm) after contraction. (For the USB micro/C part and for the aviator connector you can choose a different (smaller/cheaper) heatshrink.)
Heatshrinks are labeled by their shrinking characteristics. Eg. a 9/3 heatshrink's starting (circular) diameter is 9 mm and it shrinks to 3 mm when heated (3:1).
Another one I've used was labelled "9.5/4 mm (2:1)".
⌀3 and ⌀4 mm after shrinking are fine for our ⌀3.2-4 mm cable (+sleeving). But what about the USB-A part? What diameter is equivalent to the USB-A connector?
According to the specifications the USB-A connector's dimensions are 12x4.5mm. This is a circumference of 33mm, which is equivalent to a circle of about 10.5 mm diameter (if you divide it with pi). You can slightly extend a heatshrink eg. with a plier, but the 9/3 3:1 one ($3/m in a local shop) just fit my connector even without extending. The 9.5/4 2:1 ($1/m in a local shop) covered the connector effortlessly.
But you can use a 10/5mm 2:1 heatshrink, a 12/4 mm 3:1 one or anything about these dimensions until the heatshrink fits the USB-A connector. Also, you can take a connector to a nearby electronic shop and try different heatshrinks. That's what I've done.
You might use only about 3 cm for a joint, so 1 m heatshrink is plenty. Enough for 30 joints or 15 cables.
Detachable / aviator connector
The most basic aviator connector is available for about $1 from aliexpress. Mostly GX12 or GX16 type is used with 5 mm and 6.5 mm inner diameter respectively. Both squeezed and loose cable ends look bad so choose according to your final cable thickness.
There are multiple detachable connector types and sizes used by the community starting from the $1 ali one to the LEMO connector which costs $70+. There is the YC8 ($3.41+$1.06 shipping) or the more pricey HL12 from Amazon ($22+$4 shipping). You can find LEMO knock-offs for about $20 too.
They look cool and in some rare situations can be useful, but mostly they are used for aesthetical reasons and don't really have a function. With ratings of 500 mating cycles some of these are really not for daily travel. Even if some people claim they are useful, no doubt the aerospace graded LEMO or the waterproof HL12 are a slight overkill.
Making the cable
Building is quite straightforward:
- Cut the cable to length.
- Cut the sleeve(s) to length, burn the ends and put the sleeve(s) on.
- Make the coiled part (optional). Reversing the coil can do wonders.*
- Put the heatshrinks on the cable.
- Strip the wire ends.
- Solder the USB connectors (and the optional detachable connector).
- Heat the heatshrinks.
You have to solder four wires to each connector and you're done with the soldering part. Video.
This was my first try at soldering a USB connector and left the pic with the poor soldering job only to encourage you.
Zapcables has a nice wiring diagram: here. The coloring of your wires may differ and actually, the cable will work until you are consistent.
Making the coil
For the coiling part there's this tutorial on geekhack: DIY coiled cable tutorial.
If I would do a lot of cables, I would make a jig to hold the cable ends in place. For a few cables a small rod and adhesive tapes work fine.
The heat necessary to fix the coil depends probably on the cable thickness and material. For my greatest surprise a small hairdryer was able to produce enough heat to achieve acceptable results with a thicker, more rigid cable.
Conclusions
You've already read much more about making a custom cable than necessary. Start making one now instead of wasting your time with watching videos or reading all the guides on Earth.
Happy building! I'd like to see your cables and boards on r/mk.