A hardware protection circuit, motor driving system and method, and electronic device

By using the first and second protection modules in the hardware protection circuit, and a circuit composed of complementary transistors and diodes, the problem of multiple abnormal triggers during the abnormal detection process of the motor PWM drive was solved, thus achieving the stability and reliability of motor operation.

CN122203149APending Publication Date: 2026-06-12XIAOMI TECH (WUHAN) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAOMI TECH (WUHAN) CO LTD
Filing Date
2024-12-12
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In the existing technology, the PWM drive of the motor may cause multiple abnormal triggers during the abnormal critical situation of the hardware circuit abnormal detection process, resulting in multiple damages to the motor.

Method used

The system employs a hardware protection circuit, including a first protection module and a second protection module. Through the microcontroller's IRQn port and a comparator circuit, it promptly stops the microcontroller's PWM drive signal. A circuit composed of complementary transistors and diodes is used to lock the abnormal motor signal in abnormal situations to prevent repeated triggering.

Benefits of technology

It improves the efficiency of handling motor malfunctions, ensures the stability and reliability of motor operation, and avoids multiple damages to the motor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122203149A_ABST
    Figure CN122203149A_ABST
Patent Text Reader

Abstract

This application discloses a hardware protection circuit, a motor drive system, method, and electronic device, relating to the field of circuit technology. The hardware protection circuit includes a first protection module and a second protection module. A first terminal of the first protection module is connected to the PWM port of a microcontroller and the first terminal of a motor PWM drive module. A second terminal of the first protection module is connected to the first terminal of the second protection module. A fourth terminal of the first protection module is connected to the second terminal of the second protection module, the IRQn port of the microcontroller, and the first terminal of a comparator circuit. The first protection module is used to turn on when the motor PWM drive module outputs a low-level signal, and to drive the second protection module to turn on as well. The second protection module is used to maintain the first protection module continuously on while it is on. The first protection module is also used to pull down the PWM drive signal output by the microcontroller while it is continuously on, and to control the microcontroller to stop outputting. This application ensures stable motor operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of circuit technology, and in particular to a hardware protection circuit, motor drive system, method, and electronic device. Background Technology

[0002] Motor drive methods commonly use microcontrollers to control multiple pulse width modulation (PWM), and then drive the motor to run through a motor PWM driver such as an integrated intelligent power module (IPM) or a discrete bridge circuit.

[0003] Currently, hardware protection for motors is mainly achieved through the built-in abnormal condition detection circuit within the IPM (Integrated Pulse PWM). This abnormal condition detection circuit can output a fault level in a timely manner. After the external interrupt pin of the microcontroller captures the fault signal, the control program generates an interrupt, calls the corresponding interrupt service routine to handle the abnormality, and triggers PWM braking control.

[0004] However, with this hardware protection method, since the motor PWM drive fault handling is a process of first detecting abnormalities in the hardware circuit and then handling them in the software, the abnormality may be triggered multiple times during the abnormality detection process, causing multiple damages to the motor PWM drive or the motor. Summary of the Invention

[0005] In view of this, this application provides a hardware protection circuit, a motor drive system, a method, and an electronic device. The main purpose is to improve the technical problem that the existing technology may cause multiple triggering of abnormalities during the abnormal critical situation of the hardware circuit abnormality detection process, which may cause multiple damages to the motor PWM drive or the motor.

[0006] In a first aspect, this application provides a hardware protection circuit, including: a first protection module and a second protection module;

[0007] The first terminal of the first protection module is connected to the pulse width modulation (PWM) port of the microcontroller and the first terminal of the motor PWM drive module. The second terminal of the first protection module is connected to the first terminal of the second protection module. The fourth terminal of the first protection module is connected to the second terminal of the second protection module, the interrupt request (IRQn) port of the microcontroller, and the first terminal of the comparator circuit.

[0008] The first protection module is used to turn on when the motor PWM drive module outputs a low-level signal, and to drive the second protection module to turn on, wherein the low-level signal output by the motor PWM drive module indicates that there is an abnormality in the motor driven by the motor PWM drive module;

[0009] The second protection module is used to keep the first protection module continuously conducting when it is conducting. The first protection module is also used to pull the PWM drive signal output by the microcontroller low when it is continuously conducting and control the microcontroller to stop outputting.

[0010] Optionally, the first protection module includes: a diode, a first transistor, a first capacitor, a first inductor, a second inductor, and a third inductor;

[0011] The positive terminal of the diode is connected to the PWM port of the microcontroller and the first terminal of the motor PWM drive module, and the negative terminal of the diode is connected to the base of the first transistor, the first terminal of the first capacitor, the first terminal of the first inductor, the first terminal of the third inductor, the second terminal of the second protection module, the IRQn port of the microcontroller, and the first terminal of the comparator circuit.

[0012] Optionally, the collector of the first transistor is connected to the first terminal of the second protection module, and the emitter of the first transistor is connected to the second terminal of the first capacitor, the second terminal of the first inductor, and the first terminal of the second inductor.

