Showing posts with label watchdog timer. Show all posts
Showing posts with label watchdog timer. Show all posts

Thursday, April 30, 2015

Let's See the Watchdog TImer in Action

Hi everybody!

It is the end of the month and time for my monthly blog post.

Quite some time ago, my buddy Gary mentioned our watchdog timer protection in a post.  Here is what he had to say:

The watchdog timer is a unique feature on some Agilent power supplies, such as the N6700 series. This feature looks for any interface bus activity (LAN, GPIB, or USB) and if no bus activity is detected by the power supply for a time that you set, the power supply output shuts down. This feature was inspired by one of our customers testing new chip designs. The engineer was running long-term reliability testing including heating and cooling of the chips. These tests would run for weeks or even months. A computer program was used to control the N6700 power supplies that were responsible for heating and cooling the chips. If the program hung up, it was possible to burn up the chips. So the engineer expressed an interest in having the power supply shut down its own outputs if no commands were received by the power supply for a length of time indicating that the program has stopped working properly. The watchdog timer allows you to set delay times from 1 to 3600 seconds. 

(For the whole post click here)

Since Gary wrote that post, we have released the N6900 and N7900 APS units that also include this useful feature.  What I wanted to do was show how to set it up, how to use it,and how to clear it so that everything is a bit more clear.   All of my programming examples in this post will be done using my APS with the VISA-COM IO Library in Visual Basic.

The setup is pretty easy:

        APS.WriteString("OUTP:PROT:WDOG:DEL 5")
        APS.WriteString("OUTP:PROT:WDOG ON")

This sets the watchdog delay to 5 seconds and enables it.  This means that if there is no IO activity (ie your computer hangs up) for 5 seconds, then the unit will go into protect and shut the output down.

Lets say that I have a program that performs a measurement around every second for a minute.  Here is the program:


        APS.WriteString("OUTP:PROT:WDOG:DEL 2")
        APS.WriteString("OUTP:PROT:WDOG ON")

        For i = 0 To 59
            APS.WriteString("MEAS:VOLT?")
            strResponse = APS.ReadString
            Threading.Thread.Sleep(1000)
        Next

        Threading.Thread.Sleep(3000)

        APS.WriteString("STAT:QUES:COND?")
        strResponse = APS.ReadString

 The watchdog delay is set for 2 second so while I run in the loop taking my measurements everything is working great.  After the 3 second wait at the end though, the 2 second watchdog timer comes into effect and the unit goes into the protect state and disables the output.  The response to the questionsable status query is 2048 which corresponds to bit 11 of the register which is defined as "Output is disabled by a watchdog timer protection".  This is the expected result.

My reccomendation to clear the watchdog timer would be to first disable the watchdog timer and then clear the protect.  You can then re-start the watchdog timer when you are ready.

        APS.WriteString("OUTP:PROT:WDOG OFF")
        APS.WriteString("OUTP:PROT:CLE")

The watchdog timer is a pretty cool feature that can perform a pretty useful task.  I hope that this blog post explains what it is and how to use it a bit more.

Thursday, March 29, 2012

Protect your DUT with power supply features including a watchdog timer

The two biggest threats of damage to your device under test (DUT) from a power supply perspective are excessive voltage and excessive current. There are various protection features built into quality power supplies that will protect your DUT from exposure to these destructive forces. There are also some other not-so-common features that can prove to be invaluable in certain applications.

Soft limits
The first line of defense against too much voltage or current can be using soft limits (when available). These are maximum values for voltage and current you can set that later prevent someone from setting output voltage or current values that exceed your soft limit settings. If someone attempts to set a higher value (either from the front panel or over the programming interface), the power supply will ignore the request and generate an error. While this feature is useful to prevent accidentally setting voltages or currents that are too high, it cannot protect the DUT if the voltage or current actually exceeds a value due to another reason. Over-voltage protection and over-current protection must be used for these cases.

Over-voltage protection
Over-voltage protection (OVP) is a feature that uses an OVP setting (separate from the output voltage setting). If the actual output voltage reaches or exceeds the OVP setting, the power supply shuts down its output, protecting the DUT from excessive voltage. The figure below shows a power supply output voltage heading toward 20 V with an OVP setting of 15 V. The output shuts down when the voltage reaches 15 V.

