Arduino to restart frozen computers

Hello!

I have a dozen computers that occasionally lock up, requiring a manual restart. Since these computers aren’t at home with me, resetting them is getting to be a real pain!

Shorting the front panel pins of the motherboard for a few seconds is all I really need, and I’ve got a 16 channel relay module that I think will do the trick. I hoped to get the relay module working with a device I’m more familiar using, but it uses 3.3V logic and doesn’t work quite right with the 5V of my relay module.

Rather than convert the logic levels, I believe an arduino mega might be just what I need though I really don’t know much about them. I do know I can pick one up locally at micro center, and I’d have all weekend to work with it which fits perfect in my schedule!

What I am looking to do is ping IP addresses (micro center also has Ethernet shields!) then close the relay for 10 seconds if the IP is unresponsive. Would an arduino mega be able to do this, rather easily? I need to check around 12 ip addresses, as well as controlling 12 of the 16 relays, and I’d like for each address to be checked once every 5 minutes or so, continually.

Any pointers in the right direction would be greatly appreciated! I’m pretty decent with google :slight_smile:

Thank you!

Yes, but it's not easy. It is a project for advanced users. If you have some programming and electronics skills it can be done.

The Arduino Uno board is the easiest to start with. But if you use the Ethernet Shield and the microSD card, you run out of memory very quick. So the Arduion Mega 2560 with the Ethernet Shield is the best combination. There are many examples, and they can easily be combined. The Arduino can be a webserver and webclient at the same time. http://arduino.cc/en/reference/ethernet

Perhaps simple reed relais can be used for the reset buttons.

What if something in your sketch will lock up the Arduino. How will you reset that ?

Caltoa: Perhaps simple reed relays can be used for the reset buttons.

Opto-couplers.

I have literally no programming experience at all, think I may be a little over my head for one weekend of work! Not to mention, I need whatever I implement to ease the problems, not add to them!

Reed relays, that sounds interesting and something I'd never heard of. I looked around and found some with a 3.3V coil needing only 6mA, I think this ought to be within the limits of my other IO. While a bit pricy, they still come out cheaper than a new mega+Ethernet shield.

I think I may just give these reed relays a try, as that seems easier than building 16 logic level converters.

Thanks for the lead!

Hi,

coinish: What I am looking to do is ping IP addresses (micro center also has Ethernet shields!) then close the relay for 10 seconds if the IP is unresponsive. Would an arduino mega be able to do this, rather easily? I need to check around 12 ip addresses, as well as controlling 12 of the 16 relays, and I'd like for each address to be checked once every 5 minutes or so, continually.

That seems like a moderately complicated solution to a problem usually solved with a simple watchdog. On the PC you run a program that regularly outputs something to the Arduino's serial port. Sending a sequence number every 30 seconds seems appropriate. On the Arduino you ensure there is output from the PC about half that rate; every one minute from my example. If the Arduino sees nothing from the PC within a reasonable amount of time (e.g. one minute), it reboots the PC.

The entire code on the PC consists of opening a serial port, sending something, waiting, then repeating indefinitely. I believe less than a dozen lines of Python would do the trick. The entire code on the Arduino consists of waiting, checking for serial data, and rebooting the PC if nothing has arrived. Should be about another dozen lines of C.

You would need an Arduino for each PC which may be cost prohibitive.

If you prefer not to crack open the PC cases, I have seen people use a servo to press the reset button.

A transistor per computer (or if you must, relays)

To keep costs down, I'd have an Arduino on your lan, have a program on each machine which connects to the arduino, grabs the ip or machine number eg send to the arduino "machine 3" you parse out the value, ie in this instance "3" .

Any machine not resresponding or showing itself, send a signal to the base pin of the transistor for several seconds (4ish seconds) to power it off followed by a delay to switch it back on...

A buch of transistors, 1 ethernet shield, and a lot of programming...

Even better - do without the Arduino!

A USB to TTL adaptor and two CMOS NE555s. The first one is reset by either a regular pulse on the RTS line of the adaptor, or by the second. If it times out (longer than the boot time of the server, that is), it trips the second to hit the reset button.

Actually, it is slightly more complicated. To kill a crashed PC, you have to hold the power button for five seconds. Then give it a “cooling off” delay. Then press the power button again for ½ second to re-start it.

I think a 4017 and a 74HC14 plus some capacitors, resistors and diodes would do the job nicely. Cheap enough?

It's obviously a lot more expensive in hardware, but less hassle in learning to program and debug an arduino solution- have you considered existing solutions to this? A cursory search found this: www.dataprobe.com/ibootbar-models.html. I'm sure there are many others.

Also, what causes the crash? Can you avoid it by nightly scheduled reboots?

wildbill: It's obviously a lot more expensive in hardware,

Only $200 per PC. XD

wildbill: Also, what causes the crash? Can you avoid it by nightly scheduled reboots?

Although i have to agree, better to fix the memory leaks and bugs ...

but if you have no choice, then take a pick from the suggested options above.

These computers are right on the very edge of hardware, bios, and driver limits. Each has 6 graphics cards, and one computer pulls approximately 2000W of 240V! While directly switching line voltage is still possible, I'd much rather switch the front panel headers.

Fixing the crashes will likely be possible in the future, but I'm not that talented and really just have to wait till the smarter folks figure it out and feel like sharing. A whole lot of progress has been made since around November though, so I am hopeful! In the meantime, I need as much uptime as I can possibly get. I'm sure most of you can guess at what I'm up to now!

I hope you all don't mind me posting this, but the 3.3V device I planned to use is a Pi. I've found a reed relay I think will work.

http://www.digikey.com/product-search/en?pv671=25&FV=fff40010%2Cfff80368%2C1200005&k=reed+relay&mnonly=0&newproducts=0&ColumnSort=0&page=1&quantity=0&ptm=0&fid=0&pageSize=25

While I think the relay is in the power requirements of the pi, I'm not sure if directly switching it is the best idea. A relay's coil will spike when released, right? With such a small, weak coil, and as often as I'd hope it would be switching, do you think I could push the envelope?

I really think that may be the best and quickest way at this point, hopefully as easy as sticking a dozen relays on a protoboard. I still plan on picking up an arduino though, and a few more books to help me learn this programming stuff...

Thank you all for the advice, it is greatly appreciated!