[0013] The second terminal of the second inductor is connected to the second terminal of the third inductor.

[0014] Optionally, the first transistor is used to conduct between the base and emitter of the first transistor when the motor PWM drive module outputs a low-level signal, and to conduct between the collector and emitter of the first transistor, so that the first protection module is turned on.

[0015] The first transistor is also used to pull up the voltage of the second protection module when the collector and emitter are conducting, thereby turning on the second protection module.

[0016] Optionally, the first transistor is also used to pull down the PWM drive signal output by the microcontroller and control the microcontroller to stop outputting while the second protection module maintains continuous conduction between the base and emitter of the first transistor.

[0017] Optionally, the second protection module includes: a second transistor, a second capacitor, and a fourth inductor;

[0018] The base of the second transistor is connected to the collector of the first transistor, the first terminal of the second capacitor, and the first terminal of the fourth inductor;

[0019] The collector of the second transistor is connected to the cathode of the diode, the base of the first transistor, the first terminal of the first capacitor, the first terminal of the first inductor, the first terminal of the third inductor, the IRQn port of the microcontroller, and the first terminal of the comparator circuit.

[0020] The emitter of the second transistor is connected to the second terminal of the second capacitor and the second terminal of the fourth inductor.

[0021] Optionally, when the collector and emitter of the second transistor are conducting, the base voltage of the second transistor is pulled high by the collector of the first transistor, thus connecting the base and emitter of the second transistor and causing the collector and emitter of the second transistor to conduct, thereby turning on the second protection module.

[0022] Optionally, the second transistor is also used to pull down the base voltage of the first transistor through the collector of the second transistor when the collector and emitter of the second transistor are conducting, so as to maintain continuous conduction between the base and emitter of the first transistor.

[0023] In a second aspect, this application provides a motor drive system, characterized in that it includes: the hardware protection circuit described in the first aspect, a microcontroller, a motor PWM drive module, a motor, and a comparison circuit;

[0024] The first terminal of the hardware protection circuit is connected to the PWM port of the microcontroller and the first terminal of the motor PWM drive module, and the second terminal of the hardware protection circuit is connected to the IRQn port of the microcontroller and the first terminal of the comparator circuit.

[0025] The hardware protection circuit is used to turn on the first protection module and drive the second protection module to turn on when the motor PWM drive module outputs a low-level signal. The low-level signal output by the motor PWM drive module indicates that there is an abnormality in the motor driven by the motor PWM drive module.

[0026] The hardware protection circuit is also used to maintain the first protection module continuously conducting when the second protection module is conducting, pull the PWM drive signal output by the microcontroller low, and control the microcontroller to stop outputting.

[0027] Optionally, the PWM port of the microcontroller is connected to the first terminal of the motor PWM drive module and the first terminal of the hardware protection circuit;

[0028] The second terminal of the motor PWM drive module is connected to the first terminal of the motor, and the second terminal of the motor is connected to the second terminal of the comparator circuit.

[0029] Optionally, the microcontroller is used to input a predetermined number of PWM drive signals to the motor PWM drive module;

[0030] The motor PWM drive module is used to convert the predetermined number of PWM drive signals and drive the motor through the converted PWM drive signals.

[0031] Optionally, the comparison circuit is used to collect the voltage value, current value and temperature value of the motor, and compare the voltage value with a predetermined voltage threshold, the current value with a predetermined current threshold, and the temperature value with a predetermined temperature threshold, respectively.

[0032] The comparison circuit is also used to control the microcontroller to stop outputting when the voltage value exceeds the predetermined voltage threshold, and / or the current value exceeds the predetermined current threshold, and / or the temperature value exceeds the predetermined temperature threshold.

[0033] Thirdly, this application provides a hardware protection method, characterized in that it includes:

[0034] In response to the motor PWM drive module outputting a low-level signal, the first protection module in the hardware protection circuit is turned on, and the second protection circuit in the hardware protection circuit is also turned on. The low-level signal output by the motor PWM drive module indicates that there is an abnormality in the motor driven by the motor PWM drive module.

[0035] The second protection circuit maintains the first protection circuit continuously conducting based on the conduction of the second protection circuit;

[0036] The first protection circuit, which remains continuously on, pulls the PWM drive signal output by the microcontroller low and controls the microcontroller to stop outputting.

[0037] Optionally, the first protection module in the control hardware protection circuit is turned on, thereby causing the second protection circuit in the hardware protection circuit to be turned on, including:

[0038] The base and emitter of the first transistor in the first protection module are connected, and the collector and emitter of the first transistor are connected.

[0039] Based on the collector of the first transistor, the base voltage of the second transistor in the second protection circuit is pulled up, controlling the conduction between the base and emitter of the second transistor, and driving the conduction between the collector and emitter of the second transistor.

[0040] Optionally, the second protection circuit based on conduction maintains the first protection circuit continuously conducting, including:

[0041] Based on the collector of the second transistor, the base voltage of the first transistor is pulled down, maintaining continuous conduction between the base and emitter of the first transistor.

