DETECTING POWER CYCLING OR COMPUTER CRASH
REFERENCE > ADVANCED TECHNIQUES >
In some cases, power will be interrupted to a computer or external equipment, and one
must take into consideration the affects. Two cases are discussed below.
1) instruNet i100 power cycles off/on (e.g. power outage, blown power fuse)
while the computer continues to operate (i.e. i100 and computer power are
independent)
Here, the i100 outputs will reset, and no message will
be sent to the controlling software. To detect this, the controlling software on the host
computer can set an instruNet output (analog or digital) to a known voltage (e.g. 4V) at
the beginning of the experiment, read it back continuously during the experiment, and if
it jumps to it's reset value, then it knows the i100 power has cycled, and
that it's outputs have all moved to their reset positions. In which case, the controller
software can act accordingly.
2) Computer power cycles off/on or computer crashes
In this case, the i100 will continue to output voltages at the same level as done before
the computer went down if the i100 power remains on while the computer goes down
(due to running on a different power source). If you want your Device Under Test
(DUT) to go into a reset phase at this point, you need a Watchdog, which is a periodic
signal from the computer to the DUT that says "I'm alive and well", and if that periodic
signal stops, then the DUT detects this and enters it's reset phase. This Watchdog can
be implemented with the i100 putting out a periodic signal (e.g. output pulse), yet the
DUT needs additional circuitry to interpret this.
What circuitry? The watchdog pulse can go through a diode to charge a capacitor that
is being drained through a resistor (peak detector circuit), and the output of this can be
fed into an analog comparator that detects the state when the capacitor has not been
charged recently (i.e. watchdog signal not present). This is then used to reset the
DUT.
To reduce the probability of a power outage at the i100 and/or computer, one can add
an uninterruptible power supply (UPS), yet note that these provide power for tens of
minutes or a few hours in the typical power outage case. They can be helpful since
they give the computer time to detect the outage and act accordingly, before the UPS
power runs out.
|