Splicing barrel jack shapes

portpower supplywiring

TL;DR: How can I "splice" two different cords for different barrel jack sizes?

I'm rather new to this sort of stuff, so bear with me here.

I am attempting a project where I need to create a port on the outside of a case for a barrel jack. I am getting power from a USB hub for a Raspberry Pi, and this is my basic setup:

|             |
|PI---HUB[<---[<---...
|             |

Where | = Case Wall, - = Wires, < = male barrel port jack and [ = female barrel port jack.

I ordered a USB hub online, and the company assured me that the barrel jack size would be 5.5mm by 2.1mm. I went ahead and ordered a 5.5mm x 2.1mm extension cord, so the male end would plug into the hub and the female end would go through the outer case, creating a port.

Sadly, the USB hub company was woefully incorrect. I received the hub to find that they used some weird barrel port size — none of the wires I tested at RadioShack would fit. RadioShack recommended I go to this other store, but first I had an idea.

What if I could change the barrel port size?

I am thinking that I would wire my now useless 5.5mm x 2.1mm extension cord's female end to the male end of the power supply that came with the USB hub. Then I would order a 5.5mm x 2.1mm power supply with the same voltage, and use that size for the outer port instead.

In essence, I would be combining two extension cords.

Would this work? Can I just connect the wires on the two cords and both will work?

Here's the diagram of what I'm thinking, if it doesn't quite make sense:

|              |
|PI---HUB[<~~=={/---
|              |

Where | = Case Wall, - = Generic Wires, < = Weird proprietary male barrel jack, [ = Weird proprietary female barrel port, / = standard male barrel jack, { = standard female barrel port, and the different squiggly lines are two spliced wires.

Would it be possible to solder these two power jacks together and have them work?

Best Answer

Splicing a power cord to effectively get a different connector is possible. This doesn't change the voltage or available supply current, it just changes the physical connector. Starting with a working wall transformer power supply that has the wrong type of connector, the goal is to remove the old connector and splice on a different connector.

This assumes that you have some basic electronics tools and experience:

  • soldering iron for electronics
  • wire cutter
  • wire stripper
  • needlenose pliers
  • Digital voltmeter (DVM)
  • optional: butane micro torch or butane lighter

And some electronics supplies:

  • solder
  • heat shrink tubing

Step 1. Plug in the power, and use the DVM to check that the power supply is working. There's no point in doing all this wiring only to find the power supply is dead. Wall transformers normally are marked with the output power and voltage rating. With no load, the measured voltage may be a slightly higher than the nominal rating. For safety I assume the voltage is less than 50V DC and less than 10V AC. If you see higher voltage than this, or if you feel a tingling or a shock, STOP.

Step 2. Unplug the transformer, then use the wire cutters to cut the cable. If you think you're likely to reuse the connector, you might make the cut about halfway along the length -- but if you're going to discard the original connector, then make the cut as far away as you can to save the maximum power cord length.

Step 3. With the power cord cut open, take a look at how the cable is constructed. Separate about an inch or two of the the two wire ends, then strip about 1/4 inch of the insulation off the end. Most likely each of the wires is made of several strands of copper, twisted together. Be sure to keep each conductor's strands twisted the same way.

Step 4. Plug in the power again, and measure the exposed wires with the DVM in volts mode. This is how you will determine which wire is the positive (+) and which is the negative (-). If these connections are swapped, the device may be permanently damaged. Make sure you can tell which wire is which -- hopefully they have different colored insulation. Red=(+), Black=(-) is commonly used, but you can't assume. If you can't distinguish the wires without the DVM, use some tape to mark the wires so they don't get mixed up.

Step 5. Unplug the transformer, and prepare the new connector. If the new connector is already attached to another power cable, make sure the wires are cut and stripped.

Step 6. Check the load requirement. There should be a label describing whether the power connector is center-positive or center-negative. Unfortunately barrel connectors are not really standardized, you need to check.

Step 7. Use the DVM in continuity mode (or ohms or diode check). One lead on the new connector's center contact, and use the other lead to find which of the wires connects to the center. Again, mark it with tape if you can't distinguish the wires. Just to be sure, check the other wire as well, just in case there's a bad connection.

Step 8. Match up the wires on the power supply side and the new connector side. You will need to make sure the new connector's center contact connects to the power supply's positive or negative supply, depending on the requirement established in step 6. Cut a length of the heat-shrink tubing, about 1/2 inch, and slide it over each end of the power supply wire. Then solder the new connector's wire to the power supply's wire (lap joint splice). Then do the same thing with the other pair of wires.

Step 9. Check your work: plug in the power again (being careful to keep the exposed splices apart), use the DVM in volts mode to verify the power supply still works and the power delivered to the new connector is the right polarity. If it's backwards, you can unplug the transformer, go back and re-do step 8 with the wires switched around right.

Step 10. Unplug the transformer, and slide the heat-shrink tubing over the wire splices. If you have a butane lighter or a small butane torch, that would be the ideal tool for heating and shrinking the tubing -- but it can also be done by contacting the barrel of the soldering iron to the tubing. Don't contact the tip of the iron, just the barrel. And don't stay very long in any one spot, the idea is to try to heat the surface of the tubing evenly until it conforms to the shape of the splice.

There's a lot of variations on this basic technique.

The new connector could be wired directly to the exposed wire ends of the power supply cable. Usually a connector includes some housing or mechanical strain relief, to prevent the end of the wire from breaking off when the cable pulls and flexes in normal use.

Heat-shrink tubing can shrink down to about half of its initial diameter. If the connector is fairly close to the diameter of the power cable, you can fit a large diameter piece of heat shrink tubing over the spliced area after you're done -- but it's better to plan ahead and get the cut length of heat shrink tubing in place before making the splices. Heat shrink tubing is good for insulating the splices and also provides good mechanical strain relief.

There are solderless connectors such as crimp wire connectors, but these don't work quite as well for smaller diameter stranded wires such as you're likely to have in a typical wall transformer power supply. Crimp connectors also require a special crimping tool; pliers can sometimes work but not always reliably.