-1
\$\begingroup\$

I was wondering if it is possible to wire an on/off switch into the cable of a wall-wart USB power charger as easily as it is to wire an on/off switch into a regular power cable? Or are there precautions that should be taken into consideration before attempting to do such a thing. I've seen extension cables with these switches on them so I know it is possible but they seem too expensive for what seems like an easy job to do yourself. Attached is a picture of the charger which I'd like to do this to.

USB charger wall wart

Thanks

\$\endgroup\$
2
  • \$\begingroup\$ 3 bucks is too expensive? \$\endgroup\$
    – Passerby
    Apr 22, 2016 at 3:12
  • 1
    \$\begingroup\$ A switch in the cable won't help. The power supply will still be using power even when your switch is off. To stop it using power, you must separate it from the mains - which you can only do with a switch in the power supply (forget it) or between the plug and the mains. That's with an extension cord with switch or a plug with switch that you plug into the outlet. Or just unplug then damn thing when you are not using it. \$\endgroup\$
    – JRE
    Apr 22, 2016 at 7:48

2 Answers 2

0
\$\begingroup\$

Yes, you can do what you're describing as long as the power adapter is regulated 5V and at least 500mA. Since you are starting with an adapter for USB already, you don't need to worry about that.

You'll want to break the Hot part of the AC line before the transformer and using a switch that is rated for the proper AC loading and wattage. 5V at 1A at the output will be 5W power rating and I'd assume high inefficiencies for cheap chargers so at least a 20W switch just to be on the safe side.

Follow standard safety precautions when dealing with high voltage.

\$\endgroup\$
2
  • \$\begingroup\$ @Anklon these kinds of cables don't make use of the data lines. And he should take precautions since he is modifying something that was not designed to be modified. I don't think it's good practice to advise an avoidance of caution since, for one example, improperly isolated Chinese knock-off iPhone chargers have killed people in some cases. \$\endgroup\$ Apr 22, 2016 at 4:56
  • \$\begingroup\$ Thanks for the answer! The switch will be located on the cable itself, not on the wall-wart. I don't want to turn the power off to the wall-wart but to a device (a raspberry pi) connected to it. I'm curious where a previous poster found something like this for 3 dollars as this price point would solve my issue. I have found something similar on eBay at around 3$ but it uses full size plugs, not mini USB. \$\endgroup\$ Apr 22, 2016 at 12:29
0
\$\begingroup\$

I don't think precaution is needed to be taken as generally all kind of precaution circuit are in the converter circuit which converting AC into DC .

But ensure that you'r connections are ok and smooth if you wanna introduce on/off switch in the cable cause USB cable contains more wire then just VCC and GND and for data transfer , those wire connections are sensitive . if you do not connects the wires properly , it can be used as charger but may not be used as data cable anymore.

And also use switch which can hold rated current and power of the charger.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.