Motor drive circuit and motor control device

By introducing a speed control circuit into the motor drive circuit, using the speed control signal adjustment relay circuit output by the processor, the speed control function of the motor is realized, and short-circuit protection and power consumption management are carried out in the motor drive circuit, and the existing technology is solved The problem of the relay circuit not being able to achieve motor speed regulation.

CN119093816APending Publication Date: 2024-12-06ZHEJIANG LEAPMOTOR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411030482.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-12-06

Smart Images

  • Figure CN119093816A_ABST
    Figure CN119093816A_ABST
Patent Text Reader

Abstract

The invention relates to a motor driving circuit and a motor control device. The motor driving circuit comprises a processor, a relay circuit and a speed control circuit; the first end of the relay circuit is connected with the processor, and the second end of the relay circuit is connected with the motor; the relay circuit is used for driving a motor to operate according to relay control signals output by the processor; the speed control circuit is respectively connected with the third end of the relay circuit and the processor, and the speed control circuit is used for controlling the relay circuit to adjust the running speed of the motor according to the speed regulation control signal output by the processor under the condition that the motor runs. By adopting the circuit, the speed regulation control of the motor can be realized under the condition that the relay drives the motor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of motor drive technology, and in particular to a motor drive circuit and a motor control device. Background Art

[0002] At present, the motor drive circuit using relays as the motor controller has a relatively large cost advantage compared to the motor drive circuit composed of bridge drive chips with the same driving capability. At the same time, the motor drive circuit using relays has simple control logic and low defective rate. Therefore, the motor drive circuit using relays is widely used.

[0003] However, the motor drive control circuit using a relay cannot achieve the speed regulation function of the motor. Summary of the invention

[0004] Based on this, it is necessary to provide a motor drive circuit and a motor control device that can realize the motor speed regulation function in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a motor drive circuit, comprising: a processor, a relay circuit, and a speed control circuit;

[0006] The first end of the relay circuit is connected to the processor, and the second end of the relay circuit is connected to the motor; the relay circuit is used to drive the motor to operate according to the relay control signal output by the processor;

[0007] The speed control circuit is connected to the third end of the relay circuit and the processor respectively. The speed control circuit is used to control the relay circuit to adjust the running speed of the motor according to the speed control signal output by the processor when the motor is running.

[0008] In one embodiment, the motor driving circuit further includes an enabling circuit, wherein an input end of the enabling circuit is connected to the processor, and an output end of the enabling circuit is connected to the speed control circuit;

[0009] The enabling circuit is used to control the speed control circuit to enter an enabling state when the enabling signal output by the processor is at a first level, so that the speed control circuit controls the relay circuit to adjust the running speed of the motor according to the speed control signal output by the processor.

[0010] In one embodiment, the motor drive circuit further includes a current collection and amplification circuit, the input end of the current collection and amplification circuit is connected to the speed control circuit, and the output end of the current collection and amplification circuit is connected to the processor;

[0011] The current acquisition and amplification circuit is used to collect the current data of the motor through the speed control circuit, and output the current data to the processor so that the processor can determine the working state of the motor based on the current data.

[0012] In one embodiment, the current collection and amplification circuit includes a sampling circuit and an amplification circuit, wherein a first end of the sampling circuit is connected to the speed control circuit, and a second end of the sampling circuit is grounded; a first end of the amplification circuit is connected to the sampling circuit, and a second end of the amplification circuit is connected to the processor;

[0013] A sampling circuit for collecting current data;

[0014] The amplifier circuit is used to amplify the current data collected by the sampling circuit and output it to the processor.

[0015] In one embodiment, the enabling circuit includes a first switch tube and a second switch tube;

[0016] The control electrode of the first switch tube is connected to the processor, the first electrode of the first switch tube is connected to the control electrode of the second switch tube, and the second electrode of the first switch tube is grounded;

[0017] The first electrode of the second switch tube is connected to the power supply, and the second electrode of the second switch tube is connected to the speed control circuit.

[0018] In one embodiment, the first switch tube is in the on state when the enable signal is at the first level, and the second switch tube is in the on state when the first switch tube is turned on, so as to control the speed control circuit to be in the enabled state when the enable signal is at the first level.

[0019] In one embodiment, the first switch tube is in the off state when the enable signal is at the second level, and the second switch tube is in the off state when the first switch tube is turned off, so as to control the speed control circuit to be in the sleep state when the enable signal is at the second level.

[0020] In one embodiment, the enabling circuit further includes a third switch tube, a first resistor, a second resistor, a third resistor, a fourth resistor, a first capacitor and a second capacitor;

[0021] A first electrode of the third switch tube is connected to the power supply, and a second electrode of the third switch tube is connected to a first electrode of the second switch tube;

[0022] The first end of the first resistor is connected to the second electrode of the third switch tube, and the second end of the first resistor is connected to the control electrode of the second switch tube;

[0023] The first end of the first capacitor is connected to the second electrode of the third switch tube, and the second end of the first capacitor is connected to the control electrode of the second switch tube;

[0024] A first end of the second resistor is connected to the control electrode of the second switch tube, and a second end of the second resistor is connected to the first electrode of the first switch tube;

[0025] A first end of the third resistor is connected to the control electrode of the first switch tube, and a second end of the third resistor is grounded;

[0026] A first end of the second capacitor is connected to the control electrode of the first switch tube, and a second end of the second capacitor is grounded;

[0027] A first end of the fourth resistor is connected to the processor, and a second end of the fourth resistor is connected to the control electrode of the first switch tube.

[0028] In one embodiment, the speed control circuit includes a fourth switch tube and a fifth switch tube;

[0029] The control electrode of the fourth switch tube is connected to the processor, the first electrode of the fourth switch tube is connected to the control electrode of the fifth switch tube, and the second electrode of the fourth switch tube is grounded;

[0030] The control electrode of the fifth switch tube is connected to the enabling circuit, the first electrode of the fifth switch tube is connected to the relay circuit, and the second electrode of the fifth switch tube is connected to the current collection and amplification circuit.

[0031] In one embodiment, when the enable signal is at the first level, the fourth switch tube is in the on state when the speed control signal output by the processor to the speed control circuit is at the third level, and the fifth switch tube is in the off state; the fourth switch tube is in the off state when the speed control signal is at the fourth level, and the fifth switch tube is in the on state, so as to control the current between the speed control circuit and the relay circuit through the speed control signal to control the running speed of the motor.

[0032] In one embodiment, the fifth switch tube is in a cut-off state when the enable signal is at the second level, so as to control the speed control circuit to be in a dormant state.

[0033] In one embodiment, the speed control circuit further includes a third capacitor, a fourth capacitor, a fifth resistor, a sixth resistor and a seventh resistor;

[0034] A first end of the third capacitor is connected to the control electrode of the fifth switch tube, and a second end of the third capacitor is connected to the second electrode of the fifth switch tube;

[0035] A first end of the sixth resistor is connected to the control electrode of the fifth switch tube, and a second end of the sixth resistor is connected to the second electrode of the fifth switch tube;

[0036] A first end of the fifth resistor is connected to the control electrode of the fifth switch tube, and a second end of the fifth resistor is connected to the enabling circuit;

[0037] A first end of the fourth capacitor is connected to the control electrode of the fourth switch tube, and a second end of the fourth capacitor is grounded;

[0038] A first end of the seventh resistor is connected to the control electrode of the fourth switch tube, and a second end of the seventh resistor is grounded.

[0039] In one embodiment, the speed control circuit further includes a sixth switch tube, a seventh switch tube and a ninth resistor;

[0040] A first end of the ninth resistor is connected to the control electrode of the fourth switch tube, and a second end of the ninth resistor is connected to the sixth switch tube;

[0041] The second end of the sixth switch tube is connected to the seventh switch tube;

[0042] The second end of the seventh switch tube is connected to the current collection and amplification circuit.

[0043] In one embodiment, the speed control circuit further includes an eighth switch tube and an eighth resistor;

[0044] A first end of the eighth resistor is connected to the processor, and a second end of the eighth resistor is connected to the eighth switch tube;

[0045] The second end of the eighth switch tube is connected to the control electrode of the fourth switch tube.

[0046] In one embodiment, when a short circuit to the power supply occurs in the motor drive circuit and the fourth switch tube is in the off state, the speed control circuit controls the fourth switch tube to be in the on state and the fifth switch tube to be in the off state so that the current output to the motor is less than a preset threshold.

[0047] In one embodiment, the amplifying circuit includes an amplifier, a first input terminal of the amplifier is connected to the sampling circuit, a second input terminal of the amplifier is grounded, and an output terminal of the amplifier is connected to the processor.

[0048] In one embodiment, the amplifier circuit further includes a fifth capacitor, a tenth resistor, an eleventh resistor, a twelfth resistor and a thirteenth resistor;

[0049] A first end of the fifth capacitor is connected to the output end of the amplifier, and a second end of the fifth capacitor is grounded;

[0050] A first end of the tenth resistor is connected to the first input end of the amplifier, and a second end of the tenth resistor is connected to the first voltage;

[0051] A first end of the eleventh resistor is connected to the first input end of the amplifier, and a second end of the eleventh resistor is connected to the sampling circuit;

[0052] A first end of the twelfth resistor is connected to the second input end of the amplifier, and a second end of the twelfth resistor is grounded;

[0053] A first end of the thirteenth resistor is connected to the second input end of the amplifier, and a second end of the thirteenth resistor is connected to the output end of the amplifier.

[0054] In one embodiment, the amplifier circuit further includes a fourteenth resistor and a sixth capacitor;

[0055] A first end of a fourteenth resistor is connected to the output end of the amplifier, and a second end of the fourteenth resistor is connected to the processor;

[0056] A first end of the sixth capacitor is connected to the processor, and a second end of the sixth capacitor is grounded.

[0057] In one embodiment, the sampling circuit includes a sampling resistor, a first end of the sampling resistor is connected to the speed control circuit, and a second end of the sampling resistor is grounded.

[0058] In a second aspect, the present application also provides a motor control device, comprising a motor drive circuit as described in any one of the first aspects above.

[0059] The motor drive circuit and motor control device include a processor, a relay circuit and a speed control circuit; the first end of the relay circuit is connected to the processor, and the second end of the relay circuit is connected to the motor; the relay circuit is used to drive the motor to run according to the relay control signal output by the processor; the speed control circuit is connected to the third end of the relay circuit and the processor respectively, and the speed control circuit is used to control the relay circuit to adjust the running speed of the motor according to the speed control signal output by the processor when the motor is running. In this way, on the basis of the relay controlling the running of the motor, the speed control signal of the processor is received through the speed control circuit, and the relay circuit is controlled to adjust the running speed of the motor according to the speed control signal, thereby realizing the speed control of the motor when the relay drives the motor. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0061] Figure 1 is a circuit structure block diagram of a motor drive circuit in one embodiment;

[0062] Figure 2 is a circuit structure block diagram of a motor driving circuit in another embodiment;

[0063] Figure 3 is a circuit structure block diagram of a motor driving circuit in another embodiment;

[0064] Figure 4is a circuit structure block diagram of an enabling circuit in another embodiment;

[0065] Figure 5 is a circuit structure block diagram of a speed control circuit in another embodiment;

[0066] Figure 6 is a circuit structure block diagram of an amplifier circuit in another embodiment;

[0067] Figure 7 is a circuit structure block diagram of a motor driving circuit in another embodiment;

[0068] Figure 8 A schematic diagram of a process of short-circuit protection of a motor drive circuit in a dormant state in one embodiment;

[0069] Fig. 9 A schematic diagram of a process flow of short-circuit protection of a motor drive circuit in a normal state in one embodiment;

[0070] Fig.10 It is a schematic diagram of the short-circuit protection process of the motor drive circuit under normal working conditions in another embodiment;

[0071] Fig.11 It is a schematic diagram of the short-circuit protection process of the motor drive circuit under normal working conditions in another embodiment;

[0072] Fig.12 A schematic diagram of a short circuit of a motor drive circuit in an embodiment;

[0073] Fig.13 FIG. 4 is a structural block diagram of a motor drive device in one embodiment. DETAILED DESCRIPTION

[0074] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0075] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0076] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first resistor may be referred to as a second resistor, and similarly, a second resistor may be referred to as a first resistor. Both the first resistor and the second resistor are resistors, but they are not the same resistor.

[0077] It can be understood that the “connection” in the following embodiments should be understood as “electrical connection”, “communication connection”, etc. if the connected circuits, modules, units, etc. have electrical signals or data transmission between each other.

[0078] It can be understood that “at least one” means one or more, “plurality” means two or more, and “at least a portion of an element” means a part or all of an element.

[0079] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" and the like specify the presence of stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. At the same time, the term "and / or" used in this specification includes any and all combinations of the relevant listed items.

[0080] In the embodiments of the present application, Figure 1 As shown, a motor driving circuit 100 is provided, including: a processor 10, a relay circuit 20 and a speed control circuit 30.

[0081] A first end of the relay circuit 20 is connected to the processor 10 , and a second end of the relay circuit 20 is connected to the motor; the relay circuit 20 is used to drive the motor to operate according to a relay control signal output by the processor 10 .

[0082] The speed control circuit 30 is connected to the third end of the relay circuit 20 and the processor 10 respectively. The speed control circuit 30 is used to control the relay circuit 20 to adjust the running speed of the motor according to the speed control signal output by the processor 10 when the motor is running.

[0083] The relay circuit 20 may include a relay, and the first end of the relay circuit 20 may be a signal input port of the relay, and the relay control signal input by the processor 10 is received through the first end. Optionally, the first end of the relay circuit 20 is connected to a relay drive circuit, and the relay drive circuit is connected to the processor 10, and the relay drive circuit amplifies the relay control signal output by the processor 10 and then outputs it to the relay circuit 20 to control the action of the relay circuit 20. The second end of the relay connected to the motor is controlled to be connected to the power supply port or the speed control circuit 30 through the relay control signal, so as to control the motor to rotate in one direction, or to control the motor to rotate in the opposite direction.

[0084] The speed control circuit 30 is connected to the third end of the relay circuit 20, and the third end can be the normally closed end of the relay circuit 20. The speed control circuit 30 receives the speed control signal output by the processor 10. Optionally, the speed control signal can be a PWM (Pulse Width Modulation) signal. By setting the frequency and duty cycle of the speed control signal, the relay circuit 20 can be controlled to adjust the running speed of the motor.

[0085] In the above embodiment, a processor, a relay circuit and a speed control circuit are included; the first end of the relay circuit is connected to the processor, and the second end of the relay circuit is connected to the motor; the relay circuit is used to drive the motor to run according to the relay control signal output by the processor; the speed control circuit is connected to the third end of the relay circuit and the processor respectively, and the speed control circuit is used to control the relay circuit to adjust the running speed of the motor according to the speed control signal output by the processor when the motor is running. In this way, on the basis of the relay controlling the running of the motor, the speed control signal of the processor is received by the speed control circuit, and the relay circuit is controlled to adjust the running speed of the motor according to the speed control signal, thereby realizing the speed control of the motor when the relay drives the motor.

[0086] In the embodiments of the present application, Figure 2 As shown, the motor drive circuit 100 also includes an enabling circuit 40, the input end of the enabling circuit 40 is connected to the processor 10, and the output end of the enabling circuit 40 is connected to the speed control circuit 30; the enabling circuit 40 is used to control the speed control circuit 30 to enter an enabling state when the enabling signal output by the processor 10 is at a first level, so that the speed control circuit 30 controls the relay circuit 20 to adjust the running speed of the motor according to the speed control signal output by the processor 10.

[0087] Among them, the enabling state is also a normal working state, the speed control circuit 30 can work normally, and the relay circuit 20 can be controlled to adjust the running speed of the motor according to the speed control signal output by the processor 10. Optionally, the enabling circuit 40 may include a switch tube, and the conduction and disconnection of the switch tube can be used to control whether the speed control circuit 30 is in a normal working state. The conduction and disconnection of the switch tube can be controlled by the enabling signal output by the processor 10. Optionally, the first level can be a high level or a low level, which can be selected according to the type of the switch tube, and the present application does not limit this.

[0088] Optionally, the normal working state is that the motor drive circuit is in a normal power supply state, but does not have the ability to perform operations and read data. If the motor drive circuit needs to work normally, it is necessary to perform certain wake-up operations on the motor drive circuit, that is, to change the motor drive circuit from a sleep state to a state where it can work normally, so that the motor drive circuit is in a "normal working" state. The sleep state is the state where the motor drive circuit is not working. It is usually necessary to ensure that the static power consumption of the motor drive circuit is as low as possible when it is in the sleep state.

[0089] In the above embodiment, the working state of the speed control circuit is controlled by the enabling circuit. When the speed control of the motor is not required, the speed control circuit can be disabled, that is, not working, thereby reducing the static power consumption of the motor drive circuit.

[0090] In one embodiment, Figure 3 As shown, the motor drive circuit 100 also includes a current acquisition and amplification circuit 50, the input end of the current acquisition and amplification circuit 50 is connected to the speed control circuit 30, and the output end of the current acquisition and amplification circuit 50 is connected to the processor 10; the current acquisition and amplification circuit 50 is used to collect the current current data of the motor through the speed control circuit 30, and output the current data to the processor 10, so that the processor 10 can determine the working state of the motor according to the current data.

[0091] Among them, the current acquisition and amplification circuit 50 can obtain the current current data of the motor by calculation by collecting the current data of the motor, and the working state of the motor can be confirmed according to the current data. For example, when the current data is greater than a preset threshold, it can be judged whether the motor may be in a short-circuit state, or it can be judged whether the motor is in a working state such as a stall according to the current data.

[0092] Please continue to refer to Figure 3The current collection and amplification circuit 50 may include a sampling circuit 51 and an amplification circuit 52. The first end of the sampling circuit 51 is connected to the speed control circuit 30, and the second end of the sampling circuit 51 is grounded; the first end of the amplification circuit 52 is connected to the sampling circuit 51, and the second end of the amplification circuit 52 is connected to the processor 10; the sampling circuit 51 is used to collect current data; the amplification circuit 52 is used to amplify the current data collected by the sampling circuit 51 and output it to the processor 10.

[0093] The sampling circuit 51 may include a sampling resistor R406, a first end of the sampling resistor R406 is connected to the speed control circuit 30, and a second end of the sampling resistor R406 is grounded. The current data on the speed control circuit 30 can be collected through the sampling resistor, and then the current data is input to the amplifier circuit 52 for amplification and then output to the processor 10. Optionally, the amplifier circuit 52 may include an amplifier to achieve current amplification.

[0094] In the above embodiment, the voltage driving circuit can obtain the current data of the motor during operation through the current acquisition and amplification circuit, so that the working state of the motor can be determined according to the working current.

[0095] In one embodiment, Figure 4 As shown, the enabling circuit 40 includes a first switch tube Q21 and a second switch tube M17; the control electrode of the first switch tube Q21 is connected to the processor 10, the first electrode of the first switch tube Q21 is connected to the control electrode of the second switch tube M17, and the second electrode of the first switch tube Q21 is grounded; the first electrode of the second switch tube M17 is connected to the power supply, and the second electrode of the second switch tube M17 is connected to the speed control circuit 30.

[0096] The first switch tube Q21 may be an NPN transistor, and the second switch tube M17 may be a field effect tube.

[0097] The first switch tube Q21 is turned on when the enable signal is at the first level, and the second switch tube M17 is turned on when the first switch tube Q21 is turned on, so as to control the speed control circuit 30 to be in the enabled state when the enable signal is at the first level.

