CN111090566B - MCU operating condition monitoring circuit - Google Patents

MCU operating condition monitoring circuit Download PDF

Info

Publication number
CN111090566B
CN111090566B CN201911378748.4A CN201911378748A CN111090566B CN 111090566 B CN111090566 B CN 111090566B CN 201911378748 A CN201911378748 A CN 201911378748A CN 111090566 B CN111090566 B CN 111090566B
Authority
CN
China
Prior art keywords
resistor
transistor
mcu
power supply
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911378748.4A
Other languages
Chinese (zh)
Other versions
CN111090566A (en
Inventor
雷萍
殷民
郑东文
石习成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shengnengjie Technology Co ltd
Yaruiyuan Technology Shenzhen Co ltd
Original Assignee
Shenzhen Shengnengjie Technology Co ltd
Yaruiyuan Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Shengnengjie Technology Co ltd, Yaruiyuan Technology Shenzhen Co ltd filed Critical Shenzhen Shengnengjie Technology Co ltd
Priority to CN201911378748.4A priority Critical patent/CN111090566B/en
Publication of CN111090566A publication Critical patent/CN111090566A/en
Application granted granted Critical
Publication of CN111090566B publication Critical patent/CN111090566B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]

Abstract

An MCU operating condition monitoring circuit comprising: the comparison circuit is used for detecting whether the PWM port of the MCU sends a PWM signal or not so as to judge whether the MCU is halted or not; the comparison circuit is respectively connected with the MCU and a power supply thereof; the power supply control circuit is used for controlling the connection between the MCU and the power supply; the power supply control circuit is respectively connected with the MCU, the power supply and the comparison circuit; when the comparison circuit does not detect the PWM signal, the comparison circuit controls the power supply control circuit to disconnect the connection between the MCU and the power supply and then conduct the connection between the MCU and the power supply so as to restart the MCU. The MCU working state monitoring circuit provided by the invention can realize the monitoring function of the watchdog on the MCU only by using common parts such as an operational amplifier, a triode, a resistor, a capacitor and the like, and compared with a special chip for the watchdog, the MCU working state monitoring circuit has the advantages that the cost is reduced by at least half, and the MCU working state monitoring circuit has good economic benefit.

Description

