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.


Recent Entries

Comments

Oldest comments listed first.

Posted by: jabbey on June 9, 2006 at 5:19 AM

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


Posted by: c0redump on June 9, 2006 at 6:06 AM

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.


Posted by: eBob on June 9, 2006 at 7:46 AM

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?


Posted by: Stokes on June 9, 2006 at 9:11 AM

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.


Posted by: newuser007 on June 9, 2006 at 1:12 PM

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


Posted by: Oracle1729 on June 9, 2006 at 8:51 PM

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.


Posted by: Pekar on June 10, 2006 at 6:27 AM

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


Posted by: K27 on June 11, 2006 at 2:50 PM

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


Posted by: nastyspill on February 25, 2007 at 1:42 PM

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?


Posted by: Jim Glasgow on May 27, 2008 at 9:27 PM

Mr

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.


Leave a comment


Subscribe to MAKE!Subscribe to MAKE Magazine!

Subscribe today, save 42% and get web access to MAKE free. MAKE Digital Edition is available only to subscribers.

$34.95 / 1 year
(4 Quarterly Issues)

Subscribe now


Void your warranty, violate a user agreement, fry a circuit, blow a fuse, poke an eye out. Make: The risk-takers, the doers, the makers of things... Welcome to Make: Online!


CRAFT Maker Shed Maker Faire MAKE television
Holiday Gift Guides from MAKE
Gifts for Dads
Science and Chemistry
Gifts Under $20
More guides: Santa Claus Machines, Geek Toys for Grown Up Girls & Boys


Check out all of the episodes of Make: television

Alex Rider Dream Gadget Contest
Make: Science Room

Connect with MAKE

Be a MAKE fan on Facebook MAKE on Facebook
Visit our Facebook page and become a fan of MAKE!
MAKE on Twitter MAKE on Twitter
Follow our MAKE tweets!
MAKE Flickr Pool MAKE on Flickr
Join our MAKE Flickr Pool!
    make_tips on Twitter




    Maker SHED

    Advertise here with FM.

    Why advertise on MAKE?
    Read what folks are saying about us!

    Click here to advertise on MAKE!



    Subscribe to MAKE Magazine!

    Make: Online authors!

    Gareth BranwynGareth Branwyn
    Senior Editor


    Phillip TorronePhillip Torrone
    Senior Editor
    | AIM | Twitter


    Becky SternBecky Stern
    Associate Editor
    | AIM | Twitter


    Marc de VinckMarc de Vinck
    Contributing Writer
    | AIM | Twitter


    John ParkJohn Park
    Contributing Writer
    | Twitter


    Sean RaganSean Ragan
    Contributing Writer
    | Twitter


    Matt MetsMatt Mets
    Contributing Writer
    | AIM | Twitter


    Dale DoughertyDale Dougherty
    Editor & Publisher
    | Twitter


    Shawn ConnallyShawn Connally
    Managing Editor
    | Twitter


    Goli MohammadiGoli Mohammadi
    Associate Managing Editor

    Kip KayKip Kay
    Weekend Projects
    | AIM | Twitter


    Collin CunninghamCollin Cunningham
    Contributing Writer
    | AIM | Twitter

    Adam FlahertyAdam Flaherty
    Contributing Writer
    | AIM | Twitter



    More contributors: Mark Frauenfelder (Editor-in-Chief, MAKE magazine), Kipp Bradford (Technical Consultant/Writer), Chris Connors (Education), Diana Eng (Guest Author), Peter Horvath (Intern), Brian Jepson (O'Reilly Media), Robert Bruce Thompson (Science Room)

    Suggest a Site!

    Current Podcast

    itunesdl.gif Weekend Project: Beetlebot Simple robot from your parts bin that avoids obstacles. Thanks go to Jerome Demers for the original article in MAKE, Volume 12. To download the Beetlebot video, click here or subscribe in iTunes. Check out the complete Beetlebot article... More...

    Get the Make: Online sent via email
    Enter your email to receive Make: Online each day:



    MAKE Fascination video series brought to you by Dow

    Make: Education
    MAKE: en EspaƱol MAKE: Japan
    Important please read


    Subscribe to MAKE Magazine!

    Recent Posts from the Craft: Blog