A hang detection circuit

By using an N-channel MOSFET and a DC-DC chip to construct a crash detection circuit in a microcontroller, the problems of increased cost and susceptibility to false triggering of independent watchdog timers in resource-constrained devices are solved, achieving fast and low-cost crash detection and reset.

CN225020471UActive Publication Date: 2026-11-24YANGZHOU JING MING TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522780891.3
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-11-24
Estimated Expiration
2035-12-29

AI Technical Summary

Technical Problem

The existing independent watchdog mechanism of microcontrollers increases system cost and complexity in resource-constrained embedded devices, and is prone to false triggering in electromagnetic interference environments, leading to unnecessary system restarts.

Method used

A crash detection circuit is adopted, which uses an N-channel MOSFET and a DC-DC chip in conjunction with a capacitor and a resistor to form a loop. It monitors the PWM signal of the microcontroller to determine whether it is working properly, and performs a power-down reset when a crash is detected.

Benefits of technology

It enables rapid determination of whether the microcontroller is working properly, reduces monitoring and reset costs, and has better anti-interference performance, avoiding false triggering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN225020471U_ABST
    Figure CN225020471U_ABST
Patent Text Reader

Abstract

This utility model discloses a crash detection circuit, relating to the field of microcontroller detection circuit technology. In this utility model, when the N-channel MOSFET fails to conduct, the power supply to the subsequent circuit is cut off, effectively resetting the microcontroller. The cycle begins when the voltage stored in capacitor C2 reaches the N-channel MOSFET threshold, triggering the DC-DC converter to power the microcontroller, which then outputs a PWM signal. If the PWM signal is not output, capacitor C2 discharges until it falls below the N-channel MOSFET threshold, at which point the power is turned off. This cycle then repeats. The crash detection circuit in this utility model can quickly determine if the microcontroller is functioning correctly and can also restart the microcontroller. This crash detection circuit is significantly cheaper than a dedicated watchdog chip, effectively reducing the cost of microcontroller monitoring and reset, and offering better anti-interference performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This utility model relates to the field of single-chip microcomputer detection circuit technology, specifically a system crash detection circuit. Background Technology

[0002] A wireless vibration tester is a specialized device used to collect, record, and analyze mechanical vibration signals. It transmits data to a terminal in real time via wireless transmission technology, facilitating remote monitoring and equipment status diagnosis. Like most electronic products, the core component of a wireless vibration tester is a microcontroller; the functionality of the microcontroller directly determines the normal operation of the device.

[0003] Generally, microcontrollers use an internal independent watchdog timer to monitor the normal operation of the program. An independent watchdog timer (IWDG) is a commonly used fault detection mechanism in embedded systems, primarily used to monitor the program's running status and trigger a system reset in case of an anomaly. Its main disadvantages include the following two points: Resource Consumption and Cost: Implementing an independent watchdog timer requires additional hardware resources (such as an external clock circuit) or consumes internal microcontroller resources, which increases system cost and design complexity; especially in resource-constrained embedded devices, this can impact overall efficiency. Risk of false triggering: In environments with strong electromagnetic interference, the clock signal of the independent watchdog may be interfered with, leading to abnormal counting or false reset; in addition, if the watchdog feeding operation itself is not executed in time due to interruption delay or priority issues, it may also cause unnecessary system restart. Summary of the Invention

[0004] The purpose of this invention is to provide a system crash detection circuit to solve the problems mentioned in the background art.

[0005] To solve the above-mentioned technical problems, this utility model provides the following technical solution: A system crash detection circuit includes a detection circuit, a DC-DC chip U1, and a microcontroller U2. The output terminal of the detection circuit is electrically connected to the DC-DC chip U1, the output terminal of the DC-DC chip U1 is electrically connected to the input terminal of the microcontroller U2, and the output terminal of the microcontroller U2 is electrically connected to the input terminal of the detection circuit.

