CN112422001B - Stepping motor driving method - Google Patents

Stepping motor driving method Download PDF

Info

Publication number
CN112422001B
CN112422001B CN202011107577.4A CN202011107577A CN112422001B CN 112422001 B CN112422001 B CN 112422001B CN 202011107577 A CN202011107577 A CN 202011107577A CN 112422001 B CN112422001 B CN 112422001B
Authority
CN
China
Prior art keywords
motor
driver
operation parameter
pulse interval
jitter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011107577.4A
Other languages
Chinese (zh)
Other versions
CN112422001A (en
Inventor
陈全帅
曾胜
龚博
喻超凡
朱礼平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Auto Vision Technology Co ltd
Original Assignee
Zhuhai Auto Vision Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Auto Vision Technology Co ltd filed Critical Zhuhai Auto Vision Technology Co ltd
Priority to CN202011107577.4A priority Critical patent/CN112422001B/en
Publication of CN112422001A publication Critical patent/CN112422001A/en
Application granted granted Critical
Publication of CN112422001B publication Critical patent/CN112422001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P8/00Arrangements for controlling dynamo-electric motors rotating step by step
    • H02P8/32Reducing overshoot or oscillation, e.g. damping

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Stepping Motors (AREA)

Abstract

The invention discloses a stepping motor driving method, which comprises the following steps: presetting an operation initial operation parameter T0 and an initial pulse number in the driver; the controller sends an automatic setting instruction to the driver, and the driver responds to the automatic setting instruction and drives the motor according to an initial operation parameter T0; the encoder detects the rotation angle information of the motor, converts the detected rotation angle information into pulse number and feeds the pulse number back to the driver, and the driver judges whether the motor shakes or not according to the comparison result of the initial pulse number and the received feedback pulse number; and if the motor shakes, adjusting the operation parameter T to inhibit the shaking of the motor until the motor rotates to the target position and then stably stops, and storing the adjusted operation parameter T as a working operation parameter T1. The stepping motor driving method can inhibit the shaking of the stepping motor, enables the stepping motor to stably stop after reaching the target position, automatically adjusts the shaking state of the stepping motor in the working operation, and maintains the running state of the stepping motor.

Description

Stepping motor driving method
Technical Field
The invention relates to the technical field of motor control, in particular to a driving method of a stepping motor.
Background
The test packaging machine is used for detecting and packaging electronic elements, and a test disc and a paper tape of the test packaging machine need to reach a target position quickly when dragging the electronic elements and cannot shake after reaching the target position. However, when the conventional stepping motor is adopted to drive the bag measuring machine, the motor can shake very after reaching a target position, so that the measuring disc cannot feed materials, the materials cannot be implanted into the paper tape, and the shaking of the stepping motor needs to be inhibited by changing the time interval of the driving pulse.
The time intervals of a plurality of driving pulses need to be changed for inhibiting the jitter of the stepping motor, the driving pulse time needs to be matched with each other, a large amount of time is needed for workers to debug and match, proper parameters cannot be matched sometimes for a long time, and even if the proper parameters are matched, the parameters are not suitable any more due to the change of external conditions during the operation of the stepping motor, so that the jitter of the stepping motor is caused.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a driving method of a stepping motor, which can inhibit the shaking of the stepping motor, realize stable stop after the stepping motor reaches a target position, automatically adjust the shaking state of the stepping motor in the working operation and maintain the running state of the stepping motor.
The stepping motor driving method according to the embodiment of the invention comprises at least the following steps:
presetting an initial value T0 and an initial pulse number of an operation parameter T in a driver;
the controller sends an automatic setting instruction to a driver, and the driver responds to the automatic setting instruction and drives the motor according to an initial operation parameter T0;
the encoder detects the rotation angle information of the motor, converts the detected rotation angle information into pulse number and feeds the pulse number back to the driver, and the driver judges whether the motor shakes or not according to the comparison result of the initial pulse number and the received feedback pulse number;
and if the motor shakes, adjusting the operation parameter T to inhibit the shaking of the motor until the motor rotates to the target position and then stops stably, and storing the adjusted operation parameter T as a working operation parameter T1.
The stepping motor driving method provided by the embodiment of the invention at least has the following beneficial effects: compared with the traditional technology of adjusting the motor jitter through pulse driving, in the stepping motor driving method, the parameter automatic setting function is realized in the driver, the parameter is not required to be adjusted manually, only a setting instruction is given, and the driver can automatically set the optimal operation parameter T to inhibit the jitter of the stepping motor when the stepping motor reaches the target position, so that the stepping motor stops stably; in addition, the invention also makes parameter closed loop, the motor operation condition is monitored in real time under the operation condition of the motor, and if the motor shakes, the driver can immediately react and adjust the operation parameters.
According to some embodiments of the invention, the operating parameter T comprises a first pulse interval, a second pulse interval and a third pulse interval, the first pulse interval, the second pulse interval and the third pulse interval are time differences between two adjacent basic stepping angles of the motor, and the third pulse interval, the second pulse interval and the first pulse interval have successively reduced jitter influence degrees on the motor.
According to some embodiments of the invention, the specific step of adjusting the operating parameter T comprises:
the driver compares the initial pulse number with the received feedback pulse number, if the pulse number difference exists, the motor jitter is indicated, and if the pulse number difference is increased, the motor jitter is judged to be increased;
and if the motor vibration is not increased, adjusting the operation parameter T for multiple times by adding a time unit to continue driving the motor to rotate until the motor vibration is increased, adjusting the operation parameter to be Tn, adjusting the operation parameter Tn minus a time unit to be Tn-1, and storing and defining the operation parameter Tn-1 as a working operation parameter T1 when the motor operates by the driver.
According to some embodiments of the present invention, the step of adjusting the operation parameter T multiple times by adding a time unit to continue driving the motor to rotate until the motor jitter increases, where the operation parameter is adjusted to be Tn, adjusting the operation parameter Tn minus a time unit to become Tn-1, and the step of storing and defining the operation parameter Tn-1 as the operating operation parameter T1 when the motor operates by the driver includes:
adjusting the third interval time for multiple times by increasing one time unit each time until the current value of the third interval time subtracts one time unit and is defined as starting the third interval time when the motor jitter increases;
continuing to adjust the second interval time for a plurality of times by increasing one time unit each time until the current value of the second interval time is subtracted by one time unit and defined as starting the second interval time when the motor jitter increases;
continuing to adjust the first interval time for multiple times by increasing one time unit each time until the current value of the first interval time is subtracted by one time unit and defined as starting first interval time when the motor jitter increases;
and judging whether the motor shake meets the requirement, if not, repeating the steps to continue the adjustment until the motor shake meets the requirement, and storing the starting third interval time, the starting second interval time and the starting first interval time.
According to some embodiments of the invention, the driver makes a plurality of adjustments to the operating parameter T, and if the number of adjustments exceeds a first threshold value, initiates an acceleration intervention step, and if the number of adjustments is greater than the first threshold value and less than a second threshold value, initiates a deceleration intervention step;
and the driver determines the operation parameters to be optimal values when the motor is in a stable stop state according to the multiple adjustment information.
According to some embodiments of the invention, the step of accelerating comprises the step of accelerating the speed of the drive control motor by a first one of the working angles.
According to some embodiments of the invention, the deceleration intervening step is to control the motor to reduce the rotation speed of the last rotation angle of the working angles for the driver.
According to some embodiments of the present invention, the method further comprises a step of adjusting the operation state of the motor, specifically comprising:
the motor operates according to the working operation parameter T1, the encoder reads the rotation angle information of the motor in the operation state and feeds the rotation angle information back to the driver, and the driver judges whether the motor shakes during the operation;
if the working running state of the motor is jittered, the jittering state of the motor is further judged;
the driver finely adjusts the working operation parameter T1 according to the motor jitter state.
According to some embodiments of the invention, the motor jitter condition includes motor delay in place and motor overshoot.
According to some embodiments of the present invention, if the jitter status is delayed in place during the operation of the motor, the driver adjusts the operation parameter T1 downward;
if the jitter condition is an overshoot when the motor is running, the driver up-regulates the operating parameter T1.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of a stepping motor driving method according to an embodiment of the present invention;
FIG. 2 is a detailed flowchart of a corresponding driving method during a setting state of a stepping motor according to another embodiment of the present invention;
FIG. 3 is a specific adjustment of the driving method of a stepping motor according to another embodiment of the present invention;
fig. 4 is a detailed flowchart of a driving method corresponding to an operating state of a stepping motor according to another embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to in the description of the orientation, such as the upper, lower, front, rear, left, right, etc., is based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and more than, less than, more than, etc. are understood as excluding the present number, and more than, less than, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly limited, terms such as arrangement, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
As shown in fig. 1, fig. 1 is a schematic flowchart of a stepping motor driving method provided in an embodiment of the present application, where the stepping motor driving method includes, but is not limited to, the following steps:
s100, presetting an initial value T0 and an initial pulse number of an operation parameter T in a driver, wherein it can be understood that the stepping motor driving method in the application can enable the stepping motor to stably stop after rotating a working angle (namely receiving materials such as electronic components and the like after operating to a target position) to realize automatic setting, firstly presetting an operation parameter T0 in the driver, in one embodiment, the initial value of the operation parameter T, namely the initial operation parameter T0, is required to realize normal operation of the motor, generally sending driving pulse to the driver for a plurality of times through a controller to operate the motor, correspondingly rotating a basic stepping angle by sending a driving pulse motor every time, completing a working angle after a plurality of pulses, wherein the total time required by a working angle is the rotation time of the motor, and the operation parameter T in the application is defined as a pulse interval, the initial value T0 of the operating parameter is defined as the minimum value of the pulse interval, the minimum value of the pulse interval is not limited, as long as the total duration of the minimum value of the pulse interval and the pulse time meets the requirement of the starting time, and each stepping angle of the motor can be ensured to rotate normally.
S200, the controller sends an automatic setting instruction to the driver, the driver responds to the automatic setting instruction and drives the motor according to an initial operation parameter T0, it can be understood that the motor needs to be set in an initial state before working operation, the traditional motor setting mode needs to send control pulse instructions to the driver for multiple times manually to drive the motor, each single control pulse instruction needs to be sent while adjustment and optimization are carried out until the time interval combination among the control pulse instructions meets the motor setting requirement, the setting of the motor is completed, in the application, compared with the traditional motor setting mode, the controller only needs to send one automatic setting instruction once, the driver can operate the preset initial operation parameter T0 to drive the motor, the motor can be automatically set by presetting the operation parameter in the driver (namely, the stepping motor can stably stop after reaching a target position after rotating a working angle), and the debugging efficiency is improved.
S300, an encoder detects the rotation angle information of a motor, converts the detected rotation angle information into pulse number and feeds the pulse number back to a driver, the driver judges whether the motor shakes according to the comparison result of the initial pulse number and the received feedback pulse number, it can be understood that the operation state of the motor comprises a periodic rotation process and a stop process, in an operation period, the motor needs to stop for a certain time to realize feeding when rotating to a specified target position, the shaking state when the motor stops needs to be strictly controlled to realize stable and accurate feeding, therefore, the operation state of the motor needs to be adjusted, the motor stably stops after rotating in place, in some embodiments of the stepping motor driving method, firstly, a controller sends an automatic setting instruction to the driver, and the driver starts to work according to the initial value T0 of the operation parameter, the motor is driven to rotate, when the motor reaches a target position after rotating for a working angle (in the rotating process), the encoder detects the rotating angle information of the motor, converts the detected rotating angle information into pulse information and feeds the pulse information back to the driver, the driver is preset with initial pulse information of the encoder in advance, and whether the motor shakes or not is judged by evaluating the difference between the fed-back pulse information and the preset pulse information.
It should be noted that the motor rotation has a basic step angle, the basic step angle includes a standard angle such as 1.8 ° or 0.9 °, one working angle of the motor is composed of a plurality of basic step angles, in this embodiment, the basic step angle of the stepping motor is 1.8 °, one working angle is composed of 4 basic step angles, that is, one working angle is 7.2 °, the stepping motor rotates for one circle for 360 °, 50 working angles are performed, the driver presets 20000 initial pulses corresponding to 360 ° of the motor rotation, therefore, when the motor rotates for one working angle of 7.2 °, the theoretical value of the number of pulses detected by the encoder is 400, and if the actual value of the number of pulses detected by the encoder is more than or less than 400, it represents that there is a shake during the motor rotation.
S400, if the motor shakes, adjusting the operation parameter T to inhibit the motor shaking until the motor stably stops after running to the target position, and storing the adjusted operation parameter T as a working operation parameter T1. In one embodiment, when the motor shakes, the driver automatically adjusts the operation parameter T, the adjustment is started from the initial value T0 until the motor is judged not to shake when the motor stops, the operation parameter when the motor stops is saved as the working operation parameter T1, and the motor is driven to perform periodic operation by the working operation parameter T1.
As shown in fig. 2, fig. 2 is a detailed flowchart of a driving method corresponding to a setting state of a stepping motor according to an embodiment of the present application, in some embodiments of the present application, if there is no jitter after the motor operates with an initial value T0 of an operating parameter, an initial operating parameter T0 is an operating parameter T1, and if there is jitter after the motor operates with an initial value T0 of an operating parameter, a driver automatically adjusts the operating parameter T, that is, adjusts a pulse interval parameter, in an embodiment of the present application, one operating angle of the motor is composed of 4 basic step angles, one step angle corresponds to one pulse, and therefore, four step pulses are required, there are three pulse intervals between the four step pulses, and therefore, three pulse interval parameters need to be adjusted, and generally, of the three pulse interval parameters, the last pulse interval has a large influence on the jitter of the motor, and the influence of the first pulse interval on the motor jitter is small, so that the last pulse interval, namely the third pulse interval is adjusted first, the second pulse interval and the first pulse interval are adjusted in sequence on the basis of the third pulse interval parameter, and the optimal operation parameter T is finally determined to be the working operation parameter T1 through the adjustment of a plurality of stepping angles.
In an embodiment, as shown in fig. 2, the method for adjusting three operation parameters, namely the first pulse interval, the second pulse interval and the third pulse interval, first compares the corresponding number of pulses after the motor is started according to the initial value T0 of the preset operation parameter with the preset number of pulses, determines whether the motor is shaken or not and increases, if the motor is not shaken, adjusts the third pulse interval to increase a time unit, the driver continues to drive the motor to rotate by a new third pulse interval after increasing a time unit until the motor is shaken to increase, the third pulse interval subtracts a time unit, the driver defines the new third pulse interval after subtracting an optimal time unit as an optimal value of the third pulse interval, and determines the value of the third pulse interval; if the motor jitter is not increased, continuing to adjust the second pulse interval and increasing a time unit, continuing to drive the motor to rotate by the driver according to a new second pulse interval after increasing the time unit until the motor jitter is increased and the time unit is subtracted from the second pulse interval, and defining the new second pulse interval after subtracting the time unit as a second pulse interval optimal value by the driver; if the motor jitter is not increased, the first pulse interval is continuously adjusted to be increased by a time unit, the driver continuously drives the motor to rotate by a new first pulse interval after the time unit is increased until the motor jitter is increased, the time unit is subtracted from the first pulse interval, the driver defines the new first pulse interval after the time unit is subtracted as the optimal value of the first pulse interval, after multiple cycles, whether the motor jitter meets the requirement is determined, if the requirement is met, the driver stores the optimal value of the operation parameter, namely the optimal values of the third pulse interval, the second pulse interval and the first pulse interval are stored, and the optimal value is defined as the motor working operation parameter T1.
As shown in fig. 4, in another embodiment of the present application, a detailed flowchart of a driving method corresponding to an operating state of a stepping motor is further provided, in this embodiment, an operating state is taken as an example to explain, jitter generated by the stepping motor due to operation heat or being affected by an external force is further suppressed, the stepping motor performs periodic operation according to an operating parameter T1 on the basis of a setting state, if jitter occurs during operation, further fine adjustment is performed on the basis of an operating parameter T1 to minimize jitter of the operating state, specifically, the motor enters the operating state according to the operating parameter T1, the encoder performs real-time detection on the motor, the encoder detects a difference between a number of pulses actually corresponding to the motor and a number of encoder pulses built in the driver to determine whether the motor operates jittering, and dividing the motor shaking state into a motor delay in-place state and a motor overshoot state according to the type of the pulse difference.
If the detected pulse number is lower than the target value of the pulse number of the built-in encoder, it is indicated that the motor jitter is caused by the motor delay, and therefore the working operation parameter T1 needs to be adjusted, specifically, firstly, the motor jitter degree is judged according to the difference of the pulse number, if the motor jitter is small, the operation parameter with small influence on the motor jitter is adjusted, in the embodiment of the present application, the first pulse interval has the smallest influence on the motor jitter, and the third pulse interval has the larger influence on the motor jitter, therefore, the pulse number difference is set within 3, the first pulse interval is adjusted downward, the time of the first pulse interval is adjusted downward to shorten the rotation time of the second basic stepping angle of the motor relative to the first basic stepping angle, thereby shortening the whole time of one working angle, increasing the motion frequency, compensating the jitter caused by the motor delay, if the pulse number difference is more than 3 and less than 5, and adjusting down a second pulse interval with relatively large influence on motor jitter to make up jitter caused by motor delay, and adjusting down a third pulse interval with relatively maximum influence on motor jitter if the difference of the number of pulses is more than 5.
If the detected pulse number is higher than the target value of the pulse number of the built-in encoder, it is indicated that the motor jitter is caused by the motor overshoot, and therefore the working operation parameter T1 needs to be adjusted, similarly, the motor jitter degree is judged according to the difference amount of the pulse number, if the motor jitter is small, the operation parameter which has small influence on the motor jitter is adjusted, in the embodiment of the present application, the first pulse interval has the smallest influence on the motor jitter, and the third pulse interval has a larger influence on the motor jitter, therefore, the difference of the pulse number is set within 3, the first pulse interval is adjusted upwards, the first pulse interval time is adjusted upwards to increase the rotation time of the second basic stepping angle of the motor relative to the first basic stepping angle, thereby increasing the whole time of one working angle, reducing the movement frequency, compensating the jitter caused by the motor overshoot, if the difference of the pulse number is larger than 3 and smaller than 5, and if the difference of the pulse number is more than 5, the third pulse interval with the largest influence on the motor jitter is subjected to up-regulation.
As shown in fig. 3, another embodiment of the present application further provides a specific adjustment manner of a stepping motor driving method, corresponding to the driving method of the operation state of the stepping motor shown in fig. 4, the motor operates according to the operation parameter T1, the encoder reads the rotation angle information of the motor in the operation state and feeds back the rotation angle information to the driver, the driver determines whether the motor is in operation and shakes, it can be understood that the motor rotates according to the operation parameter T1 given by the driver in the operation state and monitors the shaking condition of the motor in the operation state in real time, after the motor rotates by one operation angle, the encoder detects the rotation angle information of the motor and feeds back the rotation angle information of the motor to the driver, the driver compares the rotation angle information of the motor with the rotation angle information of the operation of the motor at this time according to the operation state of the motor at the last time, determining whether the motor runs in a jitter mode, if the running state of the motor is in the jitter mode, adjusting a working running parameter T for multiple times by a driver to complete a working closed loop, if the adjustment times exceed a first threshold value, starting an acceleration intervention step, and if the adjustment times are larger than the first threshold value and smaller than a second threshold value, starting a deceleration intervention step, wherein it can be understood that the motor is influenced by factors such as external force, heat dissipation and the like in the running process to cause running jitter, at the moment, automatically adjusting the parameters according to the steps corresponding to the flow chart of FIG. 4 to inhibit the jitter to enable the motor to run stably, and when the continuous adjustment reaches a certain number, the driver starts a preset acceleration function to enable the motor to run quickly, changes the running state of the current motor to be matched and adjusted again, and when the acceleration function is started, the parameters enabling the motor to run stably can still not be adjusted, the driver starts the internal preset speed reducing function to reduce the rotating speed of the motor and continues to adjust.
It should be noted that, the specific implementation method of acceleration intervention or deceleration intervention is to obtain the position of the motor rotor according to the encoder, control the torque and the angle of the motor rotor, when the torque and the rotor are kept at 90 degrees, it is equivalent to acceleration intervention, when the torque and the rotor are kept at-90 degrees, it is equivalent to deceleration intervention, in some embodiments of the present application, one working angle of the motor is correspondingly rotated four times, when the motor executes an acceleration intervention program, the first rotation speed of the four rotations is accelerated, the overall operation state of the motor is changed to be automatically adjusted again, when the motor executes a deceleration intervention program, the fourth rotation speed of the motor is adjusted to be decelerated on the premise that the first rotation speed is accelerated, and the operation state of the motor is changed to be automatically adjusted again; the driver determines the optimal value of the operation parameter T according to the multiple times of adjustment information to enable the motor to run stably, and it can be understood that after the adjustment is carried out by the method, a plurality of motor stable running states can appear, namely the motor stops stably after rotating in place, the driver records the adjustment states, screens out the corresponding optimal value of the parameter, drives the motor to run by the optimal value of the parameter, and keeps the motor running stably.
It should be noted that, in an embodiment of the present application, the adjustment manner shown in fig. 3 is applied to the stepping motor operating state, but is not limited to the motor operating state, and is also applicable to the flowchart of the stepping motor driving method provided in the embodiment shown in fig. 1 or the detailed flowchart of the driving method corresponding to the stepping motor setting state provided in the embodiment shown in fig. 2.
A stepping motor driving method according to an embodiment of the present application is described in detail in one specific embodiment with reference to fig. 2 to 4. It is to be understood that the following description is illustrative only and is not intended to be in any way limiting.
As shown in fig. 2, a driver parameter self-tuning program is triggered, all three groups of pulse interval parameters are assigned to the minimum value, and after the trigger motor rotates by a working angle, the jitter condition of the motor for the first time is recorded through the value of the encoder; then automatically adding 1 time unit to the third pulse interval parameter, triggering the motor to rotate by a working angle again, recording the jitter condition of the encoder, comparing the jitter condition with the jitter condition of the encoder at the last time, if the jitter becomes smaller, indicating that the third pulse interval parameter is effectively increased, continuously increasing the value of the third pulse interval parameter, and continuously comparing; when the situation that the jitter of the third pulse interval parameter is increased is solved, the last value of the third pulse interval parameter is optimal, and at the moment, the third pulse interval parameter is reduced by 1 unit time to determine the position of the third pulse interval parameter; continuing to trigger the motor to rotate by a working angle, and starting to set a second pulse interval parameter after the third pulse interval parameter is set, wherein the setting of the second pulse interval parameter is the same as the setting of the third pulse interval parameter; setting an optimal first pulse interval parameter by the same method; and then judging whether the current parameters meet the jitter requirement, if not, resetting the flag bits of the third pulse interval parameter, the second pulse interval parameter and the first pulse interval parameter, and searching the optimal parameters again on the last optimal basis until the jitter requirement is met.
As shown in fig. 3, after the motor operation parameter T is set, the operating operation parameter T1 may be adjusted in real time in the process of entering the operating state, so that the operation of the motor is kept stable, when the motor cannot be stabilized after 100 times of continuous adjustment, the internally preset acceleration function is enabled, and when the acceleration function is enabled, the parameter for stabilizing the motor cannot be adjusted for 100 times, the internally preset deceleration function is enabled, and the adjustment is continued.
As shown in fig. 4, the motor is operated at the adjusted operating parameter T1; collecting data of an encoder for judging the shaking condition of a motor; if the motor is delayed in place, the operation parameter T1 is adjusted downwards; if the motor overshoots, the operation parameter T1 is adjusted upwards; and determining and adjusting a certain specific parameter according to the corresponding jitter amount of the time delay or the overshoot, and finishing specific adjustment of the running state of the motor to ensure that the motor runs stably.
It should be noted that the parameter adjustment in the above embodiment is based on acquiring a large amount of data by a computer, calculating a ternary function by using a function fitting function of MATLAB (three operation parameters, that is, a first pulse interval, a second pulse interval, and a third pulse interval are independent variable parameters, and a dependent variable is a value corresponding to the number of pulses of a motor encoder, and is used for determining the motor jitter condition), and roughly calculating the adjustment trend of the parameter in the current state by using the calculated ternary function according to the feedback of the real-time encoder.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (9)

1. A stepping motor driving method characterized by comprising at least the steps of:
presetting an initial value T0 and an initial pulse number of an operation parameter T in a driver;
the controller sends an automatic setting instruction to a driver, and the driver responds to the automatic setting instruction and drives the motor according to an initial operation parameter T0;
the encoder detects the rotation angle information of the motor, converts the detected rotation angle information into pulse number and feeds the pulse number back to the driver, and the driver judges whether the motor shakes or not according to the comparison result of the initial pulse number and the received feedback pulse number;
if the motor shakes, adjusting the operation parameter T to inhibit the motor shaking until the motor rotates to a target position and then stably stops, and storing the adjusted operation parameter T as a working operation parameter T1;
the operation parameter T includes a first pulse interval, a second pulse interval, and a third pulse interval, where the first pulse interval, the second pulse interval, and the third pulse interval are time differences between two adjacent basic stepping angles of the motor, and the specific step of adjusting the operation parameter T includes: when motor jitter is not increased, the steps performed include:
adjusting the third pulse interval for multiple times by adding one time unit each time until the motor jitter is increased, and subtracting one time unit from the current value of the third pulse interval and defining the current value of the third pulse interval as starting third interval time;
continuing to adjust the second pulse interval for multiple times by adding one time unit each time until the current value of the second pulse interval subtracts one time unit and is defined as starting second interval time when the motor jitter is increased;
continuing to adjust the first pulse interval for multiple times by adding one time unit each time until the current value of the first pulse interval subtracts one time unit and is defined as starting first interval time when the motor jitter is increased;
and judging whether the motor shake meets the requirement, if not, repeating the steps to continue the adjustment until the motor shake meets the requirement, and storing the starting third interval time, the starting second interval time and the starting first interval time.
2. The stepping motor driving method according to claim 1, wherein a degree of influence of the third pulse interval, the second pulse interval, and the first pulse interval on a jitter of the motor is sequentially reduced.
3. The stepping motor driving method according to claim 2, wherein the step of adjusting the operation parameter T further comprises:
and the driver compares the initial pulse number with the received feedback pulse number, if the pulse number difference exists, the motor jitter is indicated, and if the pulse number difference is increased, the motor jitter is judged to be increased.
4. The stepping motor driving method according to claim 1, wherein the driver makes a plurality of adjustments to the operation parameter T, and if the number of adjustments exceeds a first threshold value, the acceleration intervening step is initiated, and if the number of adjustments is greater than the first threshold value and less than a second threshold value, the deceleration intervening step is initiated;
and the driver determines the operation parameters to be optimal values when the motor is in a stable stop state according to the multiple adjustment information.
5. The stepping motor driving method according to claim 4, wherein the acceleration intervening step is that the driver control motor accelerates the rotation speed of the first rotation angle of the operation angles.
6. The stepping motor driving method according to claim 4, wherein the deceleration intervening step reduces the rotation speed of the last rotation angle among the operation angles for the driver-controlled motor.
7. The stepping motor driving method according to claim 1, further comprising a step of adjusting a working operation state of the motor, specifically comprising:
the motor operates according to the working operation parameter T1, the encoder reads the rotation angle information of the motor in the operation state and feeds the rotation angle information back to the driver, and the driver judges whether the motor shakes during the operation;
if the working running state of the motor is jittered, the jittering state of the motor is further judged;
the driver finely adjusts the working operation parameter T1 according to the motor jitter state.
8. The stepping motor driving method according to claim 7, wherein the motor shake state includes a motor delay in place and a motor overshoot.
9. The stepping motor driving method according to claim 8, wherein:
if the jitter state is in-place delay when the motor works, the driver downwards regulates the working operation parameter T1;
if the jitter state is overshoot when the motor is operated, the driver adjusts the operation parameter T1 upwards.
CN202011107577.4A 2020-10-16 2020-10-16 Stepping motor driving method Active CN112422001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011107577.4A CN112422001B (en) 2020-10-16 2020-10-16 Stepping motor driving method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011107577.4A CN112422001B (en) 2020-10-16 2020-10-16 Stepping motor driving method

Publications (2)

Publication Number Publication Date
CN112422001A CN112422001A (en) 2021-02-26
CN112422001B true CN112422001B (en) 2021-07-23

Family

ID=74854580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011107577.4A Active CN112422001B (en) 2020-10-16 2020-10-16 Stepping motor driving method

Country Status (1)

Country Link
CN (1) CN112422001B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710176A (en) * 2004-06-17 2005-12-21 兄弟工业株式会社 Sewing machine and its control method
CN102780436A (en) * 2011-05-09 2012-11-14 精工电子有限公司 Stepping motor control circuit and analogue electronic timepiece
CN102843084A (en) * 2012-09-11 2012-12-26 济南优耐特汽车电子有限公司 Acceleration and deceleration driving method for stepping motor
CN104199466A (en) * 2014-06-26 2014-12-10 拓卡奔马机电科技有限公司 Control method and system for closed-loop stepping motor of sewing machine
CN110932622A (en) * 2019-12-17 2020-03-27 广州星迪智能光电科技有限公司 Method for overcoming motor shake

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1710176A (en) * 2004-06-17 2005-12-21 兄弟工业株式会社 Sewing machine and its control method
CN102780436A (en) * 2011-05-09 2012-11-14 精工电子有限公司 Stepping motor control circuit and analogue electronic timepiece
CN102843084A (en) * 2012-09-11 2012-12-26 济南优耐特汽车电子有限公司 Acceleration and deceleration driving method for stepping motor
CN104199466A (en) * 2014-06-26 2014-12-10 拓卡奔马机电科技有限公司 Control method and system for closed-loop stepping motor of sewing machine
CN110932622A (en) * 2019-12-17 2020-03-27 广州星迪智能光电科技有限公司 Method for overcoming motor shake

Also Published As

Publication number Publication date
CN112422001A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
US4598370A (en) Apparatus for control of acceleration and deceleration during auto-cruise
CN109687782B (en) Control device and control system of stepping motor
KR100377533B1 (en) Elevator door control unit
CN112422001B (en) Stepping motor driving method
JPH0316292B2 (en)
CN109648503B (en) Servo lock pair device
EP0569227A1 (en) Fuel injection control system for internal combustion engine
US5043900A (en) Ignition system with feedback controlled dwell
US5804941A (en) Dual mode position control system with speed profiling
US7111610B2 (en) Electronic throttle body control system and method
US6408238B1 (en) Method and apparatus of controlling a sliding roof
CN108923128B (en) Electric tuning method and device for base station antenna
US20220090431A1 (en) Open/close control device, open/close control system, open/close control method, and program
US6619259B2 (en) Electronically controlled throttle control system
US6650075B2 (en) Fan motor
CN115909552A (en) Intelligent door lock control method, system and storage medium
CN109667102B (en) Temperature rise protection method and system for motor of washing machine
US7313860B2 (en) Mounting device
CN111464088B (en) Control method and control device of shift motor and projection system
EP0327109A1 (en) Motor stop control device
CN111464090B (en) Control method and control device of shift motor and projection system
JP4261674B2 (en) Electronic feed sewing machine
CN111147049B (en) Pulse stopping method for avoiding spike pulse
US11114967B2 (en) Controller of rotary axis
CN111464091B (en) Control method and control device of shift motor and projection system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant