3

I would like to make a switch for my USB cable.

It's a microscope, so its data is important.

Question is, in the "off" state, after disconnecting the two power cables, do I have to disconnect both D- and D+ (purple and white cable) in the USB cable or do I just have to disconnect one of them? If so, which one?

Sorry, I'm new at this.

Many thanks.

MariusMatutiae
  • 48,517
  • 12
  • 86
  • 136
hello
  • 33

1 Answers1

4

1. Easy Way

Given that your device is USB-powered, you can use a simple switch to cut only the VCC (+5V) line, and leave D-, D+, and GND connected.

Simple, effective, and your USB controller won't mind at all.

2. Easier Way

Don't waste your time with a switch at all. Buy a short USB extension cable and plug/unplug your microscope into that as required.

This is my preferred method ;-)

3. Proper (Hard) Way

Emulate the way USB plugs work in real life. So your switch needs to turn things OFF in this order:

  • Disconnect D- and D+
  • Disconnect VCC
  • Disconnect GND

And vice-versa when turning ON:

  • Connect GND
  • Connect VCC
  • Connect D- and D+

This is surely going over the top. Someone has made something similar already and provides good information. You could modify this project to suit.

misha256
  • 11,543
  • 8
  • 60
  • 70