Use a $3 relay to turn your External Hard Drive ON and OFF Automatically !! The hard drive enclosure below is a "Vantec USB 2.0", and it houses a 500 GB Seagate drive - suweeet !! I have two of them and they are critical !! They have saved my butt on more than opne occasion. But I got sick of constantly turning them OFF and ON !! I also often forgot to turn them OFF along with my PC, and they would spin all night. I even forgot to turn them ON when I booted the PC, and would then have to do a full reboot !! Here we FIX all of that with a cheap relay.

The Backup Drive has saved many a career. Once you have one you can't imagine ever living without it. But there is one BIG problem - they do not turn ON and OFF along with your PC. So they spin incessantly, even while your machine is off.

But with a relay, You won't ever forget again, because YOU don't have to do it anymore !!

The same relay can also be used to control an Auxiliary Power Supply. The aux supply is not needed by most - but it is a Godsend for Power Users and for anyone heavily into Case Modding. The external supply drives all those fancy things and leaves your main PSU alone to do its job. Again we have the same problem - the aux supply does not shut off with the PC !! The fix, once again is the Relay.

I have 3 devices: 2 drives and one aux PSU. I used to have to reach behind and shut each one OFF - every time I turned OFF the PC, and every time I turned ON the PC. It was always a hassle and I'm glad it over and done with.

Step 1: Sample System That Needs Aux Power

Here is my own system called The Bubbler (click for my site's detailed Description of this machine) - which will be a "Mega-Instructable" at a later date. this might give you an idea how somebody might need both a Backup Drive AND auxiliary power. As you can see, I have a ton of added lighting components, so I run one auxiliary supply to take the load off the main PSU. Both drives and aux PSU run off the relay - and I haven't touched a switch since !!

Step 2: My Backup Drives

Here are the two Vantec USB 2.0 enclosures, each with a Seagate 500 GB dribe inside. Unlike many enclosures, they do not need a cooling fan because the Aluminum lays against the surface of the drive and heat is removed via convection.

My Auxiliary supply is hidden - it is held to the back of the PC with Velcro strips. All 3 devices plug into the relay-controlled extension cord outlet. Since I only use my Auxiliary supply when I run my case mod lights, I have also added a manual ON/OFF switch to the front of my PC. In this way the Aux supply will start and stop when I turn the PC ON and OFF, but if I want to just work in peace I can kill the supply with the switch and the extra lighting goes OFF. The plasma ball, scrolling text display fan, and Smiley Lamp are just a few of the many added items that run off the Aux PSU.

Step 3: Materials

The tools needed are:
Soldering Iron
Wire Cutters/Strippers
felt tip pen

The materials needed are:

Extension Cord - 12 to 15 feet - get these from anywhere

AllElectronics Enclosure - TB-1 which is 2.7x1.7x1.2" - $1.75

Red/Black Zip Cord - 25 feet, AWG 24 - this cable has both wires bonded together just like the extension cord (looks better than separate Red and Black wires) - $4.40

Perf Board - PC-1, 10 holes per inch - $0.75

Relay - 12vDC, 270 ohm coil - 120v AC, 10 Amps contacts - $2.30
*** this relay only requires 50 mA to keep contacts closed !!

AC to DC Adapter - optional - 110v AC to 12v/5v with molex DC converter - $13

Step 4: Overview

Just to give you a preliminary idea of how it works before you actually start . . . the schematic below says it all. Once you have prepped the relay and wire with solder joints and placed them inside the enclosure, you connect the wires up as shown.

Step 5: Relays 101

How they Work - a coil of wire becomes magnetized when a small amount of electrical current is sent through it. A metal plate (or "armature")is then attracted and pulled to the coil of wire, which in turn causes two contacts to touch - enabling current to flow. A Relay uses that simple concept and enables you to send a small current IN, and get a large amount of current OUT. It is basically a switch and an amplifier, that electrically goes from small to large !!

NO and NC - Actually the armature movement can either makes or break a connection with a fixed contact. The contacts that are pulled together are called NO (Normally Open). The contacts that are pulled apart are called NC (Normally Closed). Over 90% of relay appliocations use only the NO contacts !! When the current to the coil is switched off, the armature is returned to its original position by a spring.

Input and Output - Coil and Contacts - the "inputs" of the relay are the two connections to the coil. The outputs are the two contacts that are typically "NO". A voltage is applied across the contacts - but unless the relay is activated, the contacts stay open and no current flows.

Step-by-step process:

- voltage is applied to the inputs of the coil
- the voltage results in the flow of a small
current through the coil. This magnetizes the coil
and the core inside the coil
- a metal plate or bar (armature) is pulled towards the
magnetized core, and either:
a) shorts two open contacts, and and power is
applied to the load
b) open two closed contacts - and power is removed