[0098] Optionally, when the first switch tube Q21 is an NPN transistor, when the first level is a high level, that is, when the enable signal is a high level, the first switch tube Q21 and the second switch tube M17 are turned on, and the speed control circuit 30 is controlled to be in an enabled state.

[0099] Optionally, the first switch tube Q21 is in the off state when the enable signal is at the second level, and the second switch tube M17 is in the off state when the first switch tube Q21 is turned off, so as to control the speed control circuit 30 to be in the sleep state when the enable signal is at the second level.

[0100] Optionally, when the first switch tube Q21 is an NPN transistor, when the second level is a low level, that is, when the enable signal is a low level, the first switch tube Q21 and the second switch tube M17 are turned off, and the speed control circuit 30 is controlled to be in a sleep state.

[0101] Optional, please continue to refer to Figure 4 The enabling circuit 40 further includes a third switch tube D76, a first resistor R423, a second resistor R425, a third resistor R427, a fourth resistor R426, a first capacitor C226 and a second capacitor C208; a first electrode of the third switch tube D76 is connected to the power supply, and a second electrode of the third switch tube D76 is connected to a first electrode of the second switch tube M17; a first end of the first resistor R423 is connected to a second electrode of the third switch tube D76, and a second end of the first resistor R423 is connected to a control electrode of the second switch tube M17; a first end of the first capacitor C226 is connected to a second electrode of the third switch tube D76, and a first capacitor C227 is connected to a control electrode of the second switch tube M17; 6 is connected to the control electrode of the second switch tube M17; the first end of the second resistor R425 is connected to the control electrode of the second switch tube M17, and the second end of the second resistor R425 is connected to the first electrode of the first switch tube Q21; the first end of the third resistor R427 is connected to the control electrode of the first switch tube Q21, and the second end of the third resistor R427 is grounded; the first end of the second capacitor C208 is connected to the control electrode of the first switch tube Q21, and the second end of the second capacitor C208 is grounded; the first end of the fourth resistor R426 is connected to the processor 10, and the second end of the fourth resistor R426 is connected to the control electrode of the first switch tube Q21.

[0102] Among them, 'Output_EN' is the enable signal input by the processor 10, and 'POWER' is the positive electrode of the external power supply to the motor drive circuit through the external fuse. The working principle of the above circuit is analyzed, including the following situations.

[0103] When 'Output_EN' is Pull Low, that is, the second level, for example, the enable signal is in a floating or nearly floating high-impedance state, or it can be in a state of being pulled down to GND. At this time, the second switch tube M17 needs to be in the off state. Since the base of the first switch tube Q21 is connected in series to 'Output_EN' through the third resistor R427 and the fourth resistor R426, that is, it is pulled down to the negative pole of the power supply, the emitter junction voltage UBE of the first switch tube Q21 is 0V at this time, and the first switch tube Q21 is in the off state. At this time, the gate-source voltage difference Ugs of the second switch tube M17 is gate voltage Ug-source voltage Us=0V, and the second switch tube M17 is in the off state. At this time, the speed control circuit 30 is in a dormant state.

[0104] When 'Output_EN' is Pull High, that is, the first level, the first switch tube Q21 needs to be in saturation state and the second switch tube M17 is in conduction state. By selecting a suitable resistance value, the enabling circuit 40 can meet the requirement of the saturation state of the first switch tube Q21. The specific conditions that need to be met are as follows.

[0105] (1) The base of the first switch tube Q21, UB is the base voltage of the first switch tube Q21, UE is the emitter voltage of the first switch tube Q21, the emitter junction voltage of the first switch tube Q21 UBE=UB-UE=UB-0=UB>the turn-on voltage UBE(on) of the first switch tube Q21, and the current I_r426 flowing through the resistor R426 needs to be greater than UBE / R427+IBmin, where IBmin refers to the minimum current flowing through the base of the first switch tube Q21 and causing it to turn on.

[0106] (2) The collector of the first switch tube Q21, the collector current of Q21 I_R425 = (U_Power – Vf – Uce) / (R423 + R425), where U_Power is the potential of the network 'POWER', Vf is the forward conduction voltage drop of the third switch tube D76, and Uce is the saturation voltage drop of the first switch tube Q21. The value of I_R425 calculated needs to satisfy I_R425 < β * IB, where β is the gain of the transistor, and IB is the base current of the first switch tube Q21 at the current moment. Since R425 is connected in series with Q21, the current flowing through R425 is the current of the collector of Q21, so I_R425 is used to represent the current of the collector of the transistor.

[0107] Therefore, when the above conditions (1) and (2) are met, the first switch tube Q21 can be in a saturated state, and by selecting appropriate resistance values ​​of the first resistor R423, the second resistor R425, the third resistor R427 and the fourth resistor R426, the enabling circuit 40 meets the above conditions. At this time, the gate voltage of the second switch tube M17 is calculated according to the following formula.

[0108] Ug=(U_Power–Vf–Uce) / (R423+R425)*R423

[0109] The source voltage is calculated according to the following formula.

[0110] Us=U_Power–Vf

[0111] The calculation of the gate-source voltage of the second switch tube M17 is shown in the following formula.

[0112] Ugs=Ug–Us=(U_Power–Vf–Uce) / (R423+R425)*R423–U_Power+Vf.

[0113] It is necessary to satisfy |Ugs|>|Ugs(th)| to turn on the second switch tube M17. At the same time, when the second switch tube M17 is turned on, the |Ugs| voltage value of the second switch tube M17 can be set as much larger than |Ugs(th)| as possible under the premise of meeting the safe working range of the device, so as to ensure that the on-resistance Rds(on) of the second switch tube M17 is small when it is turned on.

[0114] Optionally, the second capacitor C208 and the first capacitor C226 in the enabling circuit 40 are used for electromagnetic compatibility design. The second capacitor C208 is used to maintain the level of the base of the first switch tube Q21 to prevent the first switch tube Q21 in the on state from being accidentally turned off due to static electricity or crosstalk. Similarly, the first capacitor C226 is used to prevent the second switch tube M17 from being accidentally turned off due to static electricity or crosstalk.

[0115] When 'Output_EN' switches from the Pull Low state to the Pull High state, the second capacitor C208 can be charged through the fourth resistor R426. Therefore, the rise of the base voltage UB of the first switch tube Q21 and the increase of the base current IB slow down, that is, the speed of the first switch tube Q21 turning on slows down. When 'Output_EN' switches from the Pull High state to the PullLow state, the second capacitor C208 will discharge through the third resistor R427 and the pull-down loop of 'Output_EN'. When discharged to below UBE(on), the first switch tube Q21 is turned off, and then the second capacitor C208 continues to discharge until the UB potential is 0V.

[0116] When 'Output_EN' switches from Pull Low state to Pull High state, the potential difference across the first capacitor C226 is initially 0V, and then charged to the voltage of Ugs. During this process, the first switch tube Q21 is always in saturation state, so the collector current is calculated according to the following formula.

[0117] I_R425=I_R423+I_C226.

[0118] Wherein, I_R423 is the current flowing through the first resistor R423, and I_C226 is the current flowing through the first capacitor C226.

[0119] The following capacitor charging and discharging formula can be obtained.

[0120]

[0121]

[0122] Wherein, t is a time parameter with the first switch tube Q21 being turned on as the zero point.

[0123] From the above analysis, it can be seen that due to the effect of capacitor charging and the first switch tube Q21 is always in a saturated state, the initial value IE0 of its collector current is calculated according to the following formula.

[0124] IE0=(U_C226 / R423+I_C226)=(U_Power–Vf-Uce) / R425

[0125] Gradually decreases to a stable value I_final=(U_Power–Vf-Uce) / (R423+R425). The gate-source voltage |Ugs|=U_C226 of the second switch tube M17 increases from the initial 0V to (U_Power–Vf-Uce)*R423 / (R423+R425).

[0126] Therefore, the RC circuit configuration related to the first capacitor C226 can play a role in slow-starting the second switch tube M17 and also play a role in eliminating the Miller platform. However, the RC configuration values ​​of the first capacitor C226 and the second resistor R425 cannot be too large, otherwise the second switch tube M17 will work in a condition with a relatively large on-resistance Rds(on) for a longer time due to slow startup.

[0127] Meanwhile, when 'Output_EN' switches from the Pull High state to the Pull Low state, since the first switching transistor Q21 is turned off, the first capacitor C226 will discharge through the first resistor R423. When the discharge reaches U_C226 < Ugs(th), the second switching transistor M17 is turned off. Therefore, the numerical design of the first capacitor C226 and the first resistor R423 needs to consider the discharge characteristics related to the first capacitor C226 and the first resistor R423 to control the time for the second switching transistor M17 to turn from on to off. The specific values of each resistor and capacitor can be designed according to the actual circuit requirements, as long as the above circuit conditions are met. This application does not limit this.

[0128] In one embodiment, as Figure 5 shown, the speed control circuit 30 includes a fourth switching transistor Q5 and a fifth switching transistor M3; the control electrode of the fourth switching transistor Q5 is connected to the processor 10, the first electrode of the fourth switching transistor Q5 is connected to the control electrode of the fifth switching transistor M3, and the second electrode of the fourth switching transistor Q5 is grounded; the control electrode of the fifth switching transistor M3 is connected to the enable circuit 40, the first electrode of the fifth switching transistor M3 is connected to the relay circuit 20, and the second electrode of the fifth switching transistor M3 is connected to the current acquisition and amplification circuit 50.

[0129] Optionally, the fourth switching transistor Q5 can be a triode, and the fifth switching transistor M3 can be a field effect transistor.

[0130] Among them, in the case where the enable signal is at the first level, the fourth switching transistor Q5 is in the conducting state when the speed control signal output from the processor 10 to the speed control circuit 30 is at the third level, and the fifth switching transistor M3 is in the cutoff state; the fourth switching transistor Q5 is in the cutoff state when the speed control signal is at the fourth level, and the fifth switching transistor M3 is in the conducting state to control the operating speed of the motor by controlling the current between the speed control circuit 30 and the relay circuit 20 through the speed control signal.

