On/Off Circuit for my USB LED
Welcome to EE.SE,

Ideally this question would include more research on your end. A question going "I have this, I want this, help me" is usually considered much too broad and as such closed, since it sounds like "I have this issue, design my solution for me" and our time is usually quite expensive. So that annoys us.

That said, your problem may be solvable purely in software, trying to get the PC to disable the USB port through calls to the over-current controller that can individually switch on and off ports when they use too much current. That would be a non-EE solution that may be dependent on the exact motherboard.

It is definitely solvable by adding a chip and a transistor between your USB lamp and PC.

Start with looking at an FTDI FT232 chip, it creates a USB COM Port and you can use its D2XX drivers to directly control the hand-shaking pins on that port. There is also another chip they make that creates an 8 bit parallel set of lines on a virtual COM Port that you can use to control 8 signals simultaneously.

All you need to do from there is:







simulate this circuit &ndash; Schematic created using CircuitLab

The rest, is down to the research that you'll have to do yourself in place of what you'd normally have to do beforehand.