CN114499299A - Method, device, terminal and readable storage medium for reducing motor driving error - Google Patents

Method, device, terminal and readable storage medium for reducing motor driving error Download PDF

Info

Publication number
CN114499299A
CN114499299A CN202111674801.2A CN202111674801A CN114499299A CN 114499299 A CN114499299 A CN 114499299A CN 202111674801 A CN202111674801 A CN 202111674801A CN 114499299 A CN114499299 A CN 114499299A
Authority
CN
China
Prior art keywords
motor
pulse count
patch
sensing
sensor
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.)
Granted
Application number
CN202111674801.2A
Other languages
Chinese (zh)
Other versions
CN114499299B (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.)
Shenzhen Aitushi Innovation Technology Co ltd
Original Assignee
Aputure Imaging Industries 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 Aputure Imaging Industries Co Ltd filed Critical Aputure Imaging Industries Co Ltd
Priority to CN202111674801.2A priority Critical patent/CN114499299B/en
Publication of CN114499299A publication Critical patent/CN114499299A/en
Application granted granted Critical
Publication of CN114499299B publication Critical patent/CN114499299B/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 of the kind having motors rotating step by step
    • H02P8/36Protection against faults, e.g. against overheating, step-out; Indicating faults
    • 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 of the kind having motors rotating step by step
    • H02P8/14Arrangements for controlling speed or speed and torque
    • H02P8/18Shaping of pulses, e.g. to reduce torque ripple
    • 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 of the kind having motors rotating step by step
    • H02P8/36Protection against faults, e.g. against overheating, step-out; Indicating faults
    • H02P8/38Protection against faults, e.g. against overheating, step-out; Indicating faults the fault being step-out

Abstract

The application is suitable for the technical field of motors, and particularly relates to a method, a device, a terminal and a readable storage medium for reducing motor driving errors, wherein the method is applied to the device for reducing the motor driving errors, which comprises a detection sensor arranged on a motor and a first sensing patch arranged on external equipment, and the motor drives the external equipment to rotate when rotating, and the method comprises the following steps: responding to a first sensing signal between the detection sensor and the first sensing patch, and acquiring a pulse count of a motor corresponding to the first sensing patch; judging whether the pulse count of the motor is equal to the preset reference pulse count corresponding to the first sensing patch or not; if the pulse count of the motor is not equal to the preset reference pulse count corresponding to the first sensing patch, determining that the motor has step loss or step skipping, and correcting the pulse count of the motor for the first time, so that the driving error caused by the step loss or step skipping in the motor driving process is reduced, and the accuracy of motor driving is improved.

Description

Method, device, terminal and readable storage medium for reducing motor driving error
Technical Field
The application belongs to the technical field of motors, and particularly relates to a method, a device, a terminal and a readable storage medium for reducing motor driving errors.
Background
In the step motor control, pulse information is generally transmitted by an upper computer to drive the step motor to move. For example, the upper computer sends pulse information of a certain pulse, so that the stepping motor moves according to the pulse information, and further drives the external equipment to move to a target point. Specifically, during the movement of the stepping motor, the stepping motor advances one step by a fixed stepping angle corresponding to each pulse signal in the pulse information transmitted by the upper computer. However, in actual application, because there are reasons such as the change of the rotor inside the stepping motor and the magnetic field is asynchronous, the motor control device has inertia, the stepping motor may lose or step, and because the stepping motor is open loop, the motion condition of the stepping motor cannot be fed back to the upper computer in time, so that there is an error in the positioning of the stepping motor to the target point, that is, there is a motor driving error, which is not favorable for the driving control of the stepping motor.
Disclosure of Invention
The embodiment of the application provides a method, a device, a terminal and a readable storage medium for reducing motor driving errors, and can solve the technical problem of motor driving errors caused by step loss or step skipping of a stepping motor in the traditional method.
In a first aspect, an embodiment of the present application provides a method for reducing a motor driving error, where the method is applied to a device for reducing a motor driving error, where the device for reducing a motor driving error includes a detection sensor disposed on a motor and a first sensor patch disposed on an external device, and the motor drives the external device to rotate when rotating, and the method includes:
responding to a first induction signal between the detection sensor and the first sensing patch, and acquiring a pulse count of a motor corresponding to the first sensing patch;
judging whether the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch or not;
and if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, determining that the motor has step loss or step skipping, and correcting the pulse count of the motor for the first time.
In a second aspect, an embodiment of the present application provides a device for reducing motor driving error, the device for reducing motor driving error includes a detection sensor disposed on a motor and a first sensing patch disposed on an external device, the motor drives the external device to rotate when rotating, and the device for reducing motor driving error further includes:
the first acquisition unit is used for responding to a first induction signal between the detection sensor and the first sensing patch and acquiring the pulse count of the motor corresponding to the first sensing patch;
the first judgment unit is used for judging whether the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch or not;
and the first correction unit is used for determining that the motor has step loss or step skipping if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, and correcting the pulse count of the motor for the first time.
In a third aspect, the present application provides a terminal configured with the apparatus for reducing motor driving error according to the second aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, and when executed by a processor, the computer program implements the steps of the method of the first aspect.
In the embodiment of the application, the pulse count of the motor corresponding to the first sensing patch is obtained by responding to an induction signal between a detection sensor on the motor and the first sensing patch arranged on external equipment, and whether the pulse count of the motor corresponding to the first sensing patch is equal to a preset reference pulse count corresponding to the first sensing patch is judged; if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, determining that the motor has step loss or step skipping, and further correcting the pulse count of the motor for the first time, so that the pulse count of the motor is verified by setting the first sensing patch in the motor movement process to detect whether the motor has step loss or step skipping, and when the motor has step loss or step skipping, correcting the pulse count of the motor, reducing the driving error caused by step loss or step skipping in the motor driving process, and improving the motor driving accuracy.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating a method for reducing error in driving a stepper motor according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a motor peripheral device movement process provided by an embodiment of the present application;
fig. 3A is a schematic flow chart of a second implementation of a method for reducing a driving error of a stepping motor according to an embodiment of the present application;
FIG. 3B is a diagram illustrating a first distribution of sensor patches for a second implementation of a method for reducing driving errors of a stepper motor according to an embodiment of the present application;
FIG. 3C is a diagram illustrating a second distribution of sensor patches for a second implementation of a method for reducing driving errors of a stepper motor according to an embodiment of the present disclosure;
FIG. 3D is a schematic diagram illustrating a third distribution of sensor patches for a second implementation of a method for reducing driving errors of a stepper motor according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a pulse count modification method in a second implementation of a method for reducing error in driving a stepping motor according to an embodiment of the present application;
FIG. 5 is a schematic structural diagram of an apparatus for reducing driving errors of a stepping motor according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In the control of the stepping motor, pulse information is generally sent by an upper computer to drive the stepping motor to move. For example, the upper computer sends pulse information of a certain pulse, so that the stepping motor moves according to the pulse information, and further drives the external device to move to a target position. Specifically, during the movement of the stepping motor, the stepping motor advances one step by a fixed stepping angle corresponding to each pulse signal in the pulse information transmitted by the upper computer. However, in actual application, because there are reasons such as the change of the rotor inside the stepping motor and the magnetic field is asynchronous, the motor control device has inertia, the stepping motor may lose or step, and because the stepping motor is open loop, the motion condition of the stepping motor cannot be fed back to the upper computer in time, so that there is an error in the positioning of the stepping motor to the target point, that is, there is a motor driving error, which is not favorable for the driving control of the stepping motor.
Based on the above problems, embodiments of the present application provide an apparatus, a method, a terminal and a readable storage medium capable of reducing a driving error of a stepping motor, so as to reduce a driving error caused by step loss or step skip in a motor driving process, and improve accuracy of motor driving.
In order to explain the technical solutions of the present application, the following description is made by referring to the accompanying drawings and specific examples.
Fig. 1 shows a schematic flow chart of an implementation of a method for reducing a driving error of a stepping motor according to an embodiment of the present application. The method for reducing the driving error of the stepping motor can be applied to a device for reducing the driving error of the stepping motor, the device for reducing the driving error of the stepping motor comprises a detection sensor arranged on the motor and a first sensing patch arranged on external equipment, the external equipment is driven to rotate when the motor rotates, the first sensing patch arranged on the external equipment can also rotate along with the external equipment in the process of rotating 360 degrees of the external equipment, and when the first sensing patch rotates to the position close to the position of the detection sensor arranged on the motor (for example, on a bracket of the motor), the first sensing patch can be inducted with the detection sensor, and the method for reducing the driving error of the stepping motor specifically comprises the following steps 101 to 103.
Step 101: responding to a first sensing signal between the detection sensor and the first sensing patch, and acquiring a pulse count of a motor corresponding to the first sensing patch;
wherein, above-mentioned motor rotates the rotatory in-process of drive external equipment, can reduce external equipment's slew velocity through setting up the reduction gear, for example, with 36: 1, when the speed is reduced, the external equipment rotates for one circle every 36 circles of the motor.
The sensing signal between the detection sensor and the first sensing patch can be a sensing signal sensed by the detection sensor and the first sensing patch when the first sensing patch is close to the detection sensor (for example, the first sensing patch rotates above the detection sensor).
The pulse count of the motor corresponding to the first sensing patch is the accumulated pulse count of the motor from the beginning of moving (rotating) when the detection sensor senses the first sensing patch, and the motor moves by one step every time when the motor passes by one pulse, so that the pulse count of the motor corresponding to the first sensing patch and the moving step number (stepping step number) of the motor are equal if no error exists in the moving process of the motor.
Specifically, every time the upper computer sends a pulse, the motor can step by one step, the upper computer sends pulse information of N pulses, and the motor can step by one step at every pulse moment, namely step by N steps. In order to check whether the motor has step loss (i.e. the actual number of steps of the motor is less than the number of pulses) or step skipping (i.e. the actual number of steps of the motor is greater than the number of pulses) in the motion process of the motor, whether the motor has step loss can be detected by setting a reference value.
Step 102: judging whether the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch or not;
the preset reference pulse count corresponding to the first sensing patch is determined according to the position of the first sensing patch on the external equipment and the stepping speed of the motor, and is used for representing a reference value of the pulse count in the movement process of the motor.
Specifically, because the detection sensor is usually fixedly disposed on the motor or the motor bracket, and the first sensing patch is usually fixedly disposed on the external device, when the external device starts to move from a fixed position (e.g., mechanical limit), and when the first sensing patch senses the detection sensor, a moving distance of the external device is fixed and unchanged, so that the stepping number of steps of the motor is also fixed and unchanged under the condition that the stepping speed of the motor is unchanged, and because the stepping number is equal to the pulse count, if the motor does not lose steps or step over in the moving process, the actual pulse count (the pulse count of the motor corresponding to the first sensing patch) and the preset reference pulse count should be equal.
The movement of the external device from the fixed position may be the movement of the entire external device from the fixed position to another position, or may be the movement of a mark point on the external device from the fixed position along with the movement of the external device, and the external device itself rotates around the axis during the movement.
For example, as shown in fig. 2, the motor external device is provided with a first sensing patch, and a detection sensor provided on the motor is vertically below a mechanical limit. When the motor receives a pulse signal sent by an upper computer, the motor starts to rotate, the number of the passing pulse signals is accumulated in real time by an accumulated pulse counting process in the device for reducing the driving error of the motor, the motor rotates to drive external equipment (specifically, a mark point on the external equipment) to move in the anticlockwise direction from mechanical limit, when the external device movement distance is d1 (specifically, the external device mark point movement distance is d1), the detection sensor is located below the first sensing patch, the detection sensor senses the first sensing patch, and at this time, the number of pulse signals passed by the motor (the pulse count of the motor corresponding to the first sensing patch) is obtained, and comparing the number of the pulse signals with the preset reference pulse count corresponding to the first sensing patch, and judging whether the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count.
Step 103: and if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, determining that the motor has step loss or step skipping, and correcting the first pulse count of the motor for the first time.
Specifically, since the preset reference pulse count is a reference pulse count (equivalent to a theoretical value) set in advance according to the position of the first sensor patch on the external device and the stepping speed of the motor, when the pulse count (equivalent to an actual value) of the motor corresponding to the first sensor patch is not equal to the preset reference pulse count, it can be determined that an error exists in the motor movement process, that is, step loss or step skip.
For example, as shown in FIG. 2, assume that the external device advances every step of the motor
Figure BDA0003450731050000071
According to the distance d between the first sensing patch and the detection sensor in the vertical direction1And if the preset reference pulse count n corresponding to the first sensing patch is determined to be 10, then:
if the number of pulse signals passed by the motor (pulse count of the motor corresponding to the first sensing patch) is n' 9 when the detection sensor and the first sensing patch sense, it indicates that the motor drives the first sensing patch of the external device to rotate above the detection sensor after 9 pulse cycles, and theoretically, the motor needs 10 pulses to drive the first sensor of the external device to rotate above the detection sensor and further sense with the detection sensor, so that the step-by-step existence in the motor motion process can be determined;
if the number of the acquired pulse signals passed by the motor (the pulse count of the motor corresponding to the first sensing patch) is n' equal to 11 when the detection sensor and the first sensing patch sense, it indicates that the motor drives the first sensing patch of the external device to rotate above the detection sensor after passing 11 pulse cycles, and therefore, it can be determined that step loss exists in the motor movement process.
When the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count, it indicates that the motor has step loss or step skipping, and in order to prevent the positioning error of the target position caused by the step loss or step skipping of the motor from influencing subsequent application, the pulse count of the motor can be corrected.
For example, since the preset reference pulse count is a reference value in the motor stepping process, optionally, in some embodiments of the present application, the pulse count of the motor may be corrected based on the preset reference pulse count corresponding to the first sensing patch, that is, the pulse count of the motor is corrected to the preset reference pulse count.
Optionally, in some embodiments of the present application, after determining that there is an error in the motor stepping process, the motor may be returned to the starting point (e.g., mechanical limit) and then the stepping motion may be performed again.
In the above process of determining whether the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch, if the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count, it may be determined that there is no step loss or step skipping in the motor.
It should be noted that the pulse count of the motor refers to a pulse count accumulation process of the motor, which represents a pulse count passed during the motor movement, and the pulse count of the motor corresponding to the first sensor patch is a pulse count corresponding to the first sensor patch and the sensing time of the detection sensor in the motor pulse count accumulation process, so that the pulse count correction of the motor corresponding to the first sensor patch may refer to a pulse count accumulation process of the correction motor, that is, after the pulse count of the motor corresponding to the first sensor patch is corrected to a preset reference pulse count s corresponding to the first sensor patch, the pulse count (pulse count accumulation) of the motor is s +1 after the motor continues to move one step.
It should be noted that the method in steps 101 to 103 may be used in the process of moving each first sensing patch over the detection sensor and sensing with the detection sensor, that is:
if the number of the first sensing patches arranged on the external equipment is one, when the motor drives the external equipment to start to move, the first sensing patches on the external equipment are driven to move to the position above the detection sensor, after the first sensing patches and the detection sensor are induced, the pulse count of the motor corresponding to the first sensing patches is obtained and compared with the preset reference pulse count corresponding to the first sensing patches, whether the motor loses steps or steps in the process of moving from the starting position to the first sensing patches of the external equipment is judged, and correction is carried out when the loss steps or steps occur;
if a plurality of first sensing patches are arranged on the external device (for example, a first sensing patch, b first sensing patch and c first sensing patch are arranged in sequence of passing through the detection sensor), if the a first sensing patch is sensed, and if the pulse count of the motor corresponding to the a first sensing patch is not equal to the preset reference pulse count corresponding to the a first sensing patch, the pulse count of the motor corresponding to the a first sensing patch can be corrected; after correction, if the pulse count of the motor corresponding to the first sensing patch b is equal to the preset reference pulse count corresponding to the first sensing patch b, it can be shown that no step loss or step skipping exists in the motor during the process between the first sensing patch a and the detection sensor sensing the first sensing patch b and the detection sensor sensing, and no correction is needed; if the pulse count of the motor corresponding to the first sensing patch c is not equal to the preset reference pulse count corresponding to the first sensing patch c, the first pulse count can be continuously corrected.
In the embodiment of the application, the pulse count of the motor corresponding to the first sensing patch is obtained by responding to an induction signal between a detection sensor on the motor and the first sensing patch arranged on external equipment, and whether the pulse count of the motor corresponding to the first sensing patch is equal to a preset reference pulse count corresponding to the first sensing patch is judged; if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, determining that the motor has step loss or step skipping, and further correcting the pulse count of the motor for the first time, so that the pulse count of the motor is verified by setting the first sensing patch in the motor movement process to detect whether the motor has step loss or step skipping, and when the motor has step loss or step skipping, correcting the pulse count of the motor, reducing the driving error caused by step loss or step skipping in the motor driving process, and improving the motor driving accuracy.
In some embodiments of the present application, the apparatus for reducing motor driving error further comprises a second sensor patch disposed on the external device, one or more first sensing patches arranged on the external equipment, one or more second sensing patches arranged on the external equipment, in all the sensing patches consisting of the second sensing patch and the first sensing patch arranged on the external equipment, the position intervals among the continuous N sensing patches are equal, and the last sensing patch arranged along the rotation direction of the external device in the N continuous sensing patches is the second sensing patch, N is an integer greater than 2, after determining whether the pulse count of the motor corresponding to the first sensor patch is equal to the preset reference pulse count corresponding to the first sensor patch in step 102, the method for reducing the motor driving error further includes the following steps 301 to 302 as shown in fig. 3A.
Step 301: if the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch, after the pulse counts of the motors corresponding to the consecutive N sensing patches with equal position intervals are obtained, judging whether the pulse counts of the motors corresponding to the consecutive N sensing patches with equal position intervals meet an equal difference rule or not;
step 302: if the pulse counts of the motors corresponding to the continuous N sensing patches with equal position intervals do not meet the equal difference rule, determining that the motor has step loss or step skipping in the rotating process of the motor driving the external equipment between the last sensing patch and the detection sensor and the first sensing patch and the detection sensor which are closest to the last sensing patch and perform second correction on the pulse counts of the motor.
Specifically, since the position intervals of the N sensor patches are equal, and the step distance of each step of the motor is fixed (for example, the step angle is fixed), when the N sensor patches satisfying the position intervals are passed, the corresponding pulse counts thereof should satisfy the arithmetic mean square law.
Wherein, the above-mentioned arithmetic rule refers to the arithmetic rule satisfied by the arithmetic sequence, for example:
if N is an odd number, if N is 3, the pulse count of the motor corresponding to 3 sensor patches having the same position interval is counted (a)1、a2、a3) The arithmetic rule to be satisfied can be a3-a2=a2-a1The following rules can be satisfied:
Figure BDA0003450731050000101
if N is 5, 5 sensor patches with equal position interval correspond to the motor pulse count (a)1、a2、a3、a4、a5) The arithmetic rule to be satisfied can be a5-a4=a4-a3=a3-a2=a2-a1The following equation may be satisfied according to the median law of the arithmetic differences:
Figure BDA0003450731050000102
and the like.
For example, as shown in fig. 3B, after receiving a pulse signal sent by the upper computer, the motor starts to rotate and drives the external device to start to move from the mechanical limit 30, where a specific moving direction is a moving direction shown by a dotted arrow in the figure, and the positions of the sensing patches on the external device are different according to different setting positions on the external device, so that the positions of the sensing patches on the external device are different from the positions of the mechanical limit, and the positions of the sensing patches are different along with the movement of the external device:
the second sensing patch 311 is first moved over the detection sensor 30 and detects the sensingThe sensor 33 senses, and the pulse count m of the motor can be acquired at the moment1(pulse count of the motor corresponding to the second sensor patch 311) and saved;
next, the first sensing patch 321 senses with the detection sensor 33, and at this time, a pulse count (pulse count of the motor corresponding to the first sensing patch 321) m of the motor can be obtained2And can be compared with the preset reference pulse count corresponding to the first sensing patch 321, if the comparison result at this time is that the preset reference pulse count is equal to the pulse count of the motor, that is, the motor does not have step loss or step overtaking;
then, a second sensing patch 312 senses with the detecting sensor 33, and a pulse count m of the motor (pulse count of the motor corresponding to the second sensing patch 312) is acquired at this time3In addition, since the three sensor patches, i.e., the second sensor patch 311, the first sensor patch 321, and the second sensor patch 312, are located at the same distance, the pulse count m of the motor corresponding to the three sensor patches can be obtained according to the obtained pulse count m1、m2、m3Whether or not the law of equal difference is satisfied, e.g. according to m2Whether or not to be equal to
Figure BDA0003450731050000111
It is determined whether there is a step loss or a step crossing. If the pulse counts of the motors corresponding to the three sensor patches acquired at this time satisfy the arithmetic rule, for example,
Figure BDA0003450731050000112
it can be determined that there is a step loss or step crossing of the motor.
And, further, if there is no step loss or step over of the motor as a result of comparing the pulse count of the motor when the first sensor patch 321 and the detection sensor sense with the preset reference pulse count corresponding to the first sensor patch 321, it may be determined that the motor has step loss or step over in the time period between the sensing of the first sensor patch 321 (the first sensor patch closest to the last sensor patch) and the sensing of the detection sensor to the second sensor patch 312 (the last sensor patch) and the sensing of the detection sensor.
Optionally, the direction of the dotted arrow may be a tangential direction of the rotation process of the disc, that is, the patches are circumferentially arranged at intervals, and when the patches move to a specific detection sensor positioning point, the patches are corresponding tangential points (or tangents).
For another example, as shown in fig. 3C, as the external device moves in the direction of the dashed arrow (alternatively, the moving direction may be a tangential direction of the rotation process of the disk, that is, a plurality of patches are arranged at intervals along the circumferential direction, and when moving to a specific detection sensor positioning point, the patches are corresponding tangent points (or tangents)):
the first sensing patch 322 firstly moves above the detection sensor 33 along with the movement of the external device, and senses with the detection sensor 33, the obtained pulse count of the motor (the pulse count of the motor corresponding to the first sensing patch 322) is not equal to the preset reference pulse count corresponding to the first sensing patch 322, the motor is determined to have step loss or step skipping, and the pulse count of the motor can be corrected based on the preset reference pulse count corresponding to the first sensing patch 322;
then, another first sensing patch 323 senses the detection sensor 33, after the pulse count of the motor (the pulse count of the motor corresponding to the first sensing patch 323) is obtained and compared with the preset reference pulse count corresponding to the first sensing patch 323, if the comparison result at this time is that the preset reference pulse count corresponding to the first sensing patch 323 is equal to the pulse count of the motor corresponding to the first sensing patch 323, the motor does not miss or step over;
then, the second sensing patch 313 senses the detection sensor 33, and after the pulse count of the motor (the pulse count of the motor corresponding to the second sensing patch 313) is obtained, the pulse count of the motor corresponding to the 3 equidistantly-arranged sensing patches is obtained, and if the pulse count of the motor corresponding to the 3 equidistantly-arranged sensing patches does not meet the arithmetic mean rule, it can be determined that the motor has step loss or step skipping.
And, further, if there is no step loss or step loss of the motor as a result of comparing the pulse count of the motor performed when the first sensor patch 323 and the detection sensor 33 sense with the preset reference pulse count corresponding to the first sensor patch 323, it may be determined that the motor has step loss or step loss in the time period between the sensing of the first sensor patch 323 (the first sensor patch closest to the last sensor patch) and the sensing of the detection sensor to the second sensor patch 313 (the last sensor patch) and the sensing of the detection sensor.
When N is an even number: if N is 4, the pulse count of the motor corresponding to 4 sensor patches with equal position interval (a)1、a2、a3、a4) The arithmetic rule to be satisfied can be a4-a3=a3-a2=a2-a1The following rules can be satisfied: a is2+a3=a1+a4And the like.
For example, as shown in fig. 3D, as the external device moves in the direction of the dashed arrow:
the first sensing patch 324 and the first sensing patch 325 move above the detection sensor 33 successively along with the movement of the external device to be sensed with the detection sensor 33, after the pulse count of the corresponding motor is obtained, whether the motor has step loss or step skipping is judged based on the corresponding preset reference pulse count, and after correction is carried out when the motor has step loss or step skipping, the second sensing patch 314 senses with the detection sensor to obtain the pulse count m 'of the motor'1(pulse count of motor corresponding to second sensor patch 314), the second sensor patch 315 senses with the detection sensor to obtain pulse count m 'of corresponding motor'2(pulse count of motor corresponding to second sensor patch 315), the second sensor patch 316 senses with the detection sensor to obtain pulse count m 'of corresponding motor'3(pulse count of motor corresponding to second sensor patch 316), second sensor patch 317 senses with the detection sensor to obtain pulse count m 'of corresponding motor'4(pulse count of motor corresponding to second sensor patch 317), at this time, pulse count m 'of motors corresponding to 4 equidistantly-arranged sensor patches (second sensor patches) has been acquired'1、m′2、m′3And m'4Can beCounting m 'according to the pulse of the motor corresponding to the 4 equidistantly arranged sensing patches (second sensing patches)'1、m′2、m′3And m'4Whether or not the arithmetic rule is satisfied, for example, m 'is judged'2+m′3Is m 'or not'1+m′4Equality, determining if there is a step loss or step crossing in the motor, if the arithmetic rule is not satisfied, e.g., (m'2+m′3)≠(m′1+m′4) Then it is determined that there is a step loss or step over as the motor rotates between the second sensing patch 317 (last sensing patch) and the first sensing patch 325 (first sensing patch closest to the last sensing patch).
It should be noted that the above list of the arithmetic laws is only an example of the arithmetic laws, and the application does not limit the specific form of the arithmetic laws.
Alternatively, the moving direction of the external device indicated by the dotted arrow may be a tangential direction of the rotation process of the disc, that is, the plurality of patches are circumferentially spaced and are corresponding tangential points (or tangents) when moving to a specific detection sensor positioning point.
It should be noted that the first correction and the second correction of the pulse count of the motor only represent the order of the correction of the pulse count of the motor, that is, the first correction of the pulse count of the motor is performed before the second correction of the pulse count of the motor, and do not represent the limitation of the correction of the motor, that is, the first correction of the pulse count of the motor may be one or more times, and the second correction of the pulse count of the motor may also be one or more times.
Optionally, in some embodiments of the present application, the second correction of the pulse count of the motor in step 302 may be performed based on a preset reference pulse count corresponding to the first sensing patch, so that when the closest first sensing patch senses the detection sensor disposed on the motor, the pulse count of the motor may be corrected based on the preset reference pulse count corresponding to the first sensing patch, that is, steps 401 to 403 below.
Step 401: controlling the motor to rotate, enabling the detection sensor to be inducted with the first sensing patch closest to the last sensing patch, and generating a second induction signal;
step 402: responding to the second sensing signal, and acquiring a second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch;
step 403: and correcting the pulse count of the motor into a second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch.
The control motor can be controlled to rotate continuously in the original movement direction, or the control motor can be controlled to change the movement direction to enable the motor to move in the opposite direction; correspondingly, when the motor continues to move towards the original movement direction, the pulse counting of the motor continues to be accumulated, the movement direction of the motor is changed, and when the motor moves towards the reverse direction, the pulse counting of the motor is correspondingly reduced.
The second sensing signal is a sensing signal generated when the detection sensor senses the first sensing patch closest to the last sensing patch.
The first sensing patch closest to the last sensing patch is a first sensing patch which is sensed by the detection sensor in the process that the motor drives the external device to continue rotating, and the second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch is the reference value of the pulse count corresponding to the first sensing patch closest to the last sensing patch.
The above-mentioned correction of the pulse count of the motor to the second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch means that, when the detection sensor senses the first sensing patch closest to the last sensing patch, the value in the current pulse number accumulation process of the motor is corrected to the second preset reference pulse count.
For example, as shown in fig. 4, the motor starts to rotate to drive the external device to start moving from the mechanical limit 30, the second sensing patch 411 firstly senses with the detection sensor 33, and at this time, the pulse count of the motor is obtained and stored; then the first sensing patch 421 and the detection sensor 33 are sensed, at this time, the pulse count of the motor (the pulse count of the motor corresponding to the first sensing patch 421) is obtained and compared with the preset reference pulse count corresponding to the first sensing patch, if the comparison result at this time is that the preset reference pulse count is equal to the pulse count of the motor, that is, the motor does not lose steps or step over; if the comparison result is that the preset reference pulse count is not equal to the pulse count of the motor, the motor has step loss or step skipping, and the pulse count of the motor can be corrected based on the preset reference pulse count; next, the second sensing patch 412 senses with the detection sensor, and at this time, the pulse count of the motor is obtained, and since the position distances of the three sensing patches, that is, the second sensing patch 411, the first sensing patch 421 and the second sensing patch 412, are the same, it can be determined whether the motor drives the external device to lose or go by steps in the process between the sensing of the first sensing patch 421 and the detection sensor and the sensing of the second sensing patch 412 and the detection sensor, based on whether the obtained pulse counts of the corresponding three sensing patches satisfy the arithmetic rule. If the pulse counts acquired at this time corresponding to the three sensor patches do not satisfy the arithmetic rule, it can be determined that the motor drives the external device to lose or step in the process between the sensing of the first sensor patch 421 and the detection sensor and the sensing of the second sensor patch 412 and the detection sensor.
If the rotation direction of the motor is to continue moving towards the original direction, the next first sensing patch 422 can be used as a reference, when the next first sensing patch 422 senses the sensor, a preset reference pulse count corresponding to the next first sensing patch 422 is obtained, and the pulse count of the motor is corrected based on the preset reference pulse count;
if the rotation direction of the motor is in the opposite direction, the motor may change its movement direction based on the one or more first sensing patches 421, the accumulated pulse count of the motor decreases in the opposite direction, and the motor drives the external device to move in the opposite direction, so that when the previous first sensing patch 421 senses the sensor, the preset reference pulse count corresponding to the previous first sensing patch 421 is obtained to correct the pulse count of the motor.
Optionally, in some embodiments, after the pulse count of the motor is corrected based on the preset reference pulse count corresponding to the first sensor patch closest in the opposite direction, the motor may be controlled to continue to change the movement direction, the pulse counts of the motor are accumulated, and the motor drives the external device to continue to move in the original direction.
In the embodiment of the application, after the motor is determined not to have step loss or step skipping based on the fact that the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch, by arranging the sensing patches on the external device at equal intervals, when the sensing patches sense with the detection sensor, acquiring the pulse counts of the motors at the corresponding positions, and according to whether the pulse counts of the motors meet the equal difference law or not, and then whether the motor loses steps or not is determined in the process that the motor drives the external equipment between the last sensing patch and the detection sensor to sense and the first sensing patch and the detection sensor which are closest to the last sensing patch and sense, whether the motor loses steps or not is judged without knowing the preset reference pulse count corresponding to the sensing patches, and the detection efficiency of motor step loss or step stepping is improved.
It should be noted that, in an actual usage scenario, the driving of the motor by the upper computer includes that the motor initially drives the external device to move from the mechanical limit to the target position a, and also includes driving the external device from the target position a to the target position B, so that the method for reducing the motor driving error can be applied to the motor to move according to the pulse information sent by the upper computer, and includes that the motor drives the external device to move from the mechanical limit to the target position a, and also includes a process of driving the external device to move from the target position a to the target position B.
The motor drives the external equipment to move to a target position A from a mechanical limit, and the following two situations are mainly adopted:
case 1: when the motor is initially used, the external equipment is in a mechanical limiting position and needs to move to a target position A from the mechanical limiting position
Case 2: when the motor is powered on again, the motor usually moves reversely to enable the external device to return to the mechanical limit, and then the motor drives the external device to move to the target position A from the mechanical limit.
Specifically, the motor is powered off when in the target position A, and the pulse of the motor can be counted by n1Stored in the memory, when the motor is powered on again, the motor usually moves reversely automatically to drive the external device to return to the mechanical limit, and then the stored pulse count n of the motor is obtained1And further count n according to the pulse1The motor drives the external device to move to the target position a again.
Wherein, the motor drives the external device to move to the target position A again according to the pulse count, if the motor is powered off again, the pulse count n during the power off can be counted2From the last stored pulse count n of the motor1Comparing, the larger value max (n)1,n2) As the pulse count for target position a.
In some embodiments of the present application, the patches arranged on the external device may be all second sensing patches arranged at equal intervals, and the number of the second sensing patches is M, where M is an integer greater than or equal to 3, that is, the method for reducing the motor driving error may further be implemented through the following steps 501 to 503.
Step 501: responding to a third induction signal between the detection sensor and the second sensing patch, and acquiring a pulse count of a motor corresponding to the second sensing patch;
step 502: after pulse counts of motors corresponding to the second sensing patches with the same continuous L position intervals are obtained, judging whether the pulse counts of the motors corresponding to the second sensing patches with the same continuous L position intervals meet an arithmetic rule;
step 503: and if the pulse counts of the motors corresponding to the second sensing patches with the same interval at the continuous L positions meet the equal difference rule, determining that the motor has step loss or step skipping, and correcting the pulse counts of the motor.
In the embodiment of the application, in response to a third sensing signal between the detection sensor and the second sensing patch, the pulse count of the motor corresponding to the second sensing patch is obtained, and after the pulse count of the motor corresponding to the second sensing patch with the same continuous L position intervals is obtained, whether the motor has step loss or step skipping is determined according to whether the second pulse count corresponding to the second sensing patch with the same continuous L position intervals meets an equal difference rule, and then if the motor has step loss or step skipping is determined, the pulse count of the motor is corrected, so that whether the motor has step loss or step skipping is determined according to the obtained pulse count only according to the sensing information of the second sensing patch and the detection sensor, the reference pulse count of the sensing patch is not required, and the efficiency of step loss or step skipping detection of the motor is improved.
It should also be noted that, for simplicity of description, the foregoing method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, and that some steps may occur in other orders in some implementations of the present application.
Fig. 5 shows a schematic structural diagram of an apparatus 500 for reducing a motor driving error according to an embodiment of the present application, where the apparatus for reducing a motor driving error includes a detection sensor disposed on a motor and a first sensor pad disposed on an external device, the motor drives the external device to rotate when rotating, and the apparatus for reducing a motor driving error further includes a first obtaining unit 501, a first determining unit 502, and a first correcting unit 503.
A first obtaining unit 501, configured to obtain a pulse count of a motor corresponding to a first sensing patch in response to a first sensing signal between a detection sensor and the first sensing patch;
a first judging unit 502, configured to judge whether a pulse count of a motor corresponding to the first sensing patch is equal to a preset reference pulse count corresponding to the first sensing patch;
the first correcting unit 503 is configured to determine that the motor has a step loss or a step skipping if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, and perform first correction on the pulse count of the motor.
In some embodiments of the present application, the first correcting unit 503 may be further specifically configured to correct the pulse count of the motor by taking a preset reference pulse count corresponding to the first sensing patch as a reference.
In some embodiments of the application, the above-mentioned device for reducing motor driving error further includes a second sensor patch disposed on the external device, where the first sensor patch is one or more, the second sensor patch is one or more, and in all sensor patches composed of the second sensor patch and the first sensor patch, there are N consecutive sensor patches with equal position intervals therebetween, and a last sensor patch arranged in the N consecutive sensor patches along the rotation direction of the external device is the second sensor patch, where N is an integer greater than 2, the device further includes:
the second judging unit is used for judging whether the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch or not, and judging whether the pulse count of the motor corresponding to the first sensing patch meets an equal difference rule or not after the pulse count of the motors corresponding to the consecutive N sensing patches with equal position intervals is obtained if the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch;
and the second correction unit is used for determining that the motor loses steps or steps in the rotation process of the external equipment driven by the motor between the induction of the last sensing patch and the detection sensor and the induction of the first sensing patch and the detection sensor which are closest to the last sensing patch in distance if the pulse count of the motor corresponding to the N continuous sensing patches with equal position intervals does not meet the equal difference rule, and performing second correction on the pulse count of the motor.
In some embodiments of the application, the second correcting unit may be further specifically configured to control the motor to rotate, so that the detection sensor senses the first sensing patch closest to the last sensing patch and generates a second sensing signal; responding to the second sensing signal, and acquiring a second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch; and correcting the pulse count of the motor into a second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch.
It should be noted that, for convenience and brevity of description, the specific working process of the apparatus 500 for reducing motor driving error described above may refer to the corresponding process of the method described in fig. 1 and fig. 3A, and is not described herein again.
As shown in fig. 6, the present application provides a terminal 60 equipped with the above-mentioned device for reducing the driving error of the motor, wherein the terminal can be an upper computer for sending a pulse control signal to the motor to control the rotation of the motor, or an application device comprising the above-mentioned motor and the above-mentioned external device.
The upper computer can be a server or a terminal such as a computer, and the application equipment can be a stage lamp, a joint of an industrial robot and the like.
The device for reducing the motor driving error may include a detection sensor disposed on the motor and a first sensing patch disposed on the external device, the motor drives the external device to rotate when rotating, and the device for reducing the motor driving error further includes a first obtaining unit 501, a first determining unit 502 and a first correcting unit 503, specifically:
a first obtaining unit 501, configured to obtain a pulse count of a motor corresponding to a first sensing patch in response to a first sensing signal between a detection sensor and the first sensing patch;
a first judging unit 502, configured to judge whether a pulse count of a motor corresponding to the first sensing patch is equal to a preset reference pulse count corresponding to the first sensing patch;
the first correcting unit 503 is configured to determine that the motor has a step loss or a step skipping if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, and perform first correction on the pulse count of the motor.
Embodiments of the present invention also provide a computer storage medium having a computer program stored therein, where the computer program can be divided into one or more modules/units, and the one or more modules/units are stored in the computer storage medium and executed by a processor in the terminal or the device for reducing motor driving errors, so as to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program in the terminal or the device for reducing motor driving errors. For example, the computer program may be divided into a first obtaining unit, a first judging unit and a first correcting unit, and the specific functions are as follows:
the first acquisition unit is used for responding to a first induction signal between the detection sensor and the first sensing patch and acquiring the pulse count of the motor corresponding to the first sensing patch;
the first judging unit is used for judging whether the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch or not;
and the first correction unit is used for determining that the motor has step loss or step skipping if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, and correcting the pulse count of the motor for the first time.
The motor drive error reduction apparatus may further include more or fewer components than those shown, or may combine some of the components, or may be different components, for example, the motor drive error reduction apparatus may further include an input/output device, a network access device, a bus, and the like.
The computer readable storage medium may be an internal storage unit of the terminal 60, such as a hard disk or a memory of a device for reducing motor driving errors. The computer readable storage medium may also be an external storage device of the terminal 60, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the terminal 60. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal 60. The computer-readable storage medium is used for storing the computer program and other programs and data required by the terminal 60. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions.
Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal are merely illustrative, and for example, the division of the above-described modules or units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the embodiments of the methods described above. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-described computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may include content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application. The spirit and scope of the embodiments should be construed as being encompassed by the present disclosure.

