A programmable on-line power management system and watchdog counter

By using a programmable online power management system and a watchdog counter, the system automatically realizes physical power-off, power-on restart, and submodule power management of electronic equipment, solving the problem of equipment being unable to restart after a crash and improving equipment reliability and troubleshooting efficiency.

CN119806301BActive Publication Date: 2025-11-25EAST CHINA INST OF COMPUTING TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411859986.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-11-25
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

Existing electronic devices cannot physically power off and restart when they freeze, and cannot manage the power of multiple sub-modules or switch I/O ports, making troubleshooting difficult and requiring external manual restart, which affects the reliability of the equipment.

Method used

Design a programmable online power management system that acquires test data of electronic devices through communication cables, monitors device status using a watchdog counter and feature instruction recognition module, automatically performs physical power-off and power-on restart, and manages power or I/O ports of sub-modules through instruction execution module. The system is independently powered and does not share power with the devices.

Benefits of technology

It enables automatic restart of electronic devices when they freeze, reduces the need for hardware modifications, supports remote online management, and improves device reliability and troubleshooting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806301B_ABST
    Figure CN119806301B_ABST
Patent Text Reader

Abstract

The application provides a programmable online power management system, wherein a feature instruction recognition module is used to monitor data transmitted by an electronic device to determine whether there is a feature instruction (including a watchdog instruction); a watchdog counter is used to realize automatic power-off and power-on restart of the electronic device when the electronic device is dead; an instruction execution module is used to realize online management operations such as turning on or off the power supply of a sub-module, triggering self-destruction, setting current grading limit power supply or I / O port selection, and the like, and the hardware of the electronic device needs to be changed little or not at all. The application also provides a watchdog counter, wherein a first counting permission circuit, a second counting permission circuit and a WDOG circuit are combined to realize a counting rule, and when the electronic device is out of control and cannot send a watchdog instruction to clear the count of the WDOG circuit, resulting in overflow, a relay driving circuit drives a relay to make the electronic device power off and then power on, thereby solving the problem that the electronic device must be restarted manually.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power management, in particular to a programmable online power management system and watchdog counter for electronic equipment. BACKGROUND

[0002] Currently, some electronic equipment needs to solve the following pain points: 1. The electronic equipment does not work normally after a period of time, the watchdog of the electronic equipment does not start, and the electronic equipment must be restarted manually (physical power off, power on, power on) to work normally. 2. The electronic equipment does not work normally after a period of time, the watchdog of the electronic equipment starts but still cannot make the electronic equipment work normally, and the electronic equipment must be restarted manually to work normally. 3. The electronic equipment cannot start normally after power on, and must be restarted manually or restarted several times to work normally. 4. The user needs to control the power on and off of the lower computer, the power supply control of the sub-module, self-destruction or switching I / O operation through the upper computer, but the hardware circuit of the upper and lower computers must be changed as little as possible. The original design of the electronic equipment does not have the ability to cope with and overcome the above pain points, and in some cases, the user or designer also does not have the condition to manually restart (physical power off, power on).

[0003] The above 1 to 3 fault phenomena are commonly known as "dead machine", which occasionally occurs during system operation, and it is difficult to reproduce and find the fault cause to troubleshoot. Once it happens, it has serious consequences.

[0004] The watchdog circuit is usually connected in parallel with the electronic equipment to share the power supply, and can partially restart the electronic equipment when the electronic equipment enters an abnormal state, such as restarting by the RESET signal, but cannot physically power off and restart the electronic equipment. Chinese patent document CN202111106926 "Watchdog control circuit, electronic equipment and watchdog control method", increases selection, self-locking, three-state output control modules on the usual watchdog circuit, the purpose is to "disable the watchdog during program burning, debugging or power-on start". But in this scheme, the watchdog circuit and the electronic equipment are still connected in parallel to share the power supply, and cannot physically power off and restart the electronic equipment. If the electronic equipment needs to be restarted and the electronic equipment continues to feed the watchdog, that is, the watchdog of the electronic equipment does not start, such a watchdog circuit cannot work, and the designer must modify the electronic equipment design to make its watchdog circuit cope with this situation, which increases additional cost. In some cases, it cannot be modified or the effect is not good, for example, the hardware cannot be modified extensively because the electronic equipment has reached some design stage, or the watchdog does not start cannot be modified or the effect is not good after modification because the reason for the watchdog not starting cannot be found.

[0005] The Chinese patent document CN118113125A "Multi-path power supply control method and device" proposes a multi-path power supply control method and device that can "control multiple power supplies to respond in turn" in electronic equipment under delay conditions, but the patent device cannot restart the electronic equipment, and cannot overcome the above-mentioned pain points.

[0006] The Chinese patent document CN114291133A "Control method and device for remote restart of ground equipment, and remote restart equipment" proposes a remote restart equipment scheme that can restart remote equipment according to user demand, but requires remote equipment to repeatedly receive and confirm restart instructions, and can only restart "ground equipment" if the instructions are the same or "two out of three", which cannot be restarted if the remote equipment is not working properly, and is not suitable for timely restarts in time-sensitive situations. Moreover, this technical solution still cannot overcome the pain points of the devices that issue instructions, remote equipment, or "ground equipment" as described in 1 to 4 above.

[0007] The Chinese patent document CN117728664A "FPGA control protection circuit and power supply control protection device" proposes a power supply control device composed of an FPGA, but this device is only a component of the power supply and can only monitor the current and voltage of the power supply, and cannot identify whether the electronic equipment is "dead" or whether the user has issued external instructions. At the same time, the user cannot intervene in the operation of the power supply control, and the power supply cannot be controlled to restart.

[0008] Therefore, there is a strong need in the industry to further improve the power supply control or management of electronic equipment. SUMMARY

[0009] The technical problems to be solved by the present application are: 1. To achieve physical power-off and power-on restart of electronic equipment when it is "dead"; 2. To manage the power supply or switch the I / O port of one or several sub-modules in electronic equipment; 3. To manage the power supply or switch the I / O port of sub-modules in the lower computer by the upper computer.

[0010] To solve the above technical problems, the technical solution of the present application provides a programmable online power management system for controlling the total power supply and control objects in electronic equipment, including the following steps:

[0011] A signal conversion module converts digital signals from the electronic equipment into test information data that can be recognized by the feature instruction recognition module through a communication cable;

[0012] A data caching module obtains test information data from the signal conversion module and stores it as cache data;

[0013] Programmable ROM, used for storing preset feature instructions and operation instructions corresponding to the preset feature instructions;

[0014] Feature instruction identification module, obtaining the cached data from the data cache module and the preset feature instructions from the programmable ROM, and judging whether there is a feature instruction matching the preset feature instructions in the cached data one by one according to the order of obtaining, if there is, judging whether the feature instruction is a feed dog instruction in the preset feature instructions, if yes, transmitting the feed dog signal corresponding to the feed dog instruction to the watchdog counter;

[0015] If it is not the feed dog instruction, matching the corresponding preset feature instruction according to the cached data, calling the operation instruction stored in the ROM corresponding to the operation instruction, and transmitting the operation instruction to the instruction execution module;

[0016] Watchdog counter, obtaining the power-on signal from the electronic device and the feed dog signal from the feature instruction identification module, and executing the counting or clearing of the watchdog counter according to the power-on signal, if the counting overflows, performing the power-off restart operation on the power supply of the electronic device;

[0017] The instruction execution module connected to the control object, obtaining the operation instruction from the feature instruction identification module, and operating the control object according to the operation instruction.

[0018] Preferably, the watchdog counter further comprises an "initial counting enable / " pin signal, if the pin signal is "0", the watchdog counter starts counting after obtaining the power-on signal, the first feed dog instruction recognized by the feature instruction identification module clears the counting and stops the watchdog counter, and the subsequent feed dog instruction wakes up, clears and restarts the counting;

