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 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 .
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.
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.
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.
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.