The Countdown to Maker Faire Bay Area is On!


USB switch

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. jabbey says:

    I like your project, but I don’t think you can programmatically switch… unless you can “turn off” usb ports. I created a similar project awhile back, except with a serial port. This allows me to switch the solid state relay on and off. Check it out:

    Switching AC power using a Solid State Relay and Serial Port

  2. c0redump says:

    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.

  3. eBob says:

    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?

  4. Stokes says:

    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.

  5. newuser007 says:

    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

  6. Oracle1729 says:

    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.

  7. Pekar says:

    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.

  8. K27 says:

    If you try this with a regular relay, make sure you put in a diode to protect your PS from inductive load.

  9. nastyspill says:

    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?

  10. Jim Glasgow says:

    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.

  11. USB Switch says:

    Thanks for information, I’ll always keep updated here!

  12. Anonymous says:

    Oh!…that’s great helpful, it’s so right to me! Million thanks for the article.

  13. Malik Burkleo says:

    Timer switches are really very useful for doing some stuffs. ‘

    <a href="Our favorite blog site

Comments are closed.

Discuss this article with the rest of the community on our Discord server!

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

View more articles by Phillip Torrone
Maker Faire Bay Area 2023 30% off early bird ticket sales ends August 31st, 2023!

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Prices Increase in....