[0019] If the pin signal is "1", the watchdog counter does not count after obtaining the power-on signal, the first feed dog instruction wakes up the watchdog counter to start counting, and the subsequent feed dog instruction clears and restarts the counting.

[0020] Preferably, the data cache module stores the information data to be tested in the order of the signal conversion module sending the information data to be tested, and ejects the data cache module after the cached data corresponding to the information data to be tested is processed by the feature instruction identification module.

[0021] Preferably, the preset feature instructions further comprise key bytes and auxiliary bytes, and only the preset feature instructions are transmitted by the communication cable, so as to reduce the influence on the communication of the communication cable.

[0022] The technical scheme of the present application also provides a watchdog counter activated by feeding a dog, which is applied to the programmable online power management system and used for power-off restart of power supply of the out-of-control electronic device.

[0023] The electronic device is connected with the first power supply through the normally closed relay switch, one end of the relay coil is connected with the second power supply for power supply of the watchdog counter, and the other end is connected with the overflow end of the WDOG circuit through the relay drive circuit; the clear end of the WDOG circuit is connected with the feeding end of the first counting permission circuit; and the permission end of the first counting permission circuit is connected with the permission end of the WDOG circuit.

[0024] When the initial counting permission end of the first counting permission circuit acquires the artificial preset signal as "1", the permission end of the first counting permission circuit outputs the signal "1".

[0025] When the electronic device is powered on, the electronic device generates the power-on signal and transmits the power-on signal to the power-on end of the first counting permission circuit, so that the permission end of the first counting permission circuit outputs the signal "0" to the permission end of the WDOG circuit, the WDOG circuit does not work, the overflow end of the WDOG circuit outputs the signal "0", the normally closed relay switch is maintained closed, the electronic device is connected with the first power supply, and the feeding end of the first counting permission circuit acquires the feeding signal, so that the permission end of the first counting permission circuit outputs the signal "1" to the permission end of the WDOG circuit, and the WDOG circuit acquires the counting clock and accumulates the count.

[0026] When the WDOG circuit works and the electronic device works normally, the clear end of the WDOG circuit acquires the feeding signal to clear the accumulated count to restart the counting, the overflow end of the WDOG circuit maintains the output as "0", the normally closed relay switch is maintained closed, and the electronic device is connected with the first power supply.

[0027] When the WDOG circuit works and the electronic device is out of control to cause the feeding signal not to be generated, the WDOG circuit accumulates the count to overflow, so that the overflow end of the WDOG circuit outputs the signal "1", the relay drive circuit works to control the normally closed relay switch to be disconnected, and the electronic device is powered off.

[0028] When the overflow end of the WDOG circuit restores the output as "0", the normally closed relay switch is closed, the electronic device is powered on, and the power-on signal is generated and transmitted to the power-on end of the first counting permission circuit.

[0029] The technical scheme of the present application also provides a power-on starting watchdog counter applied to the programmable online power management system to restart the power supply of the out-of-control electronic device, wherein the watchdog counter comprises a relay normally closed switch, a relay coil, a relay drive circuit, a WDOG circuit, a second counting permission circuit, a first power supply and a second power supply.

[0030] The electronic device is connected with the first power supply through the relay normally closed switch, one end of the relay coil is connected with the second power supply for supplying power to the watchdog counter, and the other end is connected with the overflow end of the WDOG circuit output through the relay drive circuit; the clear end of the WDOG circuit is connected with the feeding end of the second counting permission circuit; and the permission end of the second counting permission circuit is connected with the permission end of the WDOG circuit.

[0031] When the initial counting permission end of the second counting permission circuit acquires the artificial preset signal as "0", the permission end of the second counting permission circuit outputs the signal "1";

[0032] When the electronic device is powered on, the electronic device generates the power-on signal and transmits the power-on signal to the power-on end of the second counting permission circuit, so that the permission end of the second counting permission circuit outputs the signal "1" to the permission end of the WDOG circuit, the WDOG circuit works, the WDOG circuit acquires the counting clock and accumulates the counting; the overflow end of the WDOG circuit maintains the output signal as "0", the relay normally closed switch maintains the closure, and the electronic device is connected with the first power supply.

[0033] When the WDOG circuit works and the electronic device works normally, the clear end of the WDOG circuit acquires the feeding signal to clear the accumulated counting to restart the counting, the overflow end of the WDOG circuit maintains the output as "0", the relay normally closed switch maintains the closure, and the electronic device maintains the power-on; meanwhile, the feeding end of the second counting permission circuit acquires the feeding signal, if it is the first acquisition, the permission end of the second counting permission circuit outputs the signal "0" to the permission end of the WDOG circuit, the WDOG circuit does not work, and the overflow end of the WDOG circuit outputs the signal "0", until the feeding end of the second counting permission circuit acquires the second and subsequent feeding signals, the permission end of the second counting permission circuit outputs the signal "1" to the permission end of the WDOG circuit, so that the WDOG circuit works.

[0034] When the WDOG circuit works and the electronic device loses control to cause the feeding signal not to be generated, the WDOG circuit accumulates the counting to overflow, so that the overflow end of the WDOG circuit outputs "1", the relay drive circuit works to control the relay normally closed switch to be opened, and the electronic device is powered off.

[0035] When the overflow end of the WDOG circuit restores output as "0", the relay normally closed switch is closed, the electronic device is powered on, and a power-on signal is transmitted to the power-on end of the second counting permission circuit.

[0036] The technical scheme of the present application also provides a watchdog counter for starting and powering on, which is applied to the programmable online power management system as described above to restart the power supply of the out-of-control electronic device. The watchdog counter comprises a relay normally closed switch, a relay coil, a relay drive circuit, a WDOG circuit, a first counting permission circuit and a second counting permission circuit, an OR gate, a first power supply and a second power supply.

[0037] The electronic device is connected with the first power supply through the relay normally closed switch, one end of the relay coil is connected with the second power supply for powering the watchdog counter, and the other end is connected with the overflow end of the WDOG circuit output through the relay drive circuit. The clear end of the WDOG circuit is connected with the feeding dog end of the first counting permission circuit and the second counting permission circuit respectively. The permission end of the first counting permission circuit and the second counting permission circuit is connected with the input end of the OR gate respectively, and the output end of the OR gate is connected with the permission end of the WDOG circuit. The power-on end of the first counting permission circuit is connected with the power-on end of the second counting permission circuit, and the initial counting permission end of the first counting permission circuit is connected with the initial counting permission end of the second counting permission circuit.

[0038] When the initial counting permission end of the first counting permission circuit obtains the artificial preset signal as "1", only the permission end of the first counting permission circuit outputs the signal "1". When the electronic device is powered on, the electronic device generates a power-on signal and transmits it to the power-on end of the first counting permission circuit, so that the permission end of the first counting permission circuit outputs the signal "0" to the permission end of the WDOG circuit, the WDOG circuit does not work, the overflow end of the WDOG circuit outputs the signal "0", the relay normally closed switch makes the electronic device communicate with the first power supply, until the feeding dog end of the first counting permission circuit obtains the feeding dog signal, so that the permission end of the first counting permission circuit outputs the signal "1" to the permission end of the WDOG circuit, the WDOG circuit works and accumulates the count of the counting clock. When the WDOG works and the electronic device works normally, the clear end of the WDOG circuit obtains the feeding dog signal to clear the accumulated count to restart the counting, the overflow end of the WDOG circuit maintains the output as "0", the relay normally closed switch maintains the closing, and the electronic device maintains the power-on. When the WDOG circuit works and the electronic device loses control to cause the feeding dog signal not to be sent out, the WDOG circuit accumulates the count overflow to make the overflow end output as "1", so that the relay drive circuit works to control the relay normally closed switch to open, and the electronic device is powered off. When the overflow end of the WDOG circuit restores output as "0", the relay normally closed switch is closed, the electronic device is powered on, and a power-on signal is transmitted to the power-on end of the first counting permission circuit.