[0042] Fourthly, this application provides an electronic device, including the hardware protection circuit described in the first aspect, or the motor drive system described in the second aspect.

[0043] By employing the above technical solutions, this application provides a hardware protection circuit, a motor drive system, a method, and an electronic device. The hardware protection circuit includes a first protection module and a second protection module. The first terminal of the first protection module is connected to the pulse width modulation (PWM) port of the microcontroller and the first terminal of the motor PWM drive module. The second terminal of the first protection module is connected to the first terminal of the second protection module. The fourth terminal of the first protection module is connected to the second terminal of the second protection module, the interrupt request (IRQn) port of the microcontroller, and the first terminal of the comparator circuit. The first protection module is used to turn on when the motor PWM drive module outputs a low-level signal, and to drive the second protection module to turn on as well. The low-level signal output by the motor PWM drive module indicates an abnormality in the motor driven by the motor PWM drive module. The second protection module is used to maintain the first protection module continuously on while it is on. The first protection module is also used to pull down the PWM drive signal output by the microcontroller while it is continuously on, and to control the microcontroller to stop outputting. Compared with existing technologies, this application, through the first and second protection modules, can promptly stop the microcontroller from outputting the PWM drive signal when the motor malfunctions, improving the efficiency of motor malfunction handling, ensuring stable motor operation, and increasing the reliability of the motor drive.

[0044] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0045] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This paper shows a schematic diagram of the structure of a hardware protection circuit provided in an embodiment of this application;

[0048] Figure 2 A schematic diagram of the structure of a motor drive system provided in an embodiment of this application is shown;

[0049] Figure 3 A flowchart illustrating a hardware protection method provided in an embodiment of this application is shown;

[0050] Figure 4 The diagram shows a structural schematic of an example provided in an embodiment of this application;

[0051] Figure 1 middle:

[0052] 11-First protection module; 12-Second protection module;

[0053] Figure 2 middle:

[0054] 1-Hardware protection circuit; 2-Microcontroller; 3-Motor PWM drive module; 4-Motor; 5-Comparison circuit. Detailed Implementation

[0055] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0056] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0057] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0058] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0059] The following is combined Figure 1 This application describes hardware protection circuits according to some embodiments.

[0060] This application provides a hardware protection circuit, such as Figure 1 As shown, it includes: a first protection module 11 and a second protection module 12; the first terminal of the first protection module 11 is connected to the pulse width modulation (PWM) port of the microcontroller and the first terminal of the motor PWM drive module; the second terminal of the first protection module 11 is connected to the first terminal of the second protection module 12; the fourth terminal of the first protection module 11 is connected to the second terminal of the second protection module 12, the interrupt request (IRQn) port of the microcontroller, and the first terminal of the comparator circuit; the first protection module 11 is used to turn on when the motor PWM drive module outputs a low-level signal, and to drive the second protection module 12 to turn on; the second protection module 12 is used to maintain the first protection module 11 continuously turning on when it is turned on; the first protection module is also used to pull the PWM drive signal output by the microcontroller low when it is continuously turned on, and to control the microcontroller to stop outputting; wherein, the low-level signal output by the motor PWM drive module indicates that there is an abnormality in the motor driven by the motor PWM drive module.

[0061] In this embodiment, a microcontroller unit (MCU) is an integrated circuit chip that integrates the main components of a computer, including a central processing unit (CPU), random access memory (RAM), read-only memory (ROM), and various input / output interfaces. The purpose of a microcontroller is to provide the functionality required by embedded systems, enabling them to perform specific tasks within limited space and power consumption. The core of the microcontroller is the CPU, which is responsible for executing instructions in the program. RAM is used for temporary data and intermediate results, while ROM is used to store firmware or other immutable program code. In addition, the microcontroller is equipped with various communication interfaces (such as serial interfaces, parallel interfaces, USB interfaces, etc.) and other special function modules (such as ADC / DAC, timers, PWM generators, etc.) to facilitate interaction with other external devices.

[0062] For example, the microcontroller in this application embodiment can send multiple drive signals to the motor PWM drive module, and the motor PWM drive module drives the motor by adjusting the multiple drive signals.

[0063] In some examples, a motor PWM drive module is an electronic device specifically designed to control motor operation. It utilizes PWM technology to adjust the motor's speed and direction. PWM is a method of controlling the average output voltage by changing the pulse width. Specifically, the motor PWM drive module receives user commands and calculates appropriate PWM drive signal parameters. Based on the microprocessor's calculations, it generates a PWM drive signal. The frequency and duty cycle of this signal can be dynamically adjusted as needed, amplifying the PWM drive signal to a level sufficient to drive the motor. For high-power motors, this part may employ MOSFETs or other types of power transistors to monitor motor current and prevent overheating or short circuits that could damage the motor or the drive module itself.

[0064] In this embodiment, the microcontroller's IRQn port can be used to receive interrupt signals generated by external devices or other components. When an event occurs and requires immediate processor attention, the relevant device can send an interrupt request signal to the microcontroller through the IRQn port. Upon receiving this signal, the microcontroller will pause its currently executing task, process the interrupt request, and then return to its original task to continue execution.

[0065] For example, in this application, when the motor PWM drive module outputs a low-level signal, it indicates that the motor PWM drive module has detected an abnormality in the motor. The first protection module 11 and the second protection module 12 can pull the PWM drive signal output by the microcontroller low through the IRQn port of the microcontroller, thereby controlling the microcontroller to stop outputting the PWM drive signal.

[0066] Specifically, when the motor PWM drive module outputs a low-level signal, the first protection module 11 is turned on. When the first protection module 11 is turned on, it pulls down the input voltage of the second protection module 12, causing the second protection module 12 to turn on. When the second protection module 12 is turned on, it pulls down the input voltage of the first protection module 11, keeping the first protection module 11 continuously turned on. The first protection module 11 pulls down the PWM drive signal output by the microcontroller through the IRQn port of the microcontroller, thereby controlling the microcontroller to stop outputting the PWM drive signal.

[0067] Optionally, the first protection module includes: diode D1, first transistor Q1, first capacitor C1, first inductor L1, second inductor L2, and third inductor L3; the positive terminal of diode D1 is connected to the PWM port of the microcontroller and the first terminal of the motor PWM drive module, and the negative terminal of diode D1 is connected to the base of the first transistor Q1, the first terminal of the first capacitor C1, the first terminal of the first inductor L1, the first terminal of the third inductor L3, the second terminal of the second protection module 12, the IRQn port of the microcontroller, and the first terminal of the comparator circuit.

[0068] Optionally, the collector of the first transistor Q1 is connected to the first terminal of the second protection module 12, and the emitter of the first transistor Q1 is connected to the second terminal of the first capacitor C1, the second terminal of the first inductor L1, and the first terminal of the second inductor L2; the second terminal of the second inductor L2 is connected to the second terminal of the third inductor L3.

[0069] In this embodiment, the first transistor Q1 can be a PNP transistor. Specifically, a PNP transistor is a type of transistor whose structure consists of three layers of semiconductor material arranged in a P-type-N-type-P-type configuration. This structure gives the PNP transistor unique electrical characteristics, enabling it to amplify electrical signals or be used as a switch under specific conditions. The working principle of a PNP transistor is based on the movement of charge carriers. In a PNP transistor, the current is mainly composed of holes (positively charged particles). When the base is negatively biased relative to both the emitter and collector, the transistor is in the cutoff state, and almost no current flows. Conversely, when the base is positively biased relative to both the emitter and collector, the transistor enters the saturation region, where the current is at its maximum.

[0070] Optionally, the first transistor Q1 is used to turn on the base and emitter of the first transistor Q1 when the motor PWM drive module outputs a low-level signal, and also to turn on the collector and emitter of the first transistor Q1, so that the first protection module 11 is turned on; the first transistor Q1 is also used to pull up the voltage of the second protection module 12 when the collector and emitter are turned on, so that the second protection module 12 is turned on.

[0071] Optionally, the first transistor Q1 is also used to pull down the PWM drive signal output by the microcontroller and control the microcontroller to stop outputting when the base and emitter of the first transistor Q1 are continuously connected by the second protection module 12.

[0072] For example, when the motor PWM drive module outputs a low-level signal, diode D1 transmits the low-level signal to the base of the first transistor Q1, pulling the base of the first transistor Q1 low. This causes the base and emitter of the first transistor Q1 to conduct, which in turn causes the collector and emitter of the first transistor Q1 to conduct. After the collector of the first transistor Q1 is turned on, the second protection module is connected to the collector of the first transistor Q1, thus pulling the input voltage of the second protection module 12 high and turning on the second protection module 12. The second protection module 12 is also connected to the base of the first transistor Q1. After the second protection module 12 is turned on, it can continue to pull down the voltage of the base of the first transistor Q1, maintaining the first transistor Q1 continuously conducting. When the first transistor Q1 is continuously conducting, it pulls down the PWM drive signal output by the microcontroller and controls the microcontroller to stop outputting.

[0073] Optionally, the second protection module 12 includes: a second transistor Q2, a second capacitor C2, and a fourth inductor L4; the base of the second transistor Q2 is connected to the collector of the first transistor Q1, the first terminal of the second capacitor C2, and the first terminal of the fourth inductor L4; the collector of the second transistor Q2 is connected to the cathode of the diode D1, the base of the first transistor Q1, the first terminal of the first capacitor C1, the first terminal of the first inductor L1, the first terminal of the third inductor L3, the IRQn port of the microcontroller, and the first terminal of the comparator circuit; the emitter of the second transistor Q2 is connected to the second terminal of the second capacitor C2 and the second terminal of the fourth inductor L4.

