Watchdog counter
By separating the power supply of the watchdog counter from that of the electronic device and using a relay drive circuit and a counter enable circuit to control the power failure and restart of the electronic device, the problem of electronic device crashes is solved, and the effects of automatic restart and reduced hardware modifications are achieved.
Patent Information
- Application Number
- CN202423124370.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2034-12-17
AI Technical Summary
Electronic devices may freeze after operating for a period of time. The built-in watchdog may not start or may start but fail to restore normal operation. External manual restart is required, and modifying the hardware design may increase costs or have poor results.
An independent watchdog counter is used, which is controlled in conjunction with the WDOG circuit through a relay drive circuit and a counting enable circuit to achieve power-off restart of runaway electronic equipment. The counter does not share a power supply with the electronic equipment and provides two modes: feed-the-dog start and power-on start.
It enables automatic restart of runaway electronic devices, eliminating the need for external manual restart, reducing the cost and complexity of hardware modifications, and improving the reliability and stability of the devices.
Smart Images

Figure CN223681059U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model relates to power control technical field, concretely relates to a watchdog counter. BACKGROUND
[0002] At present, some electronic devices need to solve the following pain points: 1. The electronic device does not work normally after a period of time, the watchdog of the electronic device does not start, and the electronic device must be restarted manually (physical power off, power on, power on) to work normally. 2. The electronic device does not work normally after a period of time, the watchdog of the electronic device starts but still cannot make the electronic device work normally, and the electronic device must be restarted manually to work normally. 3. The electronic device cannot start normally after power on, and must be restarted manually or restarted several times to work normally.
[0003] The above fault phenomenon is commonly known as "dead machine", which occasionally occurs in system operation, and it is difficult to reproduce and find the fault reason to troubleshoot. Once it happens, the consequences are serious.
[0004] Usually, the watchdog circuit and the electronic device are connected in parallel and share the power supply. After the electronic device enters an abnormal state, it can partially restart the electronic device, such as restarting by the RESET signal, but it cannot physically power off and restart the electronic device. Chinese patent document CN202111106926 "watchdog control circuit, electronic device and watchdog control method", adds selection, self-locking, three-state output control modules to the usual watchdog circuit, the purpose is to "disable the watchdog" when "programming, debugging or power on". And in this scheme, the watchdog circuit and the electronic device are still connected in parallel and share the power supply, and cannot physically power off and restart the electronic device. If the electronic device needs to be restarted and the electronic device continues to feed the watchdog, that is, the watchdog of the electronic device does not start, such a watchdog circuit cannot work, and the designer must modify the electronic device 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 electronic device has reached some design stage and cannot be modified extensively, or the reason for the watchdog not starting cannot be found and the modification is not effective or the modification is not effective.
[0005] Chinese patent document CN114291133A, entitled "Control Method and Apparatus for Remote Restart of Ground Equipment, Remote Restart Equipment," proposes a solution for a remote restart device. While it can send commands to the remote equipment to restart it according to user needs, it requires the remote equipment to repeatedly receive and confirm the restart commands, waiting for identical commands or a "two out of three" match before restarting the "ground equipment." If the remote equipment malfunctions, it cannot repeatedly receive confirmations and restart, making it unsuitable for urgent restarts. Furthermore, this technical solution still cannot promptly overcome the pain points mentioned in points 1 to 3 above concerning the command-issuing device, the remote equipment, or the "ground equipment."
[0006] Therefore, there is a strong demand in the industry for further improvements in the power control or management of electronic devices. Utility Model Content
[0007] The technical problem that this utility model needs to solve is:
[0008] 1. After working for a period of time, the electronic device malfunctions. The built-in watchdog timer of the electronic device does not start. It can only work normally after the electronic device is manually restarted externally (physical power off, power on and then off, power on).
[0009] 2. After working for a period of time, the electronic device malfunctions. The built-in watchdog timer of the electronic device is activated, but it still cannot make the electronic device work normally. It can only work normally after the electronic device is manually restarted externally.
[0010] 3. Electronic devices fail to start and work properly after being powered on, and can only work properly after being manually restarted or restarted several times.
[0011] 4. When electronic devices exhibit the aforementioned phenomena, designers must modify the device design to enable the watchdog circuit to handle this situation, incurring additional costs. In some cases, modifications may be unsuccessful or ineffective, such as when the electronic device has reached certain design stages where significant hardware modifications are not feasible, or when the cause of the watchdog's failure to activate cannot be identified, making targeted modifications impossible or ineffective even after modification.
[0012] To solve the above-mentioned technical problems, the first technical solution of this utility model provides a watchdog counter that is started by feeding the dog, which is used to power off and restart the power supply of an out-of-control electronic device. The watchdog counter includes a normally closed relay switch, a relay coil, a relay drive circuit, a WDOG circuit, a first counting enable circuit, a first power supply and a second power supply.
[0013] The electronic device is connected with a first power supply through a relay normally closed switch, one end of a relay coil is connected with a second power supply for supplying power to a watchdog counter, and the other end is connected with an overflow end of a WDOG circuit output through a relay drive circuit; a clear end of the WDOG circuit is connected with a feed end of a first counting permission circuit; and an enable end of the first counting permission circuit is connected with an enable end of the WDOG circuit.
[0014] When the initial counting permission end of the first counting permission circuit obtains a preset signal "1", the enable end of the first counting permission circuit outputs a signal "1";
[0015] When the electronic device is powered on, a power-on signal is generated and transmitted to the power-on end of the first counting permission circuit, so that the enable end of the first counting permission circuit outputs a signal "0" to the enable end of the WDOG circuit, the WDOG circuit does not work, the overflow end of the WDOG circuit outputs a signal "0", the relay drive circuit does not work, and the relay normally closed switch makes the electronic device communicate with the first power supply; until the feed end of the first counting permission circuit obtains a feed signal from the electronic device, the enable end of the first counting permission circuit outputs a signal "1" to the enable end of the WDOG circuit, the WDOG circuit works, and accumulates the count of the counting clock;
[0016] When the WDOG works and the electronic device works normally, the clear end of the WDOG circuit obtains a feed signal from the electronic device to clear the accumulated count to restart counting, the overflow end of the WDOG circuit maintains outputting "0", the relay drive circuit does not work, the relay normally closed switch maintains closing, and the electronic device maintains being powered on;
[0017] When the WDOG works and the electronic device loses control to cause the feed signal not to be sent out, the WDOG circuit accumulates the count to overflow, so that the overflow end outputs "1", the relay drive circuit works to control the relay normally closed switch to be opened, and the electronic device is powered off;
[0018] When the overflow end of the WDOG circuit restores outputting "0", the relay normally closed switch is closed, the electronic device is powered on, and a power-on signal is generated and transmitted to the power-on end of the first counting permission circuit.
[0019] The second technical scheme of the utility model provides a watchdog counter of power-on starting, which is used for power-off restart of power supply of the electronic device losing control, the watchdog counter includes 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;
[0020] 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 feed end of the second counting permission circuit; the permission end output of the second counting permission circuit is connected with the permission end of the WDOG circuit;
[0021] When the initial counting permission end of the second counting permission circuit acquires the artificial preset signal as "0", the permission end output signal of the second counting permission circuit is "1";
[0022] When the electronic device is powered on, the power-on signal is transmitted to the power-on end of the second counting permission circuit, so that the permission end output 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 accumulates the count; when the WDOG circuit count does not overflow, the overflow end output signal is "0", the relay drive circuit does not work, and the relay normally closed switch makes the electronic device communicate with the first power supply;
[0023] When the WDOG works and the electronic device works normally, the clear end of the WDOG circuit acquires the feed signal from the electronic device to clear the accumulated count to restart counting, the overflow end of the WDOG circuit maintains the output as "0", the relay drive circuit does not work, the relay normally closed switch maintains closed, and the electronic device maintains power on; at the same time, the feed end of the second counting permission circuit acquires the feed signal, if it is the first acquisition, the permission end output signal of the second counting permission circuit is "0" to the permission end of the WDOG circuit, the WDOG circuit does not work and its overflow end output signal is "0", until the feed end of the second counting permission circuit acquires the second and subsequent feed signals, the permission end output signal of the second counting permission circuit is "1" to the permission end of the WDOG circuit, and the WDOG circuit works.
[0024] When the WDOG works and the electronic device loses control to cause no feed signal, 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 be opened, and the electronic device is powered off;
[0025] When the overflow end of the WDOG circuit restores the output as "0", the relay normally closed switch is closed, the electronic device is powered on, and the power-on signal is transmitted to the power-on end of the second counting permission circuit.
[0026] The third technical scheme of the utility model provides a watchdog counter of dog feeding start and power-on start, which is used for power-off restart of power supply of out-of-control electronic equipment, 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;
[0027] The electronic equipment 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 power supply of 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 dog feeding 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, 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;
[0028] When the initial counting permission end obtains the artificial preset signal as "1", only the permission end of the first counting permission circuit is allowed to output the signal "1"; when the electronic equipment is powered on, the power-on signal is transmitted to the power-on end of the first counting permission circuit, 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 drive circuit does not work, and the relay normally closed switch makes the electronic equipment communicate with the first power supply; until the dog feeding signal from the electronic equipment is obtained by the dog feeding end of the first counting permission circuit, 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 when obtaining the counting clock; when the WDOG works and the electronic equipment works normally, the clear end of the WDOG circuit obtains the dog feeding signal from the electronic equipment to clear the accumulated count to restart the counting, the overflow end of the WDOG circuit maintains the output as "0", the relay drive circuit does not work, the relay normally closed switch maintains the closing, and the electronic equipment maintains the power-on; when the WDOG works and the electronic equipment loses control to cause the dog feeding signal not to be sent out, the overflow end of the WDOG circuit outputs "1" due to the overflow of the accumulated count of the WDOG circuit, the relay drive circuit works to control the relay normally closed switch to be disconnected, and the electronic equipment is powered off; when the overflow end of the WDOG circuit restores the output as "0", the relay normally closed switch is closed, the electronic equipment is powered on, and the power-on signal is transmitted to the power-on end of the first counting permission circuit;
[0029] When the initial counting permission end obtains the artificial preset signal as "0", only the second counting permission circuit allows the end to 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 counting permission circuit, so that the permission end of the second counting permission circuit outputs signal "1" to the permission end of the WDOG circuit, the WDOG circuit works, and the counting clock accumulates the count; when the WDOG circuit count does not overflow, the overflow end outputs signal "0", the relay driving circuit does not work, and the relay normally closed switch makes the electronic device communicate with the first power supply; when the WDOG works and the electronic device works normally, the zero end of the WDOG circuit obtains the dog feeding signal from the electronic device to clear the accumulated count to restart counting, the overflow end 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; at the same time, the dog feeding end of the second counting permission circuit obtains the dog feeding signal, if it is the first time to obtain, the permission end of the second counting permission circuit outputs signal "0" to the permission end of the WDOG circuit, the WDOG circuit does not work and its overflow end outputs signal "0", until the dog feeding end of the second counting permission circuit obtains the second and subsequent dog feeding signals, the permission end of the second counting permission circuit outputs signal "1" to the permission end of the WDOG circuit, and the WDOG circuit works. When the WDOG works and the electronic device loses control to cause the dog feeding signal not to be sent out, the WDOG circuit accumulates the count overflow to make its overflow end output "1", so that the relay driving circuit works to control the relay normally closed switch to be opened, and the electronic device is powered off; when the overflow end of the WDOG circuit restores the output as "0", the relay normally closed 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 second counting permission circuit.
[0030] Preferably, the first counting permission circuit comprises an AND gate and an RS flip-flop; the initial counting permission end of the first counting permission circuit and the output end of the RS flip-flop are respectively connected to the input ends of the AND gate, and the output end of the AND gate is used as the permission end of the first counting permission circuit; only when the initial counting permission end of the first counting permission circuit obtains signal "1", the output of the RS flip-flop is output through the AND gate and transmitted to the permission end of the WDOG circuit;
[0031] When the R end of the RS flip-flop obtains the power-on signal from the electronic device as "0", the output of the RS flip-flop is "0" and is transmitted to the permission 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 dog feeding signal from the electronic device, the output of the RS flip-flop is "1", and is transmitted to the permission end of the WDOG circuit to allow the WDOG circuit to count.
[0032] Preferably, the second counting permission circuit comprises a plurality of gate circuits, a D flip-flop with one-time 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;
[0033] 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", and the output of the permission end of the second counting permission circuit is "1", which is transmitted to the permission end of the WDOG circuit to allow the WDOG circuit to count;
[0034] When the second counting permission circuit receives a first feeding dog signal output by the normal working 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", and the output of the permission end of the second counting permission circuit is "0", which is transmitted to the permission end of the WDOG circuit to make the WDOG circuit not count;
[0035] When the second counting permission circuit receives a second and subsequent feeding dog signal output by the normal working 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 as "1", the second RS flip-flop is set to "1", and the output of the permission end of the second counting permission circuit is "1", which is transmitted to the permission end of the WDOG circuit to allow the WDOG circuit to count.
[0036] Preferably, the first power supply and the second power supply are the same power supply.
[0037] The watchdog counter provided by the technical scheme of the utility model does not share a power supply or a parallel power supply with a management object electronic device, and controls counting through the first counting permission circuit and / or the second counting permission circuit in combination with the WDOG circuit; when the electronic device loses control and cannot send a feeding dog instruction to clear the count of the WDOG circuit, causing overflow, the relay driving circuit drives the relay to make the electronic device power off and then power on and start, thereby realizing restart control of the out-of-control electronic device and solving the problem that the out-of-control electronic device must be restarted manually. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 A feeding dog started watchdog counter provided by the utility model embodiment and an electronic device are connected as shown in the schematic view;
[0039] Figure 2 A power-on started watchdog counter provided by the utility model embodiment and an electronic device are connected as shown in the schematic view;
[0040] Figure 3 A watchdog counter and electronic equipment connection schematic diagram provided by the utility model for an embodiment is fed to a dog;
[0041] Figure 4 A logic circuit schematic diagram of a first counting permission circuit in the watchdog counter provided by the utility model for an embodiment is fed to a dog;
[0042] Figure 5 A logic circuit schematic diagram of a second counting permission circuit in the watchdog counter provided by the utility model for an embodiment is fed to a dog. DETAILED DESCRIPTION
[0043] The utility model is further described below in combination with specific embodiments. It should be understood that these embodiments are only used for illustrating the utility model and are not used for limiting the scope of the utility model. In addition, it should be understood that after reading the content taught by the utility model, those skilled in the art can make various changes or modifications to the utility model, and these equivalent forms also fall within the scope defined by the appended claims of the present application.
[0044] Figure 1 A watchdog counter and electronic equipment connection schematic diagram provided by the utility model for an embodiment is fed to a dog; Figure 1 A watchdog counter fed to a dog, mainly comprising a relay normally closed switch, a relay coil, a relay drive circuit, a WDOG circuit (mainly comprising a counter), a first counting permission circuit, a first power supply (namely power supply 1) and a second power supply (namely power supply 2). The watchdog counter works independently, so that the electronic equipment 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 equipment, that is, the electronic equipment uses power supply 1, and the watchdog counter uses power supply 2. The electronic equipment is connected with power supply 1 through the relay normally closed switch, one end of the relay coil is connected with 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 drive circuit. The dog feeding signal (namely negative pulse "feed dog / ") sent by the electronic equipment is connected to the clear zero end of the WDOG circuit and the dog feeding end of the first counting permission circuit. The output of the permission end 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 an oscillation circuit.
[0045] 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 equipment not parallel on the same power line to draw power, that is, not to share the power supply in parallel.
[0046] Figure 4The utility model provides a first counting permission circuit's logic circuit schematic diagram in the watchdog counter of the utility model embodiment. Please see Figure 4 , the first counting permission circuit mainly comprises RS flip-flop U201 and AND gate U202. The input end of AND gate is connected with the initial counting permission end of the first counting permission circuit and the output end of RS flip-flop respectively, and the output end of AND gate is used as the permission end of the first counting permission circuit. Therefore, only when the initial counting permission end is artificially set as signal '1', the output Q1 of RS flip-flop is output through AND gate and is transmitted to the permission end output of the first counting permission circuit, otherwise the permission end output remains '0'. The power-on signal sent by the electronic equipment is connected to the R end of RS flip-flop, and the dog-feeding signal sent by the electronic equipment is connected to the S end of RS flip-flop, and RS flip-flop is designed as a signal maintaining circuit, and the output Q1 thereof is used as the 'permission' ('1' valid) signal, which is finally output through the permission end of the first counting permission circuit.
[0047] Please see Figure 1 And Figure 4 When the initial counting permission end of the first counting permission circuit obtains the artificial preset signal '1', the signal of RS flip-flop Q1 is output to the permission end of the first counting permission circuit.
[0048] When the electronic equipment is powered on, the power-on signal (negative pulse 'power-on / ') is transmitted to the power-on end of the first counting permission circuit, i.e. the R end of RS flip-flop, and RS flip-flop Q1 outputs and maintains '0', so that the permission end output signal of the first counting permission circuit is '0' to the permission end of WDOG circuit, the WDOG circuit does not count, the overflow end output signal of WDOG circuit is '0', the relay driving circuit does not work, the normally closed switch of relay is in closed circuit state, and the electronic equipment keeps in communication with power supply 1. This is the initial state.
[0049] Until the dog-feeding signal (negative pulse 'dog-feeding / ') from the electronic equipment is obtained by the dog-feeding end of the first counting permission circuit, i.e. the S end of RS flip-flop obtains the negative pulse, RS flip-flop Q1 outputs and maintains '1', so that the permission end output signal of the first counting permission circuit is '1' to the permission end of WDOG circuit, the WDOG circuit works and accumulates the count when obtaining the counting clock.
[0050] The function of the WDOG circuit is similar to that of a common watchdog circuit (mainly composed of a counter). When the enable end is "1", the WDOG circuit counts the count clock. The electronic device working normally outputs a "feed dog / " negative pulse signal within the overflow period of the WDOG circuit. When the WDOG works and the electronic device works normally, the clear end of the WDOG circuit obtains the feed dog signal from the electronic device to clear the accumulated count to restart counting, the overflow end of the WDOG circuit maintains output as "0", the relay driving circuit does not work, the normally closed switch of the relay maintains closure, and the electronic device maintains power-on.
[0051] When the WDOG works and the electronic device loses control and fails to output the feed dog signal, i.e. the electronic device "crashes", the clear end of the WDOG circuit does not receive the "feed dog / " signal after the count of the WDOG circuit is full, the accumulated count of the WDOG circuit overflows, the overflow end of the WDOG circuit outputs as "1", i.e. a positive pulse signal with a certain period pulse width (to make the electronic device power off sufficiently), the relay driving circuit works to control the normally closed switch of the relay to open, and the electronic device is powered off.
[0052] When the overflow end of the WDOG circuit restores to output as "0", the relay driving circuit does not work, the normally closed switch of the relay closes, the electronic device is powered on and generates a power-on signal transmitted to the power-on end of the first count enable circuit, and returns to the initial state.
[0053] The above process realizes that, after the feed dog signal starts the watchdog counter, if the electronic device loses control and "crashes", the electronic device is powered off and powered on again.
[0054] Figure 2 A kind of power-on start-up watchdog counter and electronic equipment connection schematic diagram provided for the embodiment of the utility model. Compared with Figure 2 And Figure 1 A kind of power-on start-up watchdog counter ( Figure 2 ), except that the second count enable circuit replaces the first count enable circuit, other parts are similar to the aforementioned feed dog start-up watchdog counter ( Figure 1 ), therefore the description is omitted.
[0055] Figure 5 The logic circuit schematic diagram of the second count enable circuit in the watchdog counter provided for the embodiment of the utility model. Please see Figure 5The 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 the 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".
[0056] Please refer to Figure 2 and Figure 5 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.
[0057] When the electronic device is powered on, the power-on signal (negative pulse "power-on / ") 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 the signal "0", the relay drive 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.
[0058] When the WDOG works and the electronic device works normally, the zero-clearing terminal of the WDOG circuit obtains the dog-feeding signal (negative pulse "dog-feeding / ") from the electronic device to clear the accumulated count to restart counting, and the overflow terminal of the WDOG circuit maintains the output "0", so that the relay drive circuit does not work, the normally closed switch of the relay maintains closed, and the electronic device maintains powered on.
[0059] 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, since the Q2 of the D flip-flop is "0" at this time, the feeding dog signal cannot make the second RS flip-flop Q3 "1" through the or gate U304 connected with the Q2 / or gate, and can only make the second RS flip-flop Q3 "0" through the or gate U303 connected with the Q2 or gate; meanwhile, the rising edge of the feeding dog signal makes the D flip-flop count once (Q2 / D) and lock Q2 "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 "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 output "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 "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.
[0060] Until the feeding dog end of the second counting permission circuit obtains the second and subsequent feeding dog signals, since the Q2 of the D flip-flop is locked "1" at this time, the feeding dog signal cannot make the second RS flip-flop Q3 "0" through the or gate U303 connected with the Q2 or gate, and can only make the second RS flip-flop Q3 "1" and keep through the or gate U304 connected with the Q2 / or gate; the comprehensive effect is that the D flip-flop Q2 is maintained "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 output "1" to the permission end of the WDOG circuit, the WDOG circuit works, and the counting clock is accumulated.
[0061] When the WDOG works and the electronic equipment loses control to cause the feeding dog signal not to be sent out, the overflow end of the WDOG circuit outputs "1" due to the overflow of the accumulated counting, 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.
[0062] When the overflow end of the WDOG circuit restores the output "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, and returns to the initial state.
[0063] 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 "hangs up", the electronic equipment is powered off and restarted.
[0064] Figure 3 A kind of feeding dog start and power-on start's watchdog counter provided in the embodiment of the utility model is connected with electronic equipment schematic diagram. Please see Figure 3 Comparison Figure 1 and Figure 2The watchdog counter is a combination of the watchdog counter started by feeding dog and the watchdog counter started by power-on, and aims to facilitate the selection of the two. The watchdog counter mainly comprises 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 watchdog counter started by feeding dog and the watchdog counter started by power-on, except that the permission signals output by the first counting permission circuit and the second counting permission circuit are combined by the OR gate and output to the permission end of the WDOG circuit, and thus the description is omitted.
[0065] Please refer to Figure 3 and Figure 4 When the initial counting permission end obtains the artificially preset signal as "1", only the signal output by the permission end of the first counting permission circuit is allowed to trigger the Q1 RS, and the signal output by the permission end of the second counting permission circuit is kept as "0". At this time, the working process of the watchdog counter is the same as that of the watchdog counter started by feeding dog, and thus the description is omitted.
[0066] Please refer to Figure 3 and Figure 5 When the initial counting permission end obtains the artificially preset signal as "0", only the signal output by the permission end of the second counting permission circuit is allowed to trigger the Q3 RS, and the signal output by the permission end of the first counting permission circuit is kept as "0". At this time, the working process of the watchdog counter is the same as that of the watchdog counter started by power-on, and thus the description is omitted.
[0067] The watchdog counter can be externally connected to the electronic device as an independent working unit, and does not share the power supply with the electronic device or is connected in parallel with the power supply, so that the hardware of the electronic device is slightly changed or does not need to be changed. When the watchdog counter detects that the electronic device is "dead", it directly realizes physical power-off and power-on restart, simulates manual power-on restart, and can effectively overcome the "dead" fault of the electronic device online. Moreover, the watchdog counter provides two working mode selections, i.e. the watchdog started by feeding dog or the watchdog started by power-on (including the watchdog started by feeding dog), by artificially presetting the "initial counting permission" signal. 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 start normal work after power-on. In addition, since the watchdog counter itself is composed of a relatively simple pure hardware circuit, it is ensured that the watchdog counter itself can almost stably run without the "dead" phenomenon.
Claims
1. A power-on initiated watchdog counter, characterized by The application relates to a watchdog counter for power-off restart of power supply of an out-of-control electronic device, which 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 source and a second power supply source. The electronic device is connected with the first power supply source through the relay normally closed switch, one end of the relay coil is connected with the second power supply source for power supply of 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 output of the second counting permission circuit is connected with the permission end of the WDOG circuit. When the initial counting permission end of the second counting permission circuit obtains the preset signal "0", the permission end output signal of the second counting permission circuit is "1". When the electronic device is powered on, the electronic device generates a 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 output signal of the second counting permission circuit is "1" to the permission end of the WDOG circuit; the WDOG circuit works, the WDOG circuit accumulates the count clock, 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 source. When the WDOG circuit works and the electronic device works normally, the clear end of the WDOG circuit obtains the feeding signal from the electronic device, clears 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 closure, and the electronic device maintains the power-on; meanwhile, the feeding end of the second counting permission circuit obtains the feeding signal, if the feeding signal is obtained for the first time, the permission end output signal of the second counting permission circuit is "0" to the permission end of the WDOG circuit, the WDOG circuit does not work, and the overflow end output signal of the WDOG circuit is "0"; until the feeding end of the second counting permission circuit obtains the feeding signal for the second time and the subsequent times, the permission end output signal of the second counting permission circuit is "1" to the permission end of the WDOG circuit, so that the WDOG circuit works. When the WDOG circuit works and the electronic device is out of control and cannot send the feeding signal, the WDOG circuit accumulates the count overflow, the overflow end output signal of the WDOG circuit is "1", the relay drive circuit works to control the relay normally closed switch to be disconnected, and the electronic device is powered off. When the overflow end of the WDOG circuit restores the output as "0", the relay normally closed 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 second counting permission circuit. The second counting permission circuit comprises a plurality of gate circuits, a D flip-flop counted once and locked and a second RS flip-flop. The Q / D of the D flip-flop, the Q of the D flip-flop and the feeding end of the second counting permission circuit are respectively connected with the inputs of the second OR gate, the output of the second OR gate is connected with the CK of the D flip-flop, so that the D flip-flop is counted only once for the feeding signal of the feeding end and is locked and not counted again; and the R of the D flip-flop is connected with the power-on end of the second counting permission circuit. The Q of the D flip-flop and the feeding dog end of the second counting permission circuit are connected to the input of the third OR gate respectively, and the output of the third OR gate is connected to the R of the second RS flip-flop; the Q of the D flip-flop and the feeding dog end of the second counting permission circuit are connected to the input of the fourth OR gate respectively, and the output of the fourth OR gate and the power-on end of the second counting permission circuit are connected to the input of the second AND gate respectively, and the output of the second AND gate is connected to the S of the second RS flip-flop; The initial counting permission end of the second counting permission circuit is connected to the input of the third AND gate through the NOT gate and the Q of the second RS flip-flop, and the output of the third AND gate is as the permission end output of the second counting permission circuit; Only when the initial counting permission end of the second counting permission circuit obtains the signal "0", the output of the second RS flip-flop is allowed to be transmitted to the permission end of the WDOG circuit; When the power-on end of the second counting permission circuit receives the power-on signal, the gate circuit, the D flip-flop and the second RS flip-flop of the second counting permission circuit interact, the D flip-flop is set to "0", the second RS flip-flop is set to "1", the permission end output of the second counting permission circuit is "1", and is transmitted to the permission end of the WDOG circuit to allow the WDOG circuit to count; When the feeding dog end of the second counting permission circuit receives the first feeding dog signal output by the normal working of the electronic device, the gate circuit, the D flip-flop and the second RS flip-flop of the second counting permission circuit interact, the D flip-flop counts once and is locked to "1", the second RS flip-flop is set to "0", and the permission end output of the second counting permission circuit is "0", which is transmitted to the permission end of the WDOG circuit to make the WDOG circuit not count; When the feeding dog end of the second counting permission circuit receives the second and subsequent feeding dog signals output by the normal working of the electronic device, the gate circuit, the D flip-flop and the second RS flip-flop of the second counting permission circuit interact, the D flip-flop is maintained to "1", the second RS flip-flop is set to "1", the permission end output of the second counting permission circuit is "1", and is transmitted to the permission end of the WDOG circuit to allow the WDOG circuit to count.
2. A watchdog counter that is enabled by a dog feed and enabled by a power-on, characterized by, The watchdog counter is used for power-off restart of power supply of an out-of-control electronic device, and comprises a relay normally closed switch, a relay coil, a relay driving circuit, a WDOG circuit, a first counting permission circuit and a second counting permission circuit, a first OR gate, a first power supply and a second power supply; The first counting permission circuit comprises a first AND gate and a first RS flip-flop; the initial counting permission end of the first counting permission circuit and the output end of the first RS flip-flop are connected to the input end of the first AND gate respectively, and the output end of the first AND gate is as the permission end of the first counting permission circuit; only when the initial counting permission end of the first counting permission circuit obtains the signal "1", the output of the first RS flip-flop is output through the first AND gate and is transmitted to the permission end of the WDOG circuit; When the R terminal of the first RS flip-flop obtains the power-on signal "0" from the electronic device, the output of the first RS flip-flop is "0", and the enable terminal of the WDOG circuit is transmitted to make the WDOG circuit not count; when the electronic device works normally, the S terminal of the first RS flip-flop obtains the dog-feeding signal from the electronic device, the output of the first RS flip-flop is "1", and the enable terminal of the WDOG circuit is transmitted to allow the WDOG circuit to count; 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 terminal of the WDOG circuit output through the relay drive circuit; the clear terminal of the WDOG circuit is connected with the dog-feeding terminal of the first counting enable circuit and the second counting enable circuit respectively; the enable terminal of the first counting enable circuit and the second counting enable circuit is connected with the input terminal of the first OR gate respectively, and the output terminal of the first OR gate is connected with the enable terminal of the WDOG circuit; the power-on terminal of the first counting enable circuit is connected with the power-on terminal of the second counting enable circuit, and the initial counting enable terminal of the first counting enable circuit is connected with the initial counting enable terminal of the second counting enable circuit; When the initial counting enable terminal of the first counting enable circuit obtains the artificially preset signal "1", only the enable terminal of the first counting enable circuit outputs the signal "1"; when the electronic device is powered on, the electronic device generates the power-on signal and transmits it to the power-on terminal of the first counting enable circuit, so that the enable terminal of the first counting enable circuit outputs the signal "0" to the enable terminal of the WDOG circuit, the WDOG circuit does not work, the overflow terminal 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 dog-feeding terminal of the first counting enable circuit obtains the dog-feeding signal from the electronic device, so that the enable terminal of the first counting enable circuit outputs the signal "1" to the enable terminal of the WDOG circuit, the WDOG circuit works and accumulates the count when obtaining the counting clock; when the WDOG works and the electronic device works normally, the clear terminal of the WDOG circuit obtains the dog-feeding signal from the electronic device to clear the accumulated count to restart counting, the overflow terminal of the WDOG circuit maintains outputting "0", the relay normally closed switch maintains closing, and the electronic device maintains being powered on; when the WDOG circuit works and the electronic device loses control to cause the dog-feeding signal not to be sent out, the WDOG circuit accumulates the count to overflow, so that the overflow terminal outputs "1", the relay drive circuit works to control the relay normally closed switch to open, and the electronic device is powered off; when the overflow terminal of the WDOG circuit restores to output "0", the relay normally closed switch closes, the electronic device is powered on, and the power-on signal is generated and transmitted to the power-on terminal of the first counting enable circuit; When the initial count enable end obtains the preset signal "0", the second count enable circuit only allows the output signal "1" of the enable end; 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 "1" of the enable end of the second count enable circuit is transmitted to the enable end of the WDOG circuit, the WDOG circuit works, and the accumulated count of the counting clock is obtained; when the WDOG circuit does not overflow, the output signal of the overflow end is "0", the normally closed switch of the relay is maintained closed, and the electronic device is connected with the first power supply; when the WDOG circuit works and the electronic device works normally, the zero end of the WDOG circuit obtains the dog feeding signal from the electronic device to clear the accumulated count to restart counting, 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 dog feeding end of the second count enable circuit obtains the dog feeding signal, if it is the first time to obtain, the output signal "0" of the enable end of the second count enable circuit is transmitted 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 dog feeding end of the second count enable circuit obtains the second and subsequent dog feeding signals, the output signal "1" of the enable end of the second count enable circuit is transmitted 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 dog feeding signal not to be generated, the accumulated count of the WDOG circuit overflows to make the output of the overflow end "1", so that 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; The second count enable circuit comprises a plurality of gate circuits, a D flip-flop which is counted once and locked, and a second RS flip-flop; The Q / D of the D flip-flop, the Q of the D flip-flop and the dog feeding end of the second count enable circuit are respectively connected to the inputs of the second OR gate, the output of the second OR gate is connected to the CK of the D flip-flop, so that the D flip-flop is counted only once for the dog feeding signal of the dog feeding end and is locked to no longer count; the R of the D flip-flop is connected to the power-on end of the second count enable circuit; The Q of the D flip-flop and the dog feeding end of the second count enable circuit are respectively connected to the inputs of the third OR gate, the output of the third OR gate is connected to the R of the second RS flip-flop; the Q of the D flip-flop and the dog feeding end of the second count enable circuit are respectively connected to the inputs of the fourth OR gate, the output of the fourth OR gate and the power-on end of the second count enable circuit are respectively connected to the inputs of the second AND gate, and the output of the second AND gate is connected to the S of the second RS flip-flop; The initial count enable end of the second count enable circuit is connected to the inputs of the third AND gate through the non-gate and the Q of the second RS flip-flop, and the output of the third AND gate is used as the output of the enable end of the second count enable circuit; Only when the initial count enable end of the second count enable circuit obtains the signal "0", the output of the second RS flip-flop is allowed to be transmitted to the enable end of the WDOG circuit; 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 the WDOG circuit is allowed to count by the permission end of the WDOG circuit; When the second counting permission circuit receives a first feeding signal output by 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 counts once and is locked to "1", the second RS flip-flop is set to "0", the permission end of the second counting permission circuit outputs "0", and the WDOG circuit is not allowed to count by the permission end of the WDOG circuit; When the second counting permission circuit receives a second feeding signal output by 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 the WDOG circuit is allowed to count by the permission end of the WDOG circuit.
3. The watchdog counter of any one of claims 1 to 2, wherein, The first power supply and the second power supply are the same power supply.
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