Electronic – arduino – Remote dissable a micro type B USB connection to device

arduinousbusb-host

I need to control the shutter and image download from a wired remote camera. The camera has 2 pinout ports. One to control the shutter and the second is the micro-type B USB post to download image files to a computer.

I need a circuit that controls the power line of a USB Micro-B. The USB has 5 pinouts. The circuit allows to manipulate the shutter and the image files download process from a of a remote wired SLR camera.

Connecting the USB directly to the computer does not work for me because the camera disables the shutter function when power in detected from the USB port. Therefore, I must rely in a circuit that will allow open and close the USB power line with a transistor with logic connected to a microcontroller.

I have included a primitive diagram and image of the USB type-B. Note that the USB wiring has 2 wires for ground and another ground ID. I am not sure which to which line needs the transistor attached.

UPDATE 1 NOTE: In response to comment. I rewrite the title because it misleads to think that i want to power off the device or the computer. I just want to disable the USB connection with logic.

UPDATE 2 NOTE: From comments and responces here leads me to consider this might fall under a software related solution. To anyone interested in this type of scenario. I have posted a separate thread in stackoverflow https://stackoverflow.com/questions/55680572/need-to-disconned-the-usb-from-software-in-win10

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here

Best Answer

the camera disables the shutter function when power in detected from the USB port.

If this is a designed feature for the camera, and plugging USB cable prevents the camera from taking pictures, then removing (turning off, disconnecting) VBUS (Vcc in your drawings) should solve the problem, sort of. If the camera is designed correctly to USB specifications and the host is USB compliant, disconnecting VBUS will cause (a) reset device USB engine, and (b) host port disconnect. This will be equivalent to disconnecting the cable. So the communication will be lost in this state.

You can implement the switch as electronic device or as electromechanical relay, doesn't matter. When VBUS/Vcc will be back, the camera should re-connect and re-enumerate, so all file navigation will need to be set again.

Alternatively you can try to find a USB hub with built-in high-side switches on downstream ports. I believe there are some software tools that can send USB port off command, and then re-enable it. But you should consult with software people on that.

There are hubs with individual buttons for each port, which will be easier to wire to an external micro-controller: Sabrent HB-UM43

In any case the situation looks "underdeveloped", USB connection shouldn't block shutter function, although there could be hardware/firmware conflict with simultaneous image capture and possible external access via USB to the same buffer. It looks like a deficiency in camera architecture.