A control method of a stepper motor, a terminal and a feeding mechanism
By combining positioning control signals and rotation control signals, the jitter problem of stepper motors when testing passive components was solved, and a more efficient testing process was achieved.
Patent Information
- Application Number
- CN202211292918.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-05-23
- Filing Date
- 2022-10-21
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2042-10-21
AI Technical Summary
When testing passive components, stepper motors vibrate when they stop due to their high rotation speed, which affects testing efficiency.
A combined control method using positioning control signals and rotation control signals is adopted. The positioning control signal locks the stepper motor rotor at a reference position, and the rotation control signal is output after receiving the trigger signal. Combined with the adjustment of the duty cycle calculation coefficient, the stepper motor is ensured to stop stably.
It reduces the jitter when the stepper motor stops, shortens the stable stopping time, and improves the testing efficiency of passive components.
Smart Images

Figure CN115694270B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of motor control, and particularly relates to a control method of a stepping motor, a terminal and a feeding mechanism. BACKGROUND
[0002] In the 3C industry, the demand for passive components (such as chip capacitors, chip resistors, chip inductors, etc.) is increasing, and higher requirements are put forward for the testing efficiency per unit time in the testing of passive components. The running efficiency of the feeding mechanism of the testing equipment is required to reach 5000 times / min. Since the stepping motor is an electric motor that converts an electric pulse signal into a corresponding angular displacement or linear displacement. Every input pulse signal, the rotor rotates an angle or moves forward one step, and the output angular displacement or linear displacement is proportional to the number of input pulses, so it has good control accuracy and is often used to drive the feeding mechanism of the testing equipment.
[0003] For the above related technologies, the inventors find that when the passive components are tested after the stepping motor stops rotating, the stepping motor is prone to overshoot due to its high rotating speed, so the stepping motor is prone to jitter when it stops rotating, and thus a certain period of time is needed to wait for the stepping motor to stop rotating stably before testing, thereby reducing the testing efficiency of the passive components. SUMMARY
[0004] In order to improve the testing efficiency of passive components, the present application provides a control method of a stepping motor, a terminal and a feeding mechanism.
[0005] In a first aspect, the present application provides a control method of a stepping motor, which adopts the following technical scheme:
[0006] The control method of the stepping motor comprises:
[0007] After power-on, a positioning control signal is output, and a stepping motor rotor is locked at a reference position based on the positioning control signal;
[0008] A trigger signal is received;
[0009] The positioning control signal is stopped from being output based on the trigger signal, and a rotating control signal is output, and the stepping motor rotor rotates based on the rotating control signal;
[0010] The output duration T of the rotating control signal is acquired;
[0011] It is judged whether the output duration T is equal to a preset output duration threshold value, and if yes, the rotating control signal is stopped from being output, and the positioning control signal is output again.
[0012] By adopting the technical scheme, the positioning control signal can lock the rotor of the stepper motor at the reference position, and when the stepper motor receives the trigger signal to rotate, the positioning control signal is received again to make the stepper motor stop rotating stably and lock at the reference position again, so that the time for the stepper motor to stop rotating stably is shortened, and the efficiency of the passive component test is improved.
[0013] Optionally, the positioning control signal is a PWM chopping signal, and a duty cycle of the positioning control signal satisfies a formula:
[0014]
[0015] wherein a is the duty cycle of the positioning control signal; n is a calculation coefficient of the duty cycle of the positioning control signal, and the value is less than 1; I m is a winding current of the stepper motor; R m is a winding internal resistance of the stepper motor; and U is a power supply voltage of the stepper motor.
[0016] By adopting the technical scheme, the calculation coefficient of the duty cycle of the positioning control signal is less than 1, so that the rotor of the stepper motor rotates under the control of the positioning control signal with a small torque, and because the load torque is almost unchanged, the stepper motor rotates under the control of the positioning control signal at a reduced speed, so that the rotating speed before stopping is reduced, the over-shooting of the rotating angle when stopping at the reference position is reduced, and the jitter of the stepper motor when stopping is reduced.
[0017] Optionally, the rotating control signal is a PWM chopping signal, and a duty cycle of the rotating control signal satisfies a formula:
[0018]
[0019] wherein a ′ is the duty cycle of the rotating control signal; and n ′ is a calculation coefficient of the duty cycle of the rotating control signal, and the value is greater than or equal to 1.
[0020] By adopting the technical scheme, the calculation coefficient of the duty cycle of the rotating control signal is greater than or equal to 1, so that the rotor of the stepper motor starts with a large torque to obtain a better dynamic response and load capacity.
[0021] Optionally, the output of the rotating control signal specifically includes:
[0022] outputting a rotating control signal i with a duty cycle a i ′ .
[0023] acquiring an output duration T i of the rotating control signal i.
[0024] judging whether the output duration T i whether a preset i-th output duration threshold is reached, if yes, stopping outputting the rotation control signal i;
[0025] i is sequentially taken from 1 to m, m is a finite natural number greater than 1, and satisfies the formula:
[0026]
[0027] By adopting the above technical solution, the number of rotation control signals is changed, and the control of multi-angle rotation of the stepper motor is realized.
[0028] Optionally, the re-outputting the positioning control signal further comprises:
[0029] receiving a rotation angle increment of the rotor of the stepper motor;
[0030] judging whether the rotation angle increment is equal to a preset rotation angle increment threshold, if yes, outputting a completion signal, and if no, outputting an alarm signal.
[0031] By adopting the above technical solution, when the rotation angle increment of the rotor of the stepper motor is equal to the preset rotation angle increment threshold, it indicates that the component has reached the preset position, and the completion signal is outputted to enable other devices to detect the passive component; when the rotation angle increment of the rotor of the stepper motor is not equal to the preset rotation angle increment threshold, it indicates that the component has not reached the preset position, and the stepper motor may be blocked, so that the alarm signal is outputted.
[0032] Optionally, the outputting the completion signal further comprises:
[0033] receiving a next trigger signal;
[0034] based on the next trigger signal, clearing the completion signal.
[0035] By adopting the above technical solution, after receiving the next trigger signal, the stepper motor starts to rotate based on the rotation control signal, and the clearing of the completion signal enables other devices to stop detecting the passive component when the stepper motor rotates.
[0036] In a second aspect, the application provides a control terminal of a stepper motor, adopting the following technical solution:
[0037] A control terminal of a stepper motor, the control terminal comprising:
[0038] a positioning control signal output module, configured to output a positioning control signal after the control terminal is powered on, and lock the rotor of the stepper motor at a reference position based on the positioning control signal;
[0039] a trigger signal receiving module, configured to receive a trigger signal;
[0040] a rotation control signal output module, configured to output a rotation control signal after the trigger signal receiving module receives the trigger signal; the rotor of the stepper motor rotates based on the rotation control signal;
[0041] a time length obtaining module, configured to obtain an output time length T of the rotation control signal;
[0042] a judging module, configured to judge whether the output time length T is equal to a preset output time length threshold value; if yes, the rotation control signal output module stops outputting the rotation control signal, and the positioning control signal output module outputs the positioning control signal again;
[0043] the positioning control signal output by the positioning control signal output module is a PWM chopper signal, and a duty cycle of the positioning control signal satisfies a formula:
[0044]
[0045] wherein a is the duty cycle of the positioning control signal; n1 is a calculation coefficient, and the value is less than 1; I m is a winding current of the stepper motor; R m is a winding internal resistance of the stepper motor; U is a power supply voltage of the stepper motor.
[0046] By adopting the above technical solution, since the calculation coefficient of the duty cycle of the positioning control signal output by the positioning control signal output module is less than 1, the current of the winding of the stepper motor is equivalent to being reduced, and then the magnetic field generated by the stator of the stepper motor is reduced, so that the torque of the rotor of the stepper motor is reduced, and since the load torque almost remains unchanged, the stepper motor rotor is decelerated under the control of the positioning control signal, so as to be positioned at the reference position at a lower rotating speed to reduce the stop shaking.
[0047] Optionally, the control terminal further comprises:
[0048] a rotation angle increment receiving module, configured to receive a rotation angle increment of the rotor of the stepper motor;
[0049] the judging module is further configured to judge whether the rotation angle increment is equal to a preset rotation angle increment threshold value;
[0050] a completion signal output module, configured to output a completion signal when the rotation angle increment is equal to the rotation angle increment threshold value; and an alarm signal output module, configured to output an alarm signal when the rotation angle increment is still not equal to the rotation angle increment threshold value.
[0051] By adopting the technical scheme, the rotation angle increment receiving module receives a rotation angle increment after the stepper motor rotor runs for one cycle, and the judging module judges whether the stepper motor rotor completes the preset rotation angle, if yes, the completion signal output module outputs a completion signal, if the judgment result is still no after a preset completion time, the alarm signal output module outputs an alarm signal.
[0052] In a third aspect, the application provides a feeding mechanism, which adopts the following technical scheme:
[0053] A feeding mechanism, comprising: an instruction sending terminal, a stepper motor, a feeding disc, an angle measurer and the control terminal in the second aspect.
[0054] The instruction sending terminal is configured to output a trigger signal.
[0055] The control terminal is connected with the instruction sending terminal, and is configured to output a positioning control signal and a rotation control signal in sequence after receiving the trigger signal.
[0056] The control terminal is connected with the stepper motor, and is configured to control the stepper motor to stop and rotate.
[0057] An output shaft of the stepper motor is connected with the feeding disc, and is configured to drive the feeding disc to rotate.
[0058] The angle measurer is connected with the stepper motor and the control terminal respectively, and is configured to measure a rotation angle increment of the stepper motor, and output the rotation angle increment value to the control terminal.
[0059] By adopting the technical scheme, after the feeding mechanism is powered on, the control terminal first outputs the positioning control signal to control the stepper motor to drive the feeding disc to rotate to a reference position, then the instruction sending terminal outputs the trigger signal, the control terminal outputs the rotation control signal to control the stepper motor to drive the feeding disc to start rotating in response to the trigger signal, when a preset output duration elapses, the control terminal stops outputting the rotation control signal, and outputs the positioning control signal again to control the stepper motor to drive the feeding disc to rotate to the reference position again, and the angle measurer measures the rotation angle of the stepper motor, and outputs the rotation angle increment value, and the control terminal judges whether the rotation of the preset angle is completed.
[0060] In a fourth aspect, the application provides a computer readable storage medium, which adopts the following technical scheme:
[0061] A computer readable storage medium, which stores a computer program capable of being loaded and executed by a processor to execute the method in the first aspect.
[0062] In summary, the application at least has the following beneficial effects:
[0063] 1. The step motor rotor is locked at the reference position by the positioning control signal, and after the step motor receives the trigger signal to complete the rotation, the positioning control signal is received again to make the step motor stable stop and be positioned at the reference position again, which shortens the time of the step motor stable stop and improves the efficiency of the passive component test.
[0064] 2. The purpose of the duty cycle calculation coefficient of the rotation control signal being less than 1 is to make the step motor rotor rotate with smaller torque and decelerate when driving the feed mechanism to load the feed, so as to reduce the jitter of the step motor stop. BRIEF DESCRIPTION OF DRAWINGS
[0065] Figure 1 is a flowchart of the control method of one embodiment of the application;
[0066] Figure 2 is a specific flowchart of step S300 of the control method of one embodiment of the application;
[0067] Figure 3 is a control timing diagram of one embodiment of the step motor control method of the application;
[0068] Figure 4 is a flowchart of the steps after step S500 in the step motor control method of the application;
[0069] Figure 5 is a structural block diagram of the control terminal of one embodiment of the application;
[0070] Figure 6 is a structural block diagram of a further embodiment of the control terminal of the application;
[0071] Figure 7 is a structural block diagram of one embodiment of the feed mechanism of the application.
[0072] Reference signs: 10, control terminal; 11, trigger signal receiving module; 12, positioning control signal output module; 13, rotation control signal output module; 14, time length acquisition module; 15, judgment module; 16, rotation angle increment receiving module; 17, alarm signal output module; 18, completion signal output module; 20, instruction sending terminal; 30, step motor; 40, feed tray; 50, rotation angle measurer. DETAILED DESCRIPTION
[0073] To make the purpose, technical solutions and advantages of the embodiments of the application clearer, the following will combine the attached drawings for the detailed description of the embodiments of the application. Figures 1-7The technical solutions in the embodiments of the present application are clearly and completely described. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0074] The embodiments of the present application disclose a control method of a stepper motor.
[0075] As shown in the accompanying drawings, Figure 1 the control method comprises the steps of S100-S500:
[0076] S100, after power-on, outputting a positioning control signal, and locking a stepper motor rotor at a reference position based on the positioning control signal;
[0077] Specifically, the positioning control signal is a PWM chopping signal with adjustable duty cycle, and the duty cycle of the positioning control signal satisfies the formula:
[0078]
[0079] wherein a is the duty cycle of the positioning control signal; n is a calculation coefficient of the duty cycle of the positioning control signal, and is less than 1; I m is a winding current of the stepper motor; R m is a winding internal resistance of the stepper motor; and U is a power supply voltage of the stepper motor. Since the calculation coefficient of the duty cycle of the positioning control signal is less than 1, the stepper motor rotor rotates with a small torque, thereby slowing down and positioning at the reference position, and thus reducing the jitter of the stepper motor when stopping.
[0080] S200, receiving a trigger signal;
[0081] S300, stopping outputting the positioning control signal based on the trigger signal, and outputting a rotating control signal, and rotating the stepper motor rotor based on the rotating control signal;
[0082] Specifically, the rotating control signal is a PWM chopping signal with adjustable duty cycle, and the duty cycle of the rotating control signal satisfies the formula:
[0083]
[0084] wherein a ′ is the duty cycle of the rotating control signal; n ′ is a calculation coefficient of the duty cycle of the rotating control signal, and is greater than or equal to 1. Since the calculation coefficient of the duty cycle of the rotating control signal is greater than or equal to 1, the stepper motor has a large starting torque greater than a load torque, thereby enabling the stepper motor to have a good dynamic response and load carrying capacity.
[0085] S400, obtaining an output duration T of the rotation control signal;
[0086] S500, judging whether the output duration T is equal to a preset output duration threshold value, if yes, stopping outputting the rotation control signal and outputting the positioning control signal again.
[0087] The preset output duration threshold value is set artificially according to the performance of the stepping motor used and historical experience; the preset output duration threshold value can be set as the minimum time required to complete the required rotation angle under the premise of ensuring that the stepping motor does not lose steps, for example, the stepping motor needs at least 5 ms to rotate 7.2°, and the output duration threshold value can be preset as 5 ms-8 ms.
[0088] Specifically, in order to lock the stepping motor rotor at the reference position and reduce the disturbance of the external rotation angle of the stepping motor rotor, the positioning control signal is continuously output before the next trigger signal is received.
[0089] The positioning control signal can make the stepping motor rotor rotate with a small torque, and the driving test equipment feed mechanism load feeding presents deceleration operation, reduces the rotation speed before the stepping motor stops, thereby reducing the occurrence of rotation angle overshoot when the stepping motor stops at the reference position, reducing the jitter of the stepping motor when it stops, shortening the time for the stepping motor to stabilize and stop, and improving the efficiency of passive component testing.
[0090] As shown in the accompanying drawings Figure 2 As an implementation of step S300, step S300 specifically includes S310-S330:
[0091] S310, outputting a rotation control signal i with a duty cycle of a i ′ ;
[0092] S320, obtaining an output duration T i of the rotation control signal i;
[0093] S330, judging whether the output duration T i reaches a preset i-th output duration threshold value, if yes, stopping outputting the rotation control signal i; i is sequentially taken from 1 to m, m is a finite natural number greater than 1, and satisfies the formula:
[0094]
[0095] Specifically, the duty cycle of the rotation control signal 1 is greater than that of the remaining rotation control signals i, so that the stepping motor torque is higher than the load torque after starting, and then the torque is reduced to match the load torque, thereby saving energy.
[0096] It should be noted that m is determined according to the step angle of the stepper motor used, the number of steps, and the angle of rotation required, for example, a stepper motor with 50 teeth, a step angle of 7.2° (360° / 50), a step angle of 1.8° (7.2° / 4) when running four steps, and m = 3 when a 7.2° position movement needs to be completed.
[0097] In order to better understand the above steps, as shown in the accompanying drawings Figure 2 As shown in the accompanying drawings: taking four-step control of a two-phase stepper motor as an example, positioning control signal and rotation control signal 3 are used to control the A-phase winding of the two-phase stepper motor, rotation control signal 2 and rotation control signal 4 are used to control the B-phase winding of the two-phase stepper motor, and the phases of the A-phase and B-phase windings are 90° apart in space. When powered on, the positioning control signal with a duty cycle of a is output, the A-phase stator winding is loaded with a forward voltage, the A-phase winding generates a forward magnetic field, and under the action of the A-phase winding forward magnetic field, the stepper motor rotor is locked at the reference position, at this time the stepper motor rotor magnetic field coincides with the A-phase winding forward magnetic field; after receiving the trigger signal, the rotation control signal 1 with a duty cycle of a'1 is output, the positioning control signal stops output, the B-phase stator winding is loaded with a forward voltage, and a forward magnetic field is generated, the magnetic field direction changes by 90°, the stepper motor rotor magnetic field rotates to the changed magnetic field direction, and coincides with the B-phase winding forward magnetic field; after 2ms, the rotation control signal 2 with a duty cycle of a'2 is output, the rotation control signal 1 stops output, the A-phase stator winding is loaded with a reverse voltage, and a reverse magnetic field is generated, the magnetic field direction changes by 180°, the stepper motor rotor magnetic field rotates to the changed magnetic field direction, and coincides with the A-phase winding reverse magnetic field; after 2ms, the rotation control signal 3 with a duty cycle of a'3 is output, the rotation control signal 2 stops output, the B-phase stator winding is loaded with a reverse voltage, and a reverse magnetic field is generated, the magnetic field direction changes by 270°, the stepper motor rotor magnetic field rotates to the changed magnetic field direction, and coincides with the B-phase winding reverse magnetic field; after 3ms, the positioning control signal is output again, the rotation control signal 3 stops output, the A-phase stator winding is loaded with a forward voltage, and a forward magnetic field is generated, the magnetic field direction changes by 360°, the stepper motor rotor returns to the reference position, and waits for the next trigger signal.
[0098] The preset output duration threshold is T = 2ms + 2ms + 3ms = 7ms, and in order to enable the stepper motor rotor to start with a larger torque, thereby enabling the stepper motor to have better response speed and load capacity, and better saving energy after the stepper motor starts; the duty cycles of the rotation control signal 1, the rotation control signal 2, and the rotation control signal 3 satisfy the formula:
[0099] In the above embodiment, the control of the multi-angle rotation of the stepper motor is realized.
[0100] As shown in the accompanying drawings Figure 3and attached Figure 4 As shown in the figure, as a further embodiment of the control method, after determining in step S500 that the output duration T is equal to the preset output duration threshold, steps S600-S700 can also be performed: S600, receiving an incremental rotation angle of the rotor of the stepper motor;
[0101] Specifically, the incremental rotation angle can be received in real time, or can be received at a certain frequency interval, and the receiving frequency is set according to the control requirements.
[0102] S700, determining whether the incremental rotation angle is equal to the preset incremental rotation angle threshold, if yes, outputting a completion signal; if no, outputting an alarm signal.
[0103] Specifically, it can be determined in real time whether the incremental rotation angle is equal to the preset incremental rotation angle threshold, or it can be determined at the same frequency as the incremental rotation angle receiving frequency whether the incremental rotation angle is equal to the preset incremental rotation angle threshold, and when the determination result is, the completion signal is immediately outputted;
[0104] It should be noted that when the determination result is that the incremental rotation angle is not equal to the preset incremental rotation angle threshold, it is continuously determined whether the incremental rotation angle is equal to the preset incremental rotation angle threshold, until after the preset completion duration threshold, if the incremental rotation angle is still not equal to the incremental rotation angle threshold, an alarm signal is outputted, thereby reducing the false output of the alarm signal caused by the error in rotation.
[0105] In the above embodiment, when the incremental rotation angle of the rotor of the stepper motor is equal to the preset incremental rotation angle threshold, it indicates that the component has reached the preset position, and a completion signal is outputted to enable other devices to detect the passive component; when the incremental rotation angle of the rotor of the stepper motor is not equal to the preset incremental rotation angle threshold, it indicates that the component has not reached the preset position, and the stepper motor may be stalled, thereby outputting an alarm signal.
[0106] In addition, as shown in the attached Figure 4 The steps S700 further include steps S800-S900:
[0107] S800, receiving a next trigger signal;
[0108] S900, clearing the completion signal based on the next trigger signal.
[0109] In the above embodiment, after receiving the next trigger signal, the stepper motor starts to rotate in the next cycle, at this time, the completion signal is cleared based on the next trigger signal, so that other devices stop detecting the passive component when the stepper motor rotates.
[0110] Based on the above method embodiment, another embodiment of the present application provides a control terminal of a stepper motor.
[0111] As shown in the accompanying drawings Figure 5 As an embodiment of the control terminal of the stepper motor, the control terminal comprises:
[0112] a trigger signal receiving module 11 for receiving a trigger signal;
[0113] a positioning control signal output module 12 for outputting a positioning control signal after the control terminal 10 is powered on, and the stepper motor rotor is locked at a reference position based on the positioning control signal;
[0114] a rotation control signal output module 13 for outputting a rotation control signal after the trigger signal receiving module 11 receives the trigger signal, and the stepper motor rotor rotates based on the rotation control signal;
[0115] a time length obtaining module 14 for obtaining an output time length T of the rotation control signal;
[0116] a judging module 15 for judging whether the output time length T is equal to a preset output time length threshold value, if yes, the rotation control signal output module 13 stops outputting the rotation control signal, and the positioning control signal output module 12 outputs the positioning control signal again; the positioning control signal output by the positioning control signal output module 12 is a PWM chopping signal, and the duty cycle of the positioning control signal satisfies the formula:
[0117]
[0118] wherein a is the duty cycle of the positioning control signal; n1 is a calculation coefficient, and the value is less than 1; I m is the winding current of the stepper motor; R m is the winding resistance of the stepper motor; and U is the power supply voltage of the stepper motor.
[0119] As an embodiment of the rotation control signal output module 13, the rotation control signal output module 13 comprises a plurality of rotation control signal output units, the i-th rotation control signal output unit is used for outputting the i-th rotation control signal with the duty cycle of a i ′ when the i-th rotation control signal is output for the i-th output time length T i equal to a preset i-th output time length threshold value, and stopping outputting the i-th rotation control signal;
[0120] i is sequentially valued from 1 to m, m is a finite natural number greater than 1, and satisfies the formula:
[0121]
[0122] In the above embodiment, after the terminal 10 is powered on, the positioning control signal output module 12 outputs the positioning control signal, so that one phase of the stator winding of the stepper motor is powered to generate a magnetic field, thereby causing the rotor of the stepper motor to rotate under the action of the magnetic field. When the rotor of the stepper motor stops rotating, the rotor of the stepper motor is located at the reference position, and at this time, the magnetic field direction of the rotor is consistent with the magnetic field direction of the stator;
[0123] When the trigger signal receiving module 11 receives the trigger signal, the positioning control signal output module 12 stops outputting the positioning control signal, and the plurality of rotation control signal output units sequentially output the plurality of rotation control signals, thereby changing the direction of the magnetic field generated by the stator winding of the stepper motor multiple times, so that the rotor of the stepper motor rotates following the change of the magnetic field direction of the stator;
[0124] Since the duty cycle calculation coefficient of the positioning control signal is less than 1, the rotor of the stepper motor rotates at a smaller torque and stops at the reference position, so that the jitter of the rotor when stopping at the reference position can be reduced, thereby improving the detection efficiency.
[0125] As a further embodiment of the stepper motor control terminal, as shown in the accompanying drawings: Figure 6 The control terminal 10 further comprises a rotation angle increment receiving module 16 for receiving the rotation angle increment of the rotor of the stepper motor 30.
[0126] The judging module 15 is further configured to judge whether the rotation angle increment is equal to a preset rotation angle increment threshold value.
[0127] The completion signal output module 18 is configured to output a completion signal when the rotation angle increment is equal to the rotation angle increment threshold value.
[0128] The alarm signal output module 17 is configured to output an alarm signal when the rotation angle increment is not equal to the rotation angle increment threshold value.
[0129] In the above embodiment, after completing one control cycle, the rotation angle increment receiving module 16 receives the rotation angle increment of the rotor of the stepper motor, the judging module 15 judges whether the rotation angle increment is equal to the preset rotation angle increment threshold value. If yes, the completion signal output module 18 outputs a completion signal. If no, after a preset completion time threshold value, the alarm signal output module 17 outputs an alarm signal.
[0130] The stepper motor control terminal of the present application can implement any of the above-mentioned stepper motor control methods, and the specific working process of the stepper motor control terminal can refer to the corresponding process in the above-mentioned method embodiments.
[0131] As shown in the accompanying drawings:Figure 7 According to another embodiment of the present application, a feeding mechanism is provided. The feeding mechanism comprises the control terminal 10, the instruction sending terminal 20, the stepping motor 30, the feeding disc 40 and the rotation angle measurer 50.
[0132] The instruction sending terminal 20 is configured to output a trigger signal.
[0133] The control terminal 10 is connected with the instruction sending terminal 20, and is configured to output a positioning control signal and a rotation control signal in sequence after receiving the trigger signal.
[0134] The control terminal 10 is connected with the stepping motor 30, and is configured to control the stepping motor 30 to stop and rotate.
[0135] The output shaft of the stepping motor 30 is connected with the feeding disc 40, and is configured to drive the feeding disc 40 to rotate.
[0136] The rotation angle measurer 50 is connected with the stepping motor 30 and the control terminal 10 respectively, and is configured to measure the rotation angle increment of the stepping motor 30 and output the rotation angle increment value to the control terminal 10.
[0137] The instruction sending terminal 20 can be a PC, a workstation, an industrial computer or the like, and the rotation angle measurer 50 can be a rotary encoder, a Hall sensor or the like.
[0138] In the above embodiment, after the feeding mechanism is started, the control terminal 10 sends the positioning control signal to the stepping motor 30, and the rotor of the stepping motor 30 is positioned at the reference position under the action of the positioning control signal, and then waits to receive the trigger signal sent by the instruction sending terminal 20.
[0139] After the instruction sending terminal 20 sends the trigger signal to the control terminal 10, the control terminal 10 stops sending the positioning control signal to the stepping motor 30, and sends the rotation control signal to the stepping motor 30, so that the stepping motor 30 is started to drive the feeding disc 40 to feed. When the control terminal 10 sends the positioning control signal to the stepping motor 30 again, the rotation angle measurer 50 measures the rotation angle increment of the stepping motor 30 after completing a control cycle, and the control terminal 10 receives and judges the size relationship between the rotation angle increment and the preset rotation angle increment threshold value, so as to confirm that the element on the feeding disc 40 enters the detection station.
[0140] The control method of the stepping motor in the present application is implemented based on the control terminal of the stepping motor, and the control terminal of the stepping motor is configured to control the rotation of the stepping motor, so as to drive the feeding of the feeding mechanism in the test equipment.
[0141] The embodiment of the present application also discloses a computer readable storage medium.
[0142] A computer readable storage medium storing a computer program capable of being loaded by a processor and executing any one of the step motor control methods as described above.
[0143] The computer readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device; program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0144] It should be noted that in the above embodiments, the description of each embodiment has its emphasis, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0145] In several embodiments provided in the present application, it should be understood that the provided method, terminal and device can be implemented by other manners. For example, the above-described device embodiments are only schematic; for example, the division of a certain module is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0146] The above are the preferred embodiments of the present application, and are not intended to limit the protection scope of the present application, therefore: any equivalent changes made on the structure, shape, principle of the present application shall be covered within the protection scope of the present application.
Claims
1. A control method for a stepper motor, characterized in that, The control method includes: After power-on, a positioning control signal is output, and the stepper motor rotor is locked at the reference position based on the positioning control signal; Receive trigger signal; Based on the trigger signal, the output of the positioning control signal is stopped, and a rotation control signal is output. The stepper motor rotor rotates based on the rotation control signal. Obtain the output duration T of the rotation control signal; Determine whether the output duration T is equal to the preset output duration threshold. If so, stop outputting the rotation control signal and output the positioning control signal again. The positioning control signal is a PWM chopping signal, and the duty cycle of the positioning control signal satisfies the formula: Where, a is the duty cycle of the positioning control signal; n is the calculation coefficient of the duty cycle of the positioning control signal, and its value is less than 1; I m R is the winding current of the stepper motor; m U is the winding internal resistance of the stepper motor; U is the power supply voltage of the stepper motor.
2. The stepper motor control method according to claim 1, characterized in that: The rotation control signal is a PWM chopper signal, and the duty cycle of the rotation control signal satisfies the formula: Among them, a ' n is the duty cycle of the rotation control signal; ' The coefficient for calculating the duty cycle of the rotation control signal is greater than or equal to 1.
3. The stepper motor control method according to claim 2, characterized in that: The output rotation control signal specifically includes: The output duty cycle is a ' i The rotation control signal i; Obtain the output duration T of the rotation control signal i i ; Determine the output duration T i If the preset output duration threshold for the i-th time has been reached, then stop outputting the rotation control signal i. i takes values from 1 to m, where m is a natural number greater than 1, and satisfies the formula:
4. A stepper motor control method according to any one of claims 1-3, characterized in that: After the positioning control signal is output again, the process also includes: Receive the rotation angle increment of the stepper motor rotor; Determine whether the rotation angle increment is equal to the preset rotation angle increment threshold. If yes, output a completion signal; otherwise, output an alarm signal.
5. The stepper motor control method according to claim 4, characterized in that: After the output completion signal, the following is also included: Receive the trigger signal described below; The completion signal is cleared based on the trigger signal described below.
6. A control terminal for a stepper motor, characterized in that, The control terminal includes: The positioning control signal output module (12) is used to output a positioning control signal after the control terminal (10) is powered on, and the stepper motor rotor is locked at the reference position based on the positioning control signal. Trigger signal receiving module (11), used to receive trigger signals; A rotation control signal output module (13) is used to output a rotation control signal after the trigger signal receiving module (11) receives the trigger signal; the stepper motor rotor rotates based on the rotation control signal. The duration acquisition module (14) is used to acquire the output duration T of the rotation control signal; The judgment module (15) is used to determine whether the output duration T is equal to the preset output duration threshold. If so, the rotation control signal output module (13) stops outputting the rotation control signal, and the positioning control signal output module (12) outputs the positioning control signal again. The positioning control signal output by the positioning control signal output module (12) is a PWM chopper signal, and the duty cycle of the positioning control signal satisfies the formula: Where, a is the duty cycle of the positioning control signal; n1 is a calculation coefficient, with a value less than 1; I m R is the winding current of the stepper motor; m U is the internal resistance of the stepper motor windings; U is the power supply voltage of the stepper motor.
7. A control terminal for a stepper motor according to claim 6, characterized in that: The control terminal (10) also includes: Rotation angle increment receiving module (16) is used to receive the rotation angle increment of the stepper motor rotor; The judgment module (15) is also used to determine whether the rotation angle increment is equal to a preset rotation angle increment threshold. The completion signal output module (18) is used to output a completion signal when the rotation angle increment is equal to the rotation angle increment threshold. An alarm signal output module (17) is used to output an alarm signal when the rotation angle increment is not equal to the rotation angle increment threshold.
8. A feeding mechanism, characterized in that, The feeding mechanism includes: a command sending terminal (20), a stepper motor (30), a feeding tray (40), and an angle measuring device (50), as well as a control terminal (10) as described in claim 6 or 7; The instruction sending terminal (20) is used to output a trigger signal; The control terminal (10) is connected to the instruction sending terminal (20) and is used to receive the trigger signal and then output the positioning control signal and the rotation control signal in sequence. The control terminal (10) is connected to the stepper motor (30) and is used to control the stepper motor (30) to stop and rotate; the output shaft of the stepper motor (30) is connected to the feed tray (40) and is used to drive the feed tray (40) to rotate; the rotation angle measuring device (50) is connected to the stepper motor (30) and the control terminal (10) respectively, and is used to measure the rotation angle increment of the stepper motor (30) and output the rotation angle increment value to the control terminal (10).
9. A computer-readable storage medium, characterized in that: The computer program is stored that can be loaded by a processor and executed according to any one of claims 1 to 5.
Citation Information
Patent Citations
Electric motor controller for flow cnotrol device
CN1515971A
Device and method for fast position control of a hydraulic actuator
US20180274397A1