[0039] When the initial count enable end obtains the preset signal "0", only the second count enable circuit allows the output signal "1"; when the electronic device is powered on, the power-on signal is generated and transmitted to the power-on end of the second count enable circuit, so that the output signal of the enable end of the second count enable circuit is "1" to the enable end of the WDOG circuit, the WDOG circuit works, and the accumulated count is obtained; when the WDOG circuit does not overflow, the overflow end outputs the signal "0", and the normally closed switch of the relay is maintained closed, so that the electronic device is connected with the first power supply; when the WDOG circuit works and the electronic device works normally, the clear end of the WDOG circuit obtains the feed dog signal to clear the accumulated count to restart the count, the overflow end of the WDOG circuit maintains the output "0", the normally closed switch of the relay is maintained closed, and the electronic device is maintained powered on; at the same time, the feed dog end of the second count enable circuit obtains the feed dog signal, if it is the first time to obtain, the output signal of the enable end of the second count enable circuit is "0" to the enable end of the WDOG circuit, the WDOG circuit does not work, and the output signal of the overflow end is "0", until the feed dog end of the second count enable circuit obtains the second and subsequent feed dog signals, the output signal of the enable end of the second count enable circuit is "1" to the enable end of the WDOG circuit, and the WDOG circuit works; when the WDOG circuit works and the electronic device loses control to cause the feed dog signal not to be generated, the WDOG circuit accumulates the count to overflow, so that the overflow end outputs "1", the relay drive circuit works to control the normally closed switch of the relay to be opened, and the electronic device is powered off; when the overflow end of the WDOG circuit restores the output "0", the normally closed switch of the relay is closed, the electronic device is powered on, and the power-on signal is generated and transmitted to the power-on end of the second count enable circuit.

[0040] Preferably, the first count enable circuit comprises an AND gate and an RS flip-flop; the initial count enable end of the first count enable circuit and the output end of the RS flip-flop are respectively connected with the input ends of the AND gate, and the output end of the AND gate is used as the enable end of the first count enable circuit; only when the initial count enable end of the first count enable circuit obtains the signal "1", the output of the RS flip-flop is output through the AND gate and transmitted to the enable end of the WDOG circuit;

[0041] When the R end of the RS flip-flop obtains the power-on signal "0" from the electronic device, the output of the RS flip-flop is "0" and is transmitted to the enable end of the WDOG circuit to make the WDOG circuit not count; when the electronic device works normally, the S end of the RS flip-flop obtains the feed dog signal, the output of the RS flip-flop is "1", and is transmitted to the enable end of the WDOG circuit to allow the WDOG circuit to count.

[0042] Preferably, the second counting permission circuit comprises a plurality of gate circuits, a D flip-flop with one counting and locking, and a second RS flip-flop; only when the initial counting permission end of the second counting permission circuit obtains a signal of "0", the output of the second RS flip-flop is allowed to be transmitted to the permission end of the WDOG circuit;

[0043] When the power-on end of the second counting permission circuit receives a power-on signal, the gate circuit, the D flip-flop and the second RS flip-flop of the second counting permission circuit interact with each other, the D flip-flop is set to "0", the second RS flip-flop is set to "1", the permission end of the second counting permission circuit outputs "1" and is transmitted to the permission end of the WDOG circuit to allow the WDOG circuit to count;

[0044] When the second counting permission circuit receives a first feeding signal output due to the normal operation of the electronic device, the gate circuit, the D flip-flop and the second RS flip-flop of the second counting permission circuit interact with each other, the D flip-flop is counted once and locked to "1", the second RS flip-flop is set to "0", the permission end of the second counting permission circuit outputs "0" and is transmitted to the permission end of the WDOG circuit to make the WDOG circuit not count;

[0045] When the second counting permission circuit receives a second and subsequent feeding signal output due to the normal operation of the electronic device, the gate circuit, the D flip-flop and the second RS flip-flop of the second counting permission circuit interact with each other, the D flip-flop is maintained to "1", the second RS flip-flop is set to "1", the permission end of the second counting permission circuit outputs "1" and is transmitted to the permission end of the WDOG circuit to allow the WDOG circuit to count.

[0046] Preferably, the first power supply and the second power supply are the same power supply.

[0047] The programmable online power management system provided by the technical scheme of the present application is externally connected to an electronic device by means of a communication cable, acquires the to-be-tested data transmitted by the electronic device through the communication cable, monitors whether there is a characteristic instruction (including a watchdog feeding instruction) in the to-be-tested data through a characteristic instruction recognition module, and if there is, respectively transmits a watchdog feeding signal to a watchdog counter, or calls an operation instruction corresponding to the other characteristic instruction stored in a ROM and transmits the operation instruction to an instruction execution module, to respectively execute the operations of clearing the watchdog counter, restarting the power supply of the electronic device, switching operation or other operations. If the watchdog counter is not cleared by the watchdog feeding signal within a certain period and overflows, the power supply of the total power supply of the electronic device is executed to restart. In this way, the system provided by the technical scheme of the present application realizes monitoring whether the electronic device appears a "dead machine" phenomenon, and automatically realizes physical power-off and power-on restart of the electronic device when the electronic device "dead machine", and also realizes online management operations such as switching on or off the power supply of a sub-module, enabling a self-destruction module, setting a current grading limit power supply or an I / O port selection of the electronic device or the upper computer through the communication cable, and the electronic device is slightly changed or does not need to change the hardware.

[0048] The watchdog counter provided by the technical scheme of the present application is not shared with the managed electronic device or is not parallelly shared with the power supply, and through the control counting mechanism of the first counting permission circuit and / or the second counting permission circuit combined with the WDOG circuit, when the electronic device loses control and cannot send a watchdog feeding instruction to clear the count of the WDOG circuit to cause overflow, the relay driving circuit drives the relay to make the electronic device power off and then power on to start, realizing the restart control of the out-of-control electronic device, solving the problem that the electronic device "dead machine" must be restarted manually from outside, and the electronic device is also slightly changed or does not need to change the hardware. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 The block diagram of the programmable online power management system provided by the embodiment of the present application and the schematic diagram of the connection with the managed electronic device are provided;

[0050] Figure 2 The block diagram of the programmable online power management system provided by the embodiment of the present application and the schematic diagram of the connection with the upper computer and the electronic device are provided;

[0051] Figure 3 The flowchart of the online power management system provided by the embodiment of the present application is provided;

[0052] Figure 4 The schematic diagram of the connection between the watchdog counter fed by the watchdog and the electronic device provided by the embodiment of the present application is provided;

[0053] Figure 5 The schematic diagram of the connection between the watchdog counter powered on and the electronic device provided by the embodiment of the present application is provided;

[0054] Figure 6 This is a schematic diagram of the connection between a watchdog counter for dog-feed start and power-on start provided in an embodiment of the present invention and an electronic device;

[0055] Figure 7 A schematic diagram of the logic circuit of the first count enable circuit in the watchdog counter provided in an embodiment of the present invention;

[0056] Figure 8 This is a schematic diagram of the logic circuit of the second count enable circuit in the watchdog counter provided in an embodiment of the present invention. Detailed Implementation

[0057] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Any modifications made without departing from the spirit and scope of the invention are still included within the patent protection scope of the invention. The scope of protection of the present invention is determined by the maximum scope of the innovative features as defined in the claims.

