I made this instructable because I have a PC and a wii that has hard drives connected to them but when I turn off the PC or my Wii with their respective remote controls, I have to get up and flick the switch manually or the hard drive keeps spinning all the time and wastes energy as well as leaving the potential for damage if I knock it over (when its powered off, the reading heads are stuck in place so there is less risk of damage).

This instructable is going to show you how to make it so that when you plug-in your usb cable or unplug it OR when you power-on or power-off your PC, PS3, Xbox, Wii or whatever your hard drive is plugged in will turn your hard drive on or off accordingly.

The Idea is very simple, a Relay will be used to turn on the power supply when it detects that the USB port is getting power.

-appropriate tools (soldering iron, screw drivers to open the casing etc.)
-hot glue gun (helps keep the wires in place so the solder does not break and so the relay stays in place)
-flux (helps make the connection to the USB pads easier, but not necessary)
-a relay with a 5vdc coil that can take at least 2amps on the pins at 12vdc (most normal power supplies are of 2 amps, but some are 2.5 and 4amps). There are many relays that can do the job, here are a few examples so you can find the most available one for yourself.

You only need ONE, these are all different models that can be used. Anything similar to this should do the job, the important part is the 5vdc coil and a minimum of 2amps at 12vdc as you will notice.
1-a digikey example: notice that this one can take 2 amps at 30vdc, meaning it can take more than that at 12vdc
2-this sparkfun example can take 1amp at 24vdc
3- this sparkfun one can take 5amps at 30vdc
4- finally, I used a R48-5D10-6 which was available at my local store for 2.70$ and can take 10amps at 28Vdc. This left me with plenty of headroom to work with or eventually use this in different projects and allows me to save on shipping costs as well as getting it immediately and supporting my local business.

Step 1: Finding Where to Solder the USB 5v Part 1

There are two important places to find for the USB's 5V.

The first one is on the relay. The relay in this case has 5 pins, some have more some have less; in the case of the 5 pin ones, the coil pins are the ones on the edge on the side that has 3 pins. That center pin is the common pin, one of the two power pins will go there. I will get to the second power pin is going to be one of the two on the other side of the relay (the lower ones in the picture). Which one you use (right or left) changes based on the design of the component.

Step 2: Finding Where to Solder the USB 5v Part 2

The second part is the USB. Pin 1 is the +5V and 4 is the ground. Usually, pin one is the one that is soldered square (the other three are circles) and pin 4 is the one right under it. If you do not have the circle/square configuration, when the board is flipped and the usb port opening is facing you, it will be the two solder pads on the left.

A little tip, place the wire beforehand and use hot glue to hold the cables in place when trying to do this part (since it is small). Once it is well in place, it will be much easier to solder.

Step 3: Final Step: Getting the Power in Here!

Now for the power supply!

The way I normally do this is find the switch, put the common power and second power pin on where the "on" pins of the switch are, then I leave the switch at off so that it relies on the relay to switch on/off.

Now I wrote earlier about the two remaining pins on the relay being in different positions on different relays. To know which of the 2 pins to use, you simply do trial and error since the good side changes depending on the relay model. With everything plugged in except that one wire, you simply touch it on the pins (being careful not to touch random stuff) and find which one works. Whichever one causes the LEDs to turn on is the correct pin.

Just put some hot glue on the relay and put it down so it holds on the board, pins facing up. Thats it! Now you don't need to get up to turn the hard drive on or off :)

Step 4: Alternative Power Wiring for Strange Enclosures

Alternative for strange enclosures:

Now normally I would use the method described in step 3, but some switches are strange(I had one of my 3 like this) and will not work. In this case you can use these alternative methods. For some reason simply using the normal solder on the 2 pins that are in use when the switch is "on" did not work. In this case you can either try

1- setting it up on the "off" position. Some enclosures seem to use a strange setup where the "off" position short circuits the power and the "on" part actually opens the circuit.

2- This setup works great if you are having issues and works 100% of the time; problem is not all cases can physically take it (see picture). If you can, simply cut the middle pin like in this picture and simply put the power pin wires on each sides of the crack. With this setup, you leave the switch to "on" all the time instead of "off" unlike the first suggested setup which was more universal.
Nice instructable...<br><br><br>My old IDE enclosure switch could qualify as strange as well. The switch has four pins used for two separate circuits of 12V and 5V. I guess I would need two relays instead of one unless there is such a thing as a relay that allows one control coil to control two power circuits.
I need a &quot;double pole&quot; relay so six or eight pins depending on if it's single or double throw. Thanks Wikipedia.
sorry for the lack of response, I just realized (like a year and a half late) that instructable was sending me e-mails at an address I no longer use... Sorry!
I use e-sata with my Vantec External enclosure. Could I modify this ible for use on the e-sata port?
Unfortunately I do not know the exact specifications and inner workings of e-sata... however esata does have 5v pins!<br><br>http://www.interfacebus.com/SATA_Pinout.html<br><br>I don't know which of the 5v's you would have to use. If you want to go through with it, I would recommend opening it up and putting in a drive you don't care about, then use a voltmeter to prod around. While you are probing, experiment (plug in and unplug the e-sata etc.) I am afraid you will have to figure the rest on your own.<br><br>Lastly, please note that, as always when you are opening an electronic device, you will be voiding your warranty and I am not responsible if there is any damage. Good luck! :)
Wow, but I guess one would have to use such a disclaimer...<br><br>Thanks for the advice, but if I do decide to try it I'll use the USB option.
&nbsp;excelente instructable pero si el wii al apagar en stand by mantiene los 5v en el usb.<br /> <br /> yo tengo un ventilador encendido todo el tiempo para que no se caliente cuando esta en stand by.<br /> <br /> yo lo recomendar&iacute;a m&aacute;s para &nbsp;la PC<br /> <br /> gracias<br /> <br /> excellent instructable but if the wii on stand-by to turn keeps the USB 5V<br /> <br /> Ihave a fan on all the time not to hot when in stand-by<br /> <br /> I would recommend more for the PC<br /> <br /> thanks<br />
that is a good point, but I have my wii settings so that it does not remain on standby so it works perfectly for me.<br />

About This Instructable




Bio: https://www.youtube.com/making www.thingiverse.com/MakinThings/designs
More by MakinThings:3D Printer PCB Etching Turn your 3D printer into a plotter 100 AMP multimeter upgrade 
Add instructable to: