Stepping motor closed-loop control device and multi-machine networking control system

By using a closed-loop control method of magnetic encoding chips and radial magnets combined with sampling resistors in stepper motors, the position accuracy and stall problems of traditional stepper motors are solved, and high-precision, low-cost motor control is achieved, which is suitable for multiple machines. Networked system.

CN221669762UActive Publication Date: 2024-09-06SHENZHEN TAILORED MEDICAL LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202323520425.9
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2024-09-06
Estimated Expiration
2033-12-22

AI Technical Summary

Technical Problem

The open-loop control method of traditional stepper motors can easily lead to reduced position accuracy, and existing closed-loop control methods such as grating encoders are limited in resolution and assembly space, resulting in the risk of motor blockage and heating, and high costs.

Method used

It adopts a stepper motor closed-loop control device, including a motor drive PCB board, a magnetic encoding chip and a radial magnet. The magnetic flux of the magnet is obtained in real time through the magnetic encoding chip. Combined with the sampling resistor and communication module, it achieves precise position control and current regulation, forming a multi-machine Networked control system.

Benefits of technology

It improves the position accuracy of the stepper motor, prevents stalling and heating, has a compact structure, small size, convenient assembly and low cost, and is suitable for multi-machine collaborative motion control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN221669762U
    Figure CN221669762U
Patent Text Reader

Abstract

The utility model discloses a stepping motor closed-loop control device and a multi-machine networking control system, each stepping motor is provided with a closed-loop control motor unit, and each closed-loop control motor unit comprises a control module, a reference positioning module, a dynamic detection module, a sampling module and a communication module; the control module of each closed-loop control motor unit is in communication connection with an upper computer or a central control system through a communication module. The state detection module comprises a magnetic coding chip and a radial magnet; the control module positions the original point position of the stepping motor through the reference positioning module, calculates and presets the magnetic flux threshold value of the target position, detects the real-time magnetic flux of the stepping motor through the dynamic detection module, and converts the magnetic flux deviation between the real-time magnetic flux and the magnetic flux threshold value into the step number needing to be compensated for by the stepping motor. Therefore, the plurality of stepping motors are controlled to move to accurate positions in a linkage manner. The position precision can be improved, motor blockage heat transfer can be prevented, the structure is simple and compact, the size is small, assembly, installation and operation are convenient, and the cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model belongs to the technical field of stepper motor control in power electronic products, and specifically relates to a stepper motor closed-loop control device and a multi-machine networking control system. Background Art

[0002] With the rapid development of science and technology, more and more electric products have emerged. Electric products need to be driven by corresponding motor structures. Among them, stepper motors are one of the most widely used and widely used motor products.

[0003] Most stepper motors in traditional technology use open-loop control, that is, the controller calculates the corresponding number of motor steps according to the movement distance, and drives the corresponding number of pulses to achieve motion control of the motor. However, due to the loss of controller pulses or changes in load during the movement process, fluctuations in power supply, etc., the motor may lose steps or stall under this driving mode, affecting the position accuracy of the stepper motor, thereby affecting the working accuracy of the entire electric product. Even when the external load changes or the environment affects the motor, it may generate heat when it is stalled, which may endanger the safety of life and property.

[0004] In the prior art, a stepper motor is generally equipped with a grating encoder to realize closed-loop control of the stepper motor to meet the needs of applications with high requirements for position accuracy. However, the grating encoder is a detection device composed of electronic components such as light-emitting diodes and a number of rectangular holes evenly spaced on the grating code disk. When the motor moves, the pulse signal output by the grating encoder is detected to determine the position of the motor, thereby compensating the corresponding number of steps in the case of lost steps and out of step, and realizing high-precision position determination. This closed-loop control method is limited in resolution due to the limited size and number of holes in the photoelectric code disk. It is not easy to detect when the number of lost steps is small, and there is still a position deviation. More importantly, the stepper motor used must be a double-output shaft motor, an unconventional motor. The photoelectric code disk and the detection device are assembled on the output shaft at the rear end of the stepper motor, and the assembly space is large, resulting in a large size of the entire closed-loop motor, high assembly space requirements, and high cost. Summary of the invention

[0005] In order to solve the above-mentioned problems existing in the prior art, the purpose of the utility model is to provide a stepper motor closed-loop control device and a multi-machine networking control system, which can improve the positioning accuracy while preventing the motor from overheating due to stalling, and has a simple and compact structure, a small size, easy assembly and installation, and low cost.

[0006] The technical solution adopted by the utility model is:

[0007] The first technical solution provides a closed-loop control device for a stepper motor, wherein a motor driving PCB board, a magnetic encoding chip and a circular radial magnet are arranged at the rear end of the stepper motor, and the radial magnet is fixedly connected to the rotating shaft of the stepper motor;

[0008] The motor drive PCB board is arranged outside the rear end of the stepper motor, the magnetic encoding chip is arranged on the inner surface of the motor drive PCB board, and the magnetic encoding chip is communicatively connected to the main control chip on the motor drive PCB board;

[0009] The installation position of the magnetic encoding chip corresponds to the rotational motion trajectory of any point on the outer cylindrical surface of the radial magnet, so that the magnetic encoding chip can obtain the magnetic flux of the magnet in real time.

[0010] Furthermore, an axial limiting hole is provided through the middle of the rear end of the stepper motor, and the radial magnet is limitedly provided in the limiting hole and fixedly connected to the rear end of the rotating shaft of the stepper motor.

[0011] Furthermore, the magnetic encoding chip is coaxially arranged with the rotating shaft of the stepping motor.

[0012] Furthermore, the projection of the radial magnet on the axial projection plane of the stepper motor completely covers the projection of the magnetic encoding chip on the axial projection plane of the stepper motor.

[0013] Furthermore, the projection of the magnetic encoding chip on the axial projection plane of the stepping motor partially overlaps with the projection of the radial magnet on the axial projection plane of the stepping motor.

[0014] Furthermore, the motor drive PCB board is provided with sampling resistors corresponding to each phase line of the corresponding stepper motor;

[0015] The sampling resistor is used to sample and calculate the real-time current of the stepper motor.

[0016] Furthermore, the shape, size and mounting hole positions of the motor drive PCB board are the same as those of the rear end cover of the stepper motor, and the motor drive PCB board is fixedly connected to the rear end surface of the stepper motor.

[0017] The second technical solution provides a multi-machine networking control system for a stepper motor closed-loop control device, including a plurality of stepper motors, each of which is connected to a closed-loop control motor unit, each of which includes a control module, a reference positioning module, a dynamic detection module, a sampling module and a communication module; the control module of each closed-loop control motor unit is connected to a host computer or a central control system through a communication module;

[0018] The motor drive PCB board is provided with a main control chip, constituting a control module;

[0019] The magnetic encoding chip and the radial magnet constitute a dynamic detection module; the sampling resistor constitutes a sampling module;

[0020] The control module is used to locate the origin position of the stepper motor through the reference positioning module, calculate and preset the magnetic flux threshold of the target position, and detect the real-time magnetic flux of the stepper motor through the dynamic detection module, and convert the magnetic flux deviation between the real-time magnetic flux and the magnetic flux threshold into the number of steps that the stepper motor needs to compensate, so as to control the stepper motor to move to a precise position; preset the current threshold of the stepper motor, and feedback-adjust the current of the stepper motor based on the comparison and judgment result between the real-time current and the current threshold.

[0021] Furthermore, the motor drive PCB board is also provided with a CAN interface and a DIP switch to constitute a communication module;

[0022] Each of the DIP switches is used to provide an address code for each stepper motor, and each of the motor drive PCB boards is connected to a host computer or a central control system via CAN bus communication.

[0023] Finally, a photoelectric sensor is arranged on the motor drive PCB board, and the photoelectric sensor is used to locate and provide the origin position of the stepper motor, forming a reference positioning module.

[0024] The beneficial effects of the utility model are:

[0025] A closed-loop control device for a stepper motor and a multi-machine networking control system, each stepper motor is provided with a closed-loop control motor unit, each closed-loop control motor unit includes a control module, a reference positioning module, a dynamic detection module, a sampling module, and a communication module; the control module of each closed-loop control motor unit is connected to a host computer or a central control system through a communication module; the dynamic detection module includes a magnetic encoding chip and a radial magnet; the control module locates the origin position of the stepper motor through the reference positioning module, calculates and presets the magnetic flux threshold of the target position, and detects the real-time magnetic flux of the stepper motor through the dynamic detection module, and converts the magnetic flux deviation between the real-time magnetic flux and the magnetic flux threshold into the number of steps that the stepper motor needs to compensate, thereby controlling multiple stepper motors to move to precise positions in a linked manner. While improving the position accuracy, it can prevent the motor from being blocked and overheated, and has a simple and compact structure, a small size, and is easy to assemble and install, and has low cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the utility model or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the utility model. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0027] Figure 1-2 This is a schematic diagram of the radial magnet structure of the stepping motor closed-loop control system of the first embodiment of the utility model;

[0028] Figure 3 This is a schematic diagram of the circuit principle structure of a single closed-loop control motor unit of the stepper motor closed-loop control system of the first embodiment of the utility model;

[0029] Figure 4-5 It is a schematic diagram of the three-dimensional structure of a single stepper motor of the stepper motor closed-loop control system of the first embodiment of the utility model;

[0030] Figure 6 It is a schematic diagram of the conversion between magnetic flux and magnet angle of the stepping motor closed-loop control system of the first embodiment of the utility model;

[0031] Figure 7 This is a schematic diagram of the process principle of the stepper motor closed-loop control system of the first embodiment of the utility model;

[0032] Figure 8 This is a schematic diagram of the control principle of multiple closed-loop control motor units in the closed-loop control system of the stepping motor of the first embodiment of the utility model;

[0033] Figure 9-10 It is a schematic diagram of the three-dimensional structure of a single stepper motor of the stepper motor closed-loop control system of the second embodiment of the utility model. DETAILED DESCRIPTION

[0034] The utility model is further described in detail below in conjunction with the accompanying drawings.

[0035] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed, but such modifications are protected by patent law as long as they are within the scope of the claims of the present invention.

[0036] like Figures 1 to 10 As shown, in order to provide a stepper motor closed-loop control system and a control method thereof, the overall planning scheme of the present invention is:

[0037] The first technical solution first plans to develop a stepper motor closed-loop control system, and the second technical solution provides a stepper motor closed-loop control method based on the structure of the first technical solution.

[0038] Embodiment 1 provides a stepper motor closed-loop control system according to the first technical solution; Figures 1 to 8 As shown, the specific technical solution of embodiment 1 is as follows:

[0039] The first technical solution provides a stepper motor closed-loop control system, in which several stepper motors are connected in parallel, each stepper motor is respectively provided with a closed-loop control motor unit, and each closed-loop control motor unit comprises a control module, a reference positioning module, a dynamic detection module, and a communication module; the control module of each closed-loop control motor unit is respectively connected to a host computer or a central control system via a communication module, so that the synchronous coordinated movement of multiple motors can be controlled through networking of the host computer or the central control system.

[0040] The dynamic detection module is composed of a magnetic encoding chip 2 and a radial magnet 3.

[0041] The host computer or central control system can collect the initial position data of all stepper motors in the system through the control modules and reference positioning modules of all stepper motors, locate the origin position of each stepper motor, calculate and preset the magnetic flux threshold of the target position of each stepper motor, and detect the real-time magnetic flux of each stepper motor through the dynamic detection module. The magnetic flux deviation between the real-time magnetic flux of each stepper motor and the magnetic flux threshold is converted into the number of steps that need to be compensated for each stepper motor, so that each stepper motor can be controlled to move to a precise position.

[0042] Each closed-loop control motor unit is also provided with a sampling module, through which the real-time current of each stepper motor can be sampled and calculated; the current threshold of each stepper motor can be preset through the control module, and the current of the stepper motor can be feedback-adjusted based on the comparison result between the real-time current and the current threshold.

[0043] Each closed-loop control motor unit is respectively provided with a drive control board 1, and the drive control board 1, magnetic encoding chip 2 and radial magnet 3 of each closed-loop control motor unit are all arranged outside the rear end surface of each stepping motor 4, and each radial magnet 3 is respectively fixedly connected to the rotating shaft of the corresponding stepping motor.

[0044] Furthermore, a main control chip is respectively arranged on the outer surface of each drive control board 1, and a software program can be written through the main control chip to set the control module. Each magnetic encoding chip 2 is respectively arranged on the inner surface of the drive control board 1; and each drive control board is respectively fixedly connected to the rear end face of each stepper motor, and a spacing distance is set between the drive control board and the rear end face of the motor, so that the spacing distance between the magnetic encoding chip and the radial magnet is 1 to 5 mm, which meets the space requirements for the normal operation of the magnetic encoding chip, while minimizing the volume and occupying as little space as possible. Due to the limitation of the viewing angle, the specific structure of the magnetic encoding chip is not shown in the figure, and only the position of the magnetic encoding chip is indicated.

[0045] The basic requirement for the radial magnet 3 is that its diameter must be less than or equal to the diameter of the rotating shaft of the stepper motor; because a rear axle hole is provided through the middle of the rear end surface of the stepper motor according to the hardware structure of a conventional stepper motor, the radial magnet 3 can be directly limited in the rear axle hole and fixedly connected to the rear end of the rotating shaft of the stepper motor.

[0046] Theoretically, the installation position of each magnetic encoding chip 2 corresponds to the rotational motion trajectory of any point on the outer cylindrical surface of the corresponding radial magnet 3, and each magnetic encoding chip 2 can respectively collect and obtain the real-time magnetic flux of the corresponding radial magnet in real time; each magnetic encoding chip is respectively connected to the corresponding main control chip for communication. The projection area of ​​each magnetic encoding chip on the axial projection surface of the stepper motor partially overlaps or completely overlaps with the projection area of ​​the radial magnet on the axial projection surface of the stepper motor.

[0047] In the first embodiment, the magnetic encoding chip 2 of each stepper motor is coaxially arranged with the rotating shaft of the stepper motor. Since the radial magnet 3 is coaxially fixedly connected to the rear end of the rotating shaft and rotates synchronously with the rotating shaft, each magnetic encoding chip 2 can sense and detect the maximum magnetic flux of each radial magnet 3.

[0048] The magnetic encoding chip 2 can be selected from various conventional products in the prior art. In this example, the AS5047 magnetic encoder chip is selected, and the spacing distance between the AS5047 magnetic encoder chip and the radial magnet is in the range of 2 to 3 mm, so that even after the stepper motor is installed with a drive control board, a magnetic encoding chip and a radial magnet, it still has a compact structure, a small size, and occupies less space, and has low installation space requirements.

[0049] Furthermore, a CAN interface 7 and a dip switch 8 are respectively provided on each drive control board to form a communication module; each dip switch provides an address code for each stepper motor, and each drive control board is connected to a host computer or a central control system via the CAN interface 7 and the dip switch 8 via the CAN bus communication.

[0050] The shape, size and mounting hole position of each drive control board are the same as those of the rear end face of the corresponding stepper motor;

[0051] The drive control board can be directly fixed using the standard mounting connection holes of the stepper motor; it can be installed and connected to the outside of the rear end face of the stepper motor, or an additional layer of protective cover can be added to improve the protection performance of the drive control board. It can be adaptively set according to the spatial position conditions of the corresponding application scenario.

[0052] Sampling resistors corresponding to the respective phases of the corresponding stepper motor are respectively arranged on each drive control board; the real-time current of the stepper motor can be sampled and calculated through the sampling resistors, forming a sampling module.

[0053] A photoelectric sensor is arranged on the drive control board, and the origin position of the stepper motor can be located by the photoelectric sensor to form a reference positioning module.

[0054] The main control chip uses STM32 chip, and the dip switch uses a five-position dip switch.

[0055] Embodiment 2 According to the second technical solution of the present invention, a closed-loop control method for a stepping motor is provided, which is specifically performed according to the following steps:

[0056] S01, preset the operating parameter threshold and origin position of each stepper motor;

[0057] S02, pull the DIP switch of each stepper motor respectively to set the unique address of each stepper motor and each closed-loop control motor unit; each stepper motor is connected to the power supply and the communication port of the host computer through the CAN interface;

[0058] S03, calibration; after power-on, the host computer issues a calibration command, and the stepper motor rotates forward and reversely for one circle to record the magnetic flux size at each position. After calibration, the average value of the forward and reverse magnetic flux at each point is calculated as the magnetic flux constant at that position;

[0059] S04, reset; the stepper motor rotates to find the origin of the photoelectric sensor;

[0060] S05, the host computer or central control system sends the target position command, and the motor drive board software automatically calculates the displacement between the current position S1 and the target position S2;

[0061] S06, the motor driver board will obtain the magnetic flux B in real time. The software calculates the current motor speed through the change of magnetic flux and compares it with the set speed.

[0062] S07, if the actual speed is too slow, the motor drive board increases the pulse sending frequency to increase the motor speed;

[0063] S08, if the actual speed is too fast, the motor drive board reduces the pulse sending frequency to slow down the motor speed;

[0064] S09, the motor drive board collects the voltage of the sampling resistor in real time, converts it into the real-time motion current of the current stepper motor, and compares it with the set current threshold value for judgment;

[0065] S10, if the real-time motion current is greater than the set current, reduce the current;

[0066] S11, if the real-time motion current is less than the set current, increase the current;

[0067] S12, after the stepper motor stops moving, the control module detects and obtains the magnetic flux B1 at the current position, and compares and calculates it with the magnetic flux B2 at the target position to obtain the magnetic flux deviation △B.

[0068] S13, calculating the angle deviation △θ, and then converting it into the pulse step number T1 of the stepper motor compensation corresponding to the angle deviation;

[0069] S14, the control module drives the stepper motor to compensate and move to the target position according to the pulse step number T1.

[0070] The specific operation process and calculation principle of the stepper motor closed-loop control system and control method of Embodiment 1 and Embodiment 2 are as follows:

[0071] In the first embodiment, a single stepper motor is taken as an example of a 57-inch motor; the hardware includes a 57-inch stepper motor 1, a circular radial magnet 3, a magnetic encoding chip 2, and a motor drive board 1. The magnetic flux at the center of the circular radial magnet 3 changes linearly with the linear change of the magnet angle, that is, each position of the magnet corresponds to a specific magnetic flux.

[0072] The circular radial magnet is fixed to the rear end of the stepper motor shaft. When the motor rotates, the magnet rotates with it, and the magnetic flux changes accordingly. The magnetic encoding chip can obtain the magnetic flux of the magnet in real time, thereby determining the current position of the magnet and then the position of the stepper motor shaft.

[0073] Furthermore, the motor control board communicates with the magnetic encoding chip to obtain the current position of the motor. When the motor moves, the software control program calculates the magnetic flux threshold of the set target position. After each motor movement stops, the real-time magnetic flux at the current position is obtained and compared with the calculated magnetic flux threshold of the target position to obtain a magnetic flux deviation. This deviation is then converted into the number of steps that the stepper motor needs to compensate, and the motor is controlled to move to a precise position to achieve a position closed loop of the stepper motor.

[0074] Furthermore, the software of the motor driver board controls the movement of the stepper motor and obtains the real-time change of magnetic flux. The software converts the real-time change of magnetic flux into the current speed, compares the set speed with the current speed, and realizes the speed closed loop of the stepper motor. When the magnetic flux does not change during the movement process, the software determines that the motor is blocked and immediately controls the motor to stop moving, which can effectively prevent the motor from heating up due to blocking and prevent the moving parts from hitting people or objects.

[0075] Furthermore, the motor driver board is designed with sampling resistors for each phase of the stepper motor. When the software is driven through the CAN port or a preset current, the real-time current of the stepper motor during movement is calculated through the sampling resistor. When the stepper motor movement current deviates from the set current, the software can perform current feedback adjustment to achieve a current closed loop for the stepper motor.

[0076] Furthermore, the motor drive board, magnetic encoding chip and radial magnet are assembled to the rear end of the motor, and the whole is used as a closed-loop control motor unit. A 5-bit DIP switch is provided on the motor drive board as an address code selection, and the CAN bus is used for communication control. The host computer or central control system can simultaneously perform multi-motor synchronous coordinated motion on a system composed of up to 32 closed-loop control motor units through the CAN bus, such as Figure 8 shown.

[0077] Furthermore, the size of the motor drive board is consistent with the size and fixing hole position of the stepper motor, and can be assembled to the rear end of the stepper motor, or can be controlled separately and independently.

[0078] Select the corresponding circular radial magnet according to the size of the stepper motor shaft. Figure 4 , fix the radial magnet on the motor shaft, install the motor drive board containing the magnetic encoding chip on the stepper motor, and form an attached Figure 4-5 Closed-loop control of the motor unit.

[0079] Select the corresponding circular radial magnet according to the size of the stepper motor shaft. Figure 3 The motor drive board uses STM32 as the main control chip, and the dip switch is used as the signal input to determine the unique address of the control unit. The 5-bit dip switch can determine up to 32 addresses. The photoelectric sensor determines the origin position of the stepper motor, and the subsequent motion coordinates are all relative positions with this point as the reference point. The main control chip communicates with the magnetic encoding chip to read the current magnetic flux. Refer to the attached Figure 4 , fix the radial magnet on the motor shaft, install the motor drive board on the stepper motor, and form an attached Figure 5 Closed-loop control of the motor unit.

[0080] Furthermore, the 5-position DIP switch is turned to determine the unique address of the closed-loop control motor unit, and the CAN interface is connected to the power supply and the communication port of the host computer. After power-on, the host computer or central control system sends a calibration command, and the stepper motor rotates forward and reversely for one circle to record the magnetic flux size at each position and store it on the motor drive board. Then a reset command is sent, and the stepper motor starts to rotate to find the origin to determine the reference point for all subsequent motion positions.

[0081] Furthermore, the CAN interface is connected to the power supply and the communication port of the host computer. After power-on, the host computer or the central control system sends a calibration command. Figure 6, the stepper motor rotates forward and reversely for one circle to record the magnetic flux size at each position. After calibration, the average value of the magnetic flux at each point is calculated as the magnetic flux constant at that position. The motor rotates for 360°. The real-time magnetic flux of 200 positions of the radial magnet can be read out at a spacing of 1.8°. The linear formula of magnetic flux B and angle θ is obtained by fitting these 200 points: B=kθ+b (1). Here, the k and b values ​​are coefficients obtained by linear fitting. The magnetic flux at any subsequent angle can be calculated by this formula. The calibration angle spacing in the present invention is not limited to 1.8°, and can be increased or decreased according to the actual accuracy requirements. According to the linear formula, the magnetic flux of the motor is the smallest at 0° and the largest at 360°. The software uses the number of jump changes of the magnetic flux as the number of rotations T of the motor. When jumping from high to low, the motor rotates T-1; when jumping from low to high, the motor rotates T+1.

[0082] Refer to the attached Figure 6 , determine the total displacement S of the motor's single-turn motion according to the synchronous wheel installed on the motor, and then calculate the relationship between the motor's single-turn displacement △D and the angle change △θ: △D=S / 360*△θ (2), where S represents the total displacement of the motor's single turn, △D represents the displacement of the motor's single turn, and △θ represents the angle change.

[0083] Refer to the attached Figure 6 If the motor step angle is w and the number of subdivisions set by the driver board is H, the calculation formula for the total number of pulses T in one revolution of the motor is: T=360 / w*H (3). From this, the relationship between the number of stepper motor movement pulses T1 and the angle change △θ is calculated: T1=T / 360*△θ=H*△θ / w (4).

[0084] Furthermore, after the calibration is completed, a reset command is issued, and the stepper motor starts to rotate to find the origin of the photoelectric sensor. All subsequent movement positions use this as a reference point, and the number of motor revolutions R is set to 0, the current position S1 is set to 0, the current real-time magnetic flux B1 is read, and the current angle θ1 is calculated using formula (1).

[0085] Furthermore, the host computer or central control system sends a target position command, and the motor driver board software automatically calculates the displacement between its current position and the target position to determine the motor's movement direction, pulse step number, and magnetic flux threshold of the target position, and starts driving the motor to start moving.

[0086] Furthermore, the host computer or central control system sends the target position command, and the motor driver board software automatically calculates the displacement between the current position S1 and the target position S2: △D=S2-S1, the number of motor revolutions R=△D / S, the displacement of the motor in the last single revolution D1=△D%S (remainder), according to formula (2), the current angle change △θ=(△D%S)*360 / S can be calculated, and finally the angle of the target position θ2=θ1+△θ is calculated. According to formula (1), the magnetic flux threshold B2=kθ2+b of the target position is obtained, and according to formulas (3) and (4), the total number of pulses to move to the target position is T2=T*R+T1=360 / w*H*R+H*△θ / w. The motor driver board sends T2 pulses to start driving the motor to move to the target position.

[0087] During the motor movement, the motor driver board will obtain the real-time magnetic flux B in real time. The software calculates the current motor movement speed through the change of the real-time magnetic flux and compares it with the set speed. When the actual speed is too slow, the motor driver board increases the pulse sending frequency to speed up the motor; when the actual speed is too fast, the motor driver board reduces the pulse sending frequency to slow down the motor speed, realizing the speed closed loop of the stepper motor.

[0088] During the movement of the motor, the motor driver board will collect the voltage of the sampling resistor in real time to convert it into the current movement current of the stepper motor. When the current is greater than the set current, it will automatically reduce the current; when the current is less than the set current, it will automatically increase the current to realize the current closed loop of the stepper motor.

[0089] After the motor stops moving, the motor driver board will obtain the real-time magnetic flux B1 at the current position and compare it with the magnetic flux threshold B2 at the target position to obtain a magnetic flux deviation △B. According to formula (1), the angle deviation △θ is obtained. Then, according to formula (4), the number of pulse steps T1 of the stepper motor compensation corresponding to the angle deviation is obtained. The motor driver board will drive T1 pulses to compensate and move to the target position, thus realizing the position closed loop of the stepper motor.

[0090] After the motor stops moving, the motor driver board will obtain the real-time magnetic flux at the current position, and compare it with the magnetic flux threshold of the target position to obtain a magnetic flux deviation, which is the angle deviation of the stepper motor shaft. Based on this deviation, the number of pulse steps required to compensate the stepper motor is calculated, and the motor driver board controls the stepper motor to continue moving to the target position, realizing the position closed loop of the stepper motor.

[0091] Furthermore, the speed closed loop, current closed loop and position closed loop controlling the stepper motor in the software all have an allowable deviation parameter, and this deviation can be set through the CAN bus. The smaller this parameter is set, the more precise the speed, torque and position control of the motor movement will be.

[0092] Furthermore, through the speed closed loop, current closed loop, and position closed loop, the software realizes the stall detection of motor movement, which can effectively prevent collisions when the structure moves in a large motion such as a three-dimensional arm; the torque control effectively solves the heating problem of the stepper motor. It has better stability and higher precision.

[0093] Furthermore, most products, especially equipment products, have multiple stepper motors that are controlled simultaneously and move in coordination. Figure 6 The stepper motor closed-loop control of the present invention allows a maximum of 32 closed-loop control motor units to exist, and can control a maximum of 32 stepper motors to operate simultaneously.

[0094] Example 3 Figures 9-10 As shown, based on the structure of embodiment one, a single stepper motor 42 motor 5 is taken as an example, and the specific technical content of embodiment three is slightly different from that of embodiments one and two only in terms of mechanical structure size, and the specific structural features and operating methods are consistent with the contents of embodiments one and two.

[0095] Since the rear end of the 42 motor 5 has a rear end plate 9, a drive control board 1 is respectively arranged on the rear side of the rear end plate 9 of each 42 motor 5, and a second radial magnet 6 is respectively arranged in the shaft hole in the middle of the rear end plate 9, and each second radial magnet 6 is respectively fixedly connected to the rear end of the rotating shaft of each stepper motor, and a spacing distance is arranged between the drive control board 1 and the rear end plate 9, so that the spacing distance between the magnetic encoding chip and the second radial magnet is 1 to 5 mm, which meets the space requirements for the normal operation of the magnetic encoding chip, while minimizing the volume and occupying as little space as possible. Due to the limitation of the viewing angle, the specific structure of the magnetic encoding chip is also not shown in the figure, and only the position of the magnetic encoding chip is indicated.

[0096] The stepper motor closed-loop control system and control method thereof of the present invention include several stepper motors, each stepper motor is respectively provided with a closed-loop control motor unit, each closed-loop control motor unit respectively includes a control module, a reference positioning module, a dynamic detection module, a sampling module, and a communication module; the control module of each closed-loop control motor unit is respectively connected to a host computer or a central control system through a communication module; the dynamic detection module includes a magnetic encoding chip and a radial magnet; the control module locates the origin position of the stepper motor through the reference positioning module, calculates and presets the magnetic flux threshold of the target position, and detects the real-time magnetic flux of the stepper motor through the dynamic detection module, and converts the magnetic flux deviation between the real-time magnetic flux and the magnetic flux threshold into the number of steps that the stepper motor needs to compensate, thereby controlling the multiple stepper motors to move to precise positions respectively. It can improve the position accuracy while preventing the motor from blocking and overheating, has a simple and compact structure, a small volume, is easy to assemble and install, and has low cost. The stepper motors adapted for control include but are not limited to 28 motors, 35 motors, 42 motors, 57 motors, 60 motors, 86 motors, etc., which can be assembled to the rear end of the stepper motor or can be controlled separately and independently.

[0097] The above content is only used to illustrate the technical solution of the present invention rather than to limit it. The present invention is not limited to the above optional implementation modes. Other modifications or equivalent substitutions made to the technical solution of the present invention by ordinary technicians in the field, regardless of any changes in its shape or structure, should be included in the scope of the claims of the present invention as long as they do not depart from the spirit and scope of the technical solution of the present invention.

Claims

1. A stepper motor closed-loop control device, comprising a stepper motor, characterized in that: The rear end of the stepper motor is provided with a motor drive PCB board, a magnetic encoding chip and a circular radial magnet, and the radial magnet is fixedly connected to the rotating shaft of the stepper motor; The motor drive PCB board is arranged outside the rear end of the stepper motor, the magnetic encoding chip is arranged on the inner surface of the motor drive PCB board, and the magnetic encoding chip is communicatively connected to the main control chip on the motor drive PCB board; The installation position of the magnetic encoding chip corresponds to the rotational motion trajectory of any point on the outer cylindrical surface of the radial magnet, so that the magnetic encoding chip can obtain the magnetic flux of the magnet in real time.

2. The stepper motor closed-loop control device according to claim 1 is characterized in that: An axial limiting hole is provided through the middle of the rear end of the stepper motor, and the radial magnet is limitedly provided in the limiting hole and fixedly connected to the rear end of the rotating shaft of the stepper motor.

3. The stepper motor closed-loop control device according to claim 1 is characterized in that: The magnetic encoding chip is coaxially arranged with the rotating shaft of the stepping motor.

4. The stepper motor closed-loop control device according to claim 1 is characterized in that: The projection of the radial magnet on the axial projection plane of the stepper motor completely covers the projection of the magnetic encoding chip on the axial projection plane of the stepper motor.

5. The stepper motor closed-loop control device according to claim 1 is characterized in that: The projection of the magnetic encoding chip on the axial projection plane of the stepping motor partially overlaps with the projection of the radial magnet on the axial projection plane of the stepping motor.

6. The stepper motor closed-loop control device according to claim 1 is characterized in that: The motor drive PCB board is provided with sampling resistors corresponding to each phase line of the corresponding stepper motor; The sampling resistor is used to sample and calculate the real-time current of the stepper motor.

7. The stepper motor closed-loop control device according to claim 1 is characterized in that: The shape, size and mounting hole positions of the motor drive PCB board are the same as those of the rear end surface of the stepper motor, and the motor drive PCB board is fixedly connected to the rear end surface of the stepper motor.

8. A multi-machine networking control system for a stepper motor closed-loop control device according to any one of claims 1 to 7, comprising a plurality of stepper motors, characterized in that: Each stepper motor is respectively connected to a closed-loop control motor unit, and each closed-loop control motor unit includes a control module, a reference positioning module, a dynamic detection module, a sampling module and a communication module; the control module of each closed-loop control motor unit is respectively connected to the host computer or the central control system through the communication module; The motor drive PCB board is provided with a main control chip, constituting a control module; The magnetic encoding chip and the radial magnet constitute a dynamic detection module; the sampling resistor constitutes a sampling module; The control module is used to locate the origin position of the stepper motor through the reference positioning module, calculate and preset the magnetic flux threshold of the target position, and detect the real-time magnetic flux of the stepper motor through the dynamic detection module, and convert the magnetic flux deviation between the real-time magnetic flux and the magnetic flux threshold into the number of steps that the stepper motor needs to compensate, so as to control the stepper motor to move to a precise position; preset the current threshold of the stepper motor, and feedback-adjust the current of the stepper motor based on the comparison and judgment result between the real-time current and the current threshold.

9. The multi-machine networking control system for a stepper motor closed-loop control device according to claim 8, characterized in that: The motor drive PCB board is also provided with a CAN interface and a DIP switch to form a communication module; Each of the DIP switches is used to provide an address code for each stepper motor, and each of the motor drive PCB boards is connected to a host computer or a central control system via CAN bus communication.

10. The multi-machine networking control system for a stepper motor closed-loop control device according to claim 8, characterized in that: The motor drive PCB board is provided with a photoelectric sensor, which is used to locate and provide the origin position of the stepper motor, forming a reference positioning module.