[0131] As Figure 5 shown, 'Motor_Speed_Control' is the speed control signal output by the processor 10. 'Mos_G_Power' is the connection port between the enable circuit 40 and the speed control circuit 30.

[0132] Among them, the fifth switching transistor M3 is in the cutoff state when the enable signal is at the second level to control the speed control circuit 30 to be in the sleep state.

[0133] Optionally, please continue to refer to Figure 5The speed control circuit 30 also includes a third capacitor C209, a fourth capacitor C152, a fifth resistor R360, a sixth resistor R397 and a seventh resistor R160; a first end of the third capacitor C209 is connected to the control electrode of the fifth switch tube M3, and a second end of the third capacitor C209 is connected to the second electrode of the fifth switch tube M3; a first end of the sixth resistor R397 is connected to the control electrode of the fifth switch tube M3, and a second end of the sixth resistor R397 is connected to the second electrode of the fifth switch tube M3; a first end of the fifth resistor R360 is connected to the control electrode of the fifth switch tube M3, and a second end of the fifth resistor R360 is connected to the enabling circuit 40; a first end of the fourth capacitor C152 is connected to the control electrode of the fourth switch tube Q5, and a second end of the fourth capacitor C152 is grounded; a first end of the seventh resistor R160 is connected to the control electrode of the fourth switch tube Q5, and a second end of the seventh resistor R160 is grounded.

[0134] Optional, please continue to refer to Figure 5 The speed control circuit 30 further includes a sixth switch tube D77, a seventh switch tube D133 and a ninth resistor R359; the first end of the ninth resistor R359 is connected to the control electrode of the fourth switch tube Q5, and the second end of the ninth resistor R359 is connected to the sixth switch tube D77; the second end of the sixth switch tube D77 is connected to the seventh switch tube D133; the second end of the seventh switch tube D133 is connected to the current acquisition and amplification circuit 50. The speed control circuit 30 further includes an eighth switch tube and an eighth resistor R424; the first end of the eighth resistor R424 is connected to the processor 10, the second end of the eighth resistor R424 is connected to the eighth switch tube D135; the second end of the eighth switch tube is connected to the control electrode of the fourth switch tube Q5.

[0135] The sixth switch tube D77 may be a voltage-stabilizing diode, and the seventh switch tube D133 and the eighth switch tube D135 may be diodes.

[0136] In one embodiment, Figure 6 As shown, the amplifying circuit 52 includes an amplifier U23 , a first input terminal of the amplifier U23 is connected to the sampling circuit 51 , a second input terminal of the amplifier U23 is grounded, and an output terminal of the amplifier U23 is connected to the processor 10 .

[0137] Among them, the amplifier U23 can be an operational amplifier. When the motor drive circuit works normally, the current data of the motor can be obtained through the amplifier U23, and the working state of the motor can be judged through the current data. Optionally, a preset current value can be set, and the preset current value can be the short-circuit current value of the motor. If the collected current data is greater than the preset current value, the motor drive circuit may have a short circuit phenomenon, and the motor drive circuit needs to be current-limited.

[0138] Optional, please continue to refer to Figure 6 The amplifier circuit 52 also includes a fifth capacitor C156, a tenth resistor R396, an eleventh resistor R395, a twelfth resistor R358 and a thirteenth resistor R154; the first end of the fifth capacitor C156 is connected to the output end of the amplifier U23, and the second end of the fifth capacitor C156 is grounded; the first end of the tenth resistor R396 is connected to the first input end of the amplifier U23, and the second end of the tenth resistor R396 is connected to the first voltage; the first end of the eleventh resistor R395 is connected to the first input end of the amplifier U23, and the second end of the eleventh resistor R395 is connected to the sampling circuit 51; the first end of the twelfth resistor R358 is connected to the second input end of the amplifier U23, and the second end of the twelfth resistor R358 is grounded; the first end of the thirteenth resistor R154 is connected to the second input end of the amplifier U23, and the second end of the thirteenth resistor R154 is connected to the output end of the amplifier U23.

[0139] The tenth resistor R396 is connected to the first voltage Vref and then connected to the first input terminal of the amplifier U23. The first input terminal can be the in-phase input terminal of the amplifier U23. The tenth resistor R396 and the first voltage Vref are used for pull-up. The fifth capacitor C156 is used to increase the stability of the negative feedback loop of the amplifier U23.

[0140] Optionally, the amplification circuit 52 also includes a fourteenth resistor R153 and a sixth capacitor C151; the first end of the fourteenth resistor R153 is connected to the output end of the amplifier U23, and the second end of the fourteenth resistor R153 is connected to the processor 10; the first end of the sixth capacitor C151 is connected to the processor 10, and the second end of the sixth capacitor C151 is grounded.

[0141] The fourteenth resistor R153 and the sixth capacitor C151 form a filter circuit for filtering the voltage signal output to the processor 10 .

[0142] In an embodiment of the present application, a motor drive circuit is provided, such as Figure 7 As shown, the motor drive circuit 100 includes a processor 10, a relay circuit 20, a speed control circuit 30, an enabling circuit 40, and a current acquisition and amplification circuit 50. Among them, 'Coil_P_A', 'Coil_P_B', 'Coil_N_A', and 'Coil_N_B' are signals input to the relay circuit 20 for driving the relay. 'ADC' is an analog signal of the motor current signal output to the processor 10 after being sampled and amplified by the current acquisition and amplification circuit 50. The processor 10 can convert the received analog signal into a digital signal, and then calculate the magnitude of the current output to the motor load end by obtaining the value of the digital signal. 'Motor_P' and 'Motor_N' are active drive signals output by the motor drive circuit to the motor load.

[0143] When 'Coil_P_A', 'Coil_P_B', 'Coil_N_A', 'Coil_N_B' are in a floating or nearly floating high impedance state, at this time, the coil of the relay will not operate. 'Output_EN' is at the second level, for example, it is in a floating or nearly floating high impedance state, or it can be in a state of being pulled down to GND, at which time the first switch tube Q21 is not turned on. 'Motor_Speed_Control' is in a state that will not turn on the fourth switch tube Q5, for example, it makes the signal in a floating or nearly floating high impedance state, or it can be in a state of being pulled down to the negative pole of the power supply. When the above conditions are met, the motor drive circuit is in a dormant state.

[0144] When 'Output_EN' is pulled up to the first level, so that the first switch tube Q21 is in a saturated state, at the same time, the 'Coil_P_A', 'Coil_P_B', 'Coil_N_A', and 'Coil_N_B' signals output by the processor 10 have the load capacity to drive the relay coil, and can drive the relay coil according to the logic and level output by the processor 10 to control the contact and release of the relay. The conduction and cutoff of the fifth switch tube M3 are controlled according to the 'Motor_Speed_Control' signal with controllable frequency and duty cycle output by the processor 10. When the above conditions are met, the click drive circuit is in a normal working state.

[0145] Optionally, when the motor is not in operation, 'Motor_Speed_Control' may be at a high level or a low level by default. If it is at a high level by default, even if a short circuit to the power supply occurs when the motor is not working, since the fourth switch tube Q5 is in the on state, no additional detection or additional operation is required to protect the circuit. However, since the fourth switch tube Q5 is in the on state by default, the power consumption of the motor drive circuit when the motor is not in operation will increase. If the motor is not in operation, 'Motor_Speed_Control' is at a low level by default. If a short circuit to the power supply occurs at this time, when the processor 10 determines that the current data collected by the current acquisition and amplification circuit 50 exceeds a preset threshold, it controls 'Motor_Speed_Control' to output a high level to achieve short-circuit protection of the circuit. This application uses the example of 'Motor_Speed_Control' being at a low level by default when the motor is not in operation.

[0146] In the relay circuit 20, when the relay coil is not energized, the contacts of the relay are in the normally closed state. Figure 7In the relay JK30, pins 7 and 10 are internally connected, and pins 2 and 5 are internally connected, that is, the two contacts of the relay are connected to the negative pole of the power supply. Among them, 'Coil_P_A' and 'Coil_P_B' are used to control one of the coils driving the relay, and 'Coil_N_A' and 'Coil_N_B' are used to control the other coil driving the relay. When a certain active signal is input to any coil, if the signal meets the requirements of the relay coil drive, the relay contacts will act and disconnect from the normally closed side and connect to the normally open side. Depending on the driven coil, it can be, for example Figure 7 The 7th and 8th pins of the relay JK30 are connected inside the relay, or the 2nd and 3rd pins are connected inside the relay. At this time, the contact corresponding to the driven coil will switch from the negative pole of the power supply to the positive pole of the power supply. By driving the corresponding coil, the motor can be controlled to rotate in the specified direction. Under normal circumstances, only one coil is driven at the same time.

[0147] Optionally, when a short circuit occurs in the motor drive circuit 100, short circuit detection and control processing in the circuit can be implemented. Specifically, the following situations may be included. The entire network corresponding to the motor end connected to the 'MOTOR_P' signal is called the positive pole of the motor, and the entire network corresponding to the motor end connected to the 'MOTOR_N' signal is called the negative pole of the motor.

[0148] When the motor driving circuit 100 is in a dormant state, Figure 8 As shown, when there is no short circuit abnormality at the positive pole or the negative pole of the motor, the motor drive circuit 100 is in a normal sleep state. When the positive pole or the negative pole of the motor is short-circuited to the positive pole of the power supply, or when the positive pole or the negative pole of the motor is short-circuited to the negative pole of the power supply, since the motor drive circuit 100 is in a sleep state, that is, not enabled, each switch tube is in a cut-off state, and therefore, the click drive circuit 100 will not be damaged.