[0006] Furthermore, the detection circuit includes a connector P1, pin 1 of which is connected to the +12V port of an external power supply. The connector P1 is electrically connected to the DC-DC chip U1. Pin 2 of the connector P1, pin 3 of the N-channel MOSFET Q1, pin 1 of the N-channel MOSFET Q1, resistor R2, diode D1, capacitor C1, and resistor R1 are connected in series. Resistor R1 is electrically connected between pin 1 of the connector P1 and the +12V port of the power supply.

[0007] Furthermore, the capacitor C1 and resistor R1 are connected to pin 2 of transistor Q2, and pin 1 of transistor Q2 is connected to resistor R3. The PWM signal output from the microcontroller U2 is connected in series with resistor R3. Resistor R5 is connected in series between pin 1 and pin 3 of transistor Q2. Pin 3 of transistor Q2 is connected in series with pin 2 of N-channel MOSFET Q1.

[0008] Furthermore, the connection between pin 3 of transistor Q2 and resistor R5 is grounded, and the connection between pin 3 of transistor Q2 and pin 2 of N-channel MOSFET Q1 is grounded.

[0009] Furthermore, an external resistor R4 is connected between pin 1 of the N-channel MOSFET Q1 and resistor R2, and resistor R4 is electrically connected between pin 3 of the transistor Q2 and pin 2 of the N-channel MOSFET Q1.

[0010] Furthermore, an external capacitor C2 is connected between the resistor R2 and the diode D1, and the capacitor C2 is electrically connected between pin 3 of the transistor Q2 and pin 2 of the N-channel MOSFET Q1.

[0011] Furthermore, an external resistor R6 and a diode D2 are connected between the diode D1 and the capacitor C1, and the diode D2 is electrically connected between pin 3 of the transistor Q2 and pin 2 of the N-channel MOSFET Q1.

[0012] Furthermore, the resistor R6 and the diode D2 are connected in series, and the resistor R6 is positioned between the capacitor C1 and the diode D2.

[0013] Compared with the prior art, the beneficial effects achieved by this utility model are: In this invention, when the N-channel MOSFET Q1 fails to conduct, the power supply to the subsequent circuit is cut off, thus resetting the microcontroller U2. The cycle repeats: the +12V port charges capacitor C2 via resistor R1, capacitor C1, and diode D1. When the voltage stored in capacitor C2 reaches the threshold of the N-channel MOSFET Q1, the DC-DC chip U1 turns on its power supply to the microcontroller U2, which then outputs a PWM signal. If the PWM signal is not output, capacitor C2 discharges through resistors R2 and R4 until it falls below the threshold of the N-channel MOSFET Q1, at which point the power is turned off. Then, the +12V port is turned on again, charging capacitor C2 via resistor R1, capacitor C1, and diode D1. The crash detection circuit in this invention can quickly determine if the microcontroller is functioning correctly and can also restart the microcontroller. This crash detection circuit is significantly cheaper than a dedicated watchdog chip, effectively reducing the cost of microcontroller monitoring and reset, and offering better anti-interference performance. Attached Figure Description

[0014] The accompanying drawings are provided to further illustrate the present invention and form part of the specification. They are used together with the embodiments of the present invention to explain the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a circuit diagram of the entire utility model; Figure 2 This is a schematic diagram of the PWM waveform of this utility model. Detailed Implementation

[0015] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, and not all embodiments. Based on the embodiments of the present utility model, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present utility model.