Claims (10)

1. A method for reducing motor driving errors is applied to a device for reducing motor driving errors, the device for reducing motor driving errors comprises a detection sensor arranged on a motor and a first sensing patch arranged on external equipment, and the motor drives the external equipment to rotate when rotating, and the method comprises the following steps:
responding to a first induction signal between the detection sensor and the first sensing patch, and acquiring a pulse count of a motor corresponding to the first sensing patch;
judging whether the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch or not;
and if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, determining that the motor has step loss or step skipping, and correcting the pulse count of the motor for the first time.
2. The method of claim 1, wherein said first modifying the pulse count of said motor comprises:
and correcting the pulse count of the motor by taking the preset reference pulse count corresponding to the first sensing patch as a reference.
3. The method according to claim 1, wherein the apparatus for reducing the motor driving error further comprises a second sensor patch disposed on the external device, the first sensor patch is one or more, the second sensor patch is one or more, in all the sensor patches composed of the second sensor patch and the first sensor patch, there are N sensor patches that have equal position intervals, and a last sensor patch in the N sensor patches arranged along the rotation direction of the external device is the second sensor patch, where N is an integer greater than 2, and after the determining whether the pulse count of the motor corresponding to the first sensor patch is equal to the preset reference pulse count corresponding to the first sensor patch, the method further comprises:
if the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch, after the pulse counts of the motors corresponding to the consecutive N sensing patches with equal intervals are obtained, judging whether the pulse counts of the motors corresponding to the consecutive N sensing patches with equal intervals meet an arithmetic rule;
if the pulse counts of the motors corresponding to the N continuous sensing patches with equal position intervals do not meet the equal difference rule, determining that the motor drives the external equipment to drop or step during the rotation process between the last sensing patch and the detection sensor and the first sensing patch and the detection sensor which are closest to the last sensing patch in distance, and correcting the pulse counts of the motor for the second time.
4. The method of claim 3, wherein said second correcting the pulse count of said motor comprises:
controlling the motor to rotate, enabling the detection sensor to be inducted with the first sensing patch closest to the last sensing patch, and generating a second induction signal;
responding to the second induction signal, and acquiring a second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch;
and correcting the pulse count of the motor into a second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch.
5. The utility model provides a reduce device of motor drive error, a serial communication port, reduce device of motor drive error is including setting up the detection sensor on the motor and setting up the first sensing paster on external equipment, the motor drives when rotating external equipment rotates, reduce device of motor drive error still includes:
the first acquisition unit is used for responding to a first induction signal between the detection sensor and the first sensing patch and acquiring the pulse count of the motor corresponding to the first sensing patch;
the first judgment unit is used for judging whether the pulse count of the motor corresponding to the first sensing patch is equal to the preset reference pulse count corresponding to the first sensing patch or not;
and the first correction unit is used for determining that the motor has step loss or step skipping if the pulse count of the motor corresponding to the first sensing patch is not equal to the preset reference pulse count corresponding to the first sensing patch, and correcting the pulse count of the motor for the first time.
6. The apparatus of claim 5, wherein the first modification unit is further configured to:
and correcting the pulse count of the motor by taking the preset reference pulse count corresponding to the first sensing patch as a reference.
7. The apparatus of claim 5, wherein the apparatus for reducing the motor driving error further comprises a second sensor patch disposed on the external device, the first sensor patch is one or more, the second sensor patch is one or more, in all sensor patches consisting of the second sensor patch and the first sensor patch, there are N sensor patches in the same position interval, and the last sensor patch in the N sensor patches arranged along the rotation direction of the external device is the second sensor patch, N is an integer greater than 2, the apparatus further comprising:
a second judging unit, configured to, after the judgment that whether the pulse count of the motor corresponding to the first sensor patch is equal to the preset reference pulse count corresponding to the first sensor patch is performed, if the pulse count of the motor corresponding to the first sensor patch is equal to the preset reference pulse count corresponding to the first sensor patch, after the pulse counts of the motors corresponding to N consecutive sensor patches with equal position intervals are obtained, judge whether the pulse counts of the motors corresponding to N consecutive sensor patches with equal position intervals satisfy an arithmetic rule;
and the second correction unit is used for determining that the motor drives the external equipment to lose or step during the rotation process between the induction of the last sensing patch and the detection sensor and the induction of the first sensing patch and the detection sensor which are closest to the last sensing patch when the motor drives the external equipment to rotate if the pulse count of the motor corresponding to the N consecutive sensing patches with equal position intervals does not meet the equal difference rule, and correcting the pulse count of the motor for the second time.
8. The apparatus of claim 7, wherein the second modification unit is further configured to:
controlling the motor to rotate, enabling the detection sensor to be inducted with the first sensing patch closest to the last sensing patch, and generating a second induction signal;
responding to the second induction signal, and acquiring a second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch;
and correcting the pulse count of the motor into a second preset reference pulse count corresponding to the first sensing patch closest to the last sensing patch.
9. A terminal, characterized in that it is provided with means for reducing motor drive errors according to any one of claims 5-8.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
CN202111674801.2A 2021-12-31 2021-12-31 Method, device, terminal and readable storage medium for reducing motor driving error Active CN114499299B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111674801.2A CN114499299B (en) 2021-12-31 2021-12-31 Method, device, terminal and readable storage medium for reducing motor driving error

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111674801.2A CN114499299B (en) 2021-12-31 2021-12-31 Method, device, terminal and readable storage medium for reducing motor driving error