[0058] Figure 1 This is a block diagram illustrating the connection between the programmable online power management system and the managed electronic device, as described in an embodiment of the present invention. Figure 1 . Figure 1 The programmable online power management system includes: a signal conversion module, a data buffer module, a programmable ROM, a feature instruction recognition module, a watchdog counter, and an instruction execution module. The watchdog counter supplies power to the main power supply of the electronic equipment via power leads or performs power-off and restart operations. The instruction execution module connects to the electronic equipment to control several other modules within it (i.e., the controlled objects). Figure 1 (Not shown) is used for operation. Electronic devices are connected to this system via communication cables, meaning this system is externally attached to the completed managed electronic devices and receives data or feature commands from the managed electronic devices via the communication cables. This system does not share a power supply with the managed objects (this system uses power supply 2, and the electronic devices use power supply 1), or it does not share a power supply with the managed electronic devices in parallel, in order to achieve physical power-off and power-on restart of the electronic devices.

[0059] The signal conversion module of the embodiment is used to convert the signal in the communication cable into the information data to be tested, and the converted information data to be tested is stored in the data cache module as cache data for the feature instruction recognition module to recognize. This module can be realized by a common serial-to-parallel circuit. Considering that the electrical characteristics of the signal in part of the communication cable can not match the module, the module also relies on some commonly used integrated circuits on the market, such as the MAX232 integrated circuit commonly used in the RS232 communication protocol. In order to facilitate the storage and recognition of data, the data sent into the data cache module is the data composed of 8-bit bytes. At the same time, in order to improve the efficiency of the feature instruction recognition module, the data transmitted to the data cache module by this module is only the data composed of the data bits of the signal in the communication cable (such as the data bits of RS232), and if the transmission protocol is a self-defined protocol or the transmission protocol has multiple protocol nesting (such as Ethernet), the user needs to match the specific circuit to obtain the required data.

[0060] The data cache module of the embodiment is used to store the cache data from the signal conversion module, and the data cache module includes a FIFO memory. Since the information data to be tested stored does not need to be output outside the system, part of the data ejected from the FIFO memory can be directly discarded. The data (hereinafter referred to as "cache data") in this module is used for the feature instruction recognition module to identify whether there is an instruction (i.e., "feature instruction") required by the user for power management, and a circuit composed of RAM can be used to realize the first-in-first-out function as the FIFO. The storage depth of the data cache module is set by the user, and the depth should be at least longer than the longest feature instruction set by the user.

[0061] The programmable ROM storage of the embodiment includes preset feature instructions and corresponding time parameters (t) and operation instructions, which are provided to the feature instruction recognition module as the basis for comparison and matching and generating operation instructions. Each piece of information stored in the programmable ROM includes the following contents in addition to the preset feature instructions: corresponding time parameters (t) and operation instructions. Among them, only the feature instructions are provided to the feature instruction recognition module for comparison and matching, and the others are respectively read out by the feature instruction recognition module and generate delay operation and operation instructions. That is, only the feature instructions need to be transmitted by the electronic device through the communication cable, and other contents do not need to be transmitted, such as the operation instructions stored in the programmable ROM, which are directly called by the feature instruction recognition module without the need to be transmitted and obtained by the communication cable. This greatly reduces the difficulty of adding the feature instruction set for managing the electronic device in the completed electronic device system.

[0062] The preset feature instruction is used for matching and judging the feature instruction appearing in the cache data. The feature instruction respectively defines the specific management operation to the control object, including the watchdog zero clearing feature instruction (i.e. the dog feeding instruction), the sub-module power on / off instruction, the sub-module power restart instruction, the trigger self-destruction instruction, the hierarchical setting instruction of the current hierarchical limitation power, the I / O switching instruction, etc. t is the time parameter of the delay sending operation instruction. Except that the operation of the dog feeding instruction is to send the dog feeding signal to the watchdog counter by the feature instruction recognition module, the operation of the other feature instructions is finally implemented by respectively operating the control switch quantity of the control object. Therefore, the operation instruction is the information sent to the instruction execution module to execute the control management, respectively containing the operation information to the control object, i.e. the switch quantity address and the switch quantity output type (low level, high level, positive pulse, negative pulse, high resistance signal, etc.). Of course, for different electronic devices, different control objects and different management operations, the feature instruction and the corresponding time parameter and operation instruction stored in the programmable ROM are also different. That is, the content in the programmable ROM is set according to the different electronic devices used by the system.

[0063] Since the system is externally hung on the completed electronic device, the feature instruction stored in the programmable ROM of the embodiment should be composed of the data bytes or byte strings that do not appear on the communication cable (i.e. the data bytes or byte strings not defined in the original system), for example, a certain instruction is composed of the instruction header of the displayable character string "####", which is convenient for the system debugging (monitoring) platform to find and display. When there is no, or it cannot be determined that there is enough redundant data byte on the communication cable to manage the feature instruction set of the electronic device, or in view of the strict system, the feature instruction header can also be composed of "key byte + auxiliary byte". The key byte needs to be selected from the bytes (e.g. non-display character) not used by the system on the communication cable, which is convenient for the feature instruction recognition module to distinguish. In summary, the composition of the feature instruction should not affect the communication function of the completed communication cable.

[0064] The feature instruction recognition module of the embodiment compares the cache data from the data cache module with the preset feature instruction in the programmable ROM in real time, judges whether there is a feature instruction matching the preset feature instruction in the cache data, if there is, judges again whether the feature instruction is the dog feeding instruction. If it is the dog feeding instruction, a dog feeding signal is sent to the watchdog counter to clear it, otherwise, the t and operation instruction corresponding to the feature instruction stored in the ROM are called according to the feature instruction, the operation instruction is sent to the instruction execution module according to t, and if t is 0, the operation instruction is sent immediately.

[0065] The watchdog counter of the embodiment is triggered by the pet command recognized by the characteristic command recognition module to clear the pet signal. After the electronic device and the system are started, the electronic device can send the pet command to wake up the watchdog counter. During normal operation, the pet command is periodically sent to clear the watchdog counter. Otherwise, the watchdog counter will overflow. The watchdog counter overflow will cause the power supply of the electronic device to be restarted. Therefore, if the electronic device does not work normally, the external system cannot send the periodic pet command, and the watchdog counter of the system will restart the power supply of the electronic device. This operation is used to overcome the occasional abnormal phenomenon of the electronic device after working for a period of time, regardless of whether the watchdog of the electronic device is started.

[0066] The watchdog counter of the embodiment is triggered by the pet command recognized by the characteristic command recognition module to clear the pet signal. After the electronic device and the system are started, the electronic device can send the pet command to wake up the watchdog counter. During normal operation, the pet command is periodically sent to clear the watchdog counter. Otherwise, the watchdog counter will overflow. The watchdog counter overflow will cause the power supply of the electronic device to be restarted. Therefore, if the electronic device does not work normally, the external system cannot send the periodic pet command, and the watchdog counter of the system will restart the power supply of the electronic device. This operation is used to overcome the occasional abnormal phenomenon of the electronic device after working for a period of time, regardless of whether the watchdog of the electronic device is started.

[0067] If the watchdog counter "initial count allowed / " pin signal is set to "1", the watchdog counter will not count after receiving the power-on signal of the electronic device. The electronic device needs to send the first pet command to wake up the watchdog counter to start counting. Subsequently, the pet command is periodically sent to clear and count the watchdog counter. Otherwise, the watchdog counter will overflow and restart the power supply of the electronic device.

[0068] The command execution module of the embodiment receives the operation command sent by the characteristic command recognition module, and outputs the operation command to the control object in the electronic device connected thereto in the form of level, pulse, high impedance signal, etc. through the corresponding switch quantity. The specific circuit configuration is determined according to the power supply requirements of the sub-module or other control object requirements managed by the system, for example, the relay is used for the on-off operation of the sub-module power supply.