MCU operating condition monitoring circuit
Technical Field
The invention belongs to the technical field of MCU, and particularly relates to an MCU working state monitoring circuit.
Background
In a microcomputer system composed of a single chip microcomputer, the work of the single chip microcomputer is often interfered by an external electromagnetic field, so that various register and memory data are disordered, a program pointer is wrong, a program area is not located, or wrong program instructions are fetched out, the program possibly falls into a dead loop, the normal running of the program is interrupted, a system controlled by the single chip microcomputer cannot work normally, the whole system falls into a dead state, and unpredictable results are generated.
The watchdog is a means for monitoring the operation condition of the system, and the operation condition of the system is monitored in a mode of combining software and hardware. And the stably running software can perform dog feeding after executing a specific instruction, and if the watchdog does not receive a dog feeding signal from the software within a certain period, the system is considered to be in fault, and an interrupt processing program is entered or the system is forced to reset. The system can select the opportunity of enabling the watchdog according to different working modes after being electrified, if the watchdog is enabled, the counter starts counting, and if the watchdog is not fed in time within the set time, the watchdog is overtime.
The common watchdog is a timer circuit, generally has an input called feeding dog, and an output to the RST end of the MCU, and when the MCU normally works, it outputs a signal to the feeding dog end at intervals to zero the WDT, and if the feeding dog is not fed (generally during program flight) for a specified time, the WDT timing is exceeded, and a reset signal is given to the MCU to reset the MCU. The watchdog is used for preventing the program from endless loop or flying.
The existing watchdog special chip is used for monitoring the work of the MCU, and when the MCU crashes, a restart signal can be sent out to restart the MCU. But watchdog-specific chips are generally expensive.
Disclosure of Invention
In order to solve the above problems, the present invention provides an MCU operating status monitoring circuit, comprising:
the comparison circuit is used for detecting whether the PWM port of the MCU sends a PWM signal or not so as to judge whether the MCU is halted or not; the comparison circuit is respectively connected with the MCU and a power supply thereof;
the power supply control circuit is used for controlling the connection between the MCU and the power supply; the power supply control circuit is respectively connected with the MCU, the power supply and the comparison circuit;
the restarting timing circuit is used for controlling the time interval of the power supply control circuit for disconnecting the connection between the MCU and the power supply and conducting the connection between the MCU and the power supply again; the restart timing circuit is respectively connected with the comparison circuit and the power supply control circuit;
when the comparison circuit does not detect the PWM signal, the comparison circuit controls the power supply control circuit to disconnect the connection between the MCU and the power supply and then conduct the connection between the MCU and the power supply so as to restart the MCU.
Preferably, the comparison circuit comprises: a resistor R1, a resistor R2, a resistor R5, a resistor R8, a resistor R9, a resistor R11, a resistor R14, a resistor R17, a resistor R19, a resistor R23, a resistor R24, a transistor Q1, a transistor Q4, a transistor Q6, a capacitor C1, a capacitor C2, a low-voltage comparison circuit and a high-voltage comparison hysteresis circuit, wherein a first end of the resistor R1 is connected to the power supply and a second end is connected to a base of the transistor Q1, a first end of the resistor R2 is connected to an output P _ driver port of the restart timing circuit and a second end is connected to a base of the transistor Q1, a first end of the resistor R5 is connected to a collector of the transistor Q1 and a second end is connected to a first end of the resistor R11, a first end of the resistor R8 is connected to the power supply and a second end is connected to a second end of the resistor R11, a first end of the resistor R9 is connected to the power supply and a second end of the capacitor C2, the first end of the resistor R14 is connected to the PWM port of the MCU and the second end is connected to the base of the transistor Q4, the first end of the resistor R17 is connected to the base of the transistor Q4 and the second end is grounded, the first end of the resistor R19 is connected to the first end of the resistor R11 and the second end is connected to the collector of the transistor Q6, the first end of the resistor R23 is connected to the N _ driver port of the restart timing circuit and the second end is connected to the base of the transistor Q6, the first end of the resistor R24 is connected to the base of the transistor Q6 and the second end is grounded, the emitter of the transistor Q1 is connected to the power supply, the collector of the transistor Q4 is connected to the second end of the resistor R11 and the emitter is grounded, the emitter of the transistor Q6 is grounded, the first end of the capacitor C1 is connected to the first end of the resistor R11 and the second end is grounded, the second end of the capacitor C2 is grounded, the first end of the low voltage comparison line is connected with the first end of the resistor R11, the second end of the low voltage comparison line is connected with the second end of the resistor R9, and the high voltage comparison hysteresis line is connected in parallel with the low voltage comparison line.
Preferably, the power control circuit includes a resistor R6, a resistor R10, a resistor R13, a resistor R18, a resistor R21, a resistor R22, a capacitor C91, a capacitor C92, a capacitor C93, a transistor Q2, a transistor Q3, a transistor Q5, and a power conversion chip U5, wherein a first end of the resistor R6 is connected to the power supply and a second end is connected to a collector of the transistor Q3, a first end of the resistor R10 is connected to a collector of the transistor Q3 and a second end is connected to a base of the transistor Q2, a first end of the resistor R13 is connected to a second end of the resistor R13 and a second end of the resistor R13 in the comparison circuit is connected to a base of the transistor Q13 and a second end of the resistor R13 is connected to a ground, a first end of the resistor R13 is connected to an EN port of the MCU and a second end of the transistor Q13 is connected to a base of the ground, and a second end of the resistor R13 is connected to a ground, the first end of the capacitor C91 is connected to the collector of the transistor Q2 and the second end is grounded, the capacitor C92 is connected to the capacitor C91 in parallel, the first end of the capacitor C93 is grounded and the second end is connected to a predetermined positive potential, the emitter of the transistor Q2 is connected to the power supply, the emitter of the transistor Q3 is grounded, the collector of the transistor Q5 is connected to the collector of the transistor Q3 and the emitter is grounded, the 2 port of the power conversion chip U5 is connected to the predetermined positive potential and the 3 port is connected to the collector of the transistor Q2.
Preferably, the preset positive potential voltage is 3.3V.
Preferably, the restart timing circuit includes a resistor R26, a resistor R28, a resistor R29, a resistor R30, a resistor R35, a resistor R36, a transistor Q7, a transistor Q8, a capacitor C3, a voltage comparison circuit, and a reverse drive circuit, wherein a first end of the resistor R26 is connected to a first end of the resistor R29 and a second end thereof is connected to a collector of the transistor Q7, a first end of the resistor R28 is connected to the power supply and a second end thereof is connected to a collector of the transistor Q8, a second end of the resistor R29 is grounded, a first end of the resistor R30 is connected to a base of the transistor Q7 and a second end thereof is connected to a collector of the transistor Q8, a first end of the resistor R35 is connected to a base of the transistor Q8 and a second end thereof is connected to a second end of the resistor R9 in the comparison circuit, a first end of the resistor R36 is connected to a base of the transistor Q8 and a second end thereof is grounded, an emitter of the triode Q7 is connected with the power supply, an emitter of the triode Q8 is grounded, the capacitor C3 is connected in parallel with the resistor R29, a first end of the voltage comparison circuit is connected with a first end of the resistor R29, a second end of the voltage comparison circuit is connected with a first end of the resistor R2 in the comparison circuit, a first end of the reverse drive circuit is connected with a second end of the voltage comparison circuit, and a second end of the reverse drive circuit is connected with a first end of the R23 in the comparison circuit.
The MCU working state monitoring circuit provided by the invention can realize the monitoring function of the watchdog on the MCU only by using common parts such as an operational amplifier, a triode, a resistor, a capacitor and the like, and compared with a special chip for the watchdog, the MCU working state monitoring circuit has the advantages that the cost is reduced by at least half, and the MCU working state monitoring circuit has good economic benefit.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of an MCU operation status monitoring circuit provided in the present invention;
FIG. 2 is a schematic diagram of an MCU working state monitoring circuit provided by the present invention;
FIG. 3 is a schematic diagram of a comparison circuit of an MCU operation status monitoring circuit according to the present invention;
FIG. 4 is a schematic diagram of a power control circuit of the MCU operation status monitoring circuit according to the present invention;
fig. 5 is a schematic diagram of a restart timing circuit of the MCU operating state monitoring circuit according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the accompanying drawings in combination with the embodiments. It should be understood that the description is intended to be exemplary only, and is not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
As shown in fig. 1 and 2, in an embodiment of the present application, the present application provides an MCU operating state monitoring circuit, including: a comparison circuit, a power control circuit, and a restart timing circuit, each of which is described in detail below.
Referring to fig. 1 and 2, in an embodiment of the present application, an MCU operating state monitoring circuit provided in the present application includes:
the comparison circuit is used for detecting whether the PWM port of the MCU sends a PWM signal or not so as to judge whether the MCU is halted or not; the comparison circuit is respectively connected with the MCU and a power supply thereof;
the power supply control circuit is used for controlling the connection between the MCU and the power supply; the power supply control circuit is respectively connected with the MCU, the power supply and the comparison circuit;
the restarting timing circuit is used for controlling the time interval of the power supply control circuit for disconnecting the connection between the MCU and the power supply and conducting the connection between the MCU and the power supply again; the restart timing circuit is respectively connected with the comparison circuit and the power supply control circuit
When the comparison circuit does not detect the PWM signal, the comparison circuit controls the power supply control circuit to disconnect the connection between the MCU and the power supply and then conduct the connection between the MCU and the power supply so as to restart the MCU.
In the embodiment of the application, when the MCU crashes, the PWM port stops sending the PWM signal, at the moment, the comparison circuit detects that the PWM signal does not exist, and controls the power supply control circuit to disconnect the MCU and the connection between the power supply and then to connect the MCU and the power supply, so that the MCU is restarted.
In the embodiment of the present application, the time interval between disconnection and reconnection between the MCU and the power supply is specifically controlled by a restart timing line.
As shown in fig. 1, 2 and 3, in the embodiment of the present application, the comparison circuit includes: a resistor R1, a resistor R2, a resistor R5, a resistor R8, a resistor R9, a resistor R11, a resistor R14, a resistor R17, a resistor R19, a resistor R23, a resistor R24, a transistor Q1, a transistor Q4, a transistor Q6, a capacitor C1, a capacitor C2, a low-voltage comparison circuit and a high-voltage comparison hysteresis circuit, wherein a first end of the resistor R1 is connected to the power supply and a second end is connected to a base of the transistor Q1, a first end of the resistor R2 is connected to the output P _ driver of the restart timing circuit and a second end is connected to a base of the transistor Q1, a first end of the resistor R5 is connected to a collector of the transistor Q1 and a second end is connected to a first end of the resistor R11, a first end of the resistor R8 is connected to the power supply and a second end is connected to a second end of the resistor R11, a first end of the resistor R9 is connected to the power supply and a second end is connected to the capacitor C2, the first end of the resistor R14 is connected to the PWM port of the MCU and the second end is connected to the base of the transistor Q4, the first end of the resistor R17 is connected to the base of the transistor Q4 and the second end is grounded, the first end of the resistor R19 is connected to the first end of the resistor R11 and the second end is connected to the collector of the transistor Q6, the first end of the resistor R23 is connected to the N _ driver port of the restart timing circuit and the second end is connected to the base of the transistor Q6, the first end of the resistor R24 is connected to the base of the transistor Q6 and the second end is grounded, the emitter of the transistor Q1 is connected to the power supply, the collector of the transistor Q4 is connected to the second end of the resistor R11 and the emitter is grounded, the emitter of the transistor Q6 is grounded, the first end of the capacitor C1 is connected to the first end of the resistor R11 and the second end is grounded, the second end of the capacitor C2 is grounded, the first end of the low voltage comparison line is connected with the first end of the resistor R11, the second end of the low voltage comparison line is connected with the second end of the resistor R9, and the high voltage comparison hysteresis line is connected in parallel with the low voltage comparison line.
The working principle of the comparison circuit is as follows:
the MCU dog feeding signal received by the comparison circuit is a PWM signal sent by the comparison circuit, and when the PWM signal disappears, the MCU is halted. When the PWM signal is present, the transistor Q4 is in a high frequency switching state, and the power supply voltage (5V) charges the capacitor C1 through the resistor R8 and the resistor R11. The PWM signal is typically 50% duty cycle, so the voltage at point a at the capacitor C1 (i.e., at the second end of the resistor R5) is stabilized at 2.5V.
The low-voltage comparison circuit has the following functions: when the voltage of the point A is lower than 1V, the output of the comparison circuit is forced to be pulled low; when the voltage at the point A is higher than 1V, the output of the low-voltage comparison line is recovered to be 5V. The high-voltage hysteresis comparison circuit has the following functions: when the potential of the point y (namely the second end of the resistor R9) is 5V, the voltage of the point A exceeds 4V, and the output of the high-voltage comparison hysteresis line is forced to be pulled low; when the potential of the point y is 0 and the potential of the point A is lower than 3V, the output of the high-voltage comparison hysteresis circuit is recovered to 5V.
When the voltage of the point A is stabilized at 2.5V, the voltage of the point y output by the rear ends of the low-voltage comparison line and the high-voltage comparison hysteresis line is 5V. The transistor Q3 at the back end of y is turned on, the transistor Q2 is turned on, and the output 5V _ OUT port (i.e., the power supply voltage output end) can continuously supply power to the MCU.
After the PWM signal disappears, the PWM port becomes the low level, triode Q4 can not be turned on, capacitor C1 can be charged, the voltage of a point can rise, when the voltage rises to exceed about 4V, the output of the high-voltage hysteresis comparison circuit is pulled down, namely the potential of the point y can be pulled down, triode Q3 can be turned off, triode Q2 can be turned off, so that the power supply is disconnected to the rear pole, and output 5V _ OUT (also the voltage output end of the power supply) no longer supplies power for the MCU.
As shown in fig. 1, 2 and 4, in the embodiment of the present application, the power control circuit includes a resistor R6, a resistor R10, a resistor R13, a resistor R18, a resistor R21, a resistor R22, a capacitor C91, a capacitor C92, a capacitor C93, a transistor Q2, a transistor Q3, a transistor Q5 and a power conversion chip U5, wherein a first end of the resistor R6 is connected to the power supply and a second end is connected to a collector of the transistor Q3, a first end of the resistor R10 is connected to a collector of the transistor Q3 and a second end is connected to a base of the transistor Q2, a first end of the resistor R13 is connected to a second end of a resistor R9 and a second end is connected to a base of the transistor Q3 in the comparison circuit, a first end of the resistor R18 is connected to a base of the transistor Q3 and a second end is connected to ground, a first end of the resistor R21 is connected to an EN port of the MCU 5, the first end of the resistor R22 is connected to the base of the transistor Q5 and the second end is grounded, the first end of the capacitor C91 is connected to the collector of the transistor Q2 and the second end is grounded, the capacitor C92 is connected to the capacitor C91 in parallel, the first end of the capacitor C93 is grounded and the second end is connected to a preset positive potential, the emitter of the transistor Q2 is connected to the power supply, the emitter of the transistor Q3 is grounded, the collector of the transistor Q5 is connected to the collector of the transistor Q3 and the emitter is grounded, and the 2 port of the power conversion chip U5 is connected to the preset positive potential and the 3 port is connected to the collector of the transistor Q2.
The working principle of the power supply control circuit is as follows:
the rear end of the power supply is connected with a triode Q2 (a P-MOSFET can also be used) as a switch, and the state of the triode Q2 is controlled to control whether the power supply voltage can be output or not. The EN port input of the MCU is connected to a triode Q5, the collector of a triode Q5 is connected to the base of a triode Q2, when an EN signal is at a high level, the triode Q5 is conducted, the triode Q2 is conducted all the time, and the power supply continuously outputs; at this time, the power supply will continue to output no matter whether the PWM signal of the previous stage exists, and the MCU will not reset. When the EN signal is low, the transistor Q2 is controlled by the previous PWM signal, and when the PWM signal disappears, the MCU is restarted by the power supply.
As shown in fig. 1 and 2, in the embodiment of the present application, the preset positive potential voltage is 3.3V.
Referring to fig. 1, 2 and 5, in the embodiment of the present application, the restart timing circuit includes a resistor R26, a resistor R28, a resistor R29, a resistor R30, a resistor R35, a resistor R36, a transistor Q7, a transistor Q8, a capacitor C3, a voltage comparison circuit and a back drive circuit, wherein a first end of the resistor R26 is connected to a first end of the resistor R29 and a second end is connected to a collector of the transistor Q7, a first end of the resistor R28 is connected to the power supply and a second end is connected to a collector of the transistor Q8, a second end of the resistor R29 is grounded, a first end of the resistor R30 is connected to a base of the transistor Q7 and a second end is connected to a collector of the transistor Q8, a first end of the resistor R35 is connected to a base of the transistor Q8 and a second end of the resistor R9 in the comparison circuit, a first end of the resistor R36 is connected to a base of the transistor Q8 and a second end of the transistor Q8 is grounded, an emitter of the triode Q7 is connected with the power supply, an emitter of the triode Q8 is grounded, the capacitor C3 is connected in parallel with the resistor R29, a first end of the voltage comparison circuit is connected with a first end of the resistor R29, a second end of the voltage comparison circuit is connected with a first end of the resistor R2 in the comparison circuit, a first end of the reverse drive circuit is connected with a second end of the voltage comparison circuit, and a second end of the reverse drive circuit is connected with a first end of the R23 in the comparison circuit.
The working principle of the restarting timing circuit is as follows:
the function of the voltage comparison circuit behind point B (i.e., the first terminal of resistor R29) is: when the voltage at the point B is lower than 3V, the potential of the output point x (namely the second end of the voltage comparison circuit) of the voltage comparison circuit is at a high level; when the voltage at the point B is higher than 3V, the voltage comparison circuit outputs the potential at the point x to be low level. The reverse phase drive circuit outputs a potential reverse to the potential at the point x.
When the power supply is just powered on, the voltage at the point B is 0, the output x potential of the voltage comparison circuit is high level, so that the N-driver port is high level, the output P-driver port of the inverting drive circuit is low level, the triode Q1 and the triode Q6 at the front end of the point A are both conductive, the current-limiting resistance ratio of the triode Q6 and the triode Q1 which are connected to the point A is small, so that the potential at the point A is approximately fixed at about 2.5V, the outputs of the low-voltage comparison circuit and the high-voltage comparison hysteresis circuit are both high level, so that the potential at the point Y is 5V, the triode Q3 at the rear end is conductive, the triode Q2 is conductive, and 5V _ OUT has an output voltage of 5V which is provided for a circuit connected behind the point A.
After that, because the potential at the point y is high, the transistor Q8 at the front stage of the B is turned on, the transistor Q7 is turned on, the capacitor C3 is charged, the potential at the point B gradually rises, when the potential at the point B exceeds 3V, the voltage comparison circuit is triggered, the voltage comparison circuit outputs the potential x as low, the N-Driver port is at low level, the P-Driver port is at high level, the transistor Q1 and the transistor Q6 at the front end of the point a are both turned off, and the potential at the point a is completely determined by the PWM signal potential.
Because the capacitor C1 at the point A and the resistor R11 of the charging path are both larger, when a PWM signal is not sent, the potential at the point A is increased slowly from 2.5V due to charging, a period of detection time of the whole circuit can be realized when the MCU is powered on, the initialization time of the MCU after the MCU is powered on is ensured, and the main program can be ensured to run to the MCU to output the PWM signal in the period of time without triggering a high-voltage comparison hysteresis circuit too early.
If the MCU crashes in the running process, after the PWM signal disappears, the capacitor C1 can be charged, the voltage of the point A is increased to exceed 4V, the high voltage is compared with the hysteresis circuit for triggering, the voltage of the point y output by the circuit is low, the triode Q3 is turned off, the triode Q2 is turned off, and no output is generated from the port 5V _ OUT. At this time, since the voltage at the point y is low, the transistor Q8 at the stage B is turned off, the transistor Q7 is turned off, the capacitor C3 discharges, and the potential at the point B gradually drops. By controlling the discharge parameters of the capacitor, the point B is reduced to be lower than 3V in about 200ms, the output x of the voltage comparison circuit is at a high level, the N-driver port is at a high level, the P-driver port is at a low level, the triode Q6 and the triode Q1 at the front end of the point A are conducted, and the potential of the point A is changed from being higher than 4V to about 2.5V. Since y is low, the high voltage compare hysteresis line now has a compare point of 3V instead of 4V. In the process that the potential of the point A is reduced to 2.5V from 4V, when the voltage of the point A is 3V, the voltage of the output point y of the high-voltage comparison hysteresis line is changed to 5V, the triode Q8 at the front stage of the B is conducted, the triode Q7 is conducted, and the voltage of the point B begins to rise. When the voltage at the point B rises to 3V, the output of the point x of the voltage comparison circuit, namely the N-driver port, is at a low level, the output of the P-driver port of the inverted drive circuit is at a high level, the triode Q1 and the triode Q6 are switched off, the potential at the point A is not controlled any more, and the potential is determined by the level of the PWM signal again. At the moment, the potential of the point A is slightly lower than 3V, if the MCU is restarted and has a PWM signal, the potential of the point A slowly drops and is stabilized at 2.5V, the point y is constantly at a high level, the triode Q2 is always conducted, and a 5V _ OUT port has voltage output; if the MCU is restarted and still has no PWM signal, the potential of the point A rises again, and after the potential of the point A exceeds 4V, the point y is set to be low again, the transistor Q2 is turned off, and the process is repeated.
The capacitor charging and discharging time of the point B and the existence of a high-voltage comparison hysteresis circuit ensure that the point Y can recover to the high level again after being at the low level, and the PWM signal can be detected again after the point Y is at the high level. Therefore, when the whole circuit is just electrified, the voltage can be output by the 5V _ OUT port and the existence of the PWM signal can be detected after a period of time; when the PWM signal disappears, the output of the 5V _ OUT port can be circularly turned off, and the existence of the PWM signal is detected again after the time delay of 200 ms.
The MCU working state monitoring circuit provided by the invention can realize the monitoring function of the watchdog on the MCU only by using common parts such as an operational amplifier, a triode, a resistor, a capacitor and the like, and compared with a special chip for the watchdog, the MCU working state monitoring circuit has the advantages that the cost is reduced by at least half, and the MCU working state monitoring circuit has good economic benefit.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modifications, equivalents, improvements and the like which are made without departing from the spirit and scope of the present invention shall be included in the protection scope of the present invention. Further, it is intended that the appended claims cover all such variations and modifications as fall within the scope and boundaries of the appended claims or the equivalents of such scope and boundaries.

