Remote computer power switch

I want to use 2 arduino Unos both with xbee wireless modules to make a wall switch that turns on my computer. The first arduino would be placed in the wall where an existing lightswitch is, and would be connected to an arcade button mounted on a blank socket cover. When the button is pressed it would send a signal to the 2nd arduino which would be inside my computer case. The 2nd arduino would be connected to a NC SPST relay that is placed instead of a physical power switch. When the relay is activated by the 2nd Arduino the computer will power on.

This is my first project using the arduino so all help is greatly appreciated :slight_smile: Especially with the relay being in place of a physical switch since I am not 100% sure that's the best way of doing it .

inb4 "Use Wake on LAN"

I want to use

an elephant gun to shoot fleas.

You don't need any Arduinos for this. The XBee by itself is capable of monitoring a switch and sending data when the state changes.

The XBee on the receiving end is capable of setting a pin to match the data it received, turning the relay on.

Even the relay is probably overkill. An opto-isolator can complete the circuit, similar to pressing the power button on the outside of the case.

Resistor, transistor, diode, relay.

A simple RX TX pair would easy perform this - xbee is massive overkill.
Take a look into Home Easy hacking in the playground their sockets and switch range would allow you to do this without risking mains voltages. You might even be able to get the result you want from their off the shelf products as most BIOS's these days have an option to power-up upon power restoral which would make the PC power up when mains voltage is connected.

Heck, you can get a clapper to do this. They even have push button clappers now with 2 or 3 channels, so you don't even need to clap!

I admit it would be easier to use a "clapper" or the power up on power restore. But I was going to use this project to get started in microcontrollers. So I was wondering how exactly I would go about using the XBee on its own, or any recommendations on a quality RX TX pair.

Also, bump

XBee is overkill.
I would get a pair of promini, a set of
RF Link Transmitter & Receiver- 434MHz
and run virtualwire to send the command from one to the other.

Transmit side, run 3.3V/8 MHz, powerdown sleep mode all the time, 3.7V LiPo battery, button push creates interrupt to wake up & send the command.

If you were to suggest where you are located in the world - we can suggest somewhere to order a cheap transmitter and receiver....

I live in Pennsylvania

This place has several different sets of RF Rx/Tx to choose from
http://www.robotshop.com/433mhz-high-sensitivity-transmitter-receiver-pair-rxa30.html

Would this opto-isolator be sufficent?
And is this normally-closed? Because I know that's what I need for the computer switch.

http://www.sparkfun.com/products/314

I don't want to come off as stupid, this is just my first "real" electronics project :stuck_out_tongue:

Opto's don't have Normally closed, as they have a transistor for an output.
What you will do is pass current in pin 1, out pin 2.
When you do, pins 3-4 will act like an electronic swith and close your push button on the front panel, hopefully turnimg the PC on.
Hopefully the 0.2V drop across the part will be enough to look like a closed switch.
If not, you can do the same with a small relay instead.

Check out http://www.rfpcremote.com