[0074] In this embodiment, the second transistor Q2 can be an NPN transistor. An NPN transistor consists of three layers of semiconductor material: a P-type semiconductor in the middle and N-type semiconductors on both sides. For an NPN transistor, under normal operating conditions, the base should be forward biased relative to the emitter, and the collector should be reverse biased relative to the base. At this time, current flows in from the collector, passes through the base region, and flows out from the emitter.

[0075] Optionally, when the collector and emitter of the second transistor Q2 are conducting, the base voltage of the second transistor Q2 is pulled high by the collector of the first transistor Q1, which conducts between the base and emitter of the second transistor Q2, thereby causing the collector and emitter of the second transistor Q2 to conduct, and thus turning on the second protection module 12.

[0076] For example, the base of the second transistor Q2 is connected to the collector of the first transistor Q1. After the collector and emitter of the first transistor Q1 are turned on, the base voltage of the second transistor Q2 is pulled up, so that the base and emitter of the second transistor Q2 are turned on, and then the collector and emitter of the second transistor Q2 are also turned on. Since the collector of the second transistor Q2 is connected to the base of the first transistor Q1, when the collector and emitter of the second transistor Q2 are turned on, the base voltage of the first transistor Q1 is pulled down, so that the first transistor Q1 is turned on continuously.

[0077] It should be noted that the hardware protection circuit of this application includes complementary first transistor Q1 and second transistor Q2. When the motor PWM drive module does not detect a motor abnormality, it outputs a normal high level. The first transistor Q1 is cut off because there is no conduction between its base and emitter, and the second transistor Q2 is also cut off, so the motor PWM drive module works normally. When the motor PWM drive module detects a motor abnormality, it outputs an abnormal low level. The base and emitter of the first transistor Q1 conduct and become saturated. Because the collector and emitter of the first transistor Q1 are conducting, the base and emitter of the second transistor Q2 are also conducting. Therefore, the collector and emitter of the second transistor Q2 are also saturated, maintaining the conduction state between the base and emitter of the first transistor Q1, pulling all motor PWM drive signals low and shutting down the microcontroller PWM output. Moreover, during the mutual conduction process of the two transistors Q1 and Q2, even if the abnormal motor level returns to the normal high level, it will not affect the conduction state of the two transistors, thereby locking the abnormal motor condition and blocking multiple triggers of the abnormal condition until the abnormality is handled and the power is cut off to restart the motor drive.

[0078] Compared with existing technologies, this application provides a hardware protection circuit, including a first protection module and a second protection module. The first protection module is used to turn on when the motor PWM drive module outputs a low-level signal, and drive the second protection module to turn on. The second protection module is used to maintain the first protection module continuously on when it is on. The first protection module is also used to pull down the PWM drive signal output by the microcontroller when it is continuously on, and control the microcontroller to stop outputting. By using the first protection module and the second protection module, the output of the PWM drive signal by the microcontroller can be stopped in time when the motor is abnormal, which improves the efficiency of motor abnormality handling, ensures stable motor operation, and increases the reliability of motor drive.

[0079] The following is combined Figure 2 This application describes a motor drive system according to some embodiments.

[0080] This application provides a motor drive system, such as Figure 2 As shown, it includes: the aforementioned hardware protection circuit 1, microcontroller 2, motor PWM drive module 3, motor 4, and comparator circuit 5; the first terminal of hardware protection circuit 1 is connected to the PWM port of microcontroller 2 and the first terminal of motor PWM drive module 3, and the second terminal of hardware protection circuit 1 is connected to the IRQn port of microcontroller 2 and the first terminal of comparator circuit 5; hardware protection circuit 1 is used to turn on the first protection module 11 when motor PWM drive module 3 outputs a low-level signal, and drive the second protection module 12 to turn on; hardware protection circuit 1 is also used to maintain the first protection module 11 continuously turned on when the second protection module 12 is turned on, and pull down the PWM drive signal output by microcontroller 2, and control microcontroller 2 to stop outputting.

[0081] Optionally, the PWM port of the microcontroller 2 is connected to the first end of the motor PWM drive module 3 and the first end of the hardware protection circuit 1; the second end of the motor PWM drive module 3 is connected to the first end of the motor 4, and the second end of the motor 4 is connected to the second end of the comparator circuit 5.

[0082] Optionally, the microcontroller 2 is used to input a predetermined number of PWM drive signals to the motor PWM drive module 3; the motor PWM drive module 3 is used to convert the predetermined number of PWM drive signals and drive the motor through the converted PWM drive signals.

[0083] In this embodiment, the microcontroller 2 sends a predetermined number of PWM drive signals to the motor PWM drive module 3 through a predetermined number of PWM ports. The motor PWM drive module 3 converts the predetermined number of PWM drive signals and drives the motor through the converted PWM drive signals.

[0084] In some examples, hardware protection circuit 1 is connected to microcontroller 2 and motor PWM drive module 3. When the motor PWM drive module outputs a low-level signal, the first protection module 11 in hardware protection circuit 1 is turned on. When the first protection module 11 is turned on, it pulls down the input voltage of the second protection module 12 in hardware protection circuit 1, causing the second protection module 12 to turn on. When the second protection module 12 is turned on, it pulls down the input voltage of the first protection module 11, keeping the first protection module 11 continuously turned on. The first protection module 11 pulls down the PWM drive signal output by the microcontroller through the IRQn port of the microcontroller, thereby controlling the microcontroller to stop outputting the PWM drive signal.