Claims (4)

1. An MCU operating condition monitoring circuit, characterized by comprising:
the comparison circuit is used for detecting whether the PWM port of the MCU sends a PWM signal or not so as to judge whether the MCU is halted or not; the comparison circuit is respectively connected with the MCU and a power supply thereof;
the power supply control circuit is used for controlling the connection between the MCU and the power supply; the power supply control circuit is respectively connected with the MCU, the power supply and the comparison circuit;
the restarting timing circuit is used for controlling the time interval of the power supply control circuit for disconnecting the connection between the MCU and the power supply and conducting the connection between the MCU and the power supply again; the restarting timing circuit is respectively connected with the comparison circuit and the power supply control circuit;
when the comparison circuit does not detect the PWM signal, the comparison circuit controls the power supply control circuit to disconnect the connection between the MCU and the power supply and then conduct the connection between the MCU and the power supply so as to restart the MCU;
the comparison circuit comprises: a resistor R1, a resistor R2, a resistor R5, a resistor R8, a resistor R9, a resistor R11, a resistor R14, a resistor R17, a resistor R19, a resistor R23, a resistor R24, a transistor Q1, a transistor Q4, a transistor Q6, a capacitor C1, a capacitor C2, a low-voltage comparison circuit and a high-voltage comparison hysteresis circuit, wherein a first end of the resistor R1 is connected to the power supply and a second end is connected to a base of the transistor Q1, a first end of the resistor R2 is connected to an output P _ driver port of the restart timing circuit and a second end is connected to a base of the transistor Q1, a first end of the resistor R5 is connected to a collector of the transistor Q1 and a second end is connected to a first end of the resistor R11, a first end of the resistor R8 is connected to the power supply and a second end is connected to a second end of the resistor R11, a first end of the resistor R9 is connected to the power supply and a second end of the capacitor C2, the first end of the resistor R14 is connected to the PWM port of the MCU and the second end is connected to the base of the transistor Q4, the first end of the resistor R17 is connected to the base of the transistor Q4 and the second end is grounded, the first end of the resistor R19 is connected to the first end of the resistor R11 and the second end is connected to the collector of the transistor Q6, the first end of the resistor R23 is connected to the N _ driver port of the restart timing circuit and the second end is connected to the base of the transistor Q6, the first end of the resistor R24 is connected to the base of the transistor Q6 and the second end is grounded, the emitter of the transistor Q1 is connected to the power supply, the collector of the transistor Q4 is connected to the second end of the resistor R11 and the emitter is grounded, the emitter of the transistor Q6 is grounded, the first end of the capacitor C1 is connected to the first end of the resistor R11 and the second end is grounded, the second end of the capacitor C2 is grounded, the first end of the low voltage comparison line is connected with the first end of the resistor R11, the second end of the low voltage comparison line is connected with the second end of the resistor R9, and the high voltage comparison hysteresis line is connected in parallel with the low voltage comparison line.
2. An MCU operation status monitoring circuit according to claim 1, wherein the power control circuit comprises a resistor R6, a resistor R10, a resistor R13, a resistor R18, a resistor R21, a resistor R22, a capacitor C91, a capacitor C92, a capacitor C93, a transistor Q2, a transistor Q3, a transistor Q5 and a power conversion chip U5, wherein a first end of the resistor R6 is connected to the power supply and a second end is connected to a collector of the transistor Q3, a first end of the resistor R10 is connected to a collector of the transistor Q3 and a second end is connected to a base of the transistor Q2, a first end of the resistor R13 is connected to a second end of the resistor R9 and a second end is connected to a base of the transistor Q3 in the comparison circuit, a first end of the resistor R18 is connected to a base of the transistor Q3 and a second end is connected to a ground, a first end of the resistor R21 is connected to an EN of the transistor Q5 and a second end of the transistor Q5, the first end of the resistor R22 is connected to the base of the transistor Q5 and the second end is grounded, the first end of the capacitor C91 is connected to the collector of the transistor Q2 and the second end is grounded, the capacitor C92 is connected to the capacitor C91 in parallel, the first end of the capacitor C93 is grounded and the second end is connected to a preset positive potential, the emitter of the transistor Q2 is connected to the power supply, the emitter of the transistor Q3 is grounded, the collector of the transistor Q5 is connected to the collector of the transistor Q3 and the emitter is grounded, and the 2 port of the power conversion chip U5 is connected to the preset positive potential and the 3 port is connected to the collector of the transistor Q2.
3. The MCU operation state monitoring circuit of claim 2, wherein the preset positive potential voltage is 3.3V.
4. An MCU operation status monitoring circuit according to claim 1, wherein the restart timing circuit comprises a resistor R26, a resistor R28, a resistor R29, a resistor R30, a resistor R35, a resistor R36, a transistor Q7, a transistor Q8, a capacitor C3, a voltage comparison circuit and a reverse driving circuit, wherein a first end of the resistor R26 is connected with a first end of the resistor R29 and a second end is connected with a collector of the transistor Q7, a first end of the resistor R28 is connected with the power supply and a second end is connected with a collector of the transistor Q8, a second end of the resistor R29 is grounded, a first end of the resistor R30 is connected with a base of the transistor Q7 and a second end is connected with a collector of the transistor Q8, a first end of the resistor R35 is connected with a base of the transistor Q8 and a second end of the resistor R9 in the comparison circuit, the first end of the resistor R36 is connected with the base of the triode Q8, the second end of the resistor R36 is grounded, the emitter of the triode Q7 is connected with the power supply, the emitter of the triode Q8 is grounded, the capacitor C3 is connected with the resistor R29 in parallel, the first end of the voltage comparison circuit is connected with the first end of the resistor R29, the second end of the voltage comparison circuit is connected with the first end of the resistor R2 in the comparison circuit, the first end of the reverse drive circuit is connected with the second end of the voltage comparison circuit, and the second end of the reverse drive circuit is connected with the first end of the R23 in the comparison circuit.
CN201911378748.4A 2019-12-27 2019-12-27 MCU operating condition monitoring circuit Active CN111090566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911378748.4A CN111090566B (en) 2019-12-27 2019-12-27 MCU operating condition monitoring circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911378748.4A CN111090566B (en) 2019-12-27 2019-12-27 MCU operating condition monitoring circuit