Step 6: The Perf Board (optional)

Perf board can be used or omitted - you CAN solder directly to the pins of the relay !! But mounting it on a small board ford ease the soldering of the connections and protects the bottom of the relay from your solder gun tip and excess heat during soldering.

First insert the relay contacts by feeding them through the holes. Then Mark the edges as an outline on the perf-board with a sharpie or any felt tip pen. Remove the relay, and cut the perf board to size using a hacksaw or shears. Re-insert the relay into the perf-board.

Step 7: Solder the Wires to the Relay

Spread the two wires of the extension cord apart and peel back about an inch. Cut one of the wires and strip the ends. Then make the 4 solder joints as shown.

Step 8: Notch the Enclosure and Insert Relay

Remove the 4 screws and take off the top of the enclosure. Then cut 3 notches in the edges of the enclosure as shown - this is holes for the wires to pass through.

DO NOT Drill holes instead !! You will not be able to feed the wire through the holes. No, you need notches.

The plastic is soft, so you can use a hacksaw, a dremel, or even a set of wire clippers to cut two slots and the use pliers to break off the plastic and create the notch. Then insert the relay and screw the cover back on.

Step 9: Check Your Work

Your Enclosure should now look like this. You might want to plug it into the wall, plug a lamp into the other end, and connect the zip cord to a 12v source or a (9v battery will work) - the lamp should turn ON and it should turn OFF when the voltage is removed from the zip cord.

Step 10: Splice the Zip Cord to PC Molex Plug

This is a simple splice - just cut and strip the wires, add some heat shrink tubing, twist them together, solder, and then apply heat to the heat shrink. Alternatively you can use Electrical tape. Do NOT splice Red-to-Red, as that is only 5 volts, and you need 12 volts.

The professional way is to insert a molex adapter called a "Y adapter". It has three plugs and is meant to "Y" off an additional power source. Cut all 4 wires of the Y and to remove the plug. Cut off the excess unused Red and Black molex wires, and splice your zip cord directly to the black and yellow wires on the Y adapter.

Step 11: Connect It All Up and Test !!

Follow the pic below - which is the same one we showed earlier. Plug the extension cable into the wall, plug the hard drive AC wall wart into the end of the extension cable, and plug in the aux PSU if you are using one. Then connect up the Hard Drive and PSU if not already connected. Finally, turn you machine ON and OFF a few times to make sure the relay is kicking in and turning your stuff ON and OFF.

If you added an Auxiliary PSU then your system can now handle anything you care to throw at it - light it up like Disney World if you want to. And you will never have to worry if you left the backup drive spinning all night or while on vacation. You will never have to reboot if you forgot to turn on your backup drive before starting your machine. And You will never, EVER have to reach back behind your backup drive again.