[0085] Optionally, the comparison circuit 5 is used to acquire the voltage, current and temperature values ​​of the motor 4, and compare the voltage value with a predetermined voltage threshold, the current value with a predetermined current threshold, and the temperature value with a predetermined temperature threshold, respectively. The comparison circuit 5 is also used to control the microcontroller to stop output when the voltage value exceeds the predetermined voltage threshold, and / or the current value exceeds the predetermined current threshold, and / or the temperature value exceeds the predetermined temperature threshold.

[0086] Compared with existing technologies, this application provides a motor drive system, including a hardware protection circuit, a microcontroller, a motor PWM drive module, a motor, and a comparator circuit. The hardware protection circuit is used to turn on the first protection module and drive the second protection module to turn on when the motor PWM drive module outputs a low-level signal. The hardware protection circuit is also used to maintain the first protection module continuously on when the second protection module is on, pull down the PWM drive signal output by the microcontroller, and control the microcontroller to stop outputting. By adding a hardware protection circuit for the PWM drive with an abnormality lockout function, the first protection module and the second protection module can promptly stop the microcontroller from outputting the PWM drive signal when the motor malfunctions, improving the efficiency of motor abnormality handling, ensuring stable motor operation, and increasing the reliability of the motor drive.

[0087] To better understand the above-mentioned objectives, features, and advantages of this application, the solution of this application will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0088] To address the technical problem in current technologies where multiple triggering of abnormalities may occur during hardware circuit anomaly detection, potentially causing repeated damage to the motor's PWM drive or the motor itself, this embodiment provides a hardware protection method, such as... Figure 3 As shown, the method includes:

[0089] Step 101: In response to the low-level signal output by the motor PWM drive module, the first protection module in the hardware protection circuit is turned on, and the second protection circuit in the hardware protection circuit is turned on.

[0090] A low-level signal output from the motor PWM drive module indicates an abnormality in the motor driven by the motor PWM drive module.

[0091] Optionally, step 101 may specifically include: controlling the conduction between the base and emitter of the first transistor in the first protection module, and driving the conduction between the collector and emitter of the first transistor; based on the collector of the first transistor, pulling up the base voltage of the second transistor in the second protection circuit, controlling the conduction between the base and emitter of the second transistor, and driving the conduction between the collector and emitter of the second transistor.

[0092] In this embodiment, when the motor PWM drive module outputs a low-level signal, the first protection module in the hardware protection circuit is turned on. When the first protection module is turned on, it pulls down the input voltage of the second protection module in the hardware protection circuit, causing the second protection module to turn on. When the second protection module is turned on, it pulls down the input voltage of the first protection module, maintaining the first protection module continuously on. The first protection module pulls down the PWM drive signal output by the microcontroller through the IRQn port of the microcontroller, thereby controlling the microcontroller to stop outputting the PWM drive signal.

[0093] For example, when the motor PWM drive module outputs a low-level signal, the low-level signal is transmitted to the base of the first transistor through the diode in the first protection module. The base of the first transistor is pulled low, thereby connecting the base and emitter of the first transistor, and driving the collector and emitter of the first transistor to connect. After the collector of the first transistor is connected, the base of the second transistor is connected to the collector of the first transistor. After the collector and emitter of the first transistor are connected, the base voltage of the second transistor is pulled high, so that the base and emitter of the second transistor are connected, and the collector and emitter of the second transistor are also connected.

[0094] Step 102: The first protection circuit is kept on based on the conduction of the second protection circuit.

[0095] Optionally, step 102 may specifically include: based on the collector of the second transistor, pulling down the base voltage of the first transistor to maintain continuous conduction between the base and emitter of the first transistor.

[0096] For example, based on step 101, since the collector of the second transistor is connected to the base of the first transistor, when the collector and emitter of the second transistor are conducting, the base voltage of the first transistor is pulled down, so that the first transistor is continuously conducting. When the first transistor is continuously conducting, it pulls down the PWM drive signal output by the microcontroller and controls the microcontroller to stop outputting.

[0097] Step 103: Pull the PWM drive signal output by the microcontroller low through the continuously conducting first protection circuit, and control the microcontroller to stop outputting.

[0098] It should be noted that this application can be configured in software to trigger an interrupt service function when the external interrupt pin of the microcontroller is low. When the motor PWM driver detects a motor abnormality, the microcontroller automatically captures the low level, calls the exception handling function to execute the PWM output braking, and shuts down the microcontroller's PWM output.

