I need to simulate plugging and unplugging a USB device. So instead of physically disconnecting the USB cable I want to use something to open the four lines. It miht be sufficient to do the 2 signal lines - I am not sure.
I will be using a GPIO pin from a Raspberry Pi to enable/disable
My first thought is that the control line could drive the gate of a MOSFET and the source of the MOSFET is one of the pins of the USB port.
I have seen optoisolator boards and I could try using one of those, but they seem pricey and I do not need the optoisolation - Apart from my circuit to turn the USB off, the other device connected is an off-the-shelf headset and I do not exect that to damage the USB port.
Is there some other component I could consider here. If MOSFETs are the way to go any tips on selecting the specific MOSFET that would work would be appreciated. The USB traffic will be fast but the gate only gets switched every few seconds.
regards,
Niall Murphy