Hi,
I would like to detect usb removal using electronic circuit. I have already checked the power line of the usb port. The difference in volt and current between the usb stick present on the port or not present on the port is only 0.09V and 500 microamp. So how can I use these values to generate logic 1 (usb stick present) or 0 (usb stick not present) by electronic circuit?
When the usb is removed the data line has a rise in data amplitude above 625mV because of the 5 NRZI bytes - 01111111 - 11111111 - 11111111 - 11111111 - 11111111, but how could this little rise can be detected using circuit? How can I achieve logic 0 (no usb stick present) from there?
I don't know what you want to do with your logic signal, but here's a circuit which will light a LED when a current (e.g. 500uA) greater than a threshold (set by R1) is drawn :-
The 100 Ohm current sense resistor R3 does, however, drop the voltage by 0.1V per mA current drawn, so would need to be replaced by a lower value if the USB port load draws significant current.
The 100 Ohm current sense resistor R3 does, however, drop the voltage by 0.1V per mA current drawn, so would need to be replaced by a lower value if the USB port load draws significant current.
Hi alec_t,
I was on holiday, Sorry for late reply. Thank you for your circuit. I am not an electronic expert, correct me if I am wrong. The circuit shows that +USB is connected to 5V (Vusb) external source. Does it not affect the USB port in any way?
Hi ericgibbs,
I want to check the presence of USB device in a port of a host computer from another machine, because I have no access to the host computer software.
The 5V external source was just for the simulation. In practice it wouldn't be used. The circuit isn't ideal, because some voltage is dropped across the current-sense resistor R3.
Each USB hub will have PTC current limiters or current shunts that are be used to report consumption on SMB bus to Windows on demand. A Mod similar to what alec_t suggested would work or locate the sense amp signals. Then port out via serial, RF, piezo audio or hard wired logic level.
They can also be disabled with Administrator pw and disabled for other users in admin group.
Hi alec_t,
I also tried your circuit and the led on the circuit works. But now the operating system does not detect the USB any more. Also the led embedded inside USB stick is continuously blinking. So it is possible to detect a USB stick present or not with your circuit, but this feature is not beneficial if we cannot use the USB stick from the PC. Do you or others have any solution for that?
You could try reducing both R2 and R3 by a factor of ~3, but there's no guarantee that will overcome your problem. Or you could try the alternative that Tony suggested in post #10.
Hi alec_t,
I was trying to send you a private message, but I think you blocked any personal message. Is there any place where I can put a private message for you?