[0099] In some examples, the operation of the fan and compressor in an air conditioner relies on the normal operation of the motor drive. The motor drive commonly uses a microcontroller to control multiple PWM signals, which then drive the motor via a motor PWM driver, such as an integrated IPM driver module or a discrete bridge circuit. Besides amplifying the PWM power output from the microcontroller, the motor PWM driver also needs to monitor the motor's operating status in real time to prevent motor failure or damage due to abnormal conditions such as overvoltage / undervoltage, overcurrent, or overtemperature. Therefore, capturing anomalies at the motor PWM driver end and applying timely protective measures is an effective method to protect the motor and contributes to improving the reliability of the air conditioner motor.

[0100] Currently, commonly used integrated PWM drivers (IPMs) have built-in fault detection circuits and can output fault levels promptly. In discrete bridge-type switching PWM driver circuits, operational amplifiers or comparators are often used as fault detection circuits and for outputting fault signals. When the microcontroller's external interrupt pin detects a fault signal, the control program generates an interrupt, calls the corresponding interrupt service routine to handle the exception, and triggers PWM braking control. A schematic diagram of the entire exception handling process is shown below. Figure 4 As shown, motor PWM drive fault handling involves first detecting abnormalities in the hardware circuit and then handling them in the software. Hardware circuit detection is highly efficient, but in critical situations, it may cause multiple triggers of the abnormality, repeatedly damaging the motor PWM drive or the motor itself. Software interrupt-based fault handling, if the fault handling task has insufficient priority or the interrupt response time is too long, may fail to handle the abnormal situation in time, thus causing damage to the motor PWM drive or the motor hardware.

[0101] This application adds a motor PWM hardware protection circuit to address motor drive anomalies that would otherwise rely solely on software. The abnormal motor detection level signal triggers a PWM shutdown to turn off the motor drive signal, ensuring timely interruption and real-time handling of motor anomalies. Simultaneously, the hardware locks the abnormal motor signal level to prevent repeated triggering and potential damage to the PWM drive or motor. This application uses complementary transistors and diodes to construct the motor PWM drive hardware protection circuit, taking the abnormal motor PWM drive output signal as input. When the motor malfunctions, the abnormal level is automatically locked, and a PWM shutdown is triggered to turn off the switching transistor. Simultaneously, the abnormal level triggers a microcontroller interrupt function to handle the anomaly, achieving dual hardware and software protection for the motor PWM drive.

[0102] Compared with existing technologies, this application utilizes a first protection module and a second protection module to respond to a low-level signal output by the motor PWM drive module. The first protection module in the hardware protection circuit is activated, which in turn activates the second protection circuit. Based on the activated second protection circuit, the first protection circuit remains continuously activated. The PWM drive signal output by the microcontroller is pulled low, and the microcontroller is stopped from outputting. This allows for timely cessation of the microcontroller's PWM drive signal output in case of motor malfunction, improving the efficiency of motor malfunction handling, ensuring stable motor operation, and increasing the reliability of the motor drive.

[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented in hardware. By applying the solution of this embodiment, compared with the prior art, this application, through the first protection module and the second protection module, can promptly stop the microcontroller from outputting the PWM drive signal when the motor malfunctions, thereby improving the efficiency of motor malfunction handling, ensuring stable motor operation, and increasing the reliability of motor drive.

[0104] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0105] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A hardware protection circuit, characterized in that, include: First protection module and second protection module; The first terminal of the first protection module is connected to the pulse width modulation (PWM) port of the microcontroller and the first terminal of the motor PWM drive module. The second terminal of the first protection module is connected to the first terminal of the second protection module. The fourth terminal of the first protection module is connected to the second terminal of the second protection module, the interrupt request (IRQn) port of the microcontroller, and the first terminal of the comparator circuit. The first protection module is used to turn on when the motor PWM drive module outputs a low-level signal, and to drive the second protection module to turn on, wherein the low-level signal output by the motor PWM drive module indicates that there is an abnormality in the motor driven by the motor PWM drive module; The second protection module is used to keep the first protection module continuously conducting when it is conducting. The first protection module is also used to pull the PWM drive signal output by the microcontroller low when it is continuously conducting and control the microcontroller to stop outputting.

2. The hardware protection circuit according to claim 1, characterized in that, The first protection module includes: a diode, a first transistor, a first capacitor, a first inductor, a second inductor, and a third inductor; The positive terminal of the diode is connected to the PWM port of the microcontroller and the first terminal of the motor PWM drive module, and the negative terminal of the diode is connected to the base of the first transistor, the first terminal of the first capacitor, the first terminal of the first inductor, the first terminal of the third inductor, the second terminal of the second protection module, the IRQn port of the microcontroller, and the first terminal of the comparator circuit.

3. The hardware protection circuit according to claim 2, characterized in that, The collector of the first transistor is connected to the first terminal of the second protection module, and the emitter of the first transistor is connected to the second terminal of the first capacitor, the second terminal of the first inductor, and the first terminal of the second inductor. The second terminal of the second inductor is connected to the second terminal of the third inductor.

4. The hardware protection circuit according to claim 3, characterized in that, The first transistor is used to conduct between the base and emitter of the first transistor when the motor PWM drive module outputs a low-level signal, and to conduct between the collector and emitter of the first transistor, thereby turning on the first protection module. The first transistor is also used to pull up the voltage of the second protection module when the collector and emitter are conducting, thereby turning on the second protection module.

5. The hardware protection circuit according to claim 4, characterized in that, The first transistor is also used to pull down the PWM drive signal output by the microcontroller and control the microcontroller to stop outputting when the second protection module maintains continuous conduction between the base and emitter of the first transistor.

6. The hardware protection circuit according to claim 5, characterized in that, The second protection module includes: a second transistor, a second capacitor, and a fourth inductor; The base of the second transistor is connected to the collector of the first transistor, the first terminal of the second capacitor, and the first terminal of the fourth inductor; The collector of the second transistor is connected to the cathode of the diode, the base of the first transistor, the first terminal of the first capacitor, the first terminal of the first inductor, the first terminal of the third inductor, the IRQn port of the microcontroller, and the first terminal of the comparator circuit. The emitter of the second transistor is connected to the second terminal of the second capacitor and the second terminal of the fourth inductor.

7. The hardware protection circuit according to claim 6, characterized in that, When the collector and emitter of the second transistor are conducting, the base voltage of the second transistor is pulled high by the collector of the first transistor, which conducts between the base and emitter of the second transistor, thereby conducting between the collector and emitter of the second transistor and enabling the second protection module to conduct.

8. The hardware protection circuit according to claim 7, characterized in that, The second transistor is also used to maintain continuous conduction between the base and emitter of the first transistor by pulling down the base voltage of the first transistor through the collector of the second transistor when the collector and emitter of the second transistor are conducting.

9. A motor drive system, characterized in that, include: The hardware protection circuit, microcontroller, motor PWM drive module, motor, and comparator circuit as described in any one of claims 1 to 8; The first terminal of the hardware protection circuit is connected to the PWM port of the microcontroller and the first terminal of the motor PWM drive module, and the second terminal of the hardware protection circuit is connected to the IRQn port of the microcontroller and the first terminal of the comparator circuit. The hardware protection circuit is used to turn on the first protection module and drive the second protection module to turn on when the motor PWM drive module outputs a low-level signal. The low-level signal output by the motor PWM drive module indicates that there is an abnormality in the motor driven by the motor PWM drive module. The hardware protection circuit is also used to maintain the first protection module continuously conducting when the second protection module is conducting, pull the PWM drive signal output by the microcontroller low, and control the microcontroller to stop outputting.

10. The motor drive system according to claim 9, characterized in that, The PWM port of the microcontroller is connected to the first terminal of the motor PWM drive module and the first terminal of the hardware protection circuit; The second terminal of the motor PWM drive module is connected to the first terminal of the motor, and the second terminal of the motor is connected to the second terminal of the comparator circuit.

11. The motor drive system according to claim 10, characterized in that, The microcontroller is used to input a predetermined number of PWM drive signals to the motor PWM drive module; The motor PWM drive module is used to convert the predetermined number of PWM drive signals and drive the motor through the converted PWM drive signals.

12. The motor drive system according to claim 11, characterized in that, The comparison circuit is used to collect the voltage, current and temperature values ​​of the motor, and compare the voltage value with a predetermined voltage threshold, the current value with a predetermined current threshold, and the temperature value with a predetermined temperature threshold, respectively. The comparison circuit is also used to control the microcontroller to stop outputting when the voltage value exceeds the predetermined voltage threshold, and / or the current value exceeds the predetermined current threshold, and / or the temperature value exceeds the predetermined temperature threshold.

13. A hardware protection method, characterized in that, include: In response to the motor PWM drive module outputting a low-level signal, the first protection module in the hardware protection circuit is turned on, and the second protection circuit in the hardware protection circuit is also turned on. The low-level signal output by the motor PWM drive module indicates that there is an abnormality in the motor driven by the motor PWM drive module. The second protection circuit maintains the first protection circuit continuously conducting based on the conduction of the second protection circuit; The first protection circuit, which remains continuously on, pulls the PWM drive signal output by the microcontroller low and controls the microcontroller to stop outputting.

14. The hardware protection method according to claim 13, characterized in that, The first protection module in the control hardware protection circuit is turned on, which in turn causes the second protection circuit in the hardware protection circuit to be turned on, including: The base and emitter of the first transistor in the first protection module are connected, and the collector and emitter of the first transistor are connected. Based on the collector of the first transistor, the base voltage of the second transistor in the second protection circuit is pulled up, controlling the conduction between the base and emitter of the second transistor, and driving the conduction between the collector and emitter of the second transistor.

15. The hardware protection method according to claim 14, characterized in that, The second protection circuit based on conduction maintains the first protection circuit continuously conducting, including: Based on the collector of the second transistor, the base voltage of the first transistor is pulled down, maintaining continuous conduction between the base and emitter of the first transistor.

16. An electronic device, characterized in that, It includes the hardware protection circuit according to any one of claims 1 to 8, or the motor drive system according to any one of claims 9 to 12.