Technology
USB switch

163384719 Ee4B4894C2
Simple Simon writes “Simple but possibly useful to someone – I needed to switch on some devices whenever my PC was on so I use the 5VDC fed from the USB ports to turn on a relay.”Link.

26 thoughts on “USB switch

  1. I’ve been working on a similar device, based on a modified mains timer switch. The timer switch provides the relay and driver, plus a compact enclosure. I removed the timer circuit and installed an optocoupler to connect it to the PC’s USB port. One thing that I did discover (by using a simple LED on a USB cable) is that many USB ports have standby power, which means that a simple USB-powered switch like this will be “on” all the time.

  2. This seems like an interesting solution, however, as has been stated previously, many USB ports use standby power. Why not use the computer’s power supply to switch the relay?

  3. I built something like this to turn on my monitor and speakers; however, I mounted everything internally and used a 12V electromechanical relay which gets its power directly from the power supply via a drive connector. I also put a fuse on the outputs, just in case. Even though I’ve taken some basic precautions (mainly putting a zener diode on the relay coil inputs to ground away any back current when the thing shuts off), I’m still a little worried (albeit possibly superstitiously) that I’ll eventually destroy my power supply. I’ve been thinking about writing this up, but I don’t want to be responsible for someone burning down their house or something.

  4. My PC kills USB power when turned off so it works well for me with no programming or drivers needed. The relay is solid state and offers some protection to my PC.

    Simple Simon

  5. The USB spec requires the port not be powered with the computer off.

    Apple computers violate this spec, because they have the power switch on the USB keyboard.

  6. There’s a powerstrip on Amazon called a Smart Strip that does this. Perhaps it could be reverse engineered.
    It powers several outlets on when you turn a computer on.
    It can also be used to have a tool control a shop vac for dust collection.
    -Pekar

  7. I think this could be very useful with the new Apple Airport Extreme. It has a USB port built into the router for printers and external HDD’s. I really dont want my HDD and printer on while my laptop is not on, so I’m interested in finding a way of having the router interact with a power relay somehow to turn its periferals on and off with valid network traffic. Might be harder than it seems.. I’ll see how the router behaves once I’ve saved up and bought one.

    Any comments?

  8. I made a USB switch using a 4 pole 2-12 position “programmable” rotary switch which I set at 2 position, a plastic box from our version of Radio Shack, and 2 usb cables. I simply connected the output,female,lead to the central 4 pins, then the input,male,leads to the corresponding pins at position 1 and 2. I printed a label, laminated it and fixed it to the top of the box. Its held in place by the lock nut for the switch post. A small knob lines up with the two lines on the label, and there you have it. It cost me about $15 Aust to make 2.

Comments are closed.

Tagged

current: @adafruit - previous: MAKE, popular science, hackaday, engadget, fallon, braincraft ... howtoons, 2600...

View more articles by Phillip Torrone