How to add an inline cord switch onto the cable of a USB powered device

Some time ago, I shared a post of how to make your own USB powered LED light. If you follow that post, you will be able to make your own USB powered LED light that can be attached to a USB 2.0 power adapter on your wall socket. When you turn on your wall socket, the lights will turn on. After you are done with using your light, you can turn off your wall socket to turn off the lights.

Sounds like common sense right?

However, your wall socket plug may be too far to reach at your convenience. In such a situation, you may want to add a switch onto the cable of your USB powered device.

Given that, this post discusses how we can add a switch to a 5V USB wire. In this post, I will use a white inline cord switch as an example to show how we can add an inline cord switch to a 5V USB wire.

Parts and tools

Here are some parts and tools that can help you add an inline cord switch onto the cable of a USB powered device:

Steps to add the inline cord switch onto the cable

Once you have the parts and tools in place, you are ready to add the inline cord switch onto your cable.

1. Strip the outer jack of the cable to add the inline cord switch

First, locate the part of the 2 conductor cable that you wish to add the inline cord switch to.

After that, use the automatic wire stripping tool to help you create the opening.

using Sellery wire stripper to strip middle of cable

Once you have slitted the outer jacket of the cable, use your hands to slowly pull the outer jacket of the cable while keeping the red and black jackets intact. When the red and black jackets are intact, we will not break the wires easily while we pull the outer jacket apart.

outer jack of 2 wire cable stripped

2. Add the inline cord switch to the stripped section of the cable

Once you have created a sizeable opening for the inline cord switch, you can tuck the red and black wires into the switch, aligning the red one with the metal conductors on the switch. Since the red wire is designated to carry power to the USB powered device, we align it with the metal conductor. If you use other type of cables with different colors, then you will want to ensure that the wire carrying power to the USB powered device is aligned to the metal conductor.

2 cable wires tucked into inline cord switch

After that, you can cut the red wire and strip the outer jacket to expose some wires. After that, coil the exposed wires to the two ends of the metal conductors on the switch.

red wires coiled onto metal conductors on inline cord switch

In order to securely attached the red wires to the metal conductors, solder the red wires onto the metal conductors.

red wires soldered onto metal conductors of inline cord switch

After that, put on the switch cover and you are done with adding the inline cord switch to your 5V USB wire.

white inline cord switch on white cable

About Clivant

Clivant a.k.a Chai Heng enjoys composing software and building systems to serve people. He owns techcoil.com and hopes that whatever he had written and built so far had benefited people. All views expressed belongs to him and are not representative of the company that he works/worked for.