3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Computer Controlled Power Switch

Step 1Relay...

Relay...
«
  • 478742307_9dd8e34cc4_b.jpg
  • 478740431_5b740dd1f1_b.jpg
  • 478719968_617867bee0_b.jpg
  • 478721926_a72190ee92_b.jpg
  • 504649823_e3c752b2b5_b.jpg
This is the heart of the beast - the actual hardware to control the outlet.

My version is in a nice little case that I scrounged from my father's junk pile... I've got a kitty cat, and I think 120V 50AMP adds up to just a little over 9 cat lifes, so it's better safe than sorry with this thing.

The main part is a special "relay". You can pick these up on ebay for pretty cheap - you could try your local electronics store, but I honestly doubt you'll have much luck. None the less - you'll need it.

So, let's do an inventory of what you'll need for this part:
- Tools
- Utility Knife
- Soldering Iron
- Solder
- Electrical Insulating Tape
- Items
- Opto Relay Model # (480D10-12)
- Extension Cord, 4ft(You'll be cutting this, so it shouldn't be your dad's/friend's/neighbour's or something)
- Safe (non-conductive) housing for the relay
- Parallel Port cable'

Ok, that's pretty much it. You can see I used some fancy eye-couplings for mine (or whatever they're called)... that's where the soldering iron comes in handy - but you'll also need it to re-attach one of the power lines on the extension cord when you cut it.

1. Simply take your extension cord and cut it - keep in mind when you're doing this that where you cut is where the relay will be placed and housed. So if you need some distance to get to the outlet, cut it towards the other end. I didn't consider that when I made mine, but I got lucky.

Now, figure out which line of the two cables you cut is the lead(positive) and which is the negative. The relay is marked which connects to which, but if you don't know anything about power outlets or extension cords this may be tricky. Good luck! :P

2. Take your eye-couplings and soldering them to the ends of the wire and crimp them so they don't come lose. Don't solder up the other wire (in my photo you can see it has black tape on it for safety) - you'll need to keep those unjoined if you want to put it in a case.

3. You'll want to refer to a guide about your parallel cable, or just test it with a current tester (to determine which pin is 1). Here's a link to the wikipedia entry on parallel ports.

This is really important - all of the software I've made is configured to run on pin 1. I should mention, again, that there are 8 pins on the parallel port to control a relay with... that means 8 unique items to control... if you don't mind buying 8 relays :P

4. So you've got your hardware done and you need to test it, right? Ok - that's good. I got to that point to, I used this great program. The webpage is in German, so uhh... here's the direct link for download.

Once you've determined that you've got a good connection and it's turning your appliance on/off you'll want to head down to the last step to check out the software I had made to control this. If you're having trouble following these steps at this point, please - PLEASE leave a comment.

If you're ready to kick this instructable into TURBO CHARGE then head on to the next step.

I love improvement, and I'm a fan of criticism. So I'll update the instructable as I get suggestions or complaints. If you notice I did anything dangerous or stupid, don't hesitate to mention it - you could be saving someone a lot of trouble.

Here's a video I made a few months ago when I was still "debugging" the relay. Hopefully it will give you some insight into the simplicity of this project, or any questions you have.

« Previous StepDownload PDFView All StepsNext Step »
16 comments
Jun 17, 2009. 11:26 PMseabeepirate says:
Just a little safety info to add on to your really cool instructable. I think it's important to note that with AC power it's a common misconception that there is a positive and negative line. The truth is that AC(Alternating Current) only has a hot and a neutral wire(There should also be a ground wire, but that's really only a safety precaution added in the last 30 years or so. Ground and Neutral are always linked somewhere if only by a very long stretch of earth.) as the current changes polarity from positive to negative and back to positive 60 times per second(60 Hz) in the United States and 50 times per second(50 Hz) for most of the rest of the world as I understand. This next part is important... If you put the relay on the neutral wire, even when the switch is turned off, the hot wire will still have juice, and anyone or anything that is grounded (you'd be surprised at what types of flooring serve as a ground, and yes wood is an electrical conductor if a poor one at that) when it comes into contact with the hot wire will be electrocuted. Unfortunately this is a common mistake with DIY electricians installing new lighting circuits in their homes, and people die every year because someone switched the neutral wire instead of the hot wire. It's another common misconception that if you only touch one wire at a time a hot circuit cannot electrocute you. This is true only with DC circuits. To be electrocuted by an AC circuit you only need to touch the hot wire (and usually be grounded depending on the voltage. High Voltage, like in the lines on those tall steel towers, creates a static field and can electrocute something without a ground. Wow that's more than a little off topic). The point is, there are safety precautions to be observed when working with electricity.
Sep 24, 2011. 10:55 PMRhamkota says:
So it would be better if the relay was put in a grounded box?
Jan 24, 2010. 9:19 PMCybergeek004 says:
Dude you can get that relay for like $10.00 off ebay and 120v will not kill you if you just tap it happened to me lots it will just give you a jerk. @40 will kill you!
Feb 10, 2010. 9:39 PMjoerice01 says:
 thats why 240 countries have earth wires. 
Dec 15, 2009. 12:09 AMgophergun says:
Is there any way to do this wirelessly? I'd rather not have wires going out to the living room.
Oct 11, 2009. 3:51 AMw477s says:
hey! you have same relays i sell! :P opto22 ftw :D
btw i used once and i saw that 3 and 4 (powerup for relay) has destroyed mounts for screwing it xD i soldered cables inside :P
Apr 7, 2009. 9:58 PMcgmalantonio says:
I've been searching and searching for a way to use a USB cable instead of a parallel port cable (mainly because my laptop does not have a parallel port). Is this possible? and if so, how could it be done?
Apr 8, 2009. 5:34 PMcgmalantonio says:
awesome! thanks a lot stephen_A that's just the answer i was looking for. Truth is, the experiment i had in mind is starting to become expensive, i am not new to computer programming but i am some-what to hands-on hardware development and circuitry (which is why i figured id start with something simple like this). I've been trying to bridge the gap between computer programming and computer engineering with little success (few modded xbox360's and ps3's, nothing spectacular yet). ANYWAY let me get to my point, this experiment you wrote up is great, i love it, but in my case..i think i am better off buying an adapter from "insteon" instead of investing what little money i have in a project I'll probably find a way to mess up (lol I'm just hatin on myself today).

Again, thanks for your time! I'll be sure to keep up with your posts
May 31, 2009. 2:20 AMmeauummels says:
i dodnt get it to work ive search evey thing my pin are hoked up correct but it dont works help
Jul 25, 2009. 8:32 AMmaesschalck says:
euhm, not to be anoying, but the website isn't german but dutch, if you call belgians or people from the netherlands dutch they will become very angry because of ww2 and stuff, so dutch, not german
Jul 25, 2009. 8:37 AMmaesschalck says:
i mean not dutch but german, if you call them german they become angry
Nov 23, 2008. 2:44 AMelectronic boy says:
where is the bit that tells you what wires from the parrarell port to connect, all it shows is you cutting a wire and some rubbish about an xbox remote can you please upload the details on what wires to connect to the relay.
Oct 4, 2007. 12:17 PMmosh_berry says:
Hey, uhmm that website you linked is not German, it's Dutch. i just figured i'll let you know ;)
Oct 18, 2007. 2:08 PMrabbitkillrun says:
There actually pretty similar, but Dutch has a few more english kindof words, and i think it's easier.
Jul 4, 2007. 9:05 PMnatural_orange says:
It actually won't matter if your relay is on the positive or negative side of the switch. Either will be sufficient for turning it off.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2
Followers
1
Author:Stephen_A