[0149] When the motor drive circuit 100 is in a normal working state, please refer to Fig. 9, the processor 10 can set the frequency and duty cycle of the output signal 'Motor_Speed_Control' according to the actual needs of the motor, and control the corresponding coils of 'Coil_P_A' and 'Coil_P_B' to drive through the speed control circuit 30, but not drive the coils corresponding to 'Coil_N_A' and 'Coil_N_B', so that the motor rotates at a certain speed from the first direction. If the coils corresponding to 'Coil_N_A' and 'Coil_N_B' are controlled, but the corresponding coils driven by 'Coil_P_A' and 'Coil_P_B' are not controlled, the motor rotates at a certain speed in the direction opposite to the first direction, wherein the first direction can be forward rotation, and the speed is related to the frequency and duty cycle of 'Motor_Speed_Control'. If the duty cycle of 'Motor_Speed_Control' is set to 0%, all coils of the relay are not driven, and the motor does not move and is in a discharge state.

[0150] When the motor signal 'MOTOR_P' or 'MOTOR_N' connected to the relay contact is short-circuited.

[0151] like Fig.10 As shown, if any pin is short-circuited to the positive pole of the power supply, when the motor is rotating forward, the positive pole of the motor is short-circuited to the positive pole of the power supply. This situation will not cause damage to the components in the circuit, so there is no need for detection and control processing. If the negative pole of the motor is short-circuited to the positive pole of the power supply, if the output of 'Motor_Speed_Control' is high when a short circuit occurs, no components will be damaged at this time. If the output of 'Motor_Speed_Control' is low when a short circuit occurs, the speed control circuit 30 will be triggered to limit the current, and the 'ADC' signal will output a higher voltage amplitude at this time. After the processor 10 detects that the voltage amplitude exceeds the preset threshold, it controls the speed control signal 'Motor_Speed_Control' to output a high level. At this time, the current loop of the speed control circuit 30 is closed, and the motor drive circuit 100 will not cause component damage due to a short circuit, thereby achieving short-circuit protection.

[0152] If any pin is short-circuited to the positive pole of the power supply, if the motor is not in motion, any pin on the motor signal side is short-circuited, triggering the speed control circuit 30 to perform current limiting protection. When the processor 10 detects that the received voltage amplitude exceeds the preset threshold, it controls the speed control signal 'Motor_Speed_Control' to output a high level. At this time, the current loop of the speed control circuit 30 is closed to achieve short-circuit protection.

[0153] If any pin is short-circuited to the positive pole of the power supply, if the motor is in reverse, if the negative pole of the motor is short-circuited to the positive pole of the power supply, this situation will not cause damage to the components in the circuit, so there is no need for detection and control processing. If the positive pole of the motor is short-circuited to the positive pole of the power supply, if the output of 'Motor_Speed_Control' is high when a short circuit occurs, no components will be damaged at this time. If the output of 'Motor_Speed_Control' is low when a short circuit occurs, the speed control circuit 30 will be triggered to limit the current, and the 'ADC' signal will output a higher voltage amplitude at this time. After the processor 10 detects that the voltage amplitude exceeds the preset threshold, it controls the speed control signal 'Motor_Speed_Control' to output a high level. At this time, the current loop of the speed control circuit 30 is closed, and the motor drive circuit 100 will not cause component damage due to a short circuit, thereby achieving short-circuit protection.

[0154] like Fig.11 As shown, when any pin is short-circuited to the negative pole of the power supply, if the motor is in the forward rotation state at this time, if the positive pole of the motor is short-circuited, there will be a large short-circuit current inside the relay, which will trigger the fuse of the external power supply of the motor drive circuit 100 to melt, thereby achieving short-circuit protection. If the negative pole of the motor is short-circuited, the motor drive circuit 100 will not be damaged and no control processing is required.

[0155] When any pin is short-circuited to the negative pole of the power supply, if the motor is not in operation at this time, any pin on the motor signal side is short-circuited, the motor drive circuit 100 will not be damaged and no control processing is required.

[0156] When any pin is short-circuited to the negative pole of the power supply, if the motor is in reverse at this time, if the negative pole of the motor is short-circuited, a large short-circuit current will be generated inside the relay, which will trigger the fuse of the external power supply of the motor drive circuit 100 to melt, thereby achieving short-circuit protection. If the negative pole of the motor is short-circuited, the motor drive circuit 100 will not be damaged and no control processing is required.

[0157] In the above embodiments, the motor drive circuit can automatically perform short circuit detection and short circuit protection in different situations, such as sleep state or working state, when any pin is short-circuited, thereby protecting the motor drive circuit components.

[0158] For ease of understanding, the working principles of the current collection and amplification circuit 50 and the speed control circuit 30 in the embodiment of the present application are analyzed and explained. The current collection and amplification circuit 50 is analyzed as follows.

[0159] In the first case, the motor drive circuit 100 is in a dormant state. At this time, the 'Output_EN' in the enabling circuit 40 is in a Pull Low state, the relay is in an inactive state, and the amplifier U23 is in a power-off state, so the fourth switch tube Q5 is also in a cut-off state. At this time, the second switch tube M17 is in a cut-off state. 'Mos_G_Power' is connected to the negative pole of the power supply through the fifth resistor R360, the sixth resistor R397, and the sampling resistor R406, so the potential of 'Mos_G_Power' is 0V at this time. At the same time, the source of the fifth switch tube M3 is also pulled down to the negative pole of the power supply through the sampling resistor R406, and its potential is also 0V. It can be obtained that the gate-source voltage Ugs1 of the fifth switch tube M3 is 0V, which is in a cut-off state. The relay is in an inactive state in the dormant state, so the drain of the fifth switch tube M3 is always directly connected to the normally closed end of the relay. At this time, no matter whether 'MOTOR_P' and 'MOTOR_N' are in normal, short-circuited to the positive pole of the power source, short-circuited to the power ground, etc., there will be no abnormal current in the speed control circuit 30, and the corresponding leakage current is close to 0. The current flowing through the sampling resistor is close to 0, and the amplifier U23 is not in working state.

[0160] In the second case, the motor drive circuit 100 is in a normal working state, and the 'Output_EN' in the enable circuit 40 needs to be in the Pull High state. If 'Motor_Speed_Control' is in a high level state, the second switch tube M17 is turned on, the fourth switch tube Q5 is turned on, and the voltage U_mos_g_power of 'Mos_G_Power' = the saturation voltage Uce1_sat of the fourth switch tube Q5. At this time, the fifth switch tube M3 is turned off, and the voltage value output by the amplifier U23 can be approximately equal to the adc value Uadc_cali described below as a calibration value, which will not be repeated here.

[0161] If 'Motor_Speed_Control' is in a low level state, the second switch tube M17 is turned on, the fourth switch tube Q5 is turned off, and the voltage U_mos_g_power of 'Mos_G_Power' is U_Power-Vf.

[0162] Assume that the current flowing through the sampling resistor R406 under any working condition is I_Samp. The gate-source voltage of the fifth switch tube M3 can be calculated according to the following formula.

[0163] Ugs1=(U_mos_g_power–I_Samp*R406)*R397 / (R360+R397).

[0164] In the circuit design process, a suitable resistance value is set to ensure that the fifth switch tube M3 is in a normal working state and is always in a conducting state under any working condition.

[0165] After I_Samp passes through the amplifying circuit 52 and the RC filtering circuit formed by the fourteenth resistor R153 and the sixth capacitor C151, the analog signal is input to the processor 10, and the processor 10 performs conversion, calculation and other processing on the received data.

[0166] When I_Samp=0, Ugs1=U_mos_g_power*R397 / (R360+R397).

[0167] Without considering the input bias, leakage current, temperature drift and other characteristics of the amplifier U23, and the leakage current caused by the loop formed by 'Mos_G_Power', the fifth resistor R360, the sixth resistor R397 and the sampling resistor R406, the circuit analysis of the amplifier circuit 52 shows that the output of the amplifier U23 is calculated by the following formula.

[0168] Uamp_out_0=Vref*R395 / (R396+R395)*(R154 / R358+1)

[0169] If the bias, leakage current and other characteristics of the input amplifier U23 are taken into consideration, the output of the corresponding amplifier U23 is calculated according to the following formula.

[0170] Uamp_out_0_total=Vref*R395 / (R396+R395)*(R154 / R358+1)+V0

[0171] V0 is the output deviation of the amplifier U23 due to bias, leakage current and other characteristics, and the leakage current caused by the loop formed by 'Mos_G_Power' and the fifth resistor R360, the sixth resistor R397 and the sampling resistor R406.

[0172] At the same time, the voltage value Uadc0 output by the amplifier U23 and input to the processor 10 after RC filtering and the voltage value Uadc_dig0 corresponding to the digital quantity actually received by the processor 10 can be considered to be equal to the value of Uamp_out_0_total. The processor 10 needs to record the corresponding adc value Uadc_cali read when the relay is not actuated and the relevant interface is not short-circuited as the calibration value, and the value is judged according to the preset upper limit value: if it is lower than the preset upper limit value, the normal value Uadc_cali is used as the calibration value; if it is higher than the preset upper limit value, it is regarded as an abnormal working condition, and Uadc_cali is not taken as the calibration value. The calculation process is equivalent to Uadc0.

[0173] Similarly, when I_Samp>0 flows through the sampling resistor R406, the voltage output by the amplifier U23 can be obtained. Uamp_out = the voltage value input to the processor 10 after RC filtering. Uadc = the voltage value corresponding to the digital quantity converted after actual reception. Uadc_dig. The following uses Uadc to represent these three voltage values.

[0174] According to the characteristics of the circuit and amplifier U23, we can get:

[0175] Uadc=I_Samp*R406*(1+R154 / R358)+Uadc_cali

[0176] Therefore, I_Samp can be calculated.

[0177] I_Samp=(Uadc-Uadc_cali) / [R406*(1+R154 / R358)]

