
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.
USB switch
Recent Entries
- 3D renderings of the Mandelbrot set
- New in the Maker Shed: Microbe Motel kit
- Science through graphic novels
- Tiny solar-powered brass engine in a wineglass
- Maker Shed kiosks at Fry's
- New hackerspace in Chicagoland: Workshop 88
- Mint tin electronics dev kit packs the essentials
- Olympus BioScapes competition winners
- Mac mailbox
- LHC tweets its first circulating beam of 2009
Comments
Oldest comments listed first.
Leave a comment
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)




































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
Reply to this comment
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.
Reply to this comment
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?
Reply to this comment
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.
Reply to this comment
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
Reply to this comment
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.
Reply to this comment
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
Reply to this comment
If you try this with a regular relay, make sure you put in a diode to protect your PS from inductive load.
Reply to this comment
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?
Reply to this comment
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.
Reply to this comment