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.

Control Electrical Stuff with your computer

Control Electrical Stuff with your computer
Control lights (or any thing electrical appliance) with your keyboards lights. with no irritating micro controller!!!!

First I want to say that this is my first instructable and I didn't take many photos.
also I got the idea from: USB controlled mini lava lamps by jamesh

this is a device that turns lights (or what ever) on with the push of the caps num or scroll lock
if you want you can use an xbox DVD remote with your computer and turn on your lights with that. so you can walk in to the room and push a button on the remote and the lights turn on

Waning. this instructable involves working with high voltage mains power, I take no responsibility if things go wrong.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Get the parts

Get the parts
«
  • IMGA0329.JPG
  • IMGA0333.JPG
  • IMGA0334.JPG
  • IMGA0336.JPG
parts:

3 transistor BD140
3 capacitors 10-60uf
3 resistors (so the LEDs don't burn out. unfortunately I forgot there value)
3 relays (the ones with 5 legs)
3 switches (single pole double throw) 240v (120 in the US)
1 (single pole single throw) switch 240v (120 in the US)
a box
wire
4 grommets
A keyboard with num caps and scroll lock lights
3 LEDs
7 (or more) meter extension lead
2 power sockets (see picture)

optional:
xbox dvd remote
USB cable
small blank circuit board
« Previous StepDownload PDFView All StepsNext Step »
43 comments
1-40 of 43next »
Aug 24, 2010. 4:33 PMzilani says:
can any one plzzz tell me the value of resistance?
Nov 9, 2011. 7:21 PMcring says:
Okay the answer to your question is not a simple one but here goes. The resistor is to prevent too much power going through the LED.
Therefore, the value of the resistance is dependent on the wattage of your LED.
Example - 1/4W LED. 5V - 330ohms 9V - 680ohms 12V - 1kohm 24V - 2k2ohm
Look up Ohm's Law on Google if your voltage/wattage combination isn't listed.
Feb 8, 2010. 10:40 PMshivangi_nig says:
m realy new n fresh in des works . . .bt hopin fr d best . . .takin dis project as my first work . . .really hv no clue abt hw to go on . . .so plz leave ur comments fr help . . .peace . . .
Jul 16, 2010. 4:04 PMprogramedfiles says:
translated version: I'm really new and fresh in this sort of work, but i am hoping for the best as i take this on as my first project.I have no idea how to start, if anyone would be kind enough to lend a hand, please leave a comment, your help will be greatly appreciated.
May 15, 2010. 5:21 PMK-NiigT says:
I cnt udrstnd ur tpng cuz its msing 2 mny lters.
Jul 8, 2010. 7:16 AMRedgerr says:
you left the "E" in in "lters", taking out the vouls only works if you do it right K-NiigT (i like the monty python reference) ;) and yeah shivangi_nig, your not making sense, sorry...
Dec 1, 2008. 4:29 AMfcassia says:
What happens if you plug two keyboards? I mean, are two keyboards individually addressable on Linux? Can you keep keyboard#1 configured and working "normally" and then connect a "secondary" USB keyboard for this purpose?
Dec 7, 2009. 10:44 AMsrilyk says:
 Well, the builtin keyboard on my lenovo x61 tablet doesn't turn on the caps light when I plug in my usb keyboard and hit caps, so I think you could. This instructable shows you how you could eliminate a lot more space.

HTH
Oct 13, 2009. 5:26 PMqsiguy says:
Another option for activating the caps lock, num lock, etc. if you are using a windows machine is to click start -> run -> then enter "osk" (without the quotations).  This opens an On Screen Keyboard where you can just use the mouse to click on the buttons you want.  This will activate the num lock, caps lock, etc. LED's without using the actual keyboard and turn on your remote accessories.  FYI..
Sep 15, 2009. 11:49 AMprodlad says:
Whats wrong with a relay?
Nov 14, 2007. 4:16 PMtherian says:
religion forbid to use serial port ?
Nov 16, 2007. 2:07 AMmaffiou says:
Well, I don't think you can get more basic than this... If you want to use the serial port, even if it's just the control line, not the data (which would probably require a microcontroller) you'd need significant programming on the PC side... I personnally used a parrallel port in the old day, It worked fine... But these days, not every computer has one... Shame really, that was quite diy friendly...
Feb 14, 2008. 8:14 PMbalmacjo says:
This is way cool!!!

By the way, can you do this without using a keyboard?

I mean just controlling the power switch turn them on and off just using programs on the PC. No manual intervention needed... Via USB connection...

Originally I plan to connect it to a main switch but dont know if it can be possible for very hign voltage...
Nov 11, 2007. 3:02 AMturbonegro says:
what about using solid state relays instead
http://en.wikipedia.org/wiki/Solid_state_relay
easier methinks
Nov 18, 2007. 11:02 AMwi-fi astronomer says:
When you use an old fashioned relay, you need a transistor first. Way easier to use a solid state relay that takes a control voltage of 5 volts. They also have the desired isolation of the house current from the printer fitting. See my comments above!
Jan 30, 2008. 4:35 PMPatented says:
how did u make the draw?wich program?
Feb 7, 2008. 2:24 PMPatented says:
Nice!thank you!
Nov 12, 2007. 3:55 AMDr_Acula says:
My personal preference is also mechanical relays. I went off solid state relays after discovering they leak very slightly when off - especially when driving flouro lights. When I turn something off I want it to be really off, especially if it is mains voltage!
Nov 18, 2007. 11:13 AMwi-fi astronomer says:
Yes, solid state relays have that problem. This means that if you control a fluorescent light with one, it will flicker dimly when it's supposed to be OFF. If you use them, you design accordingly. If you want the device to be really OFF then you want the electromechanical type relay. I prefer the solid state type because of how it makes wiring up the system easier and design around the "never completely off" problem. It's a tradeoff. And of course tradeoffs are always found in engineering. Note that the same problem of solid state relays are found with triacs too. That was how I first found that problem.
Nov 11, 2007. 11:10 AMjab0592 says:
Hello kwl build but are u english or american? if american how can u make it work for engalnd?
Nov 16, 2007. 2:11 AMmaffiou says:
I don't think it would make any difference, the high voltage side of thing can handle whatever the relay can handle... 110 or 240 doesn't make a difference... It's more the amount of power that play a role, and this is the same regardless of which side of the pond you are...
Nov 12, 2007. 10:01 AMjongscx says:
I guess you would just need to make sure that the relays you use can handle the Wall currents there... it's 220V, right? Never been, so I'm not sure...
Nov 23, 2007. 4:10 PMmodest_mouse_fan says:
very cool! i will definitely do this! Thank you and oh by the way, instead of just hitting caps lock, num lock, scroll lock, etc, im going to make a VB interface so i can do it with my mouse :D
Nov 15, 2007. 1:19 AMarevolutionist says:
Ah! I did the same project as you and was recently going to post it. =]
My design is different though.
Nov 22, 2007. 12:29 PMthinker says:
you can still post it
different ways to the same end is what instructables is all about !!!
Nov 18, 2007. 10:00 AMmyrhymeandreason says:
Were you in a cave when you took these pictures? Really dark.
Nov 17, 2007. 9:01 AMwi-fi astronomer says:
I've been doing something like this since Year 1992. The best way to do it is to use some solid state relays (like the Halloween controller) and use the printer fitting with DOS or Win95 or good ol' Linux. For present-day Windows, you need SOME way to use the serial fitting or a USB fitting with a USB to serial thing. QBASIC will work with serial fittings 1 to 4. For fully computer-free operation try this: Get a solid-state relay that 5 volts DC for the control electricity. Next, get an audio transformer from a Radio Shack and hook it to said relay with the high impedance side to the relay. Next, hook the 8 ohm side with a volume knob in series to a stereo and the controlled side to 120VAC and Christmas lights. Make sure the lights will flash on their own first and set them up as desired. The last step is Use It! Fire up the stereo and adjust the knob so the lights flash to the music AND on their own as well. Using a triac (and burning up equipment) I pioneered this in 1984! Solid state relays are great as they contain a good triac. You can get 16 of them to work separately on one printer fitting by the 4 by 4 matrix methof. That is, if your software goes fast enough to way outdo 120HZ. Given that a triac stays on until voltage goes to zero, if the controlling computer is way faster than 120HZ (pretty easy!) you need no small caps across the TTL-compliant control side of the things. Think of the trick of multiple 7-segment LED number displays. Have fun!
Nov 16, 2007. 1:29 PMMarkp.com says:
Seriously, a little spell check would go a long way in this thread AND comments! Nice instructable though.
Nov 16, 2007. 1:10 PMQtronik says:
On my wireless keyboard, I take the receiver plugged on my usb computer... for those who thinks they can't do it bcz they do not have cord keyboard.
Nov 16, 2007. 8:06 AMhomunkoloss says:
I used a K8055 Velleman kit for the connection to the computer an relays to switch my lights. mfg Daniel (who speaks normally German thats why he has such a bad english) ;-)
Nov 15, 2007. 5:32 PMStephen_A says:
You should mention that there is another alternative to etching your own board for this - which is carefully popping the top off of the receiver and wiring based on Redcl0ud's schematics... Which may be more practically for most people.
Nov 16, 2007. 2:00 AMNRen2k5 says:
Or how about using a breadboard? Then you cut down on the amount of soldering you have to do, too.
Nov 15, 2007. 5:02 PMTechnoMancer says:
that wire that you say does nothing is probably the cable shield braid. it is an earthed shield to prevent interference from EM radiation.
Nov 15, 2007. 10:20 PMTheodor says:
Nope, I believe you're wrong. Think it's called video sync, or something. All Xbox controller connectors have a fifth pin (the yellow cable) that is intended for gun controllers (for shooting games, for instance duck hunt (Yes, I know, never available for Xbox)). The shield is connected to the shielding on the connector. Besides from the fifth pin, xbox connectors use USB protocol.
Nov 16, 2007. 1:55 AMTechnoMancer says:
sorry i didnt read what you were doing i assumed it was a usb cable. lol. yeah the video sync is so that you can use stuff like guns but they only work for CRTs unless you may be able to simulate the scanning on an LCD by turning one pixel off and then continuing down the screen turning the next pixel black then back to what it was ment to be.
Nov 12, 2007. 9:50 AMmoreice says:
you could use an optical sensor to check if the light is on --- saves u from taking apart keyboard
1-40 of 43next »

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!
5
Followers
1
Author:relay