This question is mainly electronics related, but it also has a programming aspect.
Some background on the problem
We have a traffic light on a wall in our office. When people come in to the office, they can immediately tell from the traffic light whether last night's automatic build & test runs went smoothly: Green means all tests passed, yellow means some tests failed and red means some builds failed.
Right now, there are three switches on three cables hanging from the traffic light and someone has to manually toggle these every morning. I'm looking for an easy way to automate this process with a PC.
Some background on me
I can write software. I have some soldering experience. I know digital design theory, but I've never built a physical device. I don't have a lot of time on my hands.
The question
How can I control three 110V lightbulbs (or any device) from a PC with the minimum amount of effort (and investment)?
Some lax constraints
- I don't care about the effort to write the software to control a serial/USB port.
- Having said that, it would be nice if I don't have to write any software and just use existing tools.
- I prefer not to do any soldering! I can go with one of those hobby kits where you push components into slots etc. Or perhaps it could be something from Toys "R" Us.
- I'm willing to purchase an existing device like an Arduino board.
- It would be nice if I can get this done with just parts that are lying around. For instance, I have an old 2400Bd modem that I can take apart (though, that would probably be followed by some soldering).
Update
Similar projects that are mentioned in the answers:
You'll need:
open collector output board
(like USB Interface Card Module VM110) and12V relays
(like Omron G5LE-14 SPDT)You may use you PC's 12V to power the relay coil.
Boards usually come with drivers and libraries to control them.
Ever think of trying phidgets? (www.phidgets.com)
USB Power relays:
http://www.phidgets.com/products.php?product_id=1014
Get a USB traffic light and a USB extension cord. I gravitate toward the simplest solution possible. Should be pretty easy to write some software to drive it.
The X-10 modules are likely the easiest path to take. If you try to do 110 V switching on your own, your project will quickly become a hardware project rather than a software one. X-10 (used to?) have a dongle that plugs onto a serial port (called a "firecracker"). The protocol for that can be found online.
Final caveat: X-10 is kind of low-tech and subject to interference from modern switching power supplies. So try it in your office before committing to the software effort.
Use a serial port, which drives a H-bridge (you can get a chip off digikey) which drives a relay (digikey again). The H bridge electrically isolates the serial port and limits the current draw. It's not possible to switch wall current with a transistor, so that's why you use a relay.
Most PC components will not handle 115 VAC. You could take a look at some the stuff from x10 which is an old home automation standard. Other wise you will need to use relays controlled by a PC to switch the 115 VAC.