ON/OFF USB switch

I am thinking about splicing in a switch to the USB cable for my Arduino so I wouldn't have to unplug it. Would i need to add a switch for all the wires, or would just one on the power line be OK?


Just the 5V (but I don't know what you would gain from that)
USB pinout

My Arduino is controlling my cnc (shapeoko 2), and i don't want to have to unplug it (mostly convenience reasons) I am going to make a control box for the power to the Arduino and the power to the gshield.

If you are using the data wires you’ll need to switch them too, otherwise you risk
sending the USB chip into latch-up mode and destroying it. This is why data
pins disconnect first.

Don't do it.


Are you using the USB cable JUST to power an already programmed Arduino? Not passing any data?

If so, maybe a different method of supplying power to the Arduino would…

a) Free up the cable for something more important.
b) Be more on/off switch friendly?

Just buy one of these... it does exactly what you want.

DigiSpark Programming tool.

I just bought a power module... It plugs into the wall and has a button to turn it on and off. You can use that to power an Arduino instead of a USB cable.

I don't really think a USB cable makes a good standalone power cord. If you're not transferring data, why use it?