[0178] According to the above, the current value flowing through the current circuit can be calculated. When the motor is working normally, the current value is the working current value of the motor. When the circuit is abnormal, the current value is the abnormal current value obtained after acting on the circuit under the abnormal working condition. The processor 10 needs to comprehensively consider the working state of the relay and the size range of the current value, for example, whether it is greater than the preset short-circuit current value, so as to specifically judge the working state of the motor.

[0179] Optionally, the tenth resistor R396 and its pull-up power supply Vref at the same-direction end of the amplifier U23 in the amplifier circuit 52 are used to offset the voltage of the amplifier U23 when it is reverse biased, so as to avoid the calculated I_Samp value being too low when the amplifier U23 is in a reverse biased state. The fifth capacitor C156 is used to increase the negative feedback loop stability of the amplifier U23.

[0180] The working process of the speed control circuit 30 is analyzed as follows.

[0181] In the first case, the motor drive circuit 100 is in a dormant state. The same as the working state of the above-mentioned current acquisition and amplification circuit 50, at this time, the 'Output_EN' in the enabling circuit 40 is in the Pull Low state, the relay is in an inactive state, and the amplifier U23 is in a power-off state, so the fourth switch tube Q5 is also in a cut-off state. At this time, the second switch tube M17 is in a cut-off state. 'Mos_G_Power' is connected to the negative pole of the power supply through the fifth resistor R360, the sixth resistor R397, and the sampling resistor R406, so the potential of 'Mos_G_Power' at this time is 0V. At the same time, the source level of the fifth switch tube M3 is also pulled down to the negative pole of the power supply through the sampling resistor R406, and its potential is also 0V. It can be obtained that the gate-source voltage Ugs1 of the fifth switch tube M3 is 0V, which is in a cut-off state. The relay is in an inactive state in the dormant state, so the drain level of the fifth switch tube M3 is always directly connected to the normally closed end of the relay. At this time, no matter whether 'MOTOR_P' and 'MOTOR_N' are in normal state, short-circuited to the positive pole of the power source, short-circuited to the power ground, etc., no abnormal current will be generated in the speed control circuit 30, and the corresponding leakage current is also close to zero.

[0182] In the second case, the motor drive circuit 100 is in a normal working state, which is the same as the above analysis of the current acquisition and amplification circuit 50. At this time, the second switch tube M17 and the fifth switch tube M3 are both in the on state, and the fourth switch tube Q5 is in the off state. The speed control circuit 30 is analyzed from various working conditions.

[0183] The relay is not in the energized state, that is, the state where the motor is not controlled. At this time, the speed control signal 'Motor_Speed_Control' will not have any corresponding action in the default state. In this case, when there is no fault in the motor interface, the current I_Samp flowing through the sampling resistor R406 is 0. Referring to the analysis of the current acquisition and amplification circuit 50 in the previous text, it can be seen that the processor 10 does not need to perform additional short-circuit protection actions.

[0184] When a short circuit to ground occurs at the motor interface, no additional current is generated in the loop, and I_Samp=0, which is equivalent to a working condition where no fault occurs at the interface.

[0185] When any motor interface short-circuits to the power supply, because 'Motor_Speed_Control' is at a low level, the fifth switch tube M3 is in the on state, and a corresponding short-circuit condition will occur on its drain-source level. The specific analysis of this process is as follows:

[0186] "When a short - circuit to the positive power supply occurs in any of the related networks 'MOTOR_P' and 'MOTOR_N' on the main board where the motor interface is located, its short - circuit effect can be approximately equivalent to Fig.12 the short - circuit resistance Rshort and the power supply POWER shown therein. The analysis of the current I_Samp flowing through the sampling resistor R406 is as follows.

[0187] At the moment when any network has a short - circuit to the positive power supply, the fifth switching transistor M3 is still in a normal conducting state with a relatively low drain - source on - resistance Rm3_ds_on. At the moment of the fault occurrence, the operating states of semiconductor devices including the fifth switching transistor M3, the fourth switching transistor Q5, and the amplifier U23 have not changed suddenly.

[0188] According to the output characteristic curve of the fifth switching transistor M3, there will be a corresponding maximum drain - source output current Ids_max at a specific gate - source voltage Ugs1 of the fifth switching transistor M3. Calculated as follows, when Ids_max < U_Power / (Rshort – Rm3_ds_on – R406), as shown in the following formula.

[0189] I_Samp = Ids_max

[0190] When Ids_max > U_Power / (Rshort – Rm3_ds_on – R406), as shown in the following formula.

[0191] I_Samp = U_Power / (Rshort – Rm3_ds_on – R406).

[0192] After I_Samp flows through the sampling resistor R406, the voltage on the sampling resistor R406 is as shown in the following formula.

[0193] U_Samp = I_Samp * R406.

[0194] Then calculate the output voltage of the amplifier U23. In this short - circuit to the power supply condition, assume that the output voltage of the amplifier U23 at this time is U_Oshort. According to the product manual of the amplifier U23 selected for the amplifier circuit 52, the maximum output voltage of the amplifier U23 is UOmax. When UOmax < U_Samp*(1 + R154 / R358)+Uadc_cali, the calculation of the output voltage of the amplifier U23 in this condition is as shown in the following formula.

[0195] U_Oshort = U_Samp*(1 + R154 / R358)+Uadc_cali

[0196] When UOmax>U_Samp*(1+R154 / R358)+Uadc_cali, U_Oshort=UOmax.

[0197] Therefore, the voltage value of U_Oshort at this time needs to be satisfied so that the NPN fourth switch tube Q5 can be switched from the cut-off state to the on state, and its collector current output needs to be in a saturated state. At this time, the collector voltage U_c1 of the fourth switch tube Q5 = the saturation voltage drop U_ce1 of the fourth switch tube Q5. When designing and selecting the circuit, it is necessary to satisfy U_ce1 < the turn-on voltage Ugs1(th) of the fifth switch tube M3.

[0198] An analysis of the above process shows that when a short circuit to power failure occurs, the output voltage of the amplifier U23 needs to satisfy the following formula.

[0199] U_Oshort>(U_be_1 / R160+IBO_1)*R359+Udz+Vf_1

[0200] Among them, U_be_1 is the emitter junction voltage of the fourth switch tube Q5, IBO_1 is the minimum base current when the fourth switch tube Q5 is turned on and in a saturated state, Udz is the clamping voltage when the voltage regulator tube Udz breaks down, and Vf_1 is the forward conduction voltage of the diode D135.

[0201] When a short circuit occurs, the output terminal of the amplifier U23 outputs a corresponding current to charge the fifth capacitor C156, and the output voltage of the amplifier U23 charges the fourth capacitor C152 through the seventh switch tube D133, the sixth switch tube D77, and the ninth resistor R359. The fifth capacitor C156 is directly connected to the output terminal of the amplifier U23 without any other resistors, and the capacitance value of the fifth capacitor C156 is usually selected to be below 100 nF, so the charging and discharging effect of the fifth capacitor C156 can be ignored.

[0202] The charging process of the fourth capacitor C152 is that the output voltage U_Oshort of the amplifier U23 passes through the seventh switch tube D133, the voltage drop of the sixth switch tube D77, and then charges the fourth capacitor C152 through the ninth resistor R359 until the fourth switch tube Q5 is turned on. After the fourth switch tube Q5 is turned on, the potential difference of the fourth capacitor C152 is clamped to the emitter junction conduction voltage UBE1 of the fourth switch tube Q5, and changes with the change of UBE1, and finally reaches the steady-state value of the current circuit UBE1.

[0203] After the fourth switch tube Q5 is turned on, the third capacitor C209 is discharged through the fourth switch tube Q5. As the third capacitor C209 is discharged, the gate-source voltage Ugs1=Ug1-U_Samp of the fifth switch tube M3 drops rapidly. When Ugs1 drops below the opening voltage Ugs(th) of the fifth switch tube M3, the fifth switch tube M3 is turned off. At this time, I_Samp=0.

[0204] From the above analysis, it can be known that the process of the motor drive circuit 100 from triggering the short circuit to turning off the fifth switch tube M3 usually follows the above logic. The changes in the relevant quantities of each node in the specific process are as follows: triggering the short circuit → the fourth capacitor C152 is charged until the fourth switch tube Q5 is turned on → the voltage at the base of the fifth switch tube M3 becomes the collector voltage UCE1 of the fourth switch tube Q5 and gradually decreases to the saturation voltage UCE1 of the fourth switch tube Q5. During the process, the on-resistance Rds(on) of the fifth switch tube M3 gradually increases → the fifth switch tube M3 is turned off, I_Samp=0.

[0205] In the above process, the third capacitor C209 is discharged through the collector junction loop of the fourth switch tube Q5. According to the characteristics of the field effect tube, when the Ugs of the fifth switch tube M3 is large, although the on-resistance of the fifth switch tube M3 will increase slightly, it has basically no effect on the size of U_Oshort output after the amplification loop. Only when the drain-source voltage Uds1 of the field effect tube is close to or located in the constant current region corresponding to the current Ugs1, the on-resistance Rds(on) of the fifth switch tube M3 will increase significantly, and U_Oshort will only decrease at this time. The voltage of the fourth capacitor C152 is discharged through the seventh resistor R160 and the base current of the fourth switch tube Q5. With the discharge of the fourth capacitor C152, the fourth switch tube Q5 will enter the amplification state, but the fourth switch tube Q5 will not be cut off. If it is cut off, it means that the current at this time is less than the short-circuit current threshold set by the voltage regulator tube of the circuit, and it is considered that no short-circuit condition occurs. Normally, the speed at which the fifth switch tube M3 is turned off is faster than the speed at which the fourth switch tube Q5 enters amplification and the collector voltage Uce1 approaches Ugs(th).

[0206] In special cases, the speed at which the fifth switch tube M3 is turned off is slower than the speed at which the fourth switch tube Q5 enters amplification and the collector voltage Uce1 approaches Ugs(th). At this time, I_Samp will be limited to a certain current value by a certain Rds(on), and if the processor 10 does not take additional actions, the current state will be maintained until the corresponding device fails.

