I want to build something that will allow me to to use my Arduino to do the following.
Turn on computers (by connecting it to the front panel connector where you would normally connect a power button)
Force computers to power off (by pressing and holding the power button for ~10 seconds)
I also want to be able to have the Arduino know if the computers are on and active (monitoring the power and HDD LEDs)
When I say monitoring the LEDs or pressing the button I do not mean using sensors and actuators I mean directly connecting the Arduino to the motherboard of the computer.
To me it would seem that performing these tasks should be rather trivial for one computer (but I still need help with this because I am completely new to micro controllers so please explain what circuit and code I would need to do this for one computer) (I am quite proficient with a soldering iron tho so that is not a problem.
I want to be able to do this for several (up to 10 or so but be able to scale higher)
All this probably sounds not too complex but I want to be able to connect the computers to the Arduino in the way described in the attached diagram (daisy chain).
My hope is to have two conductors in each cable but four is possible.
I presume I would need some kind of IC for each computer to be able to do this (connect them in daisy chain) but I am completely clueless as to how I would accomplish this. I hope that the parts required would be about 5 dollars per computer.
Any help would be appreciated!
[Edit/Modification]: Also, yes I do know that there are commercial/better solutions. I just think this project would be fun, neat/cool and educational
Also, I want the computers power buttons and LEDs to remain functional.
If you want to daisy chain, then you will need a smart controller (essentially an Arduino or equivalent) in EACH computer interface. Unless your "daisy-chain" is a big ribbon cable.
If you have a smart controller in each computer control node, then you will need to POWER them somehow. You can't use the power from the controlled computer, because you won't be able to turn on a computer that is off. That likely means that you need to SUPPLY POWER via the daisy-chain.
You will need to directly connect to the power button wires. Unless you want to kludge some robot finger to poke the button.
It should be pretty easy to make some cable harness that goes between the front panel power switch (and LED) and the motherboard so your gadget can control power and monitor status.
Other than that, the scheme appears to have no fundamental barriers.
Remember that many modern computers have "wake on LAN" and SNMP which means that these functions are built-in.
Thank you very much for your reply.
RE: (1) Daisy chain "smart controllers"
Is there an inexpensive chip ~5 dollars that can do the job?
RE: (2) Power
Is it possible to provide power and data on just two conductors or is this impractical?
RE: wake on LAN/SNMP
Those aren't as fun and could have some limitations.
RE: Physical button and LED still working? Also circuitry.
So the plan is to directly connect the controller to the motherboards header for the LEDs and power button. I also want to connect LEDs and a button directly to the motherboard parallel to the controller, do I need to do anything special to prevent damage to the controller (I am thinking about the power button maybe causing some kind of a problem).
I presume that for the circuit, the led header would be connected to gnd and a digital pin then the power button would be connected to gnd and a digital pin? Do I need resistors somewhere in there?
[edit]
RE: Not daisy chain
If I choose to connect directly to the Arduino how many computers could I hook up (I have an Arduino nano) assuming each computer had 2 LEDs and one button?
To actually turn the computer on and off, you could use a reed relay or other subminiature relay, with the contacts wired in parallel with the front panel switch. Normally I'd rather use an opto isolator for this sort of thing, however I can't find a standard specification of the interface between the front panel switch and the motherboard, and I suspect there isn't one. So designing a circuit using an opto isolator that can be relied upon to work with any PC may not be possible.
For the daisy chain, if the total length of the chain isn't too long then I agree that using I2C protocol with an I/O expander iat each PC looks like a good way to go. You can get DIL reed relays that only need 10mA@ 5V, so they can be driven directly from an I/O expander.
Is this for fun (that is, non-permanent), or for an actual application? If the latter - where will it be located?
Note that anytime you are doing something like this - should something go wrong, a fire is started, and the insurance company is called - if the company finds that your device caused the problem (heck - sometimes all it takes is for your device to be present) - and it hasn't been UL listed (or whatever testing agency for your country) - they will likely deny your claim.
If this is to be used in a server colo or such - they will likely be ticked off if found after the fact; or they will kick you out if you try...