Motor control method and device for realizing handshake mode, equipment and storage medium
By connecting the speed regulation signal lines between multiple motors in the motor control system, a hand-shake mode network is formed, which solves the problems of electromagnetic interference and unreliable signal transmission caused by parallel connection, and achieves more stable and efficient signal transmission .
Patent Information
- Application Number
- CN202411545276.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-07
AI Technical Summary
The parallel connection of the speed regulation signal line causes electromagnetic interference and unreliable signal transmission failure.
By connecting the speed regulation signal lines between multiple motors in series, a handshake mode network is formed. The host receives the speed regulation signal and transmits it to other motors through the series circuit until the last slave outputs the DC voltage signal.
Reduces electromagnetic interference caused by current changes, improves signal stability and transmission quality, simplifies wiring and reduces costs.
Smart Images

Figure CN119401860A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control technology, and in particular to a motor control method, device, equipment and storage medium for implementing a hand-shake mode. Background Art
[0002] In many cases, in order to achieve centralized control of multiple motors, people tend to use the method of parallel connection of speed control signal lines. However, although this parallel connection method simplifies the wiring and control logic to a certain extent, it also brings some challenges and problems. For example, when multiple signal lines are connected in parallel, electromagnetic interference may be generated due to the current changes on the speed control signal line. In addition, since multiple motors share the same power supply, this also increases the requirements for the current output capacity of the client power supply. At the same time, due to the need to meet customer needs for multiple speed control methods, the signal line sequence is complicated and messy, and the signal line connecting the last motor is relatively long, which can easily lead to signal transmission failure and unreliable problems. Summary of the invention
[0003] In view of this, the present invention provides a motor control method, device, equipment and storage medium for implementing a hand-shake mode to solve the electromagnetic interference caused by the parallel connection of speed control signal lines and the problem of signal transmission failure and unreliability that is very likely to occur.
[0004] In a first aspect, the present invention provides a motor control method for implementing a hand-shake mode, which is applied to a motor control system, wherein the motor control system includes a plurality of motors, and the motors are connected in series through speed control signal lines; a motor receiving a first speed control signal is used as a host, and other motors except the host are used as slaves; a slave connected to the host is used as a first slave; the method includes:
[0005] The control host receives a first speed adjustment signal;
[0006] The control host adjusts the voltage of the first speed adjustment signal to obtain a first DC voltage signal;
[0007] The first DC voltage signal is used as a second speed regulating signal of the first slave, and is sent to the first slave through a speed regulating signal line;
[0008] The first slave is controlled to adjust the second speed adjustment signal voltage to obtain a second DC voltage signal, and the second DC voltage signal is used as the third speed adjustment signal of the next slave, and is sent to the next slave through the speed adjustment signal line until the last slave outputs a DC voltage signal, so that a handshake mode network is formed between the two motors.
[0009] The motor control method for realizing the handshake mode provided by the present invention is that the motors are connected in series through the speed control signal line, and the control host receives the first speed control signal machine; the control host adjusts the voltage of the first speed control signal to obtain the first DC voltage signal; the first DC voltage signal is used as the second speed control signal of the first slave, and is sent to the first slave through the speed control signal line; the first slave is controlled to adjust the voltage of the second speed control signal to obtain the second DC voltage signal, and the second DC voltage signal is used as the third speed control signal of the next slave, and is sent to the next slave through the speed control signal line, until the last slave outputs the DC voltage signal, so as to realize the handshake mode network between the motors, and the series speed control signal line reduces the electromagnetic interference caused by the current change because the current flows sequentially on one line. The layout of the series mode helps to maintain the clarity and stability of the signal, especially when the signal transmission distance is far, the series configuration can reduce the number of cables used, simplify the wiring, and reduce the cost. In the series configuration, the signal strength will not be weakened by branches, which helps to maintain the integrity of the signal. It has the advantage of high reliability of speed control signal transmission, ensures the security and efficiency of network communication, and solves the electromagnetic interference caused by the parallel connection of speed control signal lines and the problem of signal transmission failure and unreliability.
[0010] In an optional embodiment, the control system further includes a signal generator, and receiving the first speed adjustment signal and sending it to the host includes:
[0011] The control signal generator outputs a first speed regulating signal and sends the first speed regulating signal to the host, and the host is controlled to receive the first speed regulating signal.
[0012] The motor control method for realizing the hand-shake mode provided by the present invention controls the signal generator to output the first speed adjustment signal, and sends the first speed adjustment signal to the host, so that the entire control system has only one speed adjustment signal line connected to the external power supply, reducing the demand for the output capacity of the power supply system, and allowing the first speed adjustment signal to be accurately sent to the host.
[0013] In an optional implementation, each motor includes a signal processing module and a microcontroller unit; controlling the host to adjust the first speed adjustment signal voltage to obtain a first DC voltage signal includes:
[0014] Controlling the host signal processing module to adjust the voltage of the first speed adjustment signal to obtain a first output voltage;
[0015] A microcontroller unit is used to convert the first output voltage to obtain a first DC voltage signal.
[0016] The motor control method for realizing the hand-shake mode provided by the present invention controls the host signal processing module to adjust the voltage of the first speed adjustment signal to obtain the first output voltage; adopts the microcontroller unit to obtain the first DC voltage signal based on the first output voltage conversion, and can adapt to various speed regulation modes through the close integration of software and hardware in the microcontroller unit, providing high flexibility and adaptability.
[0017] In an optional implementation, using a microcontroller unit to convert the first output voltage to obtain a first DC voltage signal includes:
[0018] A microcontroller unit is used to convert the first output voltage into a digital voltage value, a corresponding speed setting value is obtained based on the digital voltage value, a duty cycle signal of the digital voltage value is obtained based on the speed setting value, and then a first DC voltage signal is obtained based on the duty cycle signal.
[0019] In an optional implementation, the speed setting value includes the minimum speed of the motor and the maximum speed of the motor. The calculation formula for obtaining the duty cycle signal of the digital voltage value based on the speed setting value is as follows:
[0020] pwm_duty=(((rpm_setting-min_speed_prog)*(max_anV-min_anV)) / (max_speed_prog-min_speed_prog))+min_anV;
[0021] Among them, min_speed_prog and max_speed_prog are the minimum speed and maximum speed of the motor respectively; min_anV is the minimum starting voltage of the motor, that is, the minimum voltage value required for the motor to start and start running in the 0V to 10V speed regulation mode; max_anV is the full-on voltage of the motor, that is, the minimum voltage value for the motor to continuously run at the maximum speed in the 0V to 10V speed regulation mode, and rpm_setting represents the speed setting value.
[0022] In an optional implementation, each motor further includes a filtering and amplifying module, and obtaining the first DC voltage signal based on the duty cycle signal includes:
[0023] obtaining a second output voltage based on the duty cycle signal;
[0024] The filter and amplifier module is controlled to filter and amplify the second output voltage to obtain a first DC voltage signal.
[0025] In the motor control method for implementing the hand-shake mode provided by the present invention, the voltage output signal corresponding to the duty cycle signal output by the microcontroller unit can flexibly adjust the duty cycle according to actual needs to adapt to different speed regulation requirements of the motor.
[0026] In an optional implementation, the first DC voltage signal output by the host, the second DC voltage signal output by the first slave, and the DC voltage signals output by the other slaves are all equal DC voltages within a preset voltage range;
[0027] The motor control method for implementing the hand-shake mode also includes:
[0028] In the handshake mode network, the speed of each motor is regulated by using an equal DC voltage within a preset voltage range.
[0029] The motor control method for realizing the hand-shake mode provided by the present invention adopts a DC voltage within an equal preset voltage range to adjust the speed of each motor under the hand-shake mode network. Through the hand-shake mode network, the electromagnetic interference of the entire control system can be reduced, the stability of the transmission signal can be improved, and the signal transmission quality can be improved at the same time, so as to achieve the purpose of flexibly adjusting the speed of each motor.
[0030] In a second aspect, the present invention provides a motor control device for implementing a hand-shake mode, which is applied to a motor control system. The motor control system includes a plurality of motors, and the motors are connected in series through speed control signal lines; the motor receiving the first speed control signal is used as a host, and the other motors except the host are used as slaves; the slave connected to the host is used as a first slave; the device includes:
[0031] A signal receiving module, used for controlling the host to receive a first speed adjustment signal;
[0032] A host speed regulating module, used for controlling the host to adjust the voltage of the first speed regulating signal to obtain a first DC voltage signal;
[0033] A first slave speed regulating module, used for using the first DC voltage signal as a second speed regulating signal of the first slave, and sending the signal to the first slave through a speed regulating signal line;
[0034] The handshake mode network implementation module is used to control the first slave machine to adjust the second speed adjustment signal voltage to obtain a second DC voltage signal, and use the second DC voltage signal as the third speed adjustment signal of the next slave machine, and send it to the next slave machine through the speed adjustment signal line until the last slave machine outputs a DC voltage signal, so that a handshake mode network is formed between the two motors.
[0035] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the motor control method for implementing the hand-shake mode of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0036] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the motor control method for implementing a hand-shake mode according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 is a flow chart of a motor control method for implementing a hand-shake mode according to an embodiment of the present invention;
[0039] Figure 2 is a flow chart of another motor control method for implementing a hand-shake mode according to an embodiment of the present invention;
[0040] Figure 3 is a flow chart of another motor control method for implementing a hand-shake mode according to an embodiment of the present invention;
[0041] Figure 4 is a flow chart of another motor control method for implementing a hand-shake mode according to an embodiment of the present invention;
[0042] Figure 5 is a structural block diagram of a motor control system according to an embodiment of the present invention;
[0043] Figure 6 is a flow chart of an implementation of a microcontroller unit according to an embodiment of the present invention;
[0044] Figure 7 is a structural block diagram of another motor control system according to an embodiment of the present invention;
[0045] Figure 8 is a structural block diagram of a motor control device for implementing a hand-shake mode according to an embodiment of the present invention;
[0046] Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0048] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0049] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, it can also be the internal connection of two components, it can be a wireless connection, or it can be a wired connection. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0050] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0051] According to an embodiment of the present invention, an embodiment of a motor control method for realizing a hand-shake mode is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and, although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0052] In this embodiment, a motor control method for implementing a hand-shake mode is provided, which can be used in a motor control system, such as Figure 5 As shown, the motor control system includes multiple motors, and the motors are connected in series through speed control signal lines; the motor receiving the first speed control signal is used as the host, and the other motors except the host are used as slaves, that is, slave 0 to slave n; the slave connected to the host is used as the first slave, that is, slave 0, Figure 1is a flow chart of a motor control method for implementing a hand-shake mode according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0053] Step S101, controlling the host to receive a first speed adjustment signal.
[0054] Specifically, the first speed regulation signal may be a voltage speed regulation signal, which may be output by a signal generator, and the control host receives the first speed regulation signal. The voltage speed regulation signal (VSP signal for short) is a motor speed regulation method, which regulates the motor speed through a DC voltage of 0V to 10V. The first speed regulation signal is an analog signal.
[0055] Step S102, controlling the host to adjust the voltage of the first speed adjustment signal to obtain a first DC voltage signal.
[0056] Specifically, in order to improve the accuracy and reliability of the signal, the host needs to adjust the first speed adjustment signal to the host's target speed signal, that is, the first DC voltage signal V3, and adjust the speed of the first slave (slave 0) through the first DC voltage signal V3.
[0057] Step S103: Using the first DC voltage signal as the second speed adjustment signal of the first slave, and sending it to the first slave through the speed adjustment signal line.
[0058] Specifically, after the host outputs the first DC voltage signal V3, the signal is used as the second speed adjustment signal of the first slave (slave 0), and is sent to the first slave (slave 0) through the speed adjustment signal line.
[0059] Step S104, control the first slave machine to adjust the second speed adjustment signal voltage to obtain a second DC voltage signal, use the second DC voltage signal as the third speed adjustment signal of the next slave machine, and send it to the next slave machine through the speed adjustment signal line until the last slave machine outputs a DC voltage signal, so that a handshake mode network is formed between the two motors.
[0060] Specifically, Figure 5 As shown, the second speed regulation signal voltage is used as the speed regulation signal of slave 0, and slave 0 adjusts the second speed regulation signal voltage to obtain the second DC voltage signal V4, and the speed of slave 1 is adjusted by the second DC voltage signal V4, and the second DC voltage signal V4 is used as the third speed regulation signal of slave 1, and is sent to slave 1 through the speed regulation signal line, and step S104 is repeated until the last slave (slave n) outputs the DC voltage signal Vn, so that a handshake mode network is formed between the two motors.
[0061] The motor control method for implementing the hand-shake mode provided in this embodiment is that the motors are connected in series through the speed control signal line, and the control host receives the first speed control signal; the control host adjusts the voltage of the first speed control signal to obtain the first DC voltage signal; the first DC voltage signal is used as the second speed control signal of the first slave, and is sent to the first slave through the speed control signal line; the first slave is controlled to adjust the voltage of the second speed control signal to obtain the second DC voltage signal, and the second DC voltage signal is used as the third speed control signal of the next slave, and is sent to the next slave through the speed control signal line, until the last slave outputs the DC voltage signal, so as to realize the hand-shake mode network between the motors, and the series speed control signal line reduces the electromagnetic interference caused by the current change because the current flows sequentially on one line. The layout of the series mode helps to maintain the clarity and stability of the signal, especially when the signal transmission distance is far, the series configuration can reduce the number of cables used, simplify the wiring, and reduce the cost. In the series configuration, the signal strength will not be weakened by branches, which helps to maintain the integrity of the signal. It has the advantage of high reliability of speed control signal transmission, ensures the security and efficiency of network communication, and solves the electromagnetic interference caused by the parallel connection of speed control signal lines and the problem of signal transmission failure and unreliability.
[0062] In this embodiment, a motor control method for implementing a hand-shake mode is provided, which can be used in a motor control system, such as Figure 5 As shown, the motor control system includes multiple motors, and the motors are connected in series through speed control signal lines; the motor receiving the first speed control signal is used as the host, and the other motors except the host are used as slaves, that is, slave 0 to slave n; the slave connected to the host is used as the first slave, that is, slave 0, Figure 2 is a flow chart of a motor control method for implementing a hand-shake mode according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0063] Step S201, controlling the host to receive a first speed adjustment signal.
[0064] Specifically, the control system further includes a signal generator, and the above step S201 includes:
[0065] Step a. The control signal generator outputs a first speed adjustment signal, and sends the first speed adjustment signal to the host, and controls the host to receive the first speed adjustment signal.
[0066] Step S202, controlling the host to adjust the voltage of the first speed adjustment signal to obtain a first DC voltage signal.
[0067] Specifically, Figure 5 As shown, each motor includes a signal processing module and a microcontroller unit, and the above step S202 includes:
[0068] Step S2021, controlling the host signal processing module to adjust the voltage of the first speed adjustment signal to obtain a first output voltage.
[0069] Specifically, the signal processing module adjusts the voltage of the first speed adjustment signal to obtain a first output voltage V1 to adapt to the chip operating voltage.
[0070] Step S2022: using a microcontroller unit to convert the first output voltage to obtain a first DC voltage signal.
[0071] In some optional implementations, the above step S2022 includes:
[0072] Step b. Use a microcontroller unit to convert the first output voltage into a digital voltage value, obtain a corresponding speed setting value based on the digital voltage value, obtain a duty cycle signal of the digital voltage value based on the speed setting value, and then obtain a first DC voltage signal based on the duty cycle signal.
[0073] In some optional embodiments, each motor further includes a filter amplification module, and step b. includes:
[0074] A second output voltage is obtained based on the duty cycle signal; and a first DC voltage signal is obtained after the filtering and amplifying module is controlled to filter and amplify the second output voltage.
[0075] Specifically, Figure 5 and Figure 6 As shown, the microcontroller unit is an MCU (Microcontroller Unit, MCU), and the microcontroller unit is equipped with an ADC (Analog-to-Digital Converte, ADC) conversion module, a speed signal processing module and a PWM control module. The first output voltage V1 is input into the microcontroller unit of the host, and the ADC conversion module is controlled to convert the voltage value into an AD value (analog signal into a digital signal), and the speed signal processing module calculates the speed setting value rpm_setting corresponding to the first output voltage V1 value. After that, the PWM (Pulse Width Modulation) control module calculates the duty cycle signal of the PWM signal according to the speed setting value rpm_setting. The microcontroller unit calculates a second output voltage V2 according to the duty cycle signal. The second output voltage signal V2 is filtered into a DC signal through the filtering and amplification module, and then amplified to form a first DC voltage signal V3. The second output voltage V2 is a PWM voltage signal. Figure 6 The chip in the code refers to the microcontroller unit MCU.
[0076] Wherein: the speed setting value includes the minimum speed of the motor and the maximum speed of the motor. The calculation formula of the duty cycle signal of the digital voltage value obtained based on the speed setting value is as follows:
[0077] pwm_duty=(((rpm_setting-min_speed_prog)*(max_anV-min_anV)) / (max_speed_prog-min_speed_prog))+min_anV;
[0078] Among them, min_speed_prog and max_speed_prog are the minimum speed and maximum speed of the motor respectively; min_anV is the minimum starting voltage of the motor, that is, the minimum voltage value required for the motor to start and start running in the 0V to 10V speed regulation mode; max_anV is the full-on voltage of the motor, that is, the minimum voltage value for the motor to continue running at the maximum speed in the 0V to 10V speed regulation mode, and rpm_setting represents the speed setting value, which is the speed setting value obtained by the microcontroller unit through the speed regulation signal and the speed signal processing module, that is, the command speed / target speed. For example, when the external signal generator uses the 0V to 10V speed regulation signal to regulate the speed, the microcontroller unit program has already specified in advance how much input voltage the motor runs at how much speed, for example, the signal generator outputs 5.5V voltage, and after scaling, the microcontroller unit reads a voltage value of 1.759V, and the speed signal processing module calculates the target speed that the 1.759V voltage value should correspond to, and the motor will run at the target speed, which is rpm_setting.
[0079] The motor control method for implementing the hand-shake mode provided in this embodiment, the voltage output signal corresponding to the duty cycle signal output by the microcontroller unit can flexibly adjust the duty cycle according to actual needs to adapt to different speed regulation requirements of the motor.
[0080] Step S203: Use the first DC voltage signal as the second speed adjustment signal of the first slave and send it to the first slave through the speed adjustment signal line. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0081] Step S204, control the first slave machine to adjust the second speed adjustment signal voltage to obtain a second DC voltage signal, use the second DC voltage signal as the third speed adjustment signal of the next slave machine, and send it to the next slave machine through the speed adjustment signal line until the last slave machine outputs a DC voltage signal, so that a handshake mode network is formed between the two motors.
[0082] The motor control method for implementing the hand-shake mode provided in this embodiment controls the host signal processing module to adjust the voltage of the first speed adjustment signal to obtain a first output voltage; a microcontroller unit is used to obtain a first DC voltage signal based on the first output voltage conversion. The close integration of software and hardware in the microcontroller unit can adapt to a variety of speed regulation methods, providing a high degree of flexibility and adaptability.
[0083] In this embodiment, a motor control method for implementing a hand-shake mode is provided, which can be used in a motor control system, such as Figure 5 As shown, the motor control system includes multiple motors, and the motors are connected in series through speed control signal lines; the motor receiving the first speed control signal is used as the host, and the other motors except the host are used as slaves, that is, slave 0 to slave n; the slave connected to the host is used as the first slave, that is, slave 0, Figure 3 is a flow chart of a motor control method for implementing a hand-shake mode according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0084] Step S301: Control the host to receive a first speed adjustment signal. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.
[0085] Step S302: Control the host to adjust the voltage of the first speed adjustment signal to obtain a first DC voltage signal. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.
[0086] Step S303: Use the first DC voltage signal as the second speed adjustment signal of the first slave and send it to the first slave through the speed adjustment signal line. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.
[0087] Step S304, control the first slave to adjust the second speed adjustment signal voltage to obtain a second DC voltage signal, use the second DC voltage signal as the third speed adjustment signal of the next slave, and send it to the next slave through the speed adjustment signal line until the last slave outputs a DC voltage signal, so that a handshake mode network is formed between the two motors. For details, please refer to Figure 2 Step S204 of the illustrated embodiment will not be described in detail here.
[0088] Step S305, the first DC voltage signal output by the host, the second DC voltage signal output by the first slave and the DC voltage signals output by other slaves are all DC voltages within an equal preset voltage range; in the handshake mode network, the speed of each motor is adjusted using a DC voltage within an equal preset voltage range.
[0089] Specifically, only the first speed adjustment signal of the master is given by the external signal generator, and the speed adjustment signals of the other slaves are given by the motor above them, and all adopt the same, fixed speed adjustment signal mode. For example, each slave adopts a voltage speed adjustment signal, and the first DC voltage signal V3 output by the master, the second DC voltage signal V4 output by the first slave, and the DC voltage signals Vn output by the other slaves are all equal DC voltages within a preset voltage range.
[0090] The motor control method for implementing the hand-shake mode provided in this embodiment uses a DC voltage within an equal preset voltage range to adjust the speed of each motor under the hand-shake mode network. Through the hand-shake mode network, the electromagnetic interference of the entire control system can be reduced, the stability of the transmission signal can be improved, and the signal transmission quality can be improved, thereby achieving the purpose of flexibly adjusting the speed of each motor.
[0091] As one or more specific application embodiments of the present invention, Figure 4 and Figure 7 The motor control method for implementing the hand-shake mode provided by the present invention is further described in detail. Figure 4 As shown, the specific process is as follows:
[0092] Step 1: Figure 7 As shown, correctly connect the power lines and speed control signal lines of each motor, and connect the speed control signal line of the first motor as the host to an external signal generator (used to generate analog signals for adjusting the speed, such as PWM signals, VSP signals, 4mA to 20mA current signals, etc.). Power on each motor.
[0093] Step 2: The signal generator outputs a speed adjustment signal and sends it to the signal processing module of the host. The signal processing module adjusts the speed adjustment signal voltage and outputs a voltage value V1 to adapt to the working voltage of the microcontroller unit.
[0094] Step 3: The voltage value V1 is input into the microcontroller unit, which controls the conversion of the voltage value into an AD value (converting analog signals into digital signals for easy processing by the software in the microcontroller unit), and the speed setting value rpm_setting corresponding to the voltage value V1 is calculated by the speed signal processing software. Then the PWM control software calculates the duty cycle of the PWM signal according to the speed setting value rpm_setting.
[0095] Step 4: The microcontroller unit generates a voltage output signal V2 according to the duty cycle.
[0096] Step 5: The voltage output signal V2 is filtered into a DC signal through a filtering and amplifying module, and then amplified to form a DC voltage signal V3.
[0097] Step 6: The DC voltage signal V3 is input into the speed regulation signal line of slave 0 as the speed regulation signal of slave 0 and sent to the signal processing module of slave 0. The signal processing module of slave 0 regulates the speed regulation signal voltage and outputs a DC voltage signal V4.
[0098] Step 7: Repeat steps 3 to 6 until the slave n outputs a DC voltage signal Vn, but does not connect to the next slave. At this point, a handshake mode network is formed between the two motors.
[0099] Note: Only the speed control signal of the master is given by the external signal generator, and the speed control signals of the other slaves are given by the motor above them, and all use the same, fixed speed control signal mode. For example, each slave uses VSP signal speed control.
[0100] The motor control method for implementing the hand-shake mode provided by the present invention is described below with two examples:
[0101] Example 1:
[0102] Motor parameter description: The minimum starting voltage of each motor is 1.5V, the full-on voltage is 9.5V, the minimum speed is 500RPM, and the maximum speed is 3500RPM.
[0103] After the power cords of each motor are correctly connected, Figure 7 Connect the speed control signal wires as shown to form a handshake mode network, and power on all motors.
[0104] The signal generator generates a speed adjustment signal of 0V to 10V, such as a 5.5V DC voltage signal, which is input into the host signal processing module. The signal processing module adjusts the signal voltage, adjusts the 5.5V voltage signal to a 1.759V voltage signal V1, and inputs V1 into the MCU. The speed signal processing module inside the MCU calculates the corresponding speed setting value of 2000RPM based on the 1.759V voltage signal V1. Then the PWM control module calculates the duty cycle of the PWM signal as 55% based on the speed setting value through the duty cycle formula. The MCU calculates a PWM voltage signal V2 with an amplitude of 3.3V based on the duty cycle. V2 is filtered and amplified by the filtering and amplification module, and finally outputs a 5.5V DC voltage signal V3, which is sent to the signal processing module of slave 0. The signal processing module of slave 0 continues to adjust the voltage value of the 5.5V DC voltage signal V3 to the voltage value of the 1.759V DC voltage signal V4.
[0105] By analogy, finally slave n also generates a 5.5V DC voltage signal Vn, but it does not need to be transmitted to the next slave, and the whole process ends.
[0106] Example 2:
[0107] Motor parameter description: The minimum starting voltage of each motor is 1V, the full-on voltage is 9.7V, the minimum speed is 300RPM, and the maximum speed is 2550RPM.
[0108] After the power cords of each motor are correctly connected, Figure 7 Connect the speed control signal wires as shown to form a handshake mode network, and power on all motors.
[0109] The signal generator generates a speed adjustment signal of 0V to 10V, such as a 5V DC voltage signal, which is input into the host signal processing module. The signal processing module adjusts the signal voltage, adjusts the 5V voltage signal to a 1.599V voltage signal V1, and inputs V1 into the MCU. The speed signal processing module inside the MCU calculates the corresponding speed setting value of 1334RPM based on the 1.599V voltage value V1. Then the PWM control module calculates the duty cycle of the PWM signal as 50% based on the speed setting value through the formula. The MCU calculates a PWM voltage signal V2 with an amplitude of 3.3V based on the duty cycle. V2 is filtered and amplified by the filtering and amplification module, and finally outputs a 5V DC voltage signal V3, which is sent to the signal processing module of slave 0. The signal processing module of slave 0 continues to adjust the voltage value of the 5V DC voltage signal V3 to a voltage value V4 of 1.599V.
[0110] By analogy, finally slave n also generates a 5V DC voltage signal Vn, but it does not need to be transmitted to the next slave, and the whole process ends.
[0111] The motor control method for implementing the hand-shake mode provided in this embodiment can reduce the electromagnetic interference of the entire system, improve the system stability, and improve the signal transmission quality by changing the motor speed control signal line from the traditional parallel mode to the series mode and combining software control to implement the hand-shake mode network. The software flexibly controls the PWM speed control signal V2 output by the chip, and can adjust the duty cycle of the PWM signal according to actual needs to adapt to different speed control requirements. Through the close integration of software and hardware, this solution can adapt to a variety of speed control methods and provide a high degree of flexibility and adaptability.
[0112] In this embodiment, a motor control device for implementing a hand-shake mode is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0113] This embodiment provides a motor control device for implementing a handshake mode, which is applied to a motor control system. The motor control system includes multiple motors, and the motors are connected in series through speed control signal lines. The motor that receives the first speed control signal is used as the host, and the other motors except the host are used as slaves. The slave connected to the host is used as the first slave. Figure 8 As shown, including:
[0114] The signal receiving module 801 is used to control the host to receive a first speed adjustment signal.
[0115] The host speed regulating module 802 is used to control the host to regulate the voltage of the first speed regulating signal to obtain a first DC voltage signal.
[0116] The first slave speed regulating module 803 is used to use the first DC voltage signal as the second speed regulating signal of the first slave and send it to the first slave through the speed regulating signal line.
[0117] The handshake mode network implementation module 804 is used to control the first slave machine to adjust the second speed adjustment signal voltage to obtain a second DC voltage signal, and use the second DC voltage signal as the third speed adjustment signal of the next slave machine, and send it to the next slave machine through the speed adjustment signal line until the last slave machine outputs a DC voltage signal, so that a handshake mode network is formed between the two motors.
[0118] In some optional embodiments, the control system further includes a signal generator, and the signal receiving module 801 includes:
[0119] The signal output and receiving unit is used to control the signal generator to output the first speed adjustment signal, send the first speed adjustment signal to the host, and control the host to receive the first speed adjustment signal.
[0120] In some optional embodiments, each motor includes a signal processing module and a microcontroller unit; the host speed control module 802 includes:
[0121] The first output voltage output unit is used to control the host signal processing module to adjust the voltage of the first speed adjustment signal to obtain a first output voltage.
[0122] The first DC voltage signal output unit is used to obtain a first DC voltage signal based on the first output voltage conversion by the microcontroller unit.
[0123] In some optional implementations, the first DC voltage signal output unit includes:
[0124] The control calculation subunit is used to convert the first output voltage into a digital voltage value using a microcontroller unit, obtain a corresponding speed setting value based on the digital voltage value, obtain a duty cycle signal of the digital voltage value based on the speed setting value, and then obtain a first DC voltage signal based on the duty cycle signal.
[0125] The speed setting value includes the minimum speed of the motor and the maximum speed of the motor. The calculation formula for the duty cycle signal of the digital voltage value based on the speed setting value is as follows:
[0126] pwm_duty=(((rpm_setting-min_speed_prog)*(max_anV-min_anV)) / (max_speed_prog-min_speed_prog))+min_anV;;
[0127] Among them, min_speed_prog and max_speed_prog are the minimum speed and maximum speed of the motor respectively; min_anV is the minimum starting voltage of the motor, that is, the minimum voltage value required for the motor to start and start running in the 0V to 10V speed regulation mode; max_anV is the full-on voltage of the motor, that is, the minimum voltage value that enables the motor to run continuously at the maximum speed in the 0V to 10V speed regulation mode, and rpm_setting represents the speed setting value.
[0128] In some optional implementations, the first DC voltage signal output by the host, the second DC voltage signal output by the first slave, and the DC voltage signals output by the other slaves are all DC voltages within an equal preset voltage range; the motor control device for implementing the handshake mode further includes:
[0129] The motor speed control module is used to adjust the speed of each motor using a DC voltage within an equal preset voltage range in a handshake mode network.
[0130] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0131] The motor control device for implementing the hand-shake mode in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0132] The embodiment of the present invention also provides a computer device having the above Figure 8 The motor control device implementing the hand-shake mode is shown.
[0133] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.
[0134] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0135] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0136] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0137] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0138] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.
[0139] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0140] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0141] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A motor control method for implementing a hand-shake mode, characterized in that: Applied in a motor control system, the motor control system comprises a plurality of motors, and the motors are connected in series through speed regulation signal lines; the motor receiving the first speed regulation signal is used as a master, and the motors other than the master are used as slaves; Using a slave connected to the host as a first slave; The method comprises: The control host receives a first speed adjustment signal; The control host adjusts the voltage of the first speed adjustment signal to obtain a first DC voltage signal; The first DC voltage signal is used as a second speed regulating signal of the first slave, and is sent to the first slave through a speed regulating signal line; The first slave is controlled to adjust the second speed adjustment signal voltage to obtain a second DC voltage signal, and the second DC voltage signal is used as the third speed adjustment signal of the next slave, and is sent to the next slave through the speed adjustment signal line until the last slave outputs a DC voltage signal, so that a handshake mode network is formed between the two motors.
2. The method according to claim 1, characterized in that The control system further includes a signal generator, and the control host receives the first speed adjustment signal including: The control signal generator outputs a first speed regulating signal and sends the first speed regulating signal to the host, and the host is controlled to receive the first speed regulating signal.
3. The method according to claim 1, characterized in that Each motor includes a signal processing module and a microcontroller unit; the control host adjusts the first speed adjustment signal voltage to obtain a first DC voltage signal including: Controlling the host signal processing module to adjust the voltage of the first speed adjustment signal to obtain a first output voltage; A microcontroller unit is used to convert the first output voltage to obtain a first DC voltage signal.
4. The method according to claim 3, characterized in that The step of converting the first output voltage using a microcontroller unit to obtain a first DC voltage signal comprises: A microcontroller unit is used to convert the first output voltage into a digital voltage value, a corresponding speed setting value is obtained based on the digital voltage value, a duty cycle signal of the digital voltage value is obtained based on the speed setting value, and then a first DC voltage signal is obtained based on the duty cycle signal.
5. The method according to claim 4, characterized in that The speed setting value includes the minimum speed of the motor and the maximum speed of the motor. The calculation formula of the duty cycle signal of the digital voltage value obtained based on the speed setting value is as follows: pwm_duty=(((rpm_setting-min_speed_prog)*(max_anV-min_anV)) / (max_spee d_prog-min_speed_prog))+min_anV; Among them, min_speed_prog and max_speed_prog are the minimum speed and maximum speed of the motor respectively; min_anV is the minimum starting voltage of the motor, that is, the minimum voltage value required for the motor to start and start running in the 0V to 10V speed regulation mode; max_anV is the full-on voltage of the motor, that is, the minimum voltage value for the motor to continuously run at the maximum speed in the 0V to 10V speed regulation mode, and rpm_setting represents the speed setting value.
6. The method according to claim 4, characterized in that Each motor also includes a filter amplifier module, and the first DC voltage signal obtained based on the duty cycle signal includes: obtaining a second output voltage based on the duty cycle signal; The filter and amplifier module is controlled to filter and amplify the second output voltage to obtain a first DC voltage signal.
7. The method according to claim 1, characterized in that The first DC voltage signal output by the host, the second DC voltage signal output by the first slave, and the DC voltage signals output by the other slaves are all DC voltages within the same preset voltage range; The method further comprises: In the handshake mode network, the speed of each motor is regulated by using an equal DC voltage within a preset voltage range.
8. A motor control device for implementing a hand-shake mode, characterized in that: Applied in a motor control system, the motor control system comprises a plurality of motors, and the motors are connected in series through speed regulation signal lines; the motor receiving the first speed regulation signal is used as a master, and the motors other than the master are used as slaves; Using a slave connected to the host as a first slave; The device comprises: A signal receiving module, used for controlling the host to receive a first speed adjustment signal; A host speed regulating module, used for controlling the host to adjust the voltage of the first speed regulating signal to obtain a first DC voltage signal; A first slave speed regulating module, used for using the first DC voltage signal as a second speed regulating signal of the first slave, and sending the signal to the first slave through a speed regulating signal line; The handshake mode network implementation module is used to control the first slave machine to adjust the second speed adjustment signal voltage to obtain a second DC voltage signal, and use the second DC voltage signal as the third speed adjustment signal of the next slave machine, and send it to the next slave machine through the speed adjustment signal line until the last slave machine outputs a DC voltage signal, so that a handshake mode network is formed between the two motors.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the motor control method for realizing the handshake mode according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the motor control method for implementing the hand-shake mode according to any one of claims 1 to 7.