Publications (2)

Publication Number Publication Date
CN114499299A true CN114499299A (en) 2022-05-13
CN114499299B CN114499299B (en) 2022-08-23

Family

ID=81508018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111674801.2A Active CN114499299B (en) 2021-12-31 2021-12-31 Method, device, terminal and readable storage medium for reducing motor driving error

Country Status (1)

Country Link
CN (1) CN114499299B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2882096Y (en) * 2006-03-14 2007-03-21 天津市百利电气有限公司 Flexible positioning device for step-by-step motor
JP2009033822A (en) * 2007-07-25 2009-02-12 Rigaku Industrial Co Controller for pulse motor, fluorescent x-ray analyzer provided therewith and program for controlling pulse motor
CN101424946A (en) * 2007-11-02 2009-05-06 深圳迈瑞生物医疗电子股份有限公司 Pulse positioning system and method for compensating pulse positioning error thereof
EP2068436A1 (en) * 2007-12-03 2009-06-10 Roche Diagnostics GmbH Method and device for identifying step loss in a stepper motor
CN102891644A (en) * 2012-10-08 2013-01-23 宁波大学 Two-phase stepping motor driving circuit and motor fault detection method
CN106655930A (en) * 2016-09-18 2017-05-10 北京星网卫通科技开发有限公司 Stepping motor loss of synchronism loss correction method based on proximity sensor
CN108631666A (en) * 2017-03-15 2018-10-09 杭州三花研究院有限公司 A kind of motor control method and motor control assembly
CN209930173U (en) * 2019-03-27 2020-01-10 北京大豪科技股份有限公司 Device for detecting lost steps
CN111464090A (en) * 2020-04-08 2020-07-28 成都极米科技股份有限公司 Control method and control device of shift motor and projection system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2882096Y (en) * 2006-03-14 2007-03-21 天津市百利电气有限公司 Flexible positioning device for step-by-step motor
JP2009033822A (en) * 2007-07-25 2009-02-12 Rigaku Industrial Co Controller for pulse motor, fluorescent x-ray analyzer provided therewith and program for controlling pulse motor
CN101424946A (en) * 2007-11-02 2009-05-06 深圳迈瑞生物医疗电子股份有限公司 Pulse positioning system and method for compensating pulse positioning error thereof
EP2068436A1 (en) * 2007-12-03 2009-06-10 Roche Diagnostics GmbH Method and device for identifying step loss in a stepper motor
CN102891644A (en) * 2012-10-08 2013-01-23 宁波大学 Two-phase stepping motor driving circuit and motor fault detection method
CN106655930A (en) * 2016-09-18 2017-05-10 北京星网卫通科技开发有限公司 Stepping motor loss of synchronism loss correction method based on proximity sensor
CN108631666A (en) * 2017-03-15 2018-10-09 杭州三花研究院有限公司 A kind of motor control method and motor control assembly
CN209930173U (en) * 2019-03-27 2020-01-10 北京大豪科技股份有限公司 Device for detecting lost steps
CN111464090A (en) * 2020-04-08 2020-07-28 成都极米科技股份有限公司 Control method and control device of shift motor and projection system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张爱良等: "基于STM8S微控制器步进驱动器的设计", 《电子设计工程》 *
陈伟: "步进电动机失步原因分析及解决办法", 《电气传动自动化》 *

Also Published As

Publication number Publication date
CN114499299B (en) 2022-08-23

Similar Documents

Publication Publication Date Title
CN109959400B (en) Method and device for calculating absolute encoder parameters and terminal equipment
CN111197954B (en) Absolute position measuring method and device of machine, storage medium and machine
US9599453B2 (en) Device and method for processing signals which represent an angular position of a motor shaft
CN111376256A (en) Steering engine angle calibration method and system, robot and storage medium
CN109546808B (en) Steering engine and method for reducing virtual position of steering engine
CN103620416A (en) Method for determining a rotary speed of a device
US10823582B2 (en) Angle detection device and method of multi-turn servo, and multi-turn servo
JP2016004013A (en) Absolute encoder and method for transmitting rotational position data
CN109696120B (en) Steering engine, angle detection method and device thereof, and computer readable storage medium
CN114499299B (en) Method, device, terminal and readable storage medium for reducing motor driving error
CN109976326B (en) Wheeled robot control method and device, terminal device and medium
CN106092148A (en) For measuring the circuit based on counter of object of which movement
CN111800040B (en) Stepping motor, resetting method and device thereof and computer readable storage medium
CN113060149B (en) Method, device and system for detecting crankshaft position of hybrid electric vehicle and electronic equipment
CN107916509B (en) Needle position detection, needle stop position setting and needle stop control method, system, terminal and device
CN111185908B (en) Robot control method and device for recognizing friction force, robot and storage medium
CN104422883B (en) The detection method and detection device of a kind of motor desynchronizing
CN112067991B (en) Motor locked rotor detection method, detection device, terminal equipment and storage medium
CN115840402A (en) Control time sequence optimization method of double-shaft low-voltage motor driver and related equipment
CN111628682B (en) Stepping motor synchronous driving method, stepping motor synchronous driving device, terminal and storage medium
CN112104292A (en) Motor control method and device, terminal equipment and storage medium
CN113847935A (en) Position determination method and device of hybrid encoder
CN114237242B (en) Method and device for controlling robot based on optical encoder
CN207166315U (en) Absolute angular position sensor and its detecting system
CN112054741A (en) Motor control method and device, terminal equipment and storage medium

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 518000 floor 2-4, building 21, Longjun Industrial Zone, Jiuwo, Longping community, Dalang street, Longhua District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Aitushi Innovation Technology Co.,Ltd.

Address before: 518000 floor 2-4, building 21, Longjun Industrial Zone, Jiuwo, Longping community, Dalang street, Longhua District, Shenzhen City, Guangdong Province

Patentee before: APUTURE IMAGING INDUSTRIES Co.,Ltd.