Author Options:

Internet failure detector? Answered

Hi everyone - this is my first post and I hope I am posting in the right place!

I want to be able to detect when my PC loses internet connection and be able to signal an actuator to drive a motor.

Does anyone know of any software that can do this on the PC itself or a standalone project that can be used to do this?

thanks for reading!



4 years ago

Your question can be broken down into at least 2 parts :- 1) check for internet connectivity & 2) control a motor. If you need to check for your PC internet connectivity then you will need a program for your PC to do this and a program / hardware to control your motor if the internet has failed.

If you are trying to operate a motor when your household (IE Router) has lost connectivity then you will just need a program / hardware to do this.

A good way of checking internet connectivity is to use the PING command. For example if you issued the command: ping google.com at a windows command prompt you will receive the IP address of google.com if it can connect and find it (you would assume google is running quite often!!!!) or a ping timeout if it can't. This would mean google is either down or your internet is down.

So if you wanted to specifically check if your PC is connected, you could use the free visual studio program (assuming you are running windows) to write a program to check a ping command. Check out http://msdn.microsoft.com/en-us/library/system.net... to find out how. Its only about 20 lines of code and quite explanatory.

If your ping failed you could write to an arduino on a serial port to operate your motor.

If you needed to just check your household internet connectivity (Router) you could just use an arduino to check the ping and operate the motor. Check out http://playground.arduino.cc/Code/ICMPPing for Arduino ping code.

Serial coms from the PC to arduino is quite easy, checkout http://www.ladyada.net/learn/arduino/lesson4.html for a tutorial.

Operating your motor should be quite straight forward but depends on how it works. To be honest if you can work through the above you will be able to operate a motor.

Hope this helps.


4 years ago

Wired or wireless connection?

If wired your modem/router should have an indicator light showing if you have internet connection or now. You can hack into that and use power from that indicator LED to activate a transistor that trips a relay to turn on the motor.


4 years ago

There should be a small indicator in the bottom corner of your screen, a series of bars that shrinks and grows with the signal. On some computers, the loss of signal is shown by a red X.

But, if signal strength is an issue, and you need to switch it off-and-on again, why not just buy a signal repeater or booster?