[0207] In the process of the fifth switch tube M3 switching from on to off, if the processor 10 obtains the ADC value corresponding to U_Oshort, the processor 10 immediately sets the speed control signal 'Motor_Speed_Control' pin high to keep the fifth switch tube M3 in the off state. However, since the above short-circuit process usually only takes a few microseconds to tens of microseconds, the processor 10 usually cannot obtain the ADC value in time, or even if the processor 10 can obtain the ADC value, since the processor 10 usually filters the signal for a certain period of time, usually in milliseconds, the circuit may not be protected from short circuit in time through the processor 10.

[0208] Therefore, after the fifth switch tube M3 is turned off, the short circuit condition is not resolved, and the circuit-related network is not in a stable state. When the fifth switch tube M3 is in the current off state, the gate-source voltage of the fifth switch tube M3 is calculated as follows.

[0209] Ugs1=gate voltage Ug – source voltage Us=Uce1

[0210] Subsequently, since I_Samp=0, the output voltage U_Ao of the amplifier U23 is now 0V. Since the fourth capacitor C152 has no corresponding charging current, the fourth capacitor C152 is in a state of being discharged through the seventh resistor R160. As the fourth capacitor C152 is discharged, the base voltage UB1 of the fourth switch tube Q5 decreases, the base current IB1 decreases, and the fourth switch tube Q5 is in an amplification state.

[0211] And Uce1=U_Mos_G_Power-β*IB1*R360, where β is the current amplification factor of the fourth switch tube Q5. Therefore, the gate-source voltage Ugs1=Uce1 of the fifth switch tube M3 will gradually increase, but as the fourth capacitor C152 discharges to below the turn-on voltage of the fourth switch tube Q5, the fourth switch tube Q5 is turned off, and at this time the fourth switch tube Q5 no longer discharges the third capacitor C209. Then, the voltage U_Mos_g_power of 'Mos_G_Power' charges the third capacitor C209 through the fifth resistor R360. Until the gate-source voltage Ugs1 of the fifth switch tube M3>Ugs(th), the fifth switch tube M3 is turned on. As the fifth switch tube M3 is turned on, the voltage of the third capacitor C209 is still increasing. As the voltage of the third capacitor C209 increases, the drain-source on-resistance Rds(on) of the fifth switch tube M3 is continuously decreasing, and the current I_Samp on the sampling resistor R406 is continuously increasing. From the above analysis, it can be seen that the increase in I_Samp will increase the output voltage U_Ao of the amplifier U23, and when U_Ao>(U_be_on / R160+IBon_1)*R359+Udz+Vf_1, the fourth switch tube Q5 will be turned on.

[0212] Wherein, U_be_on is the minimum turn-on voltage of the fourth switch tube Q5, and IBon_1 is the minimum base current required for turning on Q5.

[0213] From the above, it can be seen that the circuit forms a certain negative feedback effect, as follows: the gate-source voltage Ugs1 of the fifth switch tube M3 increases → the on-resistance Rds(on)_1 of the fifth switch tube M3 decreases → the sampling current I_Samp on the sampling resistor R406 increases → the voltage U_Samp on the sampling resistor R406 increases → the output voltage U_Ao of the amplifier U23 increases → the emitter junction voltage and base current of the fourth switch tube Q5 increase → the collector junction voltage of the fourth switch tube Q5 decreases → the gate-source voltage Ugs1 of the fifth switch tube M3 decreases.

[0214] Due to the negative feedback, the value of I_Samp is limited to float around a value, and the value Iprotect can be approximately equal to:

[0215] The processor 10 needs to preset a preset threshold I_short as the threshold for judging a short circuit, and it is required to satisfy I_short < Iprotect. When the processor 10 detects that the value of the current converted from the corresponding received voltage into a digital quantity is greater than I_short, 'Motor_Speed_Control' is switched to a high level. At this time, the fourth switching transistor Q5 conducts and is in a saturation state. Since the saturation voltage Uce1_sat of the fourth switching transistor Q5 < the turn-on voltage Ugs1(th) of the fifth switching transistor M3, the fifth switching transistor M3 is cut off, I_Samp = 0, and the motor drive circuit is protected. Usually, the value of the detected abnormal current is on the order of dozens of amperes. At this order of magnitude, the time from detecting the abnormal current to the module circuit being protected is in the millisecond range, and usually the processor module can meet this speed requirement. Optionally, the specific required response time and logic depend on the characteristics of the sampling resistor, field effect transistor, etc.

[0216] As described above, the entire network corresponding to the 'MOTOR_P' signal connected to the motor end is called the motor positive electrode, and the entire network corresponding to the 'MOTOR_N' signal connected to the motor end is called the motor negative electrode. That is, when the relay controls the contact corresponding to 'MOTOR_P' to be connected to the normally open end of the relay, i.e., the 'POWER' network, and the contact corresponding to the 'MOTOR_N' signal is still located on the normally closed side of the relay, i.e., the drain of the fifth switching transistor M3, the motor rotates forward. Conversely, when the relay controls the contact corresponding to 'MOTOR_N' to be connected to the normally open end of the relay, i.e., the 'POWER' network, and the contact corresponding to the 'MOTOR_P' signal is still located on the normally closed side of the relay, i.e., the drain of the fifth switching transistor M3, the motor rotates in reverse. The following takes the forward rotation of the motor as an example to illustrate the working conditions of the circuit under various conditions. The reverse rotation is the same and will not be elaborated here.

[0217] In the first case, when the motor rotates forward normally, the relay control logic needs to be controlled according to the forward rotation. The processor 10 needs to set a PWM signal with a certain duty cycle and a certain frequency for the 'Motor_Speed_Control' signal. In the normal forward rotation state, since the current I_Samp flowing through the sampling resistor R406 < the short-circuit current I_short, due to the functions of the sixth switching transistor D77, the seventh switching transistor D133, and other capacitors and resistors, the amplifier U23 will not affect the control of the fourth switching transistor Q5.

[0218] When the motor drive circuit 100 is in a normal working state, the voltage U_mos_g_power of 'Mos_G_Power' = U_Power - Vf.

[0219] For the speed control circuit 30 , it is necessary to satisfy (U_h_motor_speed_control−Vf_2)*R160 / (R424+R160)>Ube1_sat.

[0220] Among them, U_h_motor_speed_control is the voltage when the PWM signal of the speed regulation function is at a high level, Vf_2 is the forward conduction voltage of the eighth switch tube D135, and Ube1_sat is the emitter junction voltage drop when the fourth switch tube Q5 is in a saturated state. Therefore, when the speed control signal 'U_h_motor_speed_control' is at a high level, the fourth switch tube Q5 is in a conductive and saturated state, and the gate-source voltage Ugs1 of the fifth switch tube M3 is equal to Uce1_sat. Among them, Uce1_sat is the collector junction voltage when the fourth switch tube Q5 is in a saturated state. At this time, the fifth switch tube M3 is in a cut-off state.

[0221] When the speed control signal 'U_h_motor_speed_control' is at a low level, the fourth switch tube Q5 is in the off state. The gate-source voltage Ugs1 of the fifth switch tube M3 = (U_mos_g_power - I_Samp*R406)*R397 / (R360+R397). Where I_Samp is the current on the sampling resistor R406. At this time, the fifth switch tube M3 is in the on state.

[0222] Since the 'Motor_Speed_Control' signal is a PWM signal, the characteristics of the signal during the rising and falling processes also need to be considered.

[0223] When the output of 'Motor_Speed_Control' changes from a low level to a high level, 'Motor_Speed_Control' will charge the fourth capacitor C152 through the eighth resistor R424 and the eighth switch tube D135. In the process of the fourth switch tube Q5 changing from a cut-off state to a conducting state and amplifying, the gate-source voltage Ugs1 of the fifth switch tube M3 does not change. In the process of the fourth switch tube Q5 changing from an amplified state to a saturated state, the third capacitor C209 discharges through the collector junction of the fourth switch tube Q5 until the voltage on the third capacitor C209 becomes the gate-source voltage of the fifth switch tube M3 when 'U_mos_g_power' is a high level as described above.

[0224] When the output of 'Motor_Speed_Control' changes from a high level to a low level, the fourth capacitor C152 will discharge through the seventh resistor R160, and the fourth switch tube Q5 will switch from a saturated state to an amplified state and then enter a cut-off state. In the above process, since the collector voltage Uce1 of the fourth switch tube Q5 continues to increase, the voltage on the third capacitor C209 is also increasing. After the fourth switch tube Q5 is in the cut-off state, its related loop will no longer act on the fifth switch tube M3 and its peripheral devices. At this time, the voltage U_mos_g_power of the 'Mos_G_Power' network is charged to the third capacitor C209 through the fifth resistor R360 until the voltage on the third capacitor C209 becomes the gate-source voltage of the fifth switch tube M3 when the 'U_mos_g_power' described above is low. Therefore, when selecting the circuit, it is necessary to consider the impact of the different rise and fall times caused by the peripheral resistors and capacitors on the circuit, and it is also necessary to consider the amplification factor of each switch tube.

[0225] In the second case, when the motor rotates forward, the positive pole of the motor is short-circuited to the positive pole of the power supply. Since when the motor rotates forward, the positive pole of the motor itself is connected to the positive pole of the power supply through the relay, the short-circuit condition will not cause damage to the circuit.

[0226] In the third case, when the motor is rotating forward, the positive pole of the motor is short-circuited to the negative pole of the power supply. In this short-circuit condition, the fuse at the power supply needs to be protected, and a fuse with a suitable overcurrent threshold needs to be selected.

[0227] In the fourth case, when the motor is rotating forward, the negative pole of the motor is short-circuited to the positive pole of the power supply. Under this short-circuit condition, the short-circuit condition of the motor and the corresponding protection logic are equivalent to the condition in which the positive or negative pole of the motor is short-circuited to the positive pole of the power supply when the motor is not working, and will not be described in detail here.

