Circuit for controlling rotation / stop of motor through combination of software and hardware
Through the circuit that combines the motor rotation/stop by software and hardware, and uses hardware detection and MCU software to jointly determine, the motor overcurrent state in the high-power DC motor driver/controller is realized, and the problems of inaccurate data, control delay and MCU vulnerability in the prior art are solved, and the stability and efficiency of the system are improved.
Patent Information
- Application Number
- CN202421580922.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2034-07-05
AI Technical Summary
In the existing high-power DC motor drivers/controllers, the hardware detects overcurrent signals with inaccurate data misjudgment. The MCU software control signal output delays, resulting in poor real-time control of the motor stop state, and the MCU chip is vulnerable to damage.
The circuit of software and hardware combined controls the motor rotation/stop is adopted, and the hardware detection overcurrent signal and the MCU software overcurrent signal are jointly determined. Real-time control is achieved using the AND gate and analog switch to avoid lag in the operation of the software program.
It improves the accuracy and stability of motor rotation and stop, enhances the real-time and efficiency of hardware circuits, protects the MCU chip, and reduces the workload of software personnel.
Smart Images

Figure CN222814233U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of electronic circuits, in particular to a circuit for controlling the start / stop of a motor by combining software and hardware. Background Art
[0002] At present, in high-power DC motor driver / controller products, hardware detection overcurrent signals are usually directly connected to the MCU detection pin, and the MCU software control signal is directly connected to the drive motor start / stop signal. Through a single hardware detection overcurrent signal, the MCU software program makes a numerical judgment, thereby sending a drive motor start / stop signal to control the motor's start / stop. The motor stop is controlled by the MCU software control signal to a low-level signal. However, there are many disadvantages in the control process of the internal hardware for the drive motor start / stop signal, such as: a single hardware detection overcurrent signal has the problem of inaccurate data misjudgment; the MCU software control signal outputs a low level to control the motor to stop rotating, and the hardware responds to the control of the MCU software program. There is a delay, and the real-time control of the motor stop state is poor; the existing solution system is easily damaged when the MCU chip is overcurrent. Therefore, it is urgent to develop a circuit that jointly controls the motor start / stop with software and hardware to solve the above technical problems.
[0003] In view of this, the present utility model is proposed. Utility Model Content
[0004] The purpose of the utility model is to provide a circuit for jointly controlling the start / stop of a motor with software and hardware. The circuit has a simple structure and an ingenious design and is applied to a high-power DC motor driver / controller circuit. During the rotation of the motor, the circuit detects whether the motor is overcurrent to realize the joint control of the rotation and stop of the motor with software and hardware. The circuit has high accuracy and stability, and the hardware circuit has strong real-time performance, the system has fast response and high efficiency. The circuit avoids problems such as software program running jams, effectively reduces the workload of software personnel, has broad application prospects, and is conducive to popularization and application.
[0005] In order to achieve the above-mentioned purpose, the utility model provides a circuit for jointly controlling the start / stop of a motor with software and hardware, comprising an AND gate U1, analog switches U2, U3, U4 and three pairs of pull-down resistors R1 and R2, R3 and R4, R5 and R6, the hardware detection overcurrent signal is I_OUT, the MCU software overcurrent signal is MCU_OUT, the AND gate U1 output signal is SEL, which is also the enable control signal of the analog switches U2, U3, U4, the MCU software control signals are MOTOR_UH, MOTOR_UL, MOTOR_VH, MOTOR_VL, MOTOR_WH, MOTOR_WL, the drive motor start / stop signals are MOTOR_UH1, MOTOR_UL1, MOTOR_VH1, MOTOR_VL1, MOTOR_WH1, MOTOR_WL1, wherein the high level state of all signals is 3.3V, and the drive motor start / stop signal is the control signal of the motor drive circuit;
[0006] The MCU_OUT signal is connected to the 1st pin of the AND gate U1, which is A. The I_OUT signal is connected to the 2nd pin of the AND gate U1, which is B. The 3rd pin of the AND gate U1 is connected to GND. The 5th pin of the AND gate U1 is connected to 3.3V. The 4th pin of the AND gate U1 outputs the SEL signal, which is connected to the 3rd and 7th pins of the analog switches U2, U3, and U4. The MOTOR_UH signal is connected to the 1st pin of the analog switch U2. The MOTOR_UL signal is connected to the 5th pin of the analog switch U2. The MOTOR_UH1 signal is connected to the 2nd pin of the analog switch U2 and the pull-down resistor R1 is connected to GND. The MOTOR_UL1 signal is connected to the 6th pin of the analog switch U2 and the pull-down resistor R2 is connected to GND. The MOTOR_VH The signal is connected to pin 1 of the analog switch U3, the MOTOR_VL signal is connected to pin 5 of the analog switch U3, the MOTOR_VH1 signal is connected to pin 2 of the analog switch U3 and connects the pull-down resistor R3 to GND, the MOTOR_VL1 signal is connected to pin 6 of the analog switch U3 and connects the pull-down resistor R4 to GND, the MOTOR_WH signal is connected to pin 1 of the analog switch U4, the MOTOR_WL signal is connected to pin 5 of the analog switch U4, the MOTOR_WH1 signal is connected to pin 2 of the analog switch U4 and connects the pull-down resistor R5 to GND, and the MOTOR_WL1 signal is connected to pin 6 of the analog switch U4 and connects the pull-down resistor R6 to GND.
[0007] Preferably, the truth table of the AND gate U1 is: when A and B are both 1, Y outputs 1; when A and B are both 0, Y outputs 0; when A is 0 and B is 1, Y outputs 0; when A is 1 and B is 0, Y outputs 0.
[0008] Preferably, pins 1 and 2 of the analog switches U2, U3, and U4 are internally equivalent to switch 1, and pin 7 is the on / off control pin of switch 1; pins 5 and 6 are internally equivalent to switch 2, and pin 3 is the on / off control pin of switch 2; when the signal at pin 3 or pin 7 is at a high level, the corresponding internal switch is closed, and when the signal at pin 3 or pin 7 is at a low level, the corresponding internal switch is opened.
[0009] Preferably, the AND gate U1 is of model SN74AHC1G08DBVR.
[0010] Preferably, the model of the analog switches U2, U3, U4 is RS2266.
[0011] Preferably, the pull-down resistors R1, R2, R3, R4, R5, and R6 are 10K resistors.
[0012] The utility model provides a circuit for controlling the motor start / stop by combining software and hardware, which has the following beneficial effects.
[0013] 1. The utility model determines whether the motor is overcurrent by combining hardware detection of overcurrent signals and MCU software overcurrent signals. The software and hardware jointly control whether the motor is overcurrent, with high accuracy and stability.
[0014] 2. The hardware circuit of the utility model uses the hardware detection overcurrent signal and the MCU software overcurrent signal as the AND gate input, and determines and controls whether the analog switch is enabled through the AND gate output, rather than through the software program. The hardware circuit has strong real-time performance, high efficiency, simple and convenient design, avoids problems such as software program running jams, and effectively reduces the workload of software personnel.
[0015] 3. When the system is overcurrent, the utility model disconnects the MCU software control signal and the drive motor start / stop signal through the analog switch. When the motor is overcurrent, the system MCU is disconnected from the motor drive circuit, which helps to protect the system MCU.
[0016] 4. When the hardware is overcurrent or the MCU software wants to control the motor to stop rotating, the utility model can directly pull down the drive motor start / stop signal to control the motor drive circuit through the pull-down resistor in the hardware circuit to stop the motor from rotating. By pulling down the drive motor start / stop signal through hardware control, the system responds quickly and has strong real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The utility model provides a schematic diagram of the structure of a circuit for controlling the start / stop of a motor by combining software and hardware.
[0018] Figure 2 The utility model provides a circuit diagram of a circuit for controlling the start / stop of a motor by combining software and hardware. DETAILED DESCRIPTION
[0019] The present invention will be further described below in conjunction with specific embodiments and drawings to help understand the content of the present invention.
[0020] like Figure 1-Figure 2 As shown, they are respectively a schematic diagram and a circuit diagram of a circuit for controlling the motor start / stop by software and hardware combined. The circuit for controlling the motor start / stop by software and hardware combined includes an AND gate U1, analog switches U2, U3, U4, and three pairs of pull-down resistors R1 and R2, R3 and R4, R5 and R6. The hardware detection overcurrent signal is I_OUT, the MCU software overcurrent signal is MCU_OUT, and the AND gate U1 output signal is SEL, which is also the enable control signal of the analog switches U2, U3, and U4. The MCU software control signals are MOTOR_UH, MOTOR_UL, MOTOR_VH, MOTOR_VL, MOTOR_WH, and MOTOR_WL. The drive motor start / stop signals are MOTOR_UH1, MOTOR_UL1, MOTOR_VH1, MOTOR_VL1, MOTOR_WH1, and MOTOR_WL1, wherein the high level state of all signals is 3.3V, and the drive motor start / stop signal is the control signal of the motor drive circuit;
[0021] The MCU_OUT signal is connected to the 1st pin of the AND gate U1, which is A. The I_OUT signal is connected to the 2nd pin of the AND gate U1, which is B. The 3rd pin of the AND gate U1 is connected to GND. The 5th pin of the AND gate U1 is connected to 3.3V. The 4th pin of the AND gate U1 outputs the SEL signal, which is connected to the 3rd and 7th pins of the analog switches U2, U3, and U4. The MOTOR_UH signal is connected to the 1st pin of the analog switch U2. The MOTOR_UL signal is connected to the 5th pin of the analog switch U2. The MOTOR_UH1 signal is connected to the 2nd pin of the analog switch U2 and the pull-down resistor R1 is connected to GND. The MOTOR_UL1 signal is connected to the 6th pin of the analog switch U2 and the pull-down resistor R2 is connected to GND. The MOTOR_VH The signal is connected to pin 1 of the analog switch U3, the MOTOR_VL signal is connected to pin 5 of the analog switch U3, the MOTOR_VH1 signal is connected to pin 2 of the analog switch U3 and connects the pull-down resistor R3 to GND, the MOTOR_VL1 signal is connected to pin 6 of the analog switch U3 and connects the pull-down resistor R4 to GND, the MOTOR_WH signal is connected to pin 1 of the analog switch U4, the MOTOR_WL signal is connected to pin 5 of the analog switch U4, the MOTOR_WH1 signal is connected to pin 2 of the analog switch U4 and connects the pull-down resistor R5 to GND, and the MOTOR_WL1 signal is connected to pin 6 of the analog switch U4 and connects the pull-down resistor R6 to GND.
[0022] The truth table of the AND gate U1 is: when A and B are both 1, Y outputs 1; when A and B are both 0, Y outputs 0; when A is 0 and B is 1, Y outputs 0; when A is 1 and B is 0, Y outputs 0. Pins 1 and 2 of the analog switches U2, U3, and U4 are equivalent to switch 1, and pin 7 is the on / off control pin of switch 1. Pins 5 and 6 are equivalent to switch 2, and pin 3 is the on / off control pin of switch 2. When the signal of pin 3 or pin 7 is high level, the corresponding internal switch is closed, and when the signal of pin 3 or pin 7 is low level, the corresponding internal switch is disconnected. The model of the AND gate U1 is SN74AHC1G08DBVR. The model of the analog switches U2, U3, and U4 is RS2266. The pull-down resistors R1, R2, R3, R4, R5, and R6 are 10K resistors.
[0023] The working principle of the utility model is:
[0024] (1) When the motor is running without overcurrent: the hardware detection overcurrent signal and the MCU software overcurrent signal are both high level, the AND gate outputs a high level signal, controls the analog switch to close, and the MCU software control signal is connected to the drive motor start / stop signal. The drive motor start / stop signal is a level change signal that controls the normal rotation of the motor.
[0025] (2) When the motor is in overcurrent state: one or both of the hardware detection overcurrent signal and the MCU software overcurrent signal are at low level, and the AND gate outputs a low level signal, which controls the analog switch to be disconnected. The MCU software control signal is not connected to the drive motor start / stop signal, and the drive motor start / stop signal is connected to the ground through a pull-down resistor. The drive motor start / stop signals are all at low level, and the control motor stops rotating.
[0026] The utility model jointly determines whether the motor is overcurrent by hardware detection overcurrent signal and MCU software overcurrent signal, and jointly controls the determination of whether the motor is overcurrent by software and hardware, with high accuracy and high stability. The hardware circuit of the utility model uses the hardware detection overcurrent signal and the MCU software overcurrent signal as AND gate input, and determines and controls whether the analog switch is enabled by AND gate output, rather than determining and controlling by software program. The hardware circuit has strong real-time performance, high efficiency, simple and convenient design, avoids problems such as software program running jams, and effectively reduces the workload of software personnel. When the system is overcurrent, the utility model disconnects the MCU software control signal and the drive motor start / stop signal through the analog switch. When the motor is overcurrent, the system MCU is disconnected from the motor drive circuit, which helps to protect the system MCU. When the hardware is overcurrent or the MCU software wants to control the motor to stop rotating, the pull-down resistor in the hardware circuit can be used to ground, directly pull down the drive motor start / stop signal to control the motor drive circuit, so that the motor stops rotating. By hardware control driving the motor start / stop signal to be pulled down, the system responds quickly and has strong real-time performance.
[0027] This article uses specific examples to explain the concept of the utility model in detail, and the description of the above embodiments is only used to help understand the core idea of the utility model. It should be pointed out that for ordinary technicians in this technical field, any obvious modifications, equivalent substitutions or other improvements made without departing from the concept of the utility model should be included in the scope of protection of the utility model.
Claims
1. A circuit for controlling the start / stop of a motor by combining software and hardware, characterized in that: It includes an AND gate U1, analog switches U2, U3, U4 and three pairs of pull-down resistors R1 and R2, R3 and R4, R5 and R6. The hardware detection overcurrent signal is I_OUT, the MCU software overcurrent signal is MCU_OUT, and the output signal of the AND gate U1 is SEL, which is also the enable control signal of the analog switches U2, U3, and U4. The MCU software control signals are MOTOR_UH, MOTOR_UL, MOTOR_VH, MOTOR_VL, MOTOR_WH, and MOTOR_WL. The drive motor start / stop signals are MOTOR_UH1, MOTOR_UL1, MOTOR_VH1, MOTOR_VL1, MOTOR_WH1, and MOTOR_WL1. The high level states of all signals are 3.3V, and the drive motor start / stop signal is the control signal of the motor drive circuit; The MCU_OUT signal is connected to the 1st pin of the AND gate U1, which is A. The I_OUT signal is connected to the 2nd pin of the AND gate U1, which is B. The 3rd pin of the AND gate U1 is connected to GND. The 5th pin of the AND gate U1 is connected to 3.3V. The 4th pin of the AND gate U1 outputs the SEL signal, which is connected to the 3rd and 7th pins of the analog switches U2, U3, and U4. The MOTOR_UH signal is connected to the 1st pin of the analog switch U2. The MOTOR_UL signal is connected to the 5th pin of the analog switch U2. The MOTOR_UH1 signal is connected to the 2nd pin of the analog switch U2 and the pull-down resistor R1 is connected to GND. The MOTOR_UL1 signal is connected to the 6th pin of the analog switch U2 and the pull-down resistor R2 is connected to GND. The MOTOR_VH The signal is connected to pin 1 of the analog switch U3, the MOTOR_VL signal is connected to pin 5 of the analog switch U3, the MOTOR_VH1 signal is connected to pin 2 of the analog switch U3 and connects the pull-down resistor R3 to GND, the MOTOR_VL1 signal is connected to pin 6 of the analog switch U3 and connects the pull-down resistor R4 to GND, the MOTOR_WH signal is connected to pin 1 of the analog switch U4, the MOTOR_WL signal is connected to pin 5 of the analog switch U4, the MOTOR_WH1 signal is connected to pin 2 of the analog switch U4 and connects the pull-down resistor R5 to GND, and the MOTOR_WL1 signal is connected to pin 6 of the analog switch U4 and connects the pull-down resistor R6 to GND.
2. A circuit for controlling the start / stop of a motor by combining software and hardware according to claim 1, characterized in that: The truth table of the AND gate U1 is: when A and B are both 1, Y outputs 1; when A and B are both 0, Y outputs 0; when A is 0 and B is 1, Y outputs 0; when A is 1 and B is 0, Y outputs 0.
3. A circuit for controlling the start / stop of a motor by combining software and hardware according to claim 2, characterized in that: Pins 1 and 2 of the analog switches U2, U3, and U4 are internally equivalent to switch 1, and pin 7 is the on / off control pin of switch 1; pins 5 and 6 are internally equivalent to switch 2, and pin 3 is the on / off control pin of switch 2; when the signal at pin 3 or pin 7 is at a high level, the corresponding internal switch is closed, and when the signal at pin 3 or pin 7 is at a low level, the corresponding internal switch is opened.
4. A circuit for controlling the start / stop of a motor by combining software and hardware according to claim 3, characterized in that: The model of the AND gate U1 is SN74AHC1G08DBVR.
5. A circuit for controlling the start / stop of a motor by combining software and hardware according to claim 4, characterized in that: The model of the analog switches U2, U3, and U4 is RS2266.
6. A circuit for controlling the start / stop of a motor by combining software and hardware according to claim 5, characterized in that: The pull-down resistors R1, R2, R3, R4, R5, and R6 are 10K resistors.