logoalt Hacker News

_deftoday at 7:20 PM1 replyview on HN

I use this to toggle power to a 3d printer. It gets it actual power from a switched socket but usb still powers the board.


Replies

zephentoday at 7:57 PM

I did a similar thing with a rack of test equipment. I had a PC power supply on each shelf, and used an NPN transistor to turn on the power supply whenever the USB port connected from the main computer to that shelf rack was turned on. Crude, but effective, out of band communication.

The local USB hub on the shelf was powered from the PC power supply on that shelf, so a single long USB cable from the shelf with the control computer could command the shelf (including the USB hub on the shelf) to fully power up or down, and then control several test devices through the USB hub, and none of the USB devices on the shelf (some of which were bus-powered) needed to worry about not getting sufficient voltage through a long cable and a hub.