Publications (2)

Publication Number Publication Date
CN111090566A CN111090566A (en) 2020-05-01
CN111090566B true CN111090566B (en) 2022-07-01

Family

ID=70397215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911378748.4A Active CN111090566B (en) 2019-12-27 2019-12-27 MCU operating condition monitoring circuit

Country Status (1)

Country Link
CN (1) CN111090566B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201145894Y (en) * 2007-10-26 2008-11-05 比亚迪股份有限公司 Observation circuit for single-chip
CN105446851A (en) * 2014-09-27 2016-03-30 研祥智能科技股份有限公司 Processor monitoring method and system and MCU (Microprogrammed Control Unit) for monitoring processor
CN206251066U (en) * 2016-12-13 2017-06-13 深圳Tcl数字技术有限公司 Chip reset circuit and electronic equipment
CN206270864U (en) * 2016-10-19 2017-06-20 广州视源电子科技股份有限公司 A kind of reset circuit
CN108551338A (en) * 2018-04-28 2018-09-18 歌尔科技有限公司 A kind of reset circuit and portable electronic product

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201145894Y (en) * 2007-10-26 2008-11-05 比亚迪股份有限公司 Observation circuit for single-chip
CN105446851A (en) * 2014-09-27 2016-03-30 研祥智能科技股份有限公司 Processor monitoring method and system and MCU (Microprogrammed Control Unit) for monitoring processor
CN206270864U (en) * 2016-10-19 2017-06-20 广州视源电子科技股份有限公司 A kind of reset circuit
CN206251066U (en) * 2016-12-13 2017-06-13 深圳Tcl数字技术有限公司 Chip reset circuit and electronic equipment
CN108551338A (en) * 2018-04-28 2018-09-18 歌尔科技有限公司 A kind of reset circuit and portable electronic product

Also Published As

Publication number Publication date
CN111090566A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
CN109597701B (en) Device for automatically restarting communication module
CN109194317B (en) Reset circuit and wearable equipment
CN103543344A (en) Method for solving failure of capacitive screen and capacitive screen anomaly detection circuit
US4843592A (en) Microcomputer controlled apparatus provided with a battery voltage detection circuit
CN217588014U (en) Reset circuit
CN111090548B (en) MCU reset restarting method and circuit
CN215729728U (en) Hardware watchdog circuit
CN111090566B (en) MCU operating condition monitoring circuit
CN103885563A (en) Management circuit for self-powered microprocessor protection device microprocessor
WO2021223437A1 (en) Electronic speed control device and unmanned aerial vehicle
CN112636732B (en) Power-off delay protection circuit and device
CN203812186U (en) Microprocessor management circuit of self-powered microcomputer protection device
CN212649434U (en) Power switch circuit with watchdog function
CN209784946U (en) controllable reset circuit based on single chip microcomputer
CN103713912A (en) Automatic power on circuit of computer
CN114389590A (en) Single-key startup and shutdown device, startup and shutdown method and remote restart method
CN203746007U (en) Microprocessor management circuit for self-powered microprocessor protection device
CN102291558B (en) Television and resetting system thereof
EP4258088A1 (en) Stylus
CN212210543U (en) Anti-lock BMS electrical power generating system
CN209805787U (en) IGBT protection circuit based on numerical control lathe servo driver
CN111752365A (en) Linkage startup and shutdown method and circuit, first electronic equipment and second electronic equipment
CN110071478B (en) Display system undervoltage protection circuit
CN216649827U (en) Enabling type watchdog circuit and control system
JP2002165155A (en) Power supply voltage control apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant