Arduino Ethernet to switch on/off Office Computers...

Hello Friends.

I have a idea in my mind is there any way to act arduino digitalwrite as switch. I have more then 30 computers in my office and I want to make them off/ON through Ethernet. from my control room. Anyone forget to switch off the computer i can switch off it from my control room. I know we can do it using relay but i don't want to use relay. I want connect wire to directly motherboard power switch connector.. So can you tell me any way to do it?

san2roy: I want connect wire to directly motherboard power switch connector.. So can you tell me any way to do it?

We have been through this recently here. You should first determine the voltages on the loom to your "soft power" switch button on each computer. My presumption is that is switches to ground rather than to 5V, in which case all you need is an ordinary NPN transistor, emitter to ground and collector to the "switch" wire. It might be as well to measure the current when you short the terminals, just to know how much the transistor has to control. I imagine it is very little in the order of a couple of milliamps. The base of the transistor requires a resistor of the order of 10k fed from the Arduino.

Now there are some other matters to consider.

Are you going to use one Arduino per PC or what? If so, you will be powering it from the computer "standby" supply (purple wire on the power supply loom). You are going to use a whole Arduino and Ethernet shield and a port on a net switch for this?

Do you propose to use one Arduino for a number of PCs? If so, you will need to use opto-couplers for the switching, with 330 ohm resistors in series with the input LEDs of the opto couplers.

And you need to know whether the computer is presently on, or off (to say nothing of whether it is in the process of shutting down), so you need to monitor the voltage on one of the 5V controlled lines, such as the floppy disc connector (which is usually not in use nowadays). If using the Arduino for multiple computers, you again need an opto-coupler for this as they have separate grounds whereas if it is only for one PC, you will be using its ground and 5V supply for the Arduino anyway.

And of course, network cards have remote power-on functionality anyway, usually disabled so that when they are put to sleep, random packets on the network do not wake them up. If you can get them to behave themselves with the correct "magic packet", you can use this to start them up and of course, VNC to shut them down.

Actually I have done this with relay I am using Arduino Mega with Ethernet and Relay board to power off/on the relays now i want it without relays. I know i can trun off computer using Remote desktop or VNC through lan but I want to build a Arduino project just to get experience and learned more :)

Question: Relay alternative circuit......

san2roy: Question: Relay alternative circuit......

Transistor or optocoupler - as detailed above.

san2roy:
Anyone forget to switch off the computer i can switch off it from my control room.

I believe that much better and easier way is to write a script that turns off all the computers over the network. Years ago I carried out a project that awakened 150 computers at night. After that, they installed the updates. Finally, power off all computers.

san2roy: I have more then 30 computers in my office and I want to make them off/ON through Ethernet. from my control room. Anyone forget to switch off the computer i can switch off it from my control room. ... So can you tell me any way to do it?

Switching computers off remotely should not require adding any hardware to them. How to do it depends on the operating system, but most operating systems can be administered remotely and commanded to shut themselves down. Switching them back on can usually be done using WOL although I suppose you could bodge a solution that operated the power switch remotely.

PeterH:

san2roy:
I have more then 30 computers in my office and I want to make them off/ON through Ethernet. from my control room. Anyone forget to switch off the computer i can switch off it from my control room.

So can you tell me any way to do it?

Switching computers off remotely should not require adding any hardware to them. How to do it depends on the operating system, but most operating systems can be administered remotely and commanded to shut themselves down. Switching them back on can usually be done using WOL although I suppose you could bodge a solution that operated the power switch remotely.

i know that but i want to this using arduino… just for fun…

Depending on your office wiring, you might be able to use an X10 setup. The x10 firecracker (CM17A) transmitter is very simple to operate via the arduino.

san2roy: i know that but i want to this using arduino... just for fun...

Oh. From the tone of your original post I thought that you were more interested in getting a practical working solution. If you just want to make something that involves an Arduino, you could just use something like a Baby Orangutan or similar cheap clone with integral driver hardware and use that to operate a micro relay that triggers the power switch. You might find that you can use the h-bridge output directly (i.e. not using a relay) but the relay would be a more certain solution. The Baby Orangutan can be powered from 5V-13V or so and I'm sure you can find something suitable inside a PC - or power it from an external supply if that's easier.

You'd need to have some way to tell it to trigger the switch, and it would be sensible for it to also give feedback about whether each PC was currently powered up or not, which implies bidirectional comms. What mechanism did you have in mind to communicate with these from wherever you are going to be?

Wake-On-LAN can be done from an Arduino, and is a much more elegant solution to power-up. A similar “Shutdown” script could be triggered from the Arduino as well.

If you’re that intent on doing this through hardware, a simple logic-level MOSFET that shorts the appropriate pin on the power button should do what you’re asking. The switch is a momentary push-to-make type, but I’m not sure whether the ATX spec defines whether the switch connects a 5v pull-up to ground, or a 0v pull-down to +5v. I would imagine it’s up to the mobo which route to take.

On mine, the switch seems to ground a 5v pull-up. The proper solution would be to use an N-ch MOSFET to ground the lead that’s pulled up to 5v from the motherboard.

You can simulate this circuit with a 9v battery (assuming the role of the HIGH pin of the motherboard’s power switch connector) through a resistor (470R would be fine), to the anode of an LED. Cathode of the LED goes to the transistor drain pin. Source to ground. Apply +5v to the gate and the LED should light. This is your switch being “pressed”. Remove +5 from the gate and the LED should go out. (Releasing the switch.) Don’t forget a pull-down resistor from gate to source. (10k)

When it works (and you’ve worked out the pulse duration for on and off button presses), substitute the 9v battery / resistor / LED for the HIGH side of the power button. LOW side goes to the source pin, which should also be connected to the Arduino ground.

If your motherboard appears to use the reverse scenario (pull-down to ground that shorts to +5 when pressed), you’ll need a P-ch MOSFET with the gate pulled up to 5VSB, and a logic LOW to turn it on. The source pin will be connected to 5VSB (and your Arduino should be powered by that rail as well), and drain to the LOW side of the switch.

You can figure out which scheme your board uses by measuring the voltage of the power button pins (either) when the button is pressed. When pressed, it’ll be 0v with the N-ch scenario, and 5v with the P-ch scenario. You might use a 1k resistor between the switched side and your MOSFET until you’re confident you have it right.

SirNickity: If you're that intent on doing this through hardware, a simple logic-level MOSFET that shorts the appropriate pin on the power button should do what you're asking.

Or in fact, a general-purpose NPN transistor with a base resistor of a few k ohms. We are not going to be worried about the (base) current draw for a second or so.

For sure... In general, I pick transistors based on this rule of thumb: Want a simple switch? Use a MOSFET. Want more analog behavior? Use a bipolar.

Not that they are type-cast into these silos, but MOSFETs don't require gain calculations, while bipolars don't necessarily need as much voltage to do their thing. To quote the camel book: There's more than one way to do it. 8)