DONE !!!
did you just take 11 steps to explain how to connect four wires to a relay..........
The Xmas tree syndrom hits again!!!....all the voltage goes to charge the gismos and no power for the VGA.....nice.....Here in Greece we do this in big 18whell trucks.Anyway just kidding!. Nice job ...but I am afraid really these backup units for power loss...and loss of data.
There are powerstrips that do this already for a lot more money so its a proven idea that is known to work. They use power sensing of the PC being on to liven the other outlets on it and cost 10 times what this would to make. I would rather get a 5v solid state relay and power it from a USB port so the whole thing is external to the case. I would expect that machine gets taken places quite often since its quite a showman ;)
Some external hard drives like the Western Digital My Book Series drives turn themselves off after you turn your computer off, put it in sleep mode or after 5 minutes. I got the 1 terabyte drive from Wal-mart.
its las vegas in a box XDD
it may cause head crash upon sudden stopping!!
I used a relay wired to the 12V supply to turn off the 110V speaker amp with the PC. You are right about the downfall of external drives! It is too bad Vantec didn't think to wire in a relay off the 5V USB feed to cut power when the PC shuts down. You won't have a backup drive for long if it is left running for days or weeks at a time. I have come up with a different idea. I currently have 5 external drives. I wired a bank of 6 DPST switches to make a power switching harness into a drive bay, cut off the AC adapters and soldered on the 4 pin PC power plugs to all the external drive power cables. Now the USB drives all get their power from PC power supply. The wire colours inside the Vantec power cable are (confidently) red-5V and yellow-12V.(black & grounds are interchangeable) You just need the sense to not have all 5 0r 6 drive turned on at once. Like any USB devices, the drives can be turned on and off with the PC in use. I soldered a plug on one of the AC adapters as well so if I ever need to use an external drive as a portable I still can.
you put a flyback in the computer to power the plasma bulb~lol!
Crikey! It's like Las Vegas. What are the advantages (to you) of having external hard storage over putting it inside? L
If it's not spinning, it can't be destroyed by malware or a brain-damaged kernel on a filesystem-corrupting rampage. If it's on a different power supply, it won't be roasted when a bad PWM driver and faulty crowbar circuit conspire to send 170v (the p-p voltage of 120v RMS) to all the components in the box. If it's outside the box, it's easy to detatch and swap with its mate which lives off-site, so last week's backup is in a safe-deposit box somewhere. If it's external, it doesn't contribute to the cooling fans' burden.
I've read most of your reasoning, and most of it makes no sense. I use a simpler approach on one of my machines. Use a power strip and a decent OS that has a log/journal filesystem. Time to turn everything off? Hit the switch on the power strip. Done. $0. If you're really fancy, you set the BIOS to auto-power-on so you really do only have to press the one switch on the power strip. Unless you were able to control that relay from the OS in software, this mod is purely didactic.
If you're usually in the same building as your computer, then this mod just saves a little labor and forgetfulness. Suppose you have backup software that can shut the computer down when it's finished running, but the external drive stays on when that happens. This mod lets you walk away or go to bed while the backup job takes place, then shuts down the drive when appropriate.
or you could use a swappable 5&quot;25 hard drive storage (vantec has these too).. you can turn on/off the hard drive independently if you want to or you can let it run as the computer runs. it has a key too..<br/><br/>Im talking about something like this: <br/><a rel="nofollow" href="http://www.newegg.com/product/product.asp?item=N82E16817122108">http://www.newegg.com/product/product.asp?item=N82E16817122108</a><br/>
Yes, sounds good, and that's what i wanted to know. But I'm not sure abou the malware, after all these are connected to your machine. L
P.S. The first bit about "not spinning" would only apply if the drive could be started and stopped independently of the main PC. This instructable isn't appropriate for always-on PCs that want sometimes-on peripherals, but it looks like it'd be fine for folks who turn their computers off.
That is really a waste of a relay. Why not simply power the external HD enclosures directly from the PC power supply? It provides high quality 12V (and 5V too) and only when the PC is on. I have done it on numerous occasions when I got tired of having those ugly black bricks hanging around. This is a much better, cleaner and energy efficient solution.
It's not a waste, messy or ugly either. I added one small black box that is behind and out of view that runs 3 items for me. The two drives use no power from my main PSU, and the extra supply gives me the added power I need. I prefer to let my main PSU run the two internal drives - and I let the wall run the outer two drives. Plus I now have 10 amps of AC that turns ON and OFF along with my PC to run anything else I want should the need arise.
Please note I am not saying that your solution is bad or anything, but I still think your relay is a waste. It is a waste because your PC power supply can generously handle the extra load with no problem whatsoever.
This sort of computer-driven relay is useful even without excessive mods or external drives; think of all those things that aren't useful unless your computer is on: powered USB hub, printer, monitor... The nearness of the 12V computer supply leads and the 120V AC wires in your relay box makes me nervous; I hope you at least have some sort of strain relief in the AC power wiring...
Your Bubbler friken scares me...
wow! very nice! excellent instructable, creative idea, and you have one freaking sweet computer! :P<br/>you definatly belong in my group:https://www.instructables.com/group/modthis/<br/>

About This Instructable




More by PCdoc:Relay Controlled Backup Hard Drive TubeLamp  
Add instructable to: