USB-C For Hackers: Reusing Cables

Your project needs a cable, and since USB-C cables are omnipresent now, it’s only natural to want to reuse them for your evil schemes. Ever seen USB 3.0 cables used for PCIe link carrying duty? It’s because USB 3.0 cables are built to a reasonably high standard, both sockets and cables are easy to find, and they’re cheap. Well, USB-C cables beat USB 3.0 cables by all possible metrics.

Let’s go through USB-C cable reuse in great detail, and see just what exactly you get when you buy either a gas station C-C USB 2.0 cable, or, the fanciest all-features-supported 240 W Thunderbolt cable that money can buy. Looking for a cable to cut, or something to pass a seriously high-speed link? You’re reading the right article.

The Omnipresent Cables

USB-A to USB-C cables are the least interesting. They’re equivalent to a microUSB to USB-A cable, except there’s a resistor on the USB-C plug, connected from VBUS to one of the CC pins. That’s it. The cable contains four conductors, there’s really not much new. Save these cables for all the devices still built without the 5.1 kΩ resistors.

Now, a USB-C to USB-C cable – let’s say, 60 W max, the default USB-C cable capability. If your cable says anything less than 60 W, say, “2 A” or “15 W”, that’s a lie – it can handle 60 W no problem, all USB-C to C cables can do 60 W. This cable is also cool – for one, it has five conductors; GND, VBUS, D+, D-, and CC. Two of them (GND and VBUS) are guaranteed to be thick enough to carry 3 A without much voltage drop if any, too!

five conductors, two of them thicker – yep, you know where to find a replacement!

What does this mean? If you need a five-wire cable to fix your headphones, and you want something solid, a USB-C cable is probably your best bet ever – and you have a ton of choice here. You will inevitably end up with a heap of broken USB-C cables, which means you’ll never be short of 5-conductor cables – the kind of cable that has always been kind of a rarity, unless you’re pilfering headphone cables for your projects.

What about 100 W to 240 W cables? There’s good news and bad news. Good news is, the cable is likely to contain six wires. One extra wire is for VCONN – power for the emarker chip inside the cable plug, a memory chip you can read over the CC line, letting the PSU know whether the cable is indeed capable of carrying over 5 A – required for the 61 W to 240 W range.

Bad news is – there could still be five wires, if the cable is built using the alternative scheme with two emarkers, one per plug. The VCONN wire won’t be present then, and there’s no way to know until you cut the wire apart, so if you’re looking for a six-wire cable, you might have to try a few different cables. Also, the VCONN wire doesn’t connect the two plugs together – it’s isolated at one end, so don’t expect it to help if you use USB-C sockets instead of cutting the cable.

Now, you don’t always want to cut the cable – you can use USB-C sockets and apply your custom five-wire scheme to them. An idea I hear often is using USB-C cables for 3D printer hotends. It makes sense – such cables can handle 60 W of power without breaking a sweat, and you could likely do a fair bit more. Put extruder power onto the VBUS and GND pins, and use the three wires left for a thermistor and a limit switch. But the cable and socket mechanicals might be a dealbreaker. If your extruder-powering cable vibrates out of the socket, you might end up with a high-resistance-contact high-current connection on your hands – a recipe for melted plastic and possibly flames. Try it at your own risk!

You also won’t be able to make such cable reuse standard-compliant, and such port won’t be safe for any USB-C devices someone might plug into it, so label it accordingly, please.

What About Voltages?

What about putting arbitrary voltages onto VBUS, without PD negotiation? Again, it won’t be standards-compliant unless you really put some effort in – mark your jury-rigged sockets and cables accordingly, or they will eat your devices for breakfast. Also, SPR (100 W) cables contain 30 V 10 nF capacitors at each plug end, and EPR cables contain 63 V ones – reach these limits at your own risk, those capacitors are known to fail short-circuit.

Another factor is if you decide to go for the 48 V / 5 A target while bypassing the USB-C standard, because 48 V support is not as simple as putting 48 V on VBUS. If you just put 48 V on the VBUS pins, you’ll really want to figure out spark management, so that suddenly unplugging the cable won’t burn either the plug or the socket or both – PD has ways to deal with that, but they do require you to actually implement PD, specifically, EPR, which brings a heap of safety guarantees due to exceeding the 20 V limit.

That’s about it when it comes to reusing the cheapest kinds of USB-C cables – you get an extra wire compared to previous USB standards, it can handle a fair bit more power, and you can even use USB-C sockets. However, it will kill your devices if you’re not careful, and you need to take extra care if you go over 25 V or so. What about if you want to get more wires and pull some differential pairs instead?

Up The Speed

Fully-featured USB-C cables and sockets are genuinely wonderful for pulling high-speed communications over them. They are built to a solid standard, with proper impedance controls, shielding, and a modern-day understanding of digital transmission standards. Now, what exactly do you get from a fully-featured USB-C cable?

HDMI over USB C – as in, passing HDMI signals through USB-C cables. I guess, that’s one way to circumvent connector royalties!

Short answer is, you get six differential pairs, and one single-ended wire (CC), in addition to VBUS and GND. You might want to keep GND at a stable level here, and perhaps don’t mess too much with VBUS. There’s a ton you can do with these six diffpairs – two USB3 ports, or a PCIe x2 link, or two SATA, or HDMI, or CSI/DSI. You can even do Ethernet if you really want to – just don’t expect galvanic isolation to work.

There are nuances, of course! Ever see a teardown or an X-ray of a fancy fully-featured cable? There’s typically all sorts of ICs inside each plug. The first one is the emarker chip, and it’s a fun one to keep in mind. For a start, it will result in some ESD diodes between GND and CC – watch out, don’t bring CC below 0 V or above 5 V.

A second kind of IC is the signal re-driver, used in active cables. You have to provide power to these redrivers through either VBUS or VCONN, just like emarkers. If you don’t do it, your high-speed lines might just be unresponsive to any high-speed signal you apply to the pins.

What about rotation? That’s a tough one – unless your signal is very much like USB3/DisplayPort/Thunderbolt, you might not be able to find a suitable mux chip to rotate your signals. As such, you will likely want to stick to a single rotation and wire your signals directly. Then, if you plug in the cable in an unexpected way, it won’t work, so you should probably consider using the CC pin or the two SBU pins for lighting up LEDs. showing you whether you’re good, or whether you should unplug the cable, rotate it, and plug it back in, like in the good old days.

There’s one last thing you might care about. USB-C cables connect TX on one end to RX on another end, and vice-versa. This is nice for PCIe purposes, since it, too, flips pair naming at the connector. For any other signal, you’ll want to keep it in mind – RX1 won’t go to RX1 on the other end, it will go to TX1, and you’ll have to re-layout accordingly. Unfortunately, I’m not intimately familar with active cable inner workings – so, it’s hard for me to tell whether any active cable redriver chips would reject certain sorts of signaling, perhaps, signals that don’t match USB3, DisplayPort or Thunderbolt signaling types.

And One Last Hack

These are the basics of what you should know before you try and reuse a USB-C cable, no matter its complexity. That said, here’s an extra hack before we conclude!

Only one USB2 pair is actually connected at the USB-C cable end – the pair on the same side as the CC pin. My guess is, this was initially done to avoid stubs and cable plug PCB routing complications, as well as to accomodate standards like VirtualLink. Regretfully, we never got VirtualLink cables, which would allow us to use seven differential pairs at a time, but there is another hack we still get out of this!

What does this mean for you? If you use two USB2-grade 2:1 muxes, you can get two extra differential signals out of a fully-compliant USB socket, and they won’t even interfere with standard-compliant cables. Use this for SWD, JTAG, or whatever else, with your signals broken out through a custom plug – just make sure you dutifully switch the muxes depending on cable orientation, then you can keep your USB2 cake and eat it, too.

30 thoughts on “USB-C For Hackers: Reusing Cables

  1. Fantastic artwork!

    But seriously, whilst the cables might be a good source of wire, it’s not a great plan to abuse USB-C ports for other purposes. That’s right up there with keeping bleach in soda bottles, keeping methanol in vodka bottles, and keeping arsenic in your powdered gypsum barrel (see Bradford sweet poisoning).

    IE it’s a great idea right up until you forget or anyone other than you uses it, or you tell someone they can plug your phone into the charger next to your 3D printer and they misunderstand and plug your phone into the Jerry-rigged hot end PSU.

    And no, warning labels only suffice until they’re hidden, run off, ignored, or just not spotted in the moment. The number of times I’ve seen someone miss an “obvious” warning sign… the problem is we’re conditioned to ignore such things through familiarity, and people tend to ignore them on a “common” situation like a USB charger because it doesn’t make sense.

    We all think we’re smart and above this until the day it comes back to bite us.

    If your plan means it’s no longer safe to plug a typical USB-C device into a USB-C port, or to plug your new special thing into a typical (or cheap knockoff) USB-C charger, reconsider and find a different connector.

    1. “If your plan means it’s no longer safe to plug a typical USB-C device into a USB-C port”

      It’s not that hard to guard it so that it’s protected against a USB-C cable being plugged in. Just use one of the cheapo chips that talks the CC protocol. Lets you detect an improperly inserted cable, too. You might need a bit more protection for the USB 2.0 pair, but you don’t want to be using it for high-speed stuff anyway, it’s unshielded and kinda sucks.

      The simple fix for the “how do I handle rotation?!?” is to use a single-screw locking USB-C cable. Lookie there, forced orientation, what a novel concept.

      https://www.amazon.com/USB-Cable-Delivery-Certified-Interface/dp/B09H2ZXC9B

    2. Disagree. We’re hackers, and we deserve to know how to do things in a pinch with what we have. Fundamentally – like half of my proposed usecases doesn’t even violate the standard too significantly (doesn’t reach the threshold where you risk burning things), and, like a quarter that’s left, could very well be done with a cable you cut apart, so your concerns are entirely not applicable for the most of it. For the remaining part, standards compliance or safeguarding might just be easier than you expect! Working with somewhat dangerous things is a good skill, and risk is a sliding scale where the optimal amount is not zero – especially as far as hacking is concerned.

      Better suggestion – learn how to pull off technically-unsafe tricks as safely as possible, and improve upon things like your UX skills. For instance, I’ve done a “USB-C connector that carries hard 20V” a couple of times because that was the best thing in the given situation (the other options were directly worse), but then, I’ve glued stickers or written with permanent marker directly on the connectors – “KILLS DEVICES” directly on the plug is hard to miss. Other projects of mine use warning LEDs with markings that train a double-check reflex in you, and other ones get extra circuitry to limit damage. I guess, bottom line is – power is danger, danger is power, trust hackers to do risky things out of the ordinary if they consider that to be the best option out of all available.

      Also, let’s be honest for a moment – “fully safeguarded from average person doing intuitive things” isn’t a standard most of us stringently adhere our homelabs to =D There’s the ideal world where we can theoretically do things perfectly, and there’s the real one where things get done.

    3. I sailed on a ship (sailed by a lot of different crews of atudents) that had several “schuko” power sockets on deck – Some were white and delivered 230V AC when the generator was on or we had wall power, some were painted red and delivered 24V (either DC when running on batteries or AC when the generator was on) and was used for navigation lights and a spotlight.

      It looked like a recipe for disaster but in the 10 years I was associated witg the ship that has never gone wrong.

  2. “Short answer is, you get six differential pairs”

    I’m so confused – are there USB-C cables with 6 actual differential pairs in it. By spec the two sideband pins have no differential requirement and in the few I’ve ripped apart they’re just single-ended.

    The wiring diagram here:
    https://www.pshinecable.com/article/usb-c-cable-wiring-diagram.html

    show the SBU pins as single-ended. They’ve both got weak single-ended impedance control so they won’t be terrible if used differentially, but only at low speeds. It’s also worth noting the true diffpairs are not all identical – the USB diffpair is unshielded, so again, not a high-speed pair.

    The other thing to note, of course, is that they’re not 100-ohm differential pairs. They’re 90+/-5 ohm. Tons of the designs I see just ignore the 90-to-100 difference because it isn’t that big a deal, but in some cases (e.g. a scope probe or something analog) it might be.

    1. Also the “That’s a tough one – unless your signal is very much like USB3/DisplayPort/Thunderbolt,” is a bit misleading. High speed exchange switches are not repeaters: they’re just analog pass connections, so all you’ve really got is a max voltage restriction. The signals don’t have to be digital or anything. They can be single-ended for all those things care.

      As an aside that also means that stuff like a PI3DBS16222 is a pretty nice and cheap analog exchange switch for balanced signals if you’re doing something clever.

      1. On a lot of Type-C cables, the only true twisted pair is the old USB D+/D-. The super-speed guys are allowed to be implemented as individual coax so long as the differential specs are met, and that’s not that hard: since they’re shielded, they’ll maintain mode so long as the shielding’s decent. The differential-to-common conversion requirement’s only 20 dB anyway.

        The SBU pair does have a single-ended impedance control such that if you use it differentially it’s ‘nominally’ 85 ohm but the variation on that is huge (~+/-15 ohm) in comparison to the D+/D-. It also has utter garbage insertion loss spec (3 dB bandwidth of ~1 MHz-ish) so it is definitely the last pair you want to use. Although that spec’s generally met with plenty of margin from my experience.

        DisplayPort uses it for AUX which only is a ~2 Mbaud path, so at that level it really doesn’t matter.

  3. Please don’t ruin USB-C by making this sort of cursed stuff. :((
    There are plenty of USB-to-YouNameIt modules available and pairing them with a simple USB-C female breakout (with proper CC resistors) will make your device universally compatible. I’ve done this to headphones, UART adapters, capture cards, ethernet adapters and more.

    1. Oh there’s like a hundred uses for USB-C connectors that violate the standard but aren’t actually dangerous and they’re super beneficial to everyone involved. MIPI CSI/DSI/HDMI on USB-C connectors for space savings and avoidance of bespoke connectors is one thing I can instantly remember, the Pinecil’s USB-C signal breakout pinout with its devboard is another that’s been a wildly helpful hack, and same goes for the Ox64’s/Oz64’s USB-C connectors that carry a whole bunch of signals on fully-featured USB-C connectors. There’s only three altmodes that really exist, and a ton of uses for an abundant and featureful connector that is USB-C – a lot of things can be retrofitted indeed, but not all of them!

      As for the simplest cables – my 3D printer ran for a while with a USB cable used for powering some parts of its hotend assembly cuz the stock cable was badly designed, which, nah I’m not gonna pay a replacement new but still badly designed cable for a printer that’s near the end of its lifetime. Use USB-C sockets, wire up both ends, plug the cable in, then wrap it in electrical tape – doesn’t fall off due to vibrations, and does prevent accidentally plugging this cable into a phone, as a bonus.

      Oh and, even if it’s dangerous, it can be worth doing. Here’s an example scenario – for like the first year of me owning my Pinecil, I didn’t have any USB-C supplies to use with my Pinecil at my workbench – only an inflexible barrel jack wire with 20V on it, that’d constantly fall out – or even worse, it’d drag the Pinecil off the desk under its weight sometimes, having it fall on my bed, so I had to catch it. I did have some nice red USB-C super flexible silicone cables from Pine64, though! And, the Pinecil doesn’t actually require USB-C negotiations to start receiving 20V – it just takes input voltages in certain range on either of its ports.

      What I did was, soldered together a barrel jack to USB-C adapter, plugged that nice red flexible USB-C cable in, and put a very visible label on its working end plug that went “DO NOT” (all that’d fit on the plug). Traded one risk (Pinecil falling off desk/starting a fire) for another (perma 20V USB-C cable that can fry devices), and it ended up being a damn good trade – it made soldering all that much easier for me, since the flexible cable was way more lightweight, and there were no more Pinecil falls off the desk or sudden unplug events, so the trade ended up being a net benefit as far as safety was concerned.

      Doing cursed stuff is part and parcel of being a hacker, really. Other people can shy away from it, but we really don’t have to – after all, witty unintended uses for things are a large part of what makes the hacker community a powerhouse that it is.

    2. USB-C already ruined itself by having cables with identical connectors perform decidedly non-identical functions. “The Standard” for USB-C is complicated and confusing. If you’re going to make a cable that can do anything, might as well lean into it and use it for all purposes.

  4. If your cable says anything less than 60 W, say, “2 A” or “15 W”, that’s a lie – it can handle 60 W no problem,

    That is a very bad bit of advice, it might be true often. But manufacturing these days tends to stamp hopelessly optimistic numbers onto their products, not numbers with a safety margin! So actually test the wire carefully before you make that assumption!!!!! It would be really stupid to cause a fire, short out your really expensive SBC or whatever because you made that assumption and found that actually for once the label was telling the truth.

    1. It’s just going to be true. Cheap USB-C cables are defined by their amperage, and the cheap cables you get, will be tested for 3A – cause that’s a commonplace charging current for phones. Then, the cheap cable will get packaged into like a hundred different packages going into different regions and under different labels, and some of the boxes will label their cables “15W” or “27W” because the box label designers won’t realize the cable can be used for laptops and will just slap the highest phone charging wattage they have in mind – whereas, a laptop will put 60W through that cable no problems, purely by asking for 20V/3A from the charger instead of 5V/3A or 9V/3A. If a cable is sold for phones and it’s tested for phones with their high charging currents, it’s safe for laptops – the only difference is voltage and that one barely affects anything of note to the user. Simply put, the probability of the label being dumb is high, and the probability of the cable being unsafe is really low, it’s hard to screw up a USB-C USB2 60W cable in a way it can do 2A and not 3A.

      1. and the cheap cables you get, will be tested for 3A

        No.

        You cannot know whether it was actually tested, or whether the manufacturer chose to disobey the standard and print the actual number that they’ve sized the actual wires for. Buy a cable from the usual suppliers and you never know what sort of mouse hair was used for the wiring until you cut the cable and see for yourself, so if the cable says 15 W I’d rather assume it is for a reason.

        1. I’m not about to praise the free market or something, but manufacturers do test their cables by aiming to avoid fires/malfunctions in the most common usage scenarios, and a 3A over a USB-C cable is a highly common scenario. That’s just a fact – if someone releases a USB-C cable that’s fire-y at 3A, they have very real, unpreventable, prompt and abundant recalls on their hands, simply because those cables get bought in droves and they will be used at 3A en masse. You think you’re smart because you know what 2A implies, but be a little smarter and realize that an average buyer doesn’t know that, and all of them will use these cable at 3A for a year straight without knowing. Essentially, any cable that’s sold in a store, has already been tested at 3A en masse for you. You didn’t have the 3A expectation with microUSB, but you have that with USB-C. Another real-life fact – USB-C cables get sold with dumb shit written on their packaging all the time. I have pictures of USB-C USB2 cables that are labelled with “20MBps transfer speeds” – go figure. Put these two together, and that’s the reason for my recommendation.

          1. “Reputable manufacturers. Your typical fly-by-night AliExpress seller isn’t.”

            Why does it matter what a fly-by-night AliExpress seller does? They could sell you a “USB-C cable” that’s literally nothing other than 2 USB-C connectors with no wiring whatsoever in the middle.

          2. Why does it matter

            It’s just to say that it’s not a universal rule you can rely on, or even bet on. A lot of the “reputable” sources do this too, because they know the cable won’t cause a problem with the particular product they’re selling, so they can “relax” the criteria and put otherwise out-of-spec cables in the box.

          3. You may also be surprised by the number of companies that simply don’t test the cables, especially the smaller companies, and simply assume that what they’re getting is the real deal. This is being abused by manufacturers in the east by mixing the factory rejects in with the proper cables to increase process yields. They’re not going to throw away “perfectly good” cables that test slightly above the specs for resistance, or even a lot above the specs if they know some place they can dump them.

            As long as nobody complains, these practices continue, and if somebody does they just say, “Sorry, that must have been a fluke, here have another cable instead”, and continue pushing the rejects somewhere else. It would take a concerted effort by most manufacturers and buyers to weed out the counterfeiters.

          4. “A lot of the “reputable” sources do this too”

            USB-C has a 25-page document specification which details exactly what the various limits and requirements are. They will carry 3 A. It’s spec 3.7.5.3.2.

            If your reputable sources aren’t meeting spec, you and I have different definitions of reputable. If it says USB type C, it’s 3 A. They can put whatever dumb label crap they want on it (and they do, primarily to avoid weirdo PD issue complaints) but it’s 3 A, max temp rise of 30 deg C, right in the spec.

        2. After all, the consumer won’t really notice if the voltage drop at the end of the cable exceeds the 5% margin. Their phones will simply charge slower because they monitor the voltage and limit the current automatically, so you’re never actually drawing the 3 Amps through the cable. When you put 20 Volts on the cable instead of 5 Volts, the current goes up, and the problem reveals itself.

          Then there’s also the point of whether the connector (plating thickness, materials, interface pressure, contact resistance, etc.) are able to handle the required 5 Amps for a 3 Amp cable (safety margin), or whether they’ve slapped on a connector that can only handle 2 Amps safely even though the wires were up to spec. If the device they’re sold with never draws more than 2 Amps, then nobody is any wiser. Put it on a different product that actually draws 3 Amps, and the connector may overheat and destroy the USB socket in your device.

          Factory rejects are typically “de-rated” and pushed to market for “less demanding” applications, and these don’t deserve the USB-C label because they aren’t compliant, but nobody is really checking.

      2. You expect it to be true, but neither you nor I can know. Also your not being specific enough really, as at higher voltage of course it can handle that – I’d suggest you should rewrite that bit somewhat for clarity.

        Especially the implication that if it says 2A it probably means 3A to get the 60W rating – it could easily be a 2A cable even though you wouldn’t expect it to be. Perhaps a link to the voltage/amp table for USB-PD (or include it inline) so you can say something like “otherwise from the USB-PD spec you can make a good guess as that 15W label means – it would almost certainly be stamped that way because its meant to be used 5V@3A”.

        But make damn sure to spell out use common sense or verify!!! As you can’t even judge by wire gauge unless you also know the material – so it is far safer to test on the assumption its garbage! Especially as the test isn’t difficult or long, and then you know for sure and the actually valuable bits of your project are at not risk!

        1. It’s not even the wire gauge – it’s difficult to make the connectors that small to reliably handle 3 Amps with the wear and tear of thousands of insertions. The contact resistance, surface plating and finish, mating pressure etc. matter a lot, and the USB specs are strict on that because most of the cable assembly resistance happens at the mating surfaces where you get spot heating and corrosion.

  5. USB-A to USB-C cables are the least interesting. They’re equivalent to a microUSB to USB-A cable, except there’s a resistor on the USB-C plug, connected from VBUS to one of the CC pins. That’s it. The cable contains four conductors, there’s really not much new.

    Not really true – USB3 speeds A-C cables do exist, and those will need more conductors to do the USB3 @ 5 or 10 Gbps part!

      1. I don’t know if there is actually a true standard in the wild of how those cable are wired up ground wise. Doesn’t really make much sense to include extra conductors most of the time probably.

  6. They typically do not use USB cables like you described for 3D printer hotends. They usually have an MCU and toolboard on the hotends and it connects to the rest of the printer either using USB or CAN. When running a system like klipper it is as easy as plugging the USB hotends into a powered hub and into the SBC. For CAN they just repurpose the cable or use custom cables to connect to a CAN adapter that is connected to the SBC.

    By doing it this way it isn’t limited to what you can power and connect with 5 conductors, meaning you can connect all kinds of things to the toolhead board, like thermistors, fans, bed levelling sensors, servos, LEDs, etc.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.