[0016] like Figures 1-2As shown, this utility model provides a technical solution: a system crash detection circuit, including a detection circuit, a DC-DC chip U1, and a microcontroller U2. The output terminal of the detection circuit is electrically connected to the DC-DC chip U1, the output terminal of the DC-DC chip U1 is electrically connected to the input terminal of the microcontroller U2, and the output terminal of the microcontroller U2 is electrically connected to the input terminal of the detection circuit. The detection circuit includes a connector P1, pin 1 of which is connected to the +12V port of an external power supply. The connector P1 is connected to the DC-DC chip U1... The microcontroller U1 is electrically connected as follows: pin 2 of connector P1, pin 3 of N-channel MOSFET Q1, pin 1 of N-channel MOSFET Q1, resistor R2, diode D1, capacitor C1, and resistor R1 are connected in series. Resistor R1 is electrically connected between pin 1 of connector P1 and the +12V power supply port. Pin 2 of transistor Q2 is externally connected between capacitor C1 and resistor R1. Pin 1 of transistor Q2 is externally connected to resistor R3. The PWM signal output from the microcontroller U2 is connected in series with resistor R3. A resistor R5 is connected in series between pin 1 and pin 3 of transistor Q2. Pin 3 of transistor Q2 is connected in series with pin 2 of N-channel MOSFET Q1. The connection between pin 3 of transistor Q2 and resistor R5 is grounded, and the connection between pin 3 of transistor Q2 and pin 2 of N-channel MOSFET Q1 is also grounded. An external resistor R4 is connected between pin 1 of N-channel MOSFET Q1 and resistor R2. Resistor R4 is electrically connected to pin 3 of transistor Q2 and the N-channel MOSFET Q1. Between pins 2 of the N-channel MOSFET Q1; an external capacitor C2 is connected between resistor R2 and diode D1, and capacitor C2 is electrically connected between pin 3 of transistor Q2 and pin 2 of N-channel MOSFET Q1; an external resistor R6 and diode D2 are connected between diode D1 and capacitor C1, and diode D2 is electrically connected between pin 3 of transistor Q2 and pin 2 of N-channel MOSFET Q1; resistor R6 and diode D2 are connected in series, and resistor R6 is placed between capacitor C1 and diode D2.

[0017] Specific working principle: The overall operation of the circuit in this invention is shown below: 1. The +12V port of the external power supply is connected to the circuit. The +12V first passes through resistor R1, capacitor C1 and diode D1, and then splits into two branches. One branch goes to ground through capacitor C2, and the other branch goes to ground through resistor R2 and resistor R4. During this period, capacitors C1 and C2 are charging, and the voltage will gradually rise. 2. Initially, capacitors C1 and C2 will charge to 6V. During the charging process, capacitor C2 will discharge through resistors R2 and R4. At this time, the voltage at pin 2 of resistor R4 will be approximately 5.45V. Figure 1 As shown; 3. The threshold turn-on voltage of the N-channel MOSFET Q1 (SI2310B) is a maximum of 2V. The threshold turn-on voltage is achieved when the voltage at pin 1 is greater than the voltage at pin 2 (2V). At this point, the voltage at pin 2 of resistor R4 (which is also pin 1 of the N-channel MOSFET Q1) is 5.45V, which is greater than 2V. Therefore, pins 3 and 2 of the N-channel MOSFET Q1 are turned on. Figure 1 As shown; 4. At this point, the +12V port of the power supply forms a loop with ground, supplying power to the subsequent DC-DC chip U1. DC-DC chip U1 generates 3V3 to power microcontroller U2, which in turn generates a PWM wave signal. This PWM wave signal is then supplied to pin 1 of resistor R3. Figure 1 As shown; 5. During the PWM high level, voltage flows through resistors R3 and R5 to GND. Therefore, the voltage at pin 2 of resistor R5 is 2.75V. Since the conduction voltage between pins 1 and 3 of transistor Q2 is 0.7V, and 2.75V is greater than 0.7V, pins 2 and 3 of transistor Q2 are conducting. Figure 1 As shown; 6. At this time, pin 1 of capacitor C1 can discharge through pins 2 and 3 of transistor Q2, then through diode D2 and resistor R6, back to pin 2 of capacitor C1. The impedance of this circuit is very small, the purpose of which is to allow capacitor C1 to discharge quickly. At this time, the voltage of capacitor C2 will be high, the voltage of pins 1 and 2 of N-channel MOSFET Q1 will be high, which will make the on-resistance of pins 2 and 3 of N-channel MOSFET Q1 small. 7. During the PWM low level, pins 2 and 3 of transistor Q2 are not conducting. Then, the +12V port passes through resistor R1, capacitor C1 and diode D1, and then splits into two branches. One branch goes to ground through capacitor C2, and the other branch goes to ground through resistor R2 and resistor R4. 8. Since capacitor C1 is discharged during the PWM high level, it is close to 0V. Then, capacitor C2 can reach about 11V during the charging process. After the voltage is divided by resistors R2 and R4, pins 1 and 2 of N-channel MOSFET Q1 can reach 10V. At this time, the on-resistance of pins 2 and 3 of N-channel MOSFET Q1 can reach about 100mR. 9. The +12V port forms a loop through the N-channel MOSFET Q1, the DC-DC chip U1 generates 3V3, the microcontroller U2 generates a PWM signal, and the loop continues in sequence. Under normal circumstances, PWM is a continuous square wave with a fixed frequency and a 50% duty cycle. With 3V3V, pins 2 and 3 of transistor Q2 will conduct, and capacitor C1 will discharge. The discharge circuit is C1→Q2→D2→R6. Because the resistance of the discharge circuit is small, the charge stored in capacitor C1 will be discharged quickly, and the voltage across it will be almost 0V. The power supply circuit is +12V→R1→pins 2 and 3 of Q2→GND. At this time, the capacitor C2 circuit is C2→R2→R4→GND. The discharge of capacitor C2 will definitely be slower than other circuits. The resistance values ​​of resistors R1 and R4 are much larger than those of resistors R6. Because with GND, pin 2 of transistor Q2... With pin 3 not conducting, the entire circuit is +12V → R1 → C1 → D1 → C2 → GND. Because capacitor C1 discharges when the PWM is high, the charging voltage of capacitor C2 will increase. After removing the 0.7V voltage drop of diode D1, the voltage of capacitor C2 is around 11V. The impedance of the charging circuit is approximately the resistance of resistor R1. Compared to the resistances of resistors R2 and R4, the charging is significantly greater than the discharging, so the voltage across resistor R4 is close to 10V. Because the PWM is continuous in normal operating mode, the voltage across resistor R4 is stable at 10V, ensuring that the N-channel MOSFET Q1 remains stably turned on under normal operating conditions of the microcontroller.

[0018] How exactly does the circuit in this invention perform crash detection? The specific principle is as follows: When the microcontroller U2 suddenly stops working, possible reasons include: external interference, program crash, or freezing. The PWM output of the microcontroller U2 is a fixed voltage: 3V3 or GND; Assuming it is GND, then transistor Q2 is not conducting. At this time, the +12V port continuously charges capacitors C1 and C2 through resistor R1, capacitor C1, diode D1 and capacitor C2, and then to ground. When capacitors C1 and C2 are fully charged, the voltage across capacitors C1 and C2 is approximately 6V. Capacitor C2 has a discharge circuit. After continuous discharge through resistors R2 and R4, the voltage across capacitor C2 eventually becomes 0V. At this point, N-channel MOSFET Q1 will not conduct, and the +12V port will not be able to supply power to the subsequent stage. Assuming a voltage of 3V3, transistor Q2 is turned on. At this time, capacitor C1 is continuously discharging. The circuit impedance from the +12V port through resistor R1, capacitor C1, diode D1, and capacitor C2 to ground is larger than that from the +12V port through resistor R1 and transistor Q2 to ground. More current flows through transistor Q2. Most importantly, capacitor C1 is continuously discharging through transistor Q2, diode D2, and resistor R6. The voltage stored in capacitor C2 does not reach the turn-on voltage of N-channel MOSFET Q1. The above description describes the PWM state in the event of a system crash, maintaining a fixed level: 3V3 or GND, not a continuous square wave, which will cause the power supply of the subsequent stage to shut down; based on the above analysis, it is determined that the microcontroller U2 has crashed and needs to be reset; reset methods include button reset, power-down reset, etc.

[0019] In this invention, once the N-channel MOSFET Q1 fails to conduct, the power supply to the subsequent circuit is cut off, thus resetting the microcontroller U2. The cycle begins with the +12V port charging capacitor C2 via resistor R1, capacitor C1, and diode D1. When the voltage stored in capacitor C2 reaches the threshold voltage of the N-channel MOSFET Q1, the DC-DC chip U1 turns on its power supply to the microcontroller U2, which then outputs a PWM signal. If the PWM signal is not output, capacitor C2 discharges through resistors R2 and R4 until it falls below the threshold voltage of the N-channel MOSFET Q1, at which point the power is turned off. Then, the +12V port is turned on again, charging capacitor C2 via resistor R1, capacitor C1, and diode D1. The crash detection circuit in this invention can quickly determine whether the microcontroller is functioning properly and also allow the microcontroller to restart. The crash detection circuit in this invention is much cheaper than a dedicated watchdog chip, which can effectively reduce the cost of microcontroller monitoring and reset, and has better anti-interference performance.

[0020] Finally, it should be noted that the above description is merely a preferred embodiment of this utility model and is not intended to limit the utility model. Although the utility model has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this utility model should be included within the protection scope of this utility model.

Claims

1. A system crash detection circuit, comprising a detection circuit, a DC-DC chip U1, and a microcontroller U2, characterized in that: The output terminal of the detection circuit is electrically connected to the DC-DC chip U1, the output terminal of the DC-DC chip U1 is electrically connected to the input terminal of the microcontroller U2, and the output terminal of the microcontroller U2 is electrically connected to the input terminal of the detection circuit.

2. The system crash detection circuit according to claim 1, characterized in that: The detection circuit includes a connector P1, pin 1 of which is connected to the +12V port of an external power supply. The connector P1 is electrically connected to the DC-DC chip U1. Pin 2 of the connector P1, pin 3 of the N-channel MOSFET Q1, pin 1 of the N-channel MOSFET Q1, resistor R2, diode D1, capacitor C1, and resistor R1 are connected in series. Resistor R1 is electrically connected between pin 1 of the connector P1 and the +12V port of the power supply.

3. The system crash detection circuit according to claim 2, characterized in that: The capacitor C1 and resistor R1 are connected to pin 2 of transistor Q2. Pin 1 of transistor Q2 is connected to resistor R3. The PWM signal output from the microcontroller U2 is connected in series with resistor R3. Resistor R5 is connected in series between pin 1 and pin 3 of transistor Q2. Pin 3 of transistor Q2 is connected in series with pin 2 of N-channel MOSFET Q1.

4. The system crash detection circuit according to claim 3, characterized in that: The connection between pin 3 of transistor Q2 and resistor R5 is grounded, and the connection between pin 3 of transistor Q2 and pin 2 of N-channel MOSFET Q1 is grounded.

5. A system crash detection circuit according to claim 4, characterized in that: An external resistor R4 is connected between pin 1 of the N-channel MOSFET Q1 and resistor R2. The resistor R4 is electrically connected between pin 3 of the transistor Q2 and pin 2 of the N-channel MOSFET Q1.

6. A system crash detection circuit according to claim 4, characterized in that: An external capacitor C2 is connected between the resistor R2 and the diode D1. The capacitor C2 is electrically connected between pin 3 of the transistor Q2 and pin 2 of the N-channel MOSFET Q1.

7. A system crash detection circuit according to claim 4, characterized in that: An external resistor R6 and a diode D2 are connected between diode D1 and capacitor C1. Diode D2 is electrically connected between pin 3 of transistor Q2 and pin 2 of N-channel MOSFET Q1.

8. A system crash detection circuit according to claim 7, characterized in that: The resistor R6 and the diode D2 are connected in series, and the resistor R6 is located between the capacitor C1 and the diode D2.