no doubt have been told to reboot the DSL/cable modem
and/or the router by unplugging the power supply. The
WatchPuppy uses this same crude reboot method to try
to restore Internet service. These devices are almost
always powered by low voltage wall-wart type
transformers. You will have to break the positive side of
the two-wire conductor to the transformer. Extend this
break with two wires to the WatchPuppy relay
connections. You will use the normally closed (NC) relay
contacts. The router and modem will then remain
powered on even when the WatchPuppy is itself not
powered. If you do not want to cut the wires leading to
the transformers (they might belong to someone else after
all), you could create jumpers with the appropriate male
and female connectors that would allow non-destructive
insertion of the relay contacts into the power cord.
The PC Side of Things
■ FIGURE 6. A clean exit from the PC case is achieved by
modifying a slot cover.
The WatchPuppy Monitor has several purposes. In
addition to providing the PC heartbeat, it also monitors
the Internet connection and issues the commands to the
WatchPuppy to reboot the modem and/or router. The
program manages the WatchPuppy configuration
including the options and timing parameters that are saved
in the WatchPuppy device EEPROM. Lastly, the program is
the place you would display the status of any auxiliary
inputs — digital or analog.
Microsoft provides VB.NET 2008 Express Edition for
free. I wanted you to be able to make modifications, so I
decided to translate the code from VB6 to the VB.NET
language. You can get VB.NET 2008 at
The source code and executable are provided at my
website at http://radiosky.com/WatchPuppy/. The
executable is provided if you are okay with using the
program as-is. I encourage you, however, to look at your
own specific remote management needs and
experiment with ways to improve usefulness and
reliability. Possible improvements include re-labeling
the auxiliary inputs for specific uses and translating
the ADC input to units meaningful to your purpose.
Also, a simple logging facility might be useful so
that you can see when problems have arisen in
your absence. You might add a routine that has the
program email you or send you a text message
saying everything is okay once a day. The
possibilities go on and on.
The monitor program relies on a software timer
to call the routines that read the status of the
WatchPuppy every five seconds. If the
modem/router reboots are enabled, the
WatchPuppy Monitor will also check the online
status of the computer. After the time (in minutes)
specified in the Internet Loss Trigger has expired
without a successful test, the modem and/or router
will be rebooted.
Within the monitor program, you will want to
configure the action of the boot relay to correspond with
the reboot method that you implement on the computer
(reset or power button). Click the Settings tab and note
the top four entries on the left. Restart Trigger is the
length of time in minutes that the WatchPuppy will wait
without hearing a heartbeat before it begins the reboot.
Boot Duration is the length of time that you expect a PC
reboot to take. After this amount of time, the WatchPuppy
will again start listening for heartbeats. If the reboot is
accomplished sooner, the reception of a ‘W’ status
request from the PC will end this wait period. The Reset
Pulse Width is usually several seconds for the power
switch. Physically test this parameter. If you are using a
reset switch and do not need the second pulse of the
switch to restart the computer, then place zero in the
Reset Pulse 2 Width textbox.
There is a global enable for the modem/router
■ FIGURE 7. Settings screen of the WatchPuppy Monitor program.
PC reboot parameters are on the left; modem/router reboot
parameters are on the right.
August 2010 43