Some power supplies have an SCR (silicon-controlled rectifier) across their output that gets turned on when the OVP trips essentially shorting the output as quickly as possible. Again, the idea here is to protect the DUT from excessive voltage by limiting the voltage magnitude and exposure time as much as possible. The SCR circuit is sometimes called a “crowbar” circuit since it acts like taking a large piece of metal, such as a crowbar, and placing it across the power supply output terminals.

Over-current protection
Over-current protection (OCP) is a feature that uses the constant current (CC) setting. If the actual output current reaches or exceeds the constant current setting causing the power supply to go into CC mode, the power supply shuts down its output, protecting the DUT from excessive current. The figure below shows a power supply output current heading toward 3 A with a CC setting of 1 A and OCP turned on. The power supply takes just a few hundred microseconds to register the over-current condition and then shut down the output. The CC and OCP circuits are not perfect, so you can see the current exceed the CC setting of 1 A, but it does so for only a brief time.

The OCP feature can be turned on or off and works in conjunction with the CC setting. The CC setting prevents the output current from exceeding the setting, but it does not shut down the output if the CC value is reached. If OCP is turned off and CC occurs, the power supply will continue producing current at the CC value basically forever. This could damage some DUTs as the undesired current flows continuously through the DUT. If OCP is turned on and CC occurs, the power supply will shut down its output, eliminating the current flowing to the DUT.

Note that there are times when briefly entering CC mode is expected and an OCP shutdown would be a problem. For example, if the load on the power supply has a large input capacitor, and the output voltage is set to go from zero to the programmed value, the cap will draw a large inrush current that could temporarily cause the power supply to go into CC mode while charging the cap. This short time in CC mode may be expected and considered acceptable, so there is another feature associated with the OCP setting that is a delay time. Upon a programmed voltage change (such as from zero to the programmed value as mentioned above), the OCP circuit will temporarily ignore the CC status just for the delay time, therefore avoiding nuisance OCP tripping.

Remote inhibit
Remote inhibit (or remote shutdown) is a feature that allows an external signal, such as a switch opening or closing, to shutdown the output of the power supply. This can be used for protection in a variety of ways. For example, you might wire this input to an emergency shutdown switch in your test system that an operator would use if a dangerous condition was observed such as smoke coming from your DUT. Or, the remote inhibit could be used to protect the test system operator by being connected to a micro switch on a safety cover for the DUT. If dangerous voltages are present on the DUT when operating, the micro switch could disable DUT power when the cover is open.

Watchdog timer
The watchdog timer is a unique feature on some Agilent power supplies, such as the N6700 series. This feature looks for any interface bus activity (LAN, GPIB, or USB) and if no bus activity is detected by the power supply for a time that you set, the power supply output shuts down. This feature was inspired by one of our customers testing new chip designs. The engineer was running long-term reliability testing including heating and cooling of the chips. These tests would run for weeks or even months. A computer program was used to control the N6700 power supplies that were responsible for heating and cooling the chips. If the program hung up, it was possible to burn up the chips. So the engineer expressed an interest in having the power supply shut down its own outputs if no commands were received by the power supply for a length of time indicating that the program has stopped working properly. The watchdog timer allows you to set delay times from 1 to 3600 seconds.

Other protection features that protect the power supply itself
There are some protection features that indirectly protect your DUT by protecting the power supply itself, such as over-temperature (OT) protection. If the power supply detects an internal temperature that exceeds a predetermined limit, it will shut down its output. The temperature may rise due to an unusually high ambient temperature, or perhaps due to a blocked or incapacitated cooling fan. Shutting down the output in response to high temperature will prevent other power supply components from failing that could lead to a more catastrophic condition.

One other way in which a power supply protects itself is with an internal reverse protection diode across its output terminals. As part of the internal design, there is often a polarized electrolytic capacitor across the output terminals of a power supply. If a reverse voltage from an external power source was applied across the output terminals, the cap (or other internal circuitry) could easily be damaged. The design includes a diode across the output terminals with its cathode connected to the positive terminal and its anode connected to the negative terminal. The diode will conduct if a reverse voltage from an external source is applied across the output terminals, thereby preventing the reverse voltage from rising above a diode drop and damaging other internal components.