[0069] Figure 2 For a schematic diagram of the block diagram of the programmable online power management system provided in this embodiment of the invention and its connection with the host computer and electronic devices, please refer to [link / reference]. Figure 2 . Figure 2 The host computer, or managed electronic device, is connected to this system via a communication cable. This means the system is externally attached to the completed host computer and the managed electronic devices. The managed electronic devices on the right include the main power supply (connected and controlled by the system's watchdog counter via a power supply lead), submodule power supplies, self-destruct modules, current-level limiting power supplies, I / O port selection, and other objects requiring control. These are controlled by the system's instruction execution module. Therefore, the system's characteristic instructions include watchdog reset instructions (i.e., watchdog feed instructions), submodule power on / off instructions, submodule power restart instructions, trigger self-destruct instructions, current-level limiting power supply grading settings instructions, and I / O switching instructions. This system does not share a power supply with the managed devices (this system uses power supply 2, and the electronic devices use power supply 1), or it does not share a power supply in parallel with the managed electronic devices to achieve physical power-off and power-on restart of the electronic devices. This system is connected in parallel to the communication cable and receives characteristic instructions from the managed electronic devices through it, without affecting other communication functions that the communication cable may carry out. Therefore, characteristic commands are issued by the managed electronic device to achieve remote online management of the electronic device. The managed electronic device, through characteristic commands, allows the system to perform start / stop and switch-in / switching operations on the submodule power supply and output ports, or activate the self-destruct module, or perform graded current limiting on the power supply (e.g., limiting to 5A or 10A), or select I / O port input / output for the electronic device. If the managed electronic device detects that the managed electronic device is operating normally or abnormally, it issues or does not issue a watchdog command, and the watchdog counter performs a power-off-on-restart operation on the main power supply of the device through the power supply lead. Of course, if the managed electronic device is also connected to a communication cable (similar to...),... Figure 1 If the connection is established, some characteristic commands (such as the dog-feeding command) can also be sent to this system by the managed electronic device.

[0070] other Figure 2 and Figure 1 The identical parts are omitted from the explanation.

[0071] This system is designed to overcome occasional "freezing" phenomena in electronic devices; it itself must not "freeze." To enhance the reliability of this device, it is implemented using an FPGA or CPLD, or with discrete components—that is, entirely using hardware circuitry. This system may not contain a processor, thus avoiding "freezing" phenomena caused by program execution.

[0072] Figure 3 The flow chart of the online power management operation method provided by the embodiment of the present application is shown in Figure 3 The flow of the online power management operation method includes the following steps.

[0073] Step 1. Real-time identification and conversion of digital signals in the communication cable into the data to be measured and storage in the data buffer module.

[0074] Step 2. Real-time detection of whether the data to be measured matches the preset characteristic instructions in the programmable ROM.

[0075] Step 3. If the matching characteristic instructions are detected, the characteristic instructions are further identified as the watchdog feeding instructions, and if yes, the watchdog feeding signal is sent to the watchdog counter and the watchdog counter is cleared, and the step 1 is continued.

[0076] Otherwise, the operation instructions are generated and sent to the instruction execution module according to the instruction format, and if the instructions have a delay time, the operation instructions are sent according to the delay requirement, and the step 1 is continued.

[0077] If the matching characteristic instructions are not detected, the step 1 is continued.

[0078] The embodiment of the present application also provides a watchdog counter which can be used in the programmable online power management system, and specifically comprises the following:

[0079] Figure 4 The watchdog counter started by the watchdog feeding and connected with the electronic device provided by the embodiment of the present application is shown in Figure 4 The watchdog counter started by the watchdog feeding mainly comprises a relay normally closed switch, a relay coil, a relay driving circuit, a WDOG circuit (mainly comprising a counter), a first counting permission circuit, a first power supply (i.e. power supply 1) and a second power supply (i.e. power supply 2). The watchdog counter works independently, so that the electronic device circuit design does not need to be modified. In order to increase the stability of operation, the power supply of the watchdog counter in the embodiment is not shared with the power supply of the electronic device, that is, the electronic device uses the power supply 1 and the watchdog counter uses the power supply 2. The total power supply of the electronic device is connected with the power supply 1 through the power supply lead and the relay normally closed switch, one end of the relay coil is connected with the power supply 2 for supplying power to the watchdog counter, and the other end is connected with the overflow end of the WDOG circuit output through the relay driving circuit. The watchdog feeding signal (i.e. negative pulse "feed dog / ") sent by the characteristic instruction identification module is connected to the zero end of the WDOG circuit and the watchdog feeding end of the first counting permission circuit. The permission end output of the first counting permission circuit is connected to the permission end of the WDOG circuit. The clock end of the WDOG is connected with the counting clock, and the counting clock is provided by the system clock or the oscillation circuit.

[0080] The first power supply and the second power supply can be the same power supply, but the above connection mode makes the watchdog counter and the electronic device not parallel to the same power line and power supply, that is, not parallel to the common power supply.

[0081] Figure 7 The logic circuit schematic diagram of the first count allowing circuit in the watchdog counter provided by the embodiment of the present application is shown in the following figure. Figure 7 The first count allowing circuit is mainly composed of an RS flip-flop U201 and an AND gate U202. The input ends of the AND gate are connected with the initial count allowing end of the first count allowing circuit and the output end of the RS flip-flop respectively, and the output end of the AND gate is used as the allowing end of the first count allowing circuit. Therefore, only when the initial count allowing end is artificially set as a signal "1", the output Q1 of the RS flip-flop is output through the AND gate and then transmitted to the allowing end of the first count allowing circuit, otherwise the allowing end output remains "0". The power-on signal generated by the electronic device is connected to the R end of the RS flip-flop, and the dog-feeding signal generated by the feature instruction recognition module is connected to the S end of the RS flip-flop. The RS flip-flop is designed as a signal maintaining circuit, and the output Q1 thereof is used as the "allowing" ("1" valid) signal, which is finally output through the allowing end of the first count allowing circuit.

[0082] Please refer to Figure 4 and Figure 7 When the initial count allowing end of the first count allowing circuit obtains the artificially preset signal "1", the signal of the RS flip-flop Q1 is allowed to be output from the allowing end of the first count allowing circuit.

[0083] When the electronic device is powered on, the power-on signal (negative pulse) is transmitted to the power-on end of the first count allowing circuit, that is, the R end of the RS flip-flop. The RS flip-flop Q1 outputs and maintains "0", so that the signal output from the allowing end of the first count allowing circuit is "0" to the allowing end of the WDOG circuit, so that the WDOG circuit does not count, the signal output from the overflow end of the WDOG circuit is "0", the relay driving circuit does not work, the normally closed switch of the relay is in a closed state, and the electronic device remains in communication with the power supply 1. This is the initial state.

[0084] Until the dog-feeding signal from the feature instruction recognition module is obtained by the dog-feeding end of the first count allowing circuit, that is, the S end of the RS flip-flop obtains a negative pulse, the RS flip-flop Q1 outputs and maintains "1", so that the signal output from the allowing end of the first count allowing circuit is "1" to the allowing end of the WDOG circuit, the WDOG circuit works and accumulates the count.

[0085] The function of the WDOG circuit is similar to that of a common watchdog circuit (mainly composed of a counter). When the enable terminal is "1", the WDOG circuit counts the count clock. The electronic device working normally outputs the feed dog command within the overflow period of the WDOG circuit, and the characteristic command recognition module sends the feed dog signal. When the WDOG works and the electronic device works normally, the clear terminal of the WDOG circuit obtains the feed dog signal to clear the accumulated count to restart counting, and the overflow terminal of the WDOG circuit maintains output as "0", the relay driving circuit does not work, the relay normally closed switch maintains closed, and the electronic device maintains power on.

[0086] When the WDOG works and the electronic device fails to send the feed dog command, that is, the electronic device "crashes" to cause the characteristic command recognition module to fail to output the feed dog signal, and the clear terminal of the WDOG circuit does not receive the feed dog signal after the WDOG circuit counts to the full, the accumulated count of the WDOG circuit overflows to make the overflow terminal output as "1", that is, a positive pulse signal with a certain period pulse width (to make the electronic device power off sufficiently), so that the relay driving circuit works to control the relay normally closed switch to open, and the electronic device is powered off.

[0087] When the overflow terminal of the WDOG circuit resumes output as "0", the relay driving circuit does not work, the relay normally closed switch is closed, the electronic device is powered on, and the power-on signal is transmitted to the power-on terminal of the first count enable circuit, returning to the initial state.

[0088] The above process realizes that if the electronic device loses control and "crashes" after the feed dog signal starts the watchdog counter, the electronic device is powered off and restarted.

[0089] Figure 5 A power-on start watchdog counter provided for an embodiment of the present application is connected with an electronic device. Compared with Figure 5 and Figure 4 , a power-on start watchdog counter Figure 5 , except that the second count enable circuit replaces the first count enable circuit, the other parts are similar to the feed dog start watchdog counter Figure 4 described above, and thus the description is omitted.

[0090] Figure 8 A logic circuit schematic diagram of the second count enable circuit in the watchdog counter provided for an embodiment of the present application. Please refer to Figure 8The second counting permission circuit is mainly composed of a plurality of gate circuits (U301, U303-U306), a D flip-flop U302 and a second RS flip-flop U307. The D flip-flop U302 is designed as a counter which counts once and then locks and no longer counts (Q2 / AND, Q2 is shielded from the CK pulse signal through an OR gate U301). The second RS flip-flop U307 is designed as a signal maintaining circuit, and its output Q3 is used as the "permission" signal ("1" is valid). The function of the AND gate U306 is that only when the initial counting permission terminal is manually set to a signal "0", the output Q3 of the second RS flip-flop is output through the AND gate U306 and transmitted to the permission terminal output of the second counting permission circuit, otherwise the permission terminal output remains "0".

[0091] Please refer to Figure 5 and Figure 8 When the initial counting permission terminal of the second counting permission circuit obtains the manually preset signal "0", the signal of the second RS flip-flop Q3 is output to the permission terminal of the second counting permission circuit.

[0092] When the electronic device is powered on, a power-on signal (negative pulse) is transmitted to the power-on terminal of the second counting permission circuit, so that the D flip-flop Q2 is set to "0" and the second RS flip-flop Q3 is set to "1", and the signal of the permission terminal output Q3 of the second counting permission circuit is "1" to the permission terminal of the WDOG circuit, so that the WDOG circuit works and accumulates the count of the counting clock. When the WDOG circuit does not overflow, the overflow terminal outputs a signal "0", and the relay driving circuit does not work, and the normally closed switch of the relay keeps the electronic device in communication with the power supply 1. This is the initial state.

[0093] When the WDOG works and the electronic device works normally, the zero terminal of the WDOG circuit obtains the feed dog signal (negative pulse) from the feature instruction recognition module to clear the accumulated count to restart counting, and the overflow terminal of the WDOG circuit maintains the output "0", so that the relay driving circuit does not work, the normally closed switch of the relay maintains closed, and the electronic device maintains powered on.

[0094] The feeding dog end of the second counting permission circuit obtains the feeding dog signal. If it is the first time to obtain the feeding dog signal, the feeding dog signal cannot make the second RS flip-flop Q3 be "1" through the or gate U304 with the Q2 / phase or, but only can make the second RS flip-flop Q3 be "0" through the or gate U303 with the Q2 phase or; at the same time, the feeding dog signal rising edge makes the D flip-flop count once (Q2 / connects D) and locks Q2 as "1" (that is, the "1" of Q2 makes the D flip-flop CK end no longer accept the feeding dog signal through the or gate U301); the comprehensive effect is that the D flip-flop Q2 is locked as "1" and the second RS flip-flop Q3 is "0". After the second RS flip-flop Q3 is "0", the Q3 signal of the second counting permission circuit is "0" to the permission end of the WDOG circuit, so that the WDOG circuit does not count, the overflow end of the WDOG circuit outputs the signal as "0", the relay driving circuit does not work, and the normally closed switch of the relay is closed, so that the electronic equipment keeps in communication with the power supply 1.

[0095] Until the feeding dog end of the second counting permission circuit obtains the second and subsequent feeding dog signals, the feeding dog signal cannot make the second RS flip-flop Q3 be "0" through the or gate U303 with the Q2 phase or, but only can make the second RS flip-flop Q3 be "1" and remain through the or gate U304 with the Q2 / phase or; the comprehensive effect is that the D flip-flop Q2 maintains "1" and the second RS flip-flop Q3 is "1". The second RS flip-flop Q3 is "1", so that the Q3 signal of the second counting permission circuit is "1" to the permission end of the WDOG circuit, the WDOG circuit works, and the counting clock is accumulated.

[0096] When the WDOG works and the electronic equipment loses control and does not send the feeding dog signal, the WDOG circuit accumulates the count overflow, so that the overflow end outputs "1", that is, a positive pulse signal with a certain period pulse width, so that the relay driving circuit works to control the normally closed switch of the relay to be opened, and the electronic equipment is powered off.

[0097] When the overflow end of the WDOG circuit restores the output as "0", the relay driving circuit does not work, the normally closed switch of the relay is closed, the electronic equipment is powered on on the power supply 1, and the power-on signal is transmitted to the power-on end of the second counting permission circuit, so as to return to the initial state.

[0098] The above process realizes that after the watchdog counter is started by the power-on signal or the feeding dog signal, if the electronic equipment loses control and "crashes", the electronic equipment is powered off and restarted.

[0099] Figure 6 A watchdog counter started by feeding dog and power-on is provided for the embodiment of the application. Please refer to Figure 6 Comparison Figure 4 and Figure 5This watchdog counter is a combination of the watchdog counter started by feeding dog and the watchdog counter started by power-on, and is used for the convenience of the two alternatives. This watchdog counter is mainly composed of a relay normally closed switch, a relay coil, a relay drive circuit, a WDOG circuit (mainly composed of a counter), a first counting permission circuit and a second counting permission circuit, an OR gate, a first power supply and a second power supply. The connection and function of each component are similar to the above-mentioned watchdog counter started by feeding dog and the watchdog counter started by power-on, except that the permission signals outputted by the first counting permission circuit and the second counting permission circuit are combined by the OR gate and outputted to the permission end of the WDOG circuit, and thus the description is omitted.

[0100] Please refer to Figure 6 and Figure 7 When the initial counting permission end acquires the artificial preset signal as "1", only the signal outputted by the permission end of the first counting permission circuit is allowed to trigger the Q1 of the RS flip-flop, and the output of the permission end of the second counting permission circuit remains "0". At this time, the working process of the watchdog counter is the same as the above-mentioned watchdog counter started by feeding dog, and thus the description is omitted.

[0101] Please refer to Figure 6 and Figure 8 When the initial counting permission end acquires the artificial preset signal as "0", only the signal outputted by the permission end of the second counting permission circuit is allowed to trigger the Q3 of the second RS flip-flop, and the output of the permission end of the first counting permission circuit remains "0". At this time, the working process of the watchdog counter is the same as the above-mentioned watchdog counter started by power-on, and thus the description is omitted.

[0102] The programmable on-line power management system and watchdog counter of the present application have the following advantages: The system of the present application enables the host computer to operate the electronic device on-line by operating instructions, such as turning on / off the power supply of the sub-module, enabling the self-destroying module, setting the current grading limit power supply or I / O port selection, etc. The system of the present application can be externally connected to the electronic device as an independent unit by means of a communication cable, without sharing the power supply with the electronic device or being connected in parallel with the power supply, and has little or no need to change the hardware of the electronic device. When the system and the watchdog counter of the present application detect that the electronic device is "dead", they directly implement physical power-off, power-on restart, and simulate manual power-on restart, which can effectively overcome the "dead" failure of the electronic device on-line. Furthermore, the watchdog counter provides two working mode selections by means of the artificially preset "initial count permission" signal, i.e. feeding the watchdog or power-on starting the watchdog (including feeding the watchdog). The former enables the user to flexibly control the timing of starting the watchdog, and the latter is used to overcome the phenomenon that the electronic device may not be able to start normal work after power-on on the basis of the former. Since the watchdog counter itself is composed of a simple pure hardware circuit, it is ensured that the watchdog counter itself can almost stably operate without the "dead" phenomenon. In addition, if the feeding signal is sent by the electronic device, the watchdog counter can also be externally connected to the electronic device as an independent unit to overcome the "dead" failure.

Claims

1. A watchdog counter activated by feeding the dog, characterized in that, The watchdog counter includes a normally closed relay switch, a relay coil, a relay drive circuit, a WDOG circuit, a first count enable circuit, a first power supply, and a second power supply. The electronic device is connected to the first power supply via a normally closed relay switch. One end of the relay coil is connected to the second power supply that powers the watchdog counter, and the other end is connected to the overflow terminal of the WDOG circuit via a relay drive circuit. The clear terminal of the WDOG circuit is connected to the feed terminal of the first counting enable circuit. The enable terminal output of the first counting enable circuit is connected to the enable terminal of the WDOG circuit. When the initial count enable terminal of the first count enable circuit receives a preset signal of "1", the enable terminal of the first count enable circuit is allowed to output the signal "1". When the electronic device is powered on, it generates a power-on signal that is transmitted to the power-on terminal of the first counting enable circuit. This causes the enable terminal of the first counting enable circuit to output a signal of "0" to the enable terminal of the WDOG circuit. The WDOG circuit does not work, and the overflow terminal of the WDOG circuit outputs a signal of "0". The normally closed relay switch remains closed, connecting the electronic device to the first power supply. This continues until the dog-feeding terminal of the first counting enable circuit receives a dog-feeding signal, causing the enable terminal of the first counting enable circuit to output a signal of "1" to the enable terminal of the WDOG circuit. The WDOG circuit then receives the counting clock and accumulates the count. When the WDOG circuit is working and the electronic device is working normally, the clear terminal of the WDOG circuit receives the dog feed signal to clear the accumulated count to start counting again. The overflow terminal of the WDOG circuit maintains the output of "0", and the normally closed relay switch remains closed, so that the electronic device is connected to the first power supply. When the WDOG circuit is working and the electronic device malfunctions, causing it to fail to send a dog-feeding signal, the WDOG circuit's cumulative count overflows, causing the overflow terminal of the WDOG circuit to output "1". This activates the relay drive circuit, which controls the normally closed relay switch to open, thus powering off the electronic device. When the overflow terminal of the WDOG circuit returns to "0", the normally closed relay switch closes, the electronic device is powered on, and a power-on signal is generated and transmitted to the power-on terminal of the first counting enable circuit.

2. A power-on start-up watchdog counter, characterized in that, The watchdog counter includes a normally closed relay switch, a relay coil, a relay drive circuit, a WDOG circuit, a second count enable circuit, a first power supply, and a second power supply. The electronic device is connected to the first power supply via a normally closed relay switch. One end of the relay coil is connected to the second power supply that powers the watchdog counter, and the other end is connected to the overflow terminal of the WDOG circuit via a relay drive circuit. The clear terminal of the WDOG circuit is connected to the feed terminal of the second count enable circuit. The enable terminal output of the second count enable circuit is connected to the enable terminal of the WDOG circuit. When the initial count enable terminal of the second count enable circuit receives a preset signal of "0", the enable terminal of the second count enable circuit is allowed to output a signal of "1". When the electronic device is powered on, it generates a power-on signal that is transmitted to the power-on terminal of the second counting enable circuit. This causes the enable terminal of the second counting enable circuit to output a signal of "1" to the enable terminal of the WDOG circuit. The WDOG circuit then operates and acquires the counting clock to accumulate counts. The overflow terminal of the WDOG circuit maintains an output signal of "0", and the normally closed relay switch remains closed, connecting the electronic device to the first power supply. When the WDOG circuit is working and the electronic device is working normally, the WDOG circuit's clear terminal receives a feed signal to clear the accumulated count and restart counting. The WDOG circuit's overflow terminal maintains an output of "0", the normally closed relay switch remains closed, and the electronic device remains powered on. At the same time, the second count enable circuit's feed signal receives a feed signal. If it is the first time it receives a feed signal, the second count enable circuit's enable terminal outputs a signal of "0" which is transmitted to the WDOG circuit's enable terminal. The WDOG circuit does not work, and the WDOG circuit's overflow terminal outputs a signal of "0" until the second count enable circuit's feed signal receives a second and subsequent feed signals, causing the second count enable circuit's enable terminal to output a signal of "1" which is transmitted to the WDOG circuit's enable terminal, thus enabling the WDOG circuit to work. When the WDOG circuit is working and the electronic device malfunctions, causing it to fail to send a dog-feeding signal, the WDOG circuit's cumulative count overflows, causing the overflow terminal of the WDOG circuit to output "1". This activates the relay drive circuit, which controls the normally closed relay switch to open, thus powering off the electronic device. When the overflow terminal of the WDOG circuit returns to "0", the normally closed relay switch closes, the electronic device is powered on, and a power-on signal is generated and transmitted to the power-on terminal of the second counting enable circuit.

3. A watchdog counter that is activated by dog ​​feeding and power-on, characterized in that, The watchdog counter includes a normally closed relay switch, a relay coil, a relay drive circuit, a WDOG circuit, a first count enable circuit and a second count enable circuit, an OR gate, a first power supply and a second power supply. The electronic device is connected to the first power supply via a normally closed relay switch. One end of the relay coil is connected to the second power supply that powers the watchdog counter, and the other end is connected to the overflow terminal of the WDOG circuit output via a relay drive circuit. The clear terminal of the WDOG circuit is connected to the feed terminal of the first and second count enable circuits, respectively. The enable terminals of the first and second count enable circuits are connected to the input terminal of an OR gate, and the output terminal of the OR gate is connected to the enable terminal of the WDOG circuit. The power-on terminal of the first count enable circuit is connected to the power-on terminal of the second count enable circuit, and the initial count enable terminal of the first count enable circuit is connected to the initial count enable terminal of the second count enable circuit. When the initial count enable terminal of the first count enable circuit receives a preset signal of "1", only the enable terminal of the first count enable circuit is allowed to output a signal of "1". When the electronic device is powered on, the electronic device generates a power-on signal and transmits it to the power-on terminal of the first count enable circuit, causing the enable terminal of the first count enable circuit to output a signal of "0" to the enable terminal of the WDOG circuit. The WDOG circuit does not work, and the overflow terminal of the WDOG circuit outputs a signal of "0". The normally closed relay switch connects the electronic device to the first power supply until the watchdog terminal of the first count enable circuit receives a watchdog signal, causing the enable terminal of the first count enable circuit to output a signal of "1" to the enable terminal of the WDOG circuit. The WDOG circuit then works and acquires the count signal. The clock accumulates the count. When the WDOG circuit is working and the electronic device is functioning normally, the clear terminal of the WDOG circuit receives a feed signal to clear the accumulated count to restart counting. The overflow terminal of the WDOG circuit maintains an output of "0", the normally closed relay switch remains closed, and the electronic device remains powered on. When the WDOG circuit is working and the electronic device malfunctions, causing it to fail to generate a feed signal, the accumulated count of the WDOG circuit overflows, causing its overflow terminal to output "1". This activates the relay drive circuit, controlling the normally closed relay switch to open, and the electronic device is powered off. When the overflow terminal of the WDOG circuit returns to an output of "0", the normally closed relay switch closes, the electronic device is powered on, and a power-on signal is generated and transmitted to the power-on terminal of the first counting enable circuit. When the initial count enable terminal receives a preset signal of "0", only the enable terminal of the second count enable circuit is allowed to output a signal of "1". When the electronic device is powered on, a power-on signal is generated and transmitted to the power-on terminal of the second count enable circuit, causing the enable terminal of the second count enable circuit to output a signal of "1" to the enable terminal of the WDOG circuit. The WDOG circuit then operates, acquiring the counting clock and accumulating the count. When the WDOG circuit count has not overflowed, the overflow terminal outputs a signal of "0", the normally closed relay switch remains closed, and the electronic device is connected to the first power supply. When the WDOG circuit is operating and the electronic device is working normally, the clear terminal of the WDOG circuit receives a watchdog signal to clear the accumulated count to restart counting. The overflow terminal of the WDOG circuit maintains an output of "0", the normally closed relay switch remains closed, and the electronic device remains powered on. Simultaneously, the watchdog terminal of the second count enable circuit... When a dog feed signal is received, if it is the first time, the enable terminal of the second counting enable circuit outputs a signal of "0" to the enable terminal of the WDOG circuit. The WDOG circuit does not work, and its overflow terminal outputs a signal of "0" until the dog feed terminal of the second counting enable circuit receives a second and subsequent dog feed signal. This causes the enable terminal of the second counting enable circuit to output a signal of "1" to the enable terminal of the WDOG circuit, and the WDOG circuit works. When the WDOG circuit works and the electronic device malfunctions, causing it to fail to send a dog feed signal, the WDOG circuit accumulates a count and overflows, causing its overflow terminal to output a signal of "1". This causes the relay drive circuit to work, controlling the normally closed switch of the relay to open, and the electronic device to power off. When the overflow terminal of the WDOG circuit returns to outputting a signal of "0", the normally closed switch of the relay closes, the electronic device powers on, and a power-on signal is generated and transmitted to the power-on terminal of the second counting enable circuit.

4. The watchdog counter as described in claim 1 or 3, characterized in that, The first counting enable circuit includes an AND gate and an RS flip-flop; the initial counting enable terminal of the first counting enable circuit and the output terminal of the RS flip-flop are respectively connected to the input terminal of the AND gate, and the output terminal of the AND gate serves as the enable terminal of the first counting enable circuit; only when the initial counting enable terminal of the first counting enable circuit acquires a signal of "1", the output of the RS flip-flop is output through the AND gate and transmitted to the enable terminal of the WDOG circuit. When the R terminal of the RS flip-flop receives a power-on signal of "0" from the electronic device, the output of the RS flip-flop is "0", which is transmitted to the enable terminal of the WDOG circuit to prevent the WDOG circuit from counting. When the electronic device is working normally, the S terminal of the RS flip-flop receives a dog-feed signal, the output of the RS flip-flop is "1", which is transmitted to the enable terminal of the WDOG circuit to enable the WDOG circuit to count.

5. The watchdog counter as described in claim 2 or 3, characterized in that, The second counting enable circuit includes multiple gate circuits, a D flip-flop that is locked after counting once, and a second RS flip-flop; the output of the second RS flip-flop is allowed to be transmitted to the enable terminal of the WDOG circuit only when the initial counting enable terminal of the second counting enable circuit receives a signal of "0"; When the power-on terminal of the second counting enable circuit receives a power-on signal, the gate circuit, D flip-flop, and second RS flip-flop of the second counting enable circuit interact with each other. The D flip-flop is set to "0", the second RS flip-flop is set to "1", and the enable terminal of the second counting enable circuit outputs "1", which is transmitted to the enable terminal of the WDOG circuit to enable the WDOG circuit to count. When the dog feed terminal of the second count enable circuit receives the first dog feed signal caused by the normal operation of the electronic device, the gate circuit, D flip-flop and the second RS flip-flop of the second count enable circuit interact with each other. The D flip-flop counts once and is locked to "1", the second RS flip-flop is set to "0", the enable terminal of the second count enable circuit outputs "0", and transmits it to the enable terminal of the WDOG circuit to prevent the WDOG circuit from counting. When the dog feed terminal of the second count enable circuit receives the second and subsequent dog feed signals caused by the normal operation of the electronic device, the gate circuit, D flip-flop and the second RS flip-flop of the second count enable circuit interact with each other. The D flip-flop remains "1" and the second RS flip-flop is set to "1". The enable terminal of the second count enable circuit outputs "1" and transmits it to the enable terminal of the WDOG circuit to enable the WDOG circuit to count.

6. The watchdog counter as described in any one of claims 1 to 3, characterized in that, The first power supply and the second power supply are the same power supply.

7. A programmable online power management system, characterized in that, The watchdog counter as described in any one of claims 1-3 is used to power off and restart the power supply of a runaway electronic device. The programmable online power management system is used to control the total power supply and the controlled object in the electronic device, and includes the following steps: The signal conversion module acquires digital signals from electronic devices via communication cables and converts them into test information data that can be recognized by the feature instruction recognition module; The data caching module acquires the test information data from the signal conversion module and stores it as cache data. Programmable ROM is used to store preset feature instructions and corresponding operation instructions. The feature instruction recognition module acquires cached data from the data cache module and preset feature instructions from the programmable ROM. It then checks whether there is a feature instruction in the cached data that matches the preset feature instruction in the order of acquisition. If there is, it checks whether the feature instruction is the watchdog instruction in the preset feature instructions. If so, it transmits the watchdog signal corresponding to the watchdog instruction to the watchdog counter. If it is not a dog-feeding command, then match the corresponding preset feature command according to the cached data, retrieve the corresponding operation command stored in the ROM, and transmit the operation command to the command execution module; The watchdog counter receives the power-on signal from the electronic device and the feed signal from the feature instruction recognition module, and executes the watchdog counter to count or clear it accordingly. If the count overflows, the power supply to the electronic device is cut off and restarted. The instruction execution module of the control object is connected to obtain operation instructions from the feature instruction recognition module, and the control object is operated according to the operation instructions.

8. The programmable online power management system as described in claim 7, characterized in that, The watchdog counter also includes an "initial count enable / " pin signal. If the pin signal is "0", the watchdog counter will start counting after obtaining the power-on signal. The first feed command identified by the feature instruction recognition module will reset the count to zero and stop the watchdog counter. Subsequent feed commands will wake it up, reset it to zero, and restart the counting. If the pin signal is "1", the watchdog counter will not count after receiving the power-on signal. The first feed instruction will wake up the watchdog counter and start counting. Subsequent feed instructions will clear the watchdog counter and restart the counting.

9. The programmable online power management system as described in claim 7, characterized in that, The data caching module stores the test information data in the order sent by the signal conversion module, and the cached data corresponding to the test information data is ejected from the data caching module after being processed by the feature instruction recognition module.

10. The programmable online power management system as described in claim 7, characterized in that, The preset feature instruction also includes a key byte and auxiliary bytes, and only the preset feature instruction is transmitted by the communication cable to reduce the impact on the communication cable.

Citation Information

Patent Citations

  • Watchdog control circuit, electronic equipment and watchdog control method

    CN113791927A

  • Control method and device for remote restart of ground equipment and remote restart equipment

    CN114291133A

  • FPGA control protection circuit and power supply control protection device

    CN117728664A

  • Multi-path power supply control method and device

    CN118113125A

  • Watchdog feeding state monitoring method and device

    CN118747131A