[0228] In the fifth case, when the motor rotates forward, the negative pole of the motor is short-circuited to the negative pole of the power supply. Since when the motor rotates forward, the negative pole of the motor itself is connected to the negative pole of the power supply through the relay, the fifth switch tube M3, and the sampling resistor R406, the short-circuit condition will not damage the circuit. At the same time, the processor 10 can judge the fault in the circuit by comparing the current value obtained under this condition to be lower than the minimum value under normal operation of the motor.

[0229] In the embodiments of the present application, Fig.13 As shown, a motor control device is also provided. Optionally, the motor control device is suitable for a four-arm motor. The motor control device includes a motor drive circuit as in any of the above embodiments.

[0230] Optionally, the motor control device may also include an external connector for the total power input of the motor control device and an active signal output for driving the motor. A slow-blow fuse is used to avoid long-term short-circuit currents under certain conditions to ensure that the components on the motor are not damaged. A relay drive module is a front-stage circuit for output control of the relay circuit. The control signal of the processor is processed by the relay drive module and then output to the relay circuit to control the relay according to the control signal. A power supply module performs circuit processing such as step-down on the input power supply so that the voltage output by the power supply module is within the normal operating range of the components on the processor, relay circuit and motor drive circuit, thereby providing power to the processor, relay circuit and motor drive circuit.

[0231] In the description of this specification, the description with reference to the terms "some embodiments", "other embodiments", "ideal embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example.

[0232] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0233] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A motor drive circuit, characterized in that: The motor drive circuit includes: a processor, a relay circuit and a speed control circuit; The first end of the relay circuit is connected to the processor, and the second end of the relay circuit is connected to the motor; the relay circuit is used to drive the motor to operate according to the relay control signal output by the processor; The speed control circuit is connected to the third end of the relay circuit and the processor respectively. The speed control circuit is used to control the relay circuit to adjust the running speed of the motor according to the speed control signal output by the processor when the motor is running.

2. The motor drive circuit according to claim 1, characterized in that: The motor drive circuit further comprises an enabling circuit, wherein an input end of the enabling circuit is connected to the processor, and an output end of the enabling circuit is connected to the speed control circuit; The enabling circuit is used to control the speed control circuit to enter an enabling state when the enabling signal output by the processor is at a first level, so that the speed control circuit controls the relay circuit to adjust the running speed of the motor according to the speed control signal output by the processor.

3. The motor drive circuit according to claim 2, characterized in that: The motor drive circuit further includes a current collection and amplification circuit, the input end of the current collection and amplification circuit is connected to the speed control circuit, and the output end of the current collection and amplification circuit is connected to the processor; The current acquisition and amplification circuit is used to acquire the current current data of the motor through the speed control circuit, and output the current data to the processor so that the processor can determine the working state of the motor according to the current data.

4. The motor drive circuit according to claim 3, characterized in that: The current collection and amplification circuit comprises a sampling circuit and an amplification circuit, wherein a first end of the sampling circuit is connected to the speed control circuit, and a second end of the sampling circuit is grounded; a first end of the amplification circuit is connected to the sampling circuit, and a second end of the amplification circuit is connected to the processor; The sampling circuit is used to collect the current data; The amplifier circuit is used to amplify the current data collected by the sampling circuit and output it to the processor.

5. The motor drive circuit according to claim 2, characterized in that: The enabling circuit includes a first switch tube and a second switch tube; The control electrode of the first switch tube is connected to the processor, the first electrode of the first switch tube is connected to the control electrode of the second switch tube, and the second electrode of the first switch tube is grounded; A first electrode of the second switch tube is connected to a power source, and a second electrode of the second switch tube is connected to the speed control circuit.

6. The motor drive circuit according to claim 5, characterized in that: The first switch tube is in the on state when the enable signal is at the first level, and the second switch tube is in the on state when the first switch tube is turned on, so as to control the speed control circuit to be in the enabled state when the enable signal is at the first level.

7. The motor drive circuit according to claim 6, characterized in that: The first switch tube is in a cut-off state when the enable signal is at the second level, and the second switch tube is in a cut-off state when the first switch tube is cut off, so as to control the speed control circuit to be in a sleep state when the enable signal is at the second level.

8. The motor drive circuit according to claim 7, characterized in that: The enabling circuit further includes a third switch tube, a first resistor, a second resistor, a third resistor, a fourth resistor, a first capacitor and a second capacitor; The first electrode of the third switch tube is connected to the power supply, and the second electrode of the third switch tube is connected to the first electrode of the second switch tube; The first end of the first resistor is connected to the second electrode of the third switch tube, and the second end of the first resistor is connected to the control electrode of the second switch tube; The first end of the first capacitor is connected to the second electrode of the third switch tube, and the second end of the first capacitor is connected to the control electrode of the second switch tube; A first end of the second resistor is connected to a control electrode of the second switch tube, and a second end of the second resistor is connected to a first electrode of the first switch tube; A first end of the third resistor is connected to the control electrode of the first switch tube, and a second end of the third resistor is grounded; A first end of the second capacitor is connected to the control electrode of the first switch tube, and a second end of the second capacitor is grounded; A first end of the fourth resistor is connected to the processor, and a second end of the fourth resistor is connected to a control electrode of the first switch tube.

9. The motor drive circuit according to claim 3, characterized in that: The speed control circuit includes a fourth switch tube and a fifth switch tube; The control electrode of the fourth switch tube is connected to the processor, the first electrode of the fourth switch tube is connected to the control electrode of the fifth switch tube, and the second electrode of the fourth switch tube is grounded; The control electrode of the fifth switch tube is connected to the enabling circuit, the first electrode of the fifth switch tube is connected to the relay circuit, and the second electrode of the fifth switch tube is connected to the current collection and amplification circuit.

10. The motor driving circuit according to claim 9, characterized in that: When the enable signal is at the first level, the fourth switch tube is in the on state, and the fifth switch tube is in the off state when the speed control signal output by the processor to the speed control circuit is at the third level; the fourth switch tube is in the off state, and the fifth switch tube is in the on state when the speed control signal is at the fourth level, so as to control the current between the speed control circuit and the relay circuit through the speed control signal to control the running speed of the motor.

11. The motor driving circuit according to claim 10, characterized in that: The fifth switch tube is in a cut-off state when the enable signal is at the second level, so as to control the speed control circuit to be in a dormant state.

12. The motor drive circuit according to claim 11, characterized in that: The speed control circuit further includes a third capacitor, a fourth capacitor, a fifth resistor, a sixth resistor and a seventh resistor; The first end of the third capacitor is connected to the control electrode of the fifth switch tube, and the second end of the third capacitor is connected to the second electrode of the fifth switch tube; The first end of the sixth resistor is connected to the control electrode of the fifth switch tube, and the second end of the sixth resistor is connected to the second electrode of the fifth switch tube; A first end of the fifth resistor is connected to the control electrode of the fifth switch tube, and a second end of the fifth resistor is connected to the enabling circuit; A first end of the fourth capacitor is connected to the control electrode of the fourth switch tube, and a second end of the fourth capacitor is grounded; A first end of the seventh resistor is connected to the control electrode of the fourth switch tube, and a second end of the seventh resistor is grounded.

13. The motor driving circuit according to claim 12, characterized in that: The speed control circuit also includes a sixth switch tube, a seventh switch tube and a ninth resistor; A first end of the ninth resistor is connected to the control electrode of the fourth switch tube, and a second end of the ninth resistor is connected to the sixth switch tube; The second end of the sixth switch tube is connected to the seventh switch tube; The second end of the seventh switch tube is connected to the current collection and amplification circuit.

14. The motor driving circuit according to claim 13, characterized in that: The speed control circuit also includes an eighth switch tube and an eighth resistor; A first end of the eighth resistor is connected to the processor, and a second end of the eighth resistor is connected to the eighth switch tube; The second end of the eighth switch tube is connected to the control electrode of the fourth switch tube.

15. The motor driving circuit according to claim 14, characterized in that: When a short circuit to the power supply occurs in the motor drive circuit and the fourth switch tube is in the off state, the speed control circuit controls the fourth switch tube to be in the on state and the fifth switch tube to be in the off state so that the current output to the motor is less than a preset threshold.

16. The motor driving circuit according to claim 4, characterized in that: The amplifying circuit comprises an amplifier, a first input terminal of the amplifier is connected to the sampling circuit, a second input terminal of the amplifier is grounded, and an output terminal of the amplifier is connected to the processor.

17. The motor driving circuit according to claim 16, characterized in that: The amplifying circuit further includes a fifth capacitor, a tenth resistor, an eleventh resistor, a twelfth resistor and a thirteenth resistor; A first end of the fifth capacitor is connected to the output end of the amplifier, and a second end of the fifth capacitor is grounded; A first end of the tenth resistor is connected to the first input end of the amplifier, and a second end of the tenth resistor is connected to a first voltage; The first end of the eleventh resistor is connected to the first input end of the amplifier, and the second end of the eleventh resistor is connected to the sampling circuit; The first end of the twelfth resistor is connected to the second input end of the amplifier, and the second end of the twelfth resistor is grounded; A first end of the thirteenth resistor is connected to the second input end of the amplifier, and a second end of the thirteenth resistor is connected to the output end of the amplifier.

18. The motor drive circuit according to claim 17, characterized in that: The amplifying circuit further includes a fourteenth resistor and a sixth capacitor; A first end of the fourteenth resistor is connected to the output end of the amplifier, and a second end of the fourteenth resistor is connected to the processor; A first end of the sixth capacitor is connected to the processor, and a second end of the sixth capacitor is grounded.

19. The motor driving circuit according to claim 4, characterized in that: The sampling circuit comprises a sampling resistor, a first end of the sampling resistor is connected to the speed control circuit, and a second end of the sampling resistor is grounded.

20. A motor control device, characterized in that: The invention comprises a motor driving circuit as claimed in any one of claims 1 to 19.