WO2020108468A1 - 步进电机的驱动方法及其驱动器以及计算机可读存储介质 - Google Patents
步进电机的驱动方法及其驱动器以及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2020108468A1 WO2020108468A1 PCT/CN2019/120861 CN2019120861W WO2020108468A1 WO 2020108468 A1 WO2020108468 A1 WO 2020108468A1 CN 2019120861 W CN2019120861 W CN 2019120861W WO 2020108468 A1 WO2020108468 A1 WO 2020108468A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- motor
- current
- preset
- speed
- running speed
- 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.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P8/00—Arrangements for controlling dynamo-electric motors rotating step by step
- H02P8/12—Control or stabilisation of current
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P8/00—Arrangements for controlling dynamo-electric motors rotating step by step
- H02P8/14—Arrangements for controlling speed or speed and torque
Definitions
- the invention relates to the technical field of motors, in particular to a driving method of a stepping motor, a driver thereof, and a computer-readable storage medium.
- Stepper motor is an open-loop control element stepper motor that converts electrical pulse signal into angular displacement or linear displacement.
- the main purpose of the present invention is to propose a driving method of a stepping motor and its driver and a computer-readable storage medium, aiming to realize the automatic adjustment of the output current of the stepping motor.
- the driving method of the stepper motor includes:
- the output current value of the motor is adjusted until the current running speed of the motor reaches the preset running speed.
- the step of adjusting the output current value of the motor until the current running speed of the motor reaches the preset running speed includes:
- the step of adjusting the output current value of the motor includes:
- the first preset current value is reduced on the current output current value of the motor.
- the step of adjusting the output current value of the motor until the current running speed of the motor reaches the preset running speed when the current running speed of the motor does not match the preset running speed includes:
- the step of adjusting the output current value of the motor includes:
- the first preset current value is added to the current output current value of the motor.
- the method further includes:
- adjusting the output current value of the motor until the current operating speed of the motor reaches the preset operating speed further includes:
- the current output current value of the motor is stored as the current storage data value of the motor.
- the invention also provides a driver for a stepper motor.
- the driver for the stepper motor includes:
- Speed sensor used to collect the running speed of the motor and output
- the driver of the stepper motor further includes a drive module and a motor interface, the input end of the drive module is connected to the processor, and the output end of the drive module is connected to the stepper motor via the motor interface.
- the present invention also provides a computer-readable storage medium on which a driver program for a stepper motor is stored, and the driver program for the stepper motor is executed by a processor to implement the stepper motor as described above Steps of the driving method.
- the driving method of the stepping motor of the present invention reads the current data value stored by the motor when receiving the current setting instruction to set the current data value stored by the motor as the current output current value of the motor, and uses the output current value Drive the motor to run; then obtain the current running speed of the motor and match the acquired current running speed of the motor with the preset running speed; when the current running speed of the motor matches the preset running speed successfully, control The motor runs at the current running speed; and when the current running speed of the motor fails to match the preset running speed, the output current value of the motor is adjusted until the current running speed of the motor reaches the preset running speed, and then the motor is controlled to Run at current operating speed.
- the invention realizes the automatic adjustment of the output current of the stepper motor without manual adjustment by the user, thereby avoiding the need for the user to set repeatedly, which brings inconvenience to the user to use the motor during the cumbersome setting process, and the invention is beneficial to improve the user's use Convenience, thereby solving the problem of inconvenience in operation due to the need to manually adjust the current to the appropriate gear.
- the present invention solves the problem that the current is not changed correspondingly according to the running speed of the motor, resulting in an unreasonable current setting, which prevents the motor from working properly and even damages the motor.
- FIG. 1 is a schematic flowchart of an embodiment of a method for driving a stepper motor of the present invention
- FIG. 2 is a detailed flowchart of an embodiment of step S500 in the driving method of the stepper motor of FIG. 1;
- FIG. 3 is a detailed flowchart of another embodiment of step S500 in the driving method of the stepper motor of FIG. 1;
- FIG. 4 is a schematic flowchart of another embodiment of the driving method of the stepping motor of the present invention.
- FIG. 5 is a schematic flowchart of another embodiment of the driving method of the stepping motor of the present invention.
- FIG. 6 is a schematic diagram of functional modules of an embodiment of the driver of the stepping motor of the present invention.
- FIG. 7 is a schematic structural diagram of a driver of a stepper motor in a hardware operating environment according to an embodiment of the present invention.
- the directional indicator is only used to explain a specific posture (as shown in the drawings) The relative positional relationship, movements, etc. of the components below, if the specific posture changes, then the directional indication changes accordingly.
- first”, “second”, etc. are for descriptive purposes only, and cannot be understood as instructions or hints Its relative importance or implicitly indicates the number of technical features indicated.
- the features defined with “first” and “second” may include at least one of the features either explicitly or implicitly.
- the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of those skilled in the art to realize. When the combination of technical solutions contradicts or cannot be realized, it should be considered that the combination of such technical solutions does not exist , Nor within the protection scope claimed by the present invention.
- the invention provides a driving method of a stepping motor.
- Stepper motor is an open-loop control element stepper motor that converts electrical pulse signal into angular displacement or linear displacement.
- the output value of the current is mostly set manually, and the output current is mostly set and adjusted by the dip switch. For different sizes of loads, the current needs to be manually adjusted to the appropriate gear. The speed is changed accordingly.
- stepper motor Since the stepper motor is running at a variable speed, when running at a low speed, because the pulse frequency is low, the motor will be turned on for a long time, and a larger current will flow, which will be compared It is easy to cause the motor and drive circuit chip to overheat or even burn; when the motor is running at high speed, if the current setting is insufficient, the torque provided by the stepper motor is not enough to push the load, resulting in out-of-step jams. Therefore, it is necessary to test and verify the set current before normal operation.
- the driving method of the stepping motor includes:
- Step S100 When receiving the current setting instruction, read the current data value stored by the motor;
- the motor drives different loads, the current and speed required by the motor are different. That is to say, if the motor replaces the load, the current needs to be reset. If the load is not replaced, the motor It can run according to the current parameter set last time. Therefore, in this embodiment, when the current setting instruction is received, it enters the current setting mode. If the current setting instruction is not received, it can be operated according to the operating parameters of the previous operation when the motor is powered on.
- the current setting command may be a key command input by a user, which may specifically be output to the driver of the motor through the input interface of the host computer, so that when the driver of the motor receives the command, the current setting mode is entered.
- the current data value stored by the motor can be the initial value of the motor, or the output current value of the motor when the power was last lost.
- Step S200 Set the current data value stored by the motor to the current output current value of the motor, and drive the motor to run with the output current value;
- the speed and stop position of the motor depend on the frequency and number of pulse signals.
- the stepper driver When the stepper driver receives a pulse signal, it drives the stepper motor to rotate a fixed angle in the set direction. It is "step angle", and its rotation runs step by step at a fixed angle.
- the stepper motor is usually controlled by the number of pulses to control the angular displacement to achieve positioning.
- the subdivision control of the stepper motor is essentially through the control of the current in the excitation winding of the stepper motor to make the stepper motor internal
- the resultant magnetic field is a uniform circular rotating magnetic field.
- the magnitude of the synthetic magnetic field vector determines the magnitude of the stepping motor's rotating torque, and the angle between two adjacent synthetic magnetic field vectors determines the magnitude of the step angle.
- the speed and acceleration of the motor can be controlled by controlling the pulse frequency, so as to achieve the purpose of speed regulation. That is, by setting an appropriate output current, the current running speed of the motor can be adjusted to adapt to different loads.
- the stored current data value is used as the current output current of the motor, and the motor is driven to run according to the output current value.
- Step S300 Obtain the current operating speed of the motor, and match the acquired current operating speed of the motor with a preset operating speed;
- the current running speed of the motor can be obtained by providing a speed measuring tool such as an encoder and a Hall speed sensor on the motor. Each load corresponds to a better running speed, which can be a fixed value or a speed range. In this embodiment, the current running speed of the motor can be matched with the preset running speed to Determine whether the current output current setting of the motor is reasonable.
- Step S400 When the current operating speed of the motor matches the preset operating speed successfully, control the motor to run at the current operating speed;
- Step S500 When the current operating speed of the motor fails to match the preset operating speed, adjust the output current value of the motor until the current operating speed of the motor reaches the preset operating speed.
- the running speed setting of the motor is unreasonable. Therefore, it is necessary to continue to adjust the output current, and continue to obtain the current operating speed of the adjusted motor, and then match the current speed of the adjusted motor with the preset operating speed until the current operating speed of the motor reaches the preset Running speed, that is, until the two match successfully. After the matching is successful, the running speed of the adjusted motor is taken as the current running speed, and then the motor is controlled to run according to the current running speed.
- the driving method of the stepping motor of the present invention reads the current data value stored by the motor when receiving the current setting instruction to set the current data value stored by the motor as the current output current value of the motor, and uses the output current value Drive the motor to run; then obtain the current running speed of the motor and match the acquired current running speed of the motor with the preset running speed; when the current running speed of the motor matches the preset running speed successfully, control The motor runs at the current running speed; and when the current running speed of the motor fails to match the preset running speed, the output current value of the motor is adjusted until the current running speed of the motor reaches the preset running speed, and then the motor is controlled to Run at current operating speed.
- the invention realizes the automatic adjustment of the output current of the stepper motor without manual adjustment by the user, thereby avoiding the need for the user to set repeatedly, which brings inconvenience to the user to use the motor during the cumbersome setting process, and the invention is beneficial to improve the user's use Convenience, thereby solving the problem of inconvenience in operation due to the need to manually adjust the current to the appropriate gear.
- the present invention solves the problem that the current is not changed correspondingly according to the running speed of the motor, resulting in an unreasonable current setting, which prevents the motor from working properly and even damages the motor.
- the output current value of the motor is adjusted until the current running speed of the motor reaches the preset running
- the speed steps include:
- Step S511 When the current operating speed of the motor is greater than the preset operating speed, lower the output current value of the motor, and after a preset time, return to execute the motor operating speed within the preset duration And matching the acquired current operating speed of the motor with a preset operating speed;
- Step S512 When the current running speed of the motor is less than or equal to the preset running speed, it is determined that the current running speed of the motor matches the preset running speed successfully, and the motor is controlled to run at the current running speed.
- the preset speed can be set according to the load, which is not limited here, and the preset speed can be a fixed value or a preset range, when the load driven by the motor is changed from a large load to a small Under load, the motor running speed needs to be reduced accordingly, so the output current value of the motor needs to be adjusted down to reduce the current running speed to the running speed suitable for the current load.
- the output current value may be set to multiple gears, that is, when the current operating speed of the motor is greater than the preset operating speed, the current output current value of the motor is adjusted down by one current gear Until the current running speed of the motor is greater than or equal to the preset running speed. Or, reduce the first preset current value on the current output current value.
- the motor is controlled to operate according to the current output current, otherwise continue to adjust
- the output current of the air conditioner decreases the first preset current value successively until the running speed of the motor in the current running state matches the preset running speed successfully.
- the speed difference between the two may be calculated, and then the output current value of the motor may be compensated according to the speed difference.
- the first preset current value can be set to 0.5V, 0.3V, 0.2V and other current values, in this embodiment can be selected as 0.5V, that is, when the current storage value is 2V, when sequentially lowered, the output current is 1.5V, 1V, 0.5V successively drop.
- the preset time may be set to 1 to 5s, and in this embodiment, 3s may be selected.
- the running speed within a certain period of time may be sampled, and the running speed within a certain period of time may be processed to obtain the current running speed.
- the running speed of the sampling may be averaged to increase sampling Accuracy.
- the sampling period may be set to 1 to 5s, and in this embodiment, 3s may be selected.
- the output current value of the motor is adjusted until the current running speed of the motor reaches the preset running
- the speed steps include:
- Step 521 When the current operating speed of the motor is less than the preset operating speed, increase the output current value of the motor, and after a preset time, return to execute the motor operating speed within the preset duration And matching the acquired current operating speed of the motor with a preset operating speed until the current operating speed of the motor is less than or equal to the preset operating speed;
- the preset speed can be set according to the load, which is not limited here, and the preset speed can be a fixed value or a preset range, when the load driven by the motor is changed from a large load to a small Under load, the motor running speed needs to be reduced accordingly, so the output current value of the motor needs to be adjusted down to reduce the current running speed to the running speed suitable for the current load.
- the output current value may be set to multiple gears, that is, when the current operating speed of the motor is less than the preset operating speed, the current output current value of the motor is increased by one current gear Until the current operating speed of the motor is greater than or equal to the preset operating speed.
- the first preset current value is added to the current output current value.
- the motor is controlled to operate according to the current output current, otherwise continue to adjust
- the output current of the air conditioner decreases the first preset current value successively until the running speed of the motor in the current running state matches the preset running speed successfully.
- the speed difference between the two may be calculated, and then the output current value of the motor may be compensated according to the speed difference.
- the first preset current value can be set to 0.5V, 0.3V, 0.2V and other current values, in this embodiment can be selected as 0.5V, that is, when the current storage value is 2V, when sequentially lowered, the output current is 1.5V, 1V, 0.5V successively drop.
- the preset time may be set to 1 to 5s, and in this embodiment, 3s may be selected.
- the running speed within a certain period of time may be sampled, and the running speed within a certain period of time may be processed to obtain the current running speed.
- the running speed of the sampling may be averaged to increase sampling Accuracy.
- the sampling period may be set to 1 to 5s, and in this embodiment, 3s may be selected.
- Step 522 When the current operating speed of the motor is greater than or equal to the preset operating speed, determine that the current operating speed of the motor matches the preset operating speed successfully, and control the motor to operate at the current operating speed.
- the current installation current of the motor can be used to control the current installation of the motor The current output current is running.
- the method further includes:
- Step 600 Obtain the output current value of the motor, and output an alarm signal when the current output current value of the motor is greater than the preset current threshold.
- this embodiment in order to avoid the ultra-high motor maximum current threshold during current regulation, this embodiment also sets an overcurrent detection to detect the current output current value during the current self-increment process, if it exceeds the maximum current threshold, Then control the motor to stop working, and output the corresponding alarm signal to avoid excessive current to damage the motor and driver, and ensure the safe use of the motor and driver.
- the maximum current threshold can be set to the rated current of the motor.
- the output current value of the motor is adjusted until the current running speed of the motor reaches the preset running speed
- Step 700 When the current running speed of the motor reaches the preset running speed, store the current output current value of the motor as the current storage data value of the motor.
- the current output current value of the adjusted motor is stored as the current storage data value of the motor for power-off storage, so set, if the load is not replaced, the next time the power is turned on, the current set according to the last time
- the parameters are operated, that is, the drive can directly read the current speed without manual intervention or manual setting, which can improve the convenience of the stepper motor.
- the current output current value of the adjusted motor can be stored in the memory together with the initial value, so that when the motor is driven, the motor can choose the output current value read according to different loads, adaptively drive the load, or The current output current value of the adjusted motor can be overwritten with the initial value.
- the invention also proposes a driver for a stepper motor.
- the driver of the stepper motor includes:
- the speed sensor 1006 may be a sensor that can sample a speed, such as an encoder or a Hall speed sensor 1006.
- the processor 1001 is connected to the memory 1005 and the speed sensor 1006 respectively.
- the driver of the stepper motor further includes a serial communication unit 1009.
- the serial communication unit 1009 mainly completes the communication between the processor 1001 and the PC host computer, and receives the PC host computer.
- the corresponding parameters (speed, direction, motion mode, number of rotations, etc.) sent by the machine are modified to realize the function of modifying the corresponding parameters in real time; the processor 1001 receives the instructions of the serial communication unit to modify the corresponding parameters (speed, direction, motion mode) , Number of rotations, etc.); the serial communication unit 1009 can also feed back data to the PC host computer.
- the memory 1005 may be implemented by one or more of non-volatile memory 1005 such as an electrically erasable programmable memory 1005, flash memory, and phase change memory 1005.
- the memory 1005 is used to store the output current value at the initial setting, and store the current output current value of the adjusted motor as the current storage data value of the motor for power-off storage.
- the processor 1001 may be implemented by a microprocessor 1001 such as a single-chip microcomputer, DSP, and FPGA.
- Those skilled in the art can integrate various hardware circuits and software programs or algorithms in the processor 1001 to use various interfaces and The circuit connects the various parts of the entire driver, executes various functions of the driver and processes data by running or executing software programs and/or modules in the processor 1001, and calling data in the processor 1001, thereby performing overall monitoring of the motor driver And execute the driver program for the stepper motor as described above.
- the driving device of the stepping motor of the present invention reads the current data value stored by the motor in the memory 1005 when the processor 1001 receives the current setting instruction to set the current data value stored by the motor to the current output current value of the motor, and Drive the motor to run with the output current value; then obtain the current running speed of the motor, and match the obtained current running speed of the motor with a preset running speed; at the current running speed of the motor and the preset running When the speed matching is successful, the motor is controlled to run at the current running speed; and when the current running speed of the motor fails to match the preset running speed, the output current value of the motor is adjusted until the current running speed of the motor reaches the preset running Speed, and then control the motor to run at the current running speed.
- the invention realizes the automatic adjustment of the output current of the stepper motor without manual adjustment by the user, thereby avoiding the need for the user to set repeatedly, which brings inconvenience to the user in using the motor during the cumbersome setting process. Convenience, thereby solving the problem of inconvenience in operation due to the need to manually adjust the current to the appropriate gear.
- the present invention solves the problem that the current is not changed correspondingly according to the running speed of the motor, resulting in an unreasonable current setting, which prevents the motor from working properly and even damages the motor.
- FIG. 7 is a schematic structural diagram of a terminal of a hardware operating environment according to an embodiment of the present invention, that is, a driver of a stepping motor.
- the terminal may be a server, a PC, or a smart phone, tablet computer, e-book reader, MP3 (Moving Pictures Experts Group Audio Layer III, motion picture expert compression standard audio level 3) player, MP4 (Moving Picture, Experts, Group, Audio, Layer IV, motion picture expert compression standard audio level 3) Players, portable computers and other mobile terminal devices with display functions.
- MP3 Motion Pictures Experts Group Audio Layer III, motion picture expert compression standard audio level 3
- MP4 Moving Picture, Experts, Group, Audio, Layer IV, motion picture expert compression standard audio level 3
- portable computers and other mobile terminal devices with display functions.
- the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
- the communication bus 1002 is used to implement connection communication between these components.
- the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface and a wireless interface.
- the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
- the memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as a disk memory.
- the memory 1005 may optionally be a storage device independent of the foregoing processor 1001.
- the terminal may further include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and so on.
- sensors such as light sensors, motion sensors and other sensors.
- the light sensor may include an ambient light sensor and a proximity sensor, where the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and/or when the mobile terminal moves to the ear Backlight.
- the gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when at rest.
- the mobile terminal can be used for applications that recognize the posture of mobile terminals (such as horizontal and vertical screen switching, Related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tap), etc.
- the mobile terminal can also be configured with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. No longer.
- terminal structure shown in FIG. 6 does not constitute a limitation on the terminal, and may include more or fewer components than those illustrated, or combine certain components, or arrange different components.
- the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a stepper motor drive.
- the network interface 1004 is mainly used to connect to the back-end server and perform data communication with the back-end server;
- the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client;
- the processor 1001 can be used to call the driver program of the stepper motor stored in the memory 1005, and execute the driver program of the stepper motor as described above, so as to realize the driving method of the stepper motor as described above.
- the embodiments of the driving method are not repeated here one by one.
- the driver of the stepper motor further includes a driving module 1007 and a motor interface 1008.
- the input end of the driving module 1007 is connected to the processor 1001.
- the output end of the driving module 1007 is connected to the stepping motor through the motor interface 1008.
- the input end of the driving module 1007 is connected to the processor 1001, and the output end is connected to the coil of the stepper motor through the motor interface 1008.
- the driving module 1007 is mainly used to receive the stepping motor control signal transmitted from the processor 1001, and correspondingly generate a control command that the stepping motor can recognize according to the stepping motor control signal, and then, the driving module 1007 steps through the motor interface 1008
- the motor coil outputs the corresponding generated control commands to drive the motor to work.
- the methods in the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware, but in many cases the former is better Implementation.
- the technical solution of the present invention can be embodied in the form of a software product in essence or part that contributes to the existing technology, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above , Disk, CD-ROM), including several instructions to enable a terminal device (which can be a mobile phone, computer, server, motion controller, or network device, etc.) to perform the methods described in various embodiments of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Control Of Stepping Motors (AREA)
Abstract
一种步进电机的驱动方法及其驱动器以及计算机可读存储介质,该步进电机的驱动方法包括:在接收到电流设置指令时,读取电机存储的电流数据值;将电机存储的电流数据值设置为电机当前输出电流值,并以输出电流值驱动电机运行;获取电机的当前运行速度,并将获取的电机的当前运行速度与预设运行速度进行匹配;在电机的当前运行速度与预设运行速度匹配成功时,控制电机以当前运行速度运转;在电机的当前运行速度与预设运行速度匹配失败时,调节电机的输出电流值,直至电机当前的运行速度达到预设运行速度,从而实现了步进电机输出电流的自动调节,有利于提高用户的使用便利性。
Description
本发明涉及电机技术领域,特别涉及一种步进电机的驱动方法及其驱动器以及计算机可读存储介质。
步进电机是将电脉冲信号转变为角位移或线位移的开环控制元步进电机件。
在电机运行时,大多通过手动来设定的电流的输出值,并且大多通过拨码开关手动设置调节输出电流,对于不同大小的负载,需要手动调节电流到合适的档位,过程比较繁琐,给电机的使用带来了极大的不便。
发明内容
本发明的主要目的是提出一种步进电机的驱动方法及其驱动器以及计算机可读存储介质,旨在实现步进电机输出电流的自动调节。
为实现上述目的,本发明提出一种步进电机的驱动方法,所述步进电机的驱动方法包括:
在接收到电流设置指令时,读取电机存储的电流数据值;
将所述电机存储的电流数据值设置为电机当前输出电流值,并以所述输出电流值驱动电机运行;
获取电机的当前运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配;
在所述电机的当前运行速度与预设运行速度匹配成功时,控制电机以当前运行速度运转;
在所述电机的当前运行速度与预设运行速度匹配失败时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度。
可选地,所述在所述电机的当前运行速度与预设运行速度不匹配时,调 节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度的步骤包括:
当所述电机的当前运行速度大于所述预设运行速度时,调低所述电机的输出电流值,并在预设时间后,返回执行所述获取预设时长内的电机运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配的步骤;
当所述电机的当前运行速度小于或者等于所述预设运行速度时,则确定所述电机的当前运行速度与预设运行速度匹配成功,并控制电机以当前运行速度运转。
可选地,所述当所述电机的当前运行速度大于所述预设运行速度时,调节所述电机的输出电流值的步骤包括:
当所述电机的当前运行速度大于所述预设运行速度时,在电机当前的输出电流值上降低第一预设电流值。
可选地,所述在所述电机的当前运行速度与预设运行速度不匹配时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度的步骤包括:
当所述电机的当前运行速度小于所述预设运行速度时,调高所述电机的输出电流值,并在预设时间后,返回执行所述获取预设时长内的电机运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配的步骤,直至所述电机的当前运行速度小于或等于所述预设运行速度;
当所述电机的当前运行速度大于或等于所述预设运行速度时,则确定所述电机的当前运行速度与预设运行速度匹配成功,并控制电机以所述当前运行速度运转。
可选地,所述当所述电机的当前运行速度小于所述预设运行速度时,调节所述电机的输出电流值的步骤包括:
当所述电机的当前运行速度小于所述预设运行速度时,在电机当前的输出电流值上增加第一预设电流值。
可选地,在所述当所述电机的当前运行速度大于或等于所述预设运行速度时,控制电机以当前运行速度的步骤之后还包括:
获取电机的输出电流值,在电机的当前的输出电流值大于预设电流阈值时,输出报警信号。
可选地,在所述在所述电机的当前运行速度与预设运行速度不匹配时,调节电机的输出电流值,直至电机当前的运行速度达到预设运行速度的步骤之后还包括:
在电机当前的运行速度达到预设运行速度时,将电机当前的输出电流值存储为电机的电流存储数据值。
本发明还提出一种步进电机的驱动器,所述步进电机的驱动器包括:
速度传感器,用于采集电机的运行速度,并输出;
存储器、处理器及存储在所述存储器上并可在所述处理器上运行的步进电机的驱动程序,所述处理器执行所述步进电机的驱动程序时实现如上所述的步进电机的驱动方法。
可选地,所述步进电机的驱动器还包括驱动模块及电机接口,所述驱动模块的输入端与所述处理器连接,所述驱动模块的输出端经电机接口接入步进电机。
本发明还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有步进电机的驱动程序,所述步进电机的驱动程序被处理器执行时实现如上所述的步进电机的驱动方法的步骤。
本发明步进电机的驱动方法在接收到电流设置指令时,读取电机存储的电流数据值,以将所述电机存储的电流数据值设置为电机当前输出电流值,并以所述输出电流值驱动电机运行;然后再获取电机的当前运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配;在所述电机的当前运行速度与预设运行速度匹配成功时,控制电机以当前运行速度运转;而在所述电机的当前运行速度与预设运行速度匹配失败时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度,再控制电机以当前运行速度运转。本发明实现了步进电机输出电流的自动调节,无需用户手动调整,从而可以避免用户需要反复设定,在繁琐的设定的过程给用户使用电机带来不便,本发明有利于提高用户的使用便利性,从而解决了需要手动调节电流到合适的档位,造成操作不便的问题。此外,本发明解决了电流未根 据电机运行速度做相应的改变,而导致电流设置的不合理而使电机无法正常工作,甚至损坏电机的问题。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图示出的结构获得其他的附图。
图1为本发明步进电机的驱动方法一实施例的流程示意图;
图2为图1步进电机的驱动方法中步骤S500一实施例的细化流程示意图;
图3为图1步进电机的驱动方法中步骤S500另一实施例的细化流程示意图;
图4为本发明步进电机的驱动方法另一实施例的流程示意图;
图5为本发明步进电机的驱动方法又一实施例的流程示意图;
图6为本发明步进电机的驱动器一实施例的功能模块示意图;
图7是本发明实施例方案涉及的硬件运行环境的步进电机的驱动器的结构示意图。
附图标号说明:
| 标号 | 名称 | 标号 | 名称 |
| 1001 | 处理器 | 1006 | 速度传感器 |
| 1002 | 通信总线 | 1007 | 驱动模块 |
| 1003 | 用户接口 | 1008 | 电机接口 |
| 1004 | 网络接口 | 1009 | 串口通信单元 |
| 1005 | 存储器 |
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
需要说明,若本发明实施例中有涉及方向性指示(诸如上、下、左、右、前、后……),则该方向性指示仅用于解释在某一特定姿态(如附图所示)下各部件之间的相对位置关系、运动情况等,如果该特定姿态发生改变时,则该方向性指示也相应地随之改变。
另外,若本发明实施例中有涉及“第一”、“第二”等的描述,则该“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本发明要求的保护范围之内。
本发明提出一种步进电机的驱动方法。
步进电机是将电脉冲信号转变为角位移或线位移的开环控制元步进电机件。在电机运行时,大多通过手动来设定的电流的输出值,并且大多通过拨码开关手动设置调节输出电流,对于不同大小的负载,需要手动调节电流到合适的档位,如果没有根据电机运行速度做相应的改变,由于步进电机是在变速度运行,当运行在低速时,由于脉冲频率较低,则电机某一相导通的时间较长,会流经较大电流,这会比较容易造成电机及驱动电路芯片过热甚至烧毁;而当电机运行在高速时,若电流设定不足,则步进电机所提供的力矩又不足以推动负载,造成失步卡顿等现象。因此还需要对设定的电流进行进行测试验证后,才能正常运行。
并且,当负载发生较大变化时,需要再次手动调节到其他档位,过程比较繁琐,并且由于很多设备追求小型化,外观设计等因素,在结构上将驱动器与电机及外壳等直接整合为一体,导致操作人员无法便利的接触到驱动器,给手动操作带来很大麻烦,严重的可能直接导致设备停机很长时间。
为了解决上述问题,参照图1,在本发明一实施例中,该步进电机的驱动方法包括:
步骤S100、在接收到电流设置指令时,读取电机存储的电流数据值;
可以理解的是,电机在驱动不同大小的负载时,其所要求的电流及转速是不同的,也就是说,若电机在更换负载后,其电流需要重新设置,若未更换负载,则电机则可以根据上一次设置的电流参数进行运转。因此,本实施例在接收到电流设置指令时,则进入电流设置模式,若未接收到电流设置指令,则可以在电机上电时,按照上一次工作时的工作参数运转。本实施例中,电流设置指令可以是用户输入的按键指令,其具体可以是通过上位机的输入接口输出至电机的驱动器,从而在电机的驱动器接收到该指令时,进入电流设置模式。电机存储的电流数据值可以电机的初始值,也可以是上一次掉电时,电机的输出电流值。
步骤S200、将所述电机存储的电流数据值设置为电机当前输出电流值,并以所述输出电流值驱动电机运行;
本实施例中,电机的转速、停止的位置取决于脉冲信号的频率和脉冲数,当步进驱动器接收到一个脉冲信号,它就驱动步进电机按设定的方向转动一个固定的角度,称为“步距角”,它的旋转是以固定的角度一步一步运行的。步进电机通常是通过控制脉冲个数来控制角位移量来实现定位的,步进电机的细分控制,从本质上讲是通过步进电机的励磁绕组中电流的控制,使步进电机内部的合成磁场为均匀的圆形旋转磁场。合成磁场矢量的幅值决定了步进电机旋转力矩的大小,相邻两个合成磁场矢量之间的夹角大小决定了步距角的大小。同时可以通过控制脉冲频率来控制电机转动的速度和加速度,从而达到调速的目的。也即,通过设置合适的输出电流,即可调整电机的当前运行速度,以适应不同的负载。在电机运行前,将存储的电流数据值作为电机的当前输出电流,并根据该输出电流值驱动电机运转。
步骤S300、获取电机的当前运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配;
本实施例中,可以通过在电机上设置编码器、霍尔转速传感器等测量速度的检测工具来实现对电机当前运行速度的获取。每一个负载分别对应有一较佳的运行速度,该较佳的运行速度可以是一个定值,也可以是一个速度范 围,本实施例可以将电机当前的运行速度与预设运行速度进行匹配,以确定当前电机的输出电流设置是否合理。
步骤S400、在所述电机的当前运行速度与预设运行速度匹配成功时,控制电机以当前运行速度运转;
本实施例中,在当前运行速度与预设运行速度的值相等,或者在当前运行速度处于预设的速度范围时,则可以确定电机的运行速度较佳。因此,此时无需再进行调节,即可以控制电机按照当前的运行速度运行。
步骤S500、在所述电机的当前运行速度与预设运行速度匹配失败时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度。
本实施例中,在当前运行速度与预设运行速度的值不相等,或者在当前运行速度不处于预设的速度范围时,则可以确定电机的运行速度设置不合理。因此,需要继续对输出电流进行调节,并继续获取调节后的电机的当前运行速度,再对调节后的电机的当前速度与预设运行速度进行匹配,直至电机当前的运行速度达到所述预设运行速度,也即直至两者匹配成功。并在匹配成功后,将调节后的电机的运行速度作为当前的运行速度,再控制电机按照当前的运行速度运行。
本发明步进电机的驱动方法在接收到电流设置指令时,读取电机存储的电流数据值,以将所述电机存储的电流数据值设置为电机当前输出电流值,并以所述输出电流值驱动电机运行;然后再获取电机的当前运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配;在所述电机的当前运行速度与预设运行速度匹配成功时,控制电机以当前运行速度运转;而在所述电机的当前运行速度与预设运行速度匹配失败时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度,再控制电机以当前运行速度运转。本发明实现了步进电机输出电流的自动调节,无需用户手动调整,从而可以避免用户需要反复设定,在繁琐的设定的过程给用户使用电机带来不便,本发明有利于提高用户的使用便利性,从而解决了需要手动调节电流到合适的档位,造成操作不便的问题。此外,本发明解决了电流未根据电机运行速度做相应的改变,而导致电流设置的不合理而使电机无法正常工作,甚至损坏电机的问题。
参照图2,在一可选实施例中,所述在所述电机的当前运行速度与预设运行速度不匹配时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度的步骤包括:
步骤S511、当所述电机的当前运行速度大于所述预设运行速度时,调低所述电机的输出电流值,并在预设时间后,返回执行所述获取预设时长内的电机运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配的步骤;
步骤S512、当所述电机的当前运行速度小于或者等于所述预设运行速度时,则确定所述电机的当前运行速度与预设运行速度匹配成功,并控制电机以当前运行速度运转。
本实施例中,预设速度可以根据负载进行设置,此处不做限定,并且该预设速度可以是一个定值,也可以是一个预设范围,当电机驱动的负载从大负载更换为小负载时,此时电机运行的速度需要随之减小,因此此时需要将电机的输出电流值调低,以将当前运行速度降低至适合当前负载的运行速度。本实施例中,可以将输出电流值设置为多个档位,也即在当所述电机的当前运行速度大于所述预设运行速度时,在电机当前的输出电流值上调低一个电流档位,直至电机的当前运行速度大于或等于所述预设运行速度。或者,在当前输出电流值上降低第一预设电流值。待预设时间后获取调整后的电机运行速度,将调整后的当前运行速度与预设运行速度进行匹配,若小于或等于预设运行速度时,则控制电机按照当前输出电流运转,否则继续调整空调的输出电流也即逐次降低第一预设电流值,直至电机当前运行状态下的运行速度与预设运行速度匹配成功。当然在其他实施例中,也可以在电机的当前运行速度与运行速度不匹配时,计算两者的速度差,再根据该速度差补偿电机的输出电流值。
其中,第一预设电流值可以设置为0.5V,0.3V,0.2V等电流值,本实施例可选为0.5V,也即当电流存储值为2V时,逐次调低时,输出电流以1.5V,1V,0.5V逐次下降。直至电机的当前速度与预设运行速度匹配。本实施例中,在预设时间后,也即待电机稳定运行后,再获取电机运行速度,以提高采样的准确性。本实施例中,预设时间可以设置为1~5s,本实施例可选为3s。
在获取电机的当前运行速度时,可以是采样一段时间内的运行速度,并 将一定时间内的运行速度进行处理后,获得当前运行速度,例如可以对采样的运行速度进行求平均,以提高采样的准确率。本实施例中,该采样的时间段可以设置为1~5s,本实施例可选为3s。
参照图3,在一可选实施例中,所述在所述电机的当前运行速度与预设运行速度不匹配时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度的步骤包括:
步骤521、当所述电机的当前运行速度小于所述预设运行速度时,调高所述电机的输出电流值,并在预设时间后,返回执行所述获取预设时长内的电机运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配的步骤,直至所述电机的当前运行速度小于或等于所述预设运行速度;
本实施例中,预设速度可以根据负载进行设置,此处不做限定,并且该预设速度可以是一个定值,也可以是一个预设范围,当电机驱动的负载从大负载更换为小负载时,此时电机运行的速度需要随之减小,因此此时需要将电机的输出电流值调低,以将当前运行速度降低至适合当前负载的运行速度。本实施例中,可以将输出电流值设置为多个档位,也即在当所述电机的当前运行速度小于所述预设运行速度时,在电机当前的输出电流值上调高一个电流档位,直至电机的当前运行速度大于或等于所述预设运行速度。或者,在当前输出电流值上增加第一预设电流值。待预设时间后获取调整后的电机运行速度,将调整后的当前运行速度与预设运行速度进行匹配,若大于或等于预设运行速度时,则控制电机按照当前输出电流运转,否则继续调整空调的输出电流也即逐次降低第一预设电流值,直至电机当前运行状态下的运行速度与预设运行速度匹配成功。当然在其他实施例中,也可以在电机的当前运行速度与运行速度不匹配时,计算两者的速度差,再根据该速度差补偿电机的输出电流值。
其中,第一预设电流值可以设置为0.5V,0.3V,0.2V等电流值,本实施例可选为0.5V,也即当电流存储值为2V时,逐次调低时,输出电流以1.5V,1V,0.5V逐次下降。直至电机的当前速度与预设运行速度匹配。本实施例中,在预设时间后,也即待电机稳定运行后,再获取电机运行速度,以提高采样的准确性。本实施例中,预设时间可以设置为1~5s,本实施例可选为3s。
在获取电机的当前运行速度时,可以是采样一段时间内的运行速度,并将一定时间内的运行速度进行处理后,获得当前运行速度,例如可以对采样的运行速度进行求平均,以提高采样的准确率。本实施例中,该采样的时间段可以设置为1~5s,本实施例可选为3s。
步骤522、当所述电机的当前运行速度大于或等于所述预设运行速度时,则确定所述电机的当前运行速度与预设运行速度匹配成功,并控制电机以所述当前运行速度运转。
当调整后的电机的当前运行速度与预设运行速度匹配成功时,则可以确定在当前的输出电流能够较佳的驱动负载工作,此时则可以按照当前的电机输出电流,控制电机的当前安装当前的输出电流运转。
参照图4,在一可选实施例中,在所述当所述电机的当前运行速度大于或等于所述预设运行速度时,控制电机以当前运行速度的步骤之后还包括:
步骤600、获取电机的输出电流值,在电机的当前的输出电流值大于预设电流阈值时,输出报警信号。
本实施例中,为了避免电流调节时,超高电机的最大电流阀值,本实施例还设置过流检测,以在电流自增过程中,检测当前的输出电流值,若超过最大电流阈值,则控制电机停止工作,并输出相应的报警信号,以避免电流过大而损坏电机及驱动器,保证电机及驱动器的使用安全。其中,最大电流阈值可以设置为电机的额定电流。
参照图5,在一可选实施例中,在所述在所述电机的当前运行速度与预设运行速度不匹配时,调节电机的输出电流值,直至电机当前的运行速度达到预设运行速度的步骤之后还包括:
步骤700、在电机当前的运行速度达到预设运行速度时,将电机当前的输出电流值存储为电机的电流存储数据值。
本实施例中,将调节好后的电机当前的输出电流值存储为电机的电流存储数据值进行掉电存储,如此设置,若未更换负载,则可以在下一次开机时,根据上一次设置的电流参数进行运转,也即驱动器可以直接读取当前的速度,无需人工干预,或者再手动设置,从而可以提高步进电机的便利性。其中, 调节好后的电机当前的输出电流值可以与初始值一起存储在存储器中,如此,在电机驱动时,电机可以根据不同的负载选择读取的输出电流值,自适应驱动负载,或者将该调节好后的电机当前的输出电流值覆盖初始值均可。
本发明还提出一种步进电机的驱动器。
参照图6和图7,在本发明一实施例中,所述步进电机的驱动器包括:
速度传感器1006,用于采集电机的运行速度,并输出;
存储器1005、处理器1001及存储在所述存储器1005上并可在所述处理器1001上运行的步进电机的驱动程序,所述处理器1001执行所述步进电机的驱动程序时实现如上所述的步进电机的驱动方法。
本实施例中,速度传感器1006可以是编码器、霍尔速度传感器1006等可以采样速度的传感器。处理器1001分别与存储器1005、速度传感器1006连接,在一些实施例中,步进电机的驱动器还包括串口通讯单元1009,通过串口通讯单元1009主要完成处理器1001与PC上位机通信,接收PC上位机所发送的相应参数(速度、方向、运动模式、旋转圈数等)修改命令,实现实时修改相应参数的功能;处理器1001接收串口通信单元的指令修改相应的参数(速度、方向、运动模式、旋转圈数等);串口通讯单元1009还可以给PC上位机反馈数据。
本实施例中,存储器1005可以采用电可擦写可编程存储器1005、闪存、相变存储器1005等非易失性存储器1005中一种或多种来实现。存储器1005用于存储初始设置时的输出电流值,以及将调节好后的电机当前的输出电流值存储为电机的电流存储数据值进行掉电存储。本实施例中,处理器1001可以采用单片机、DSP及FPGA等微处理器1001来实现,本领域的技术人员能够通过在处理器1001中集成一些硬件电路和软件程序或算法,利用各种接口和线路连接整个驱动器的各个部分,通过运行或执行处理器1001内的软件程序和/或模块,以及调用处理器1001内的数据,执行驱动器的各种功能和处理数据,从而对电机驱动器进行整体监控,并执行如上所述的步进电机的驱动程序。
本发明步进电机的驱动装置在处理器1001接收到电流设置指令时,读取存储器1005内电机存储的电流数据值,以将所述电机存储的电流数据值设置 为电机当前输出电流值,并以所述输出电流值驱动电机运行;然后再获取电机的当前运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配;在所述电机的当前运行速度与预设运行速度匹配成功时,控制电机以当前运行速度运转;而在所述电机的当前运行速度与预设运行速度匹配失败时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度,再控制电机以当前运行速度运转。本发明实现了步进电机输出电流的自动调节,无需用户手动调整,从而可以避免用户需要反复设定,在繁琐的设定的过程给用户使用电机带来不便,本发明有利于提高用户的使用便利性,从而解决了需要手动调节电流到合适的档位,造成操作不便的问题。此外,本发明解决了电流未根据电机运行速度做相应的改变,而导致电流设置的不合理而使电机无法正常工作,甚至损坏电机的问题。
如图7所示,图7是本发明实施例方案涉及的硬件运行环境的终端,即步进电机的驱动器的结构示意图。
本发明实施例终端可以是服务器、PC,也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面3)播放器、便携计算机等具有显示功能的可移动式终端设备。
如图7所示,该终端可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
可选地,终端还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器, 其中,环境光传感器可根据环境光线的明暗来调节显示屏的亮度,接近传感器可在移动终端移动到耳边时,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
本领域技术人员可以理解,图6中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图7所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及步进电机的驱动。
在图7所示的终端中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的步进电机的驱动程序,并执行如上所述的步进电机的驱动程序,以实现如上所述的步进电机的驱动方法,具体可以参照上述步进电机的驱动方法的各实施例,此处不再一一赘述。
参照图6和图7,在一可选实施例中,所述步进电机的驱动器还包括驱动模块1007及电机接口1008,所述驱动模块1007的输入端与所述处理器1001连接,所述驱动模块1007的输出端经电机接口1008接入步进电机。
本实施例中,驱动模块1007的输入端与处理器1001连接,输出端经电机接口1008与步进电机线圈连接。驱动模块1007主要用于接收处理器1001传输来的步进电机控制信号,并根据该步进电机控制信号对应产生步进电机能够识别的控制命令,之后,驱动模块1007经电机接口1008向步进电机线圈输出其对应产生的控制命令,以驱动电机工作。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系 统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,运动控制器,或者网络设备等)执行本发明各个实施例所述的方法。
以上所述仅为本发明的可选实施例,并非因此限制本发明的专利范围,凡是在本发明的发明构思下,利用本发明说明书及附图内容所作的等效结构变换,或直接/间接运用在其他相关的技术领域均包括在本发明的专利保护范围内。
Claims (10)
- 一种步进电机的驱动方法,其特征在于,所述步进电机的驱动方法包括:在接收到电流设置指令时,读取电机存储的电流数据值;将所述电机存储的电流数据值设置为电机当前输出电流值,并以所述输出电流值驱动电机运行;获取电机的当前运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配;在所述电机的当前运行速度与预设运行速度匹配成功时,控制电机以当前运行速度运转;在所述电机的当前运行速度与预设运行速度匹配失败时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度。
- 如权利要求1所述的步进电机的驱动方法,其特征在于,所述在所述电机的当前运行速度与预设运行速度不匹配时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度的步骤包括:当所述电机的当前运行速度大于所述预设运行速度时,调低所述电机的输出电流值,并在预设时间后,返回执行所述获取预设时长内的电机运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配的步骤;当所述电机的当前运行速度小于或者等于所述预设运行速度时,则确定所述电机的当前运行速度与预设运行速度匹配成功,并控制电机以当前运行速度运转。
- 如权利要求2所述的步进电机的驱动方法,其特征在于,所述当所述电机的当前运行速度大于所述预设运行速度时,调节所述电机的输出电流值的步骤包括:当所述电机的当前运行速度大于所述预设运行速度时,在电机当前的输出电流值上降低第一预设电流值。
- 如权利要求1所述的步进电机的驱动方法,其特征在于,所述在所述电机的当前运行速度与预设运行速度不匹配时,调节电机的输出电流值,直至电机当前的运行速度达到所述预设运行速度的步骤包括:当所述电机的当前运行速度小于所述预设运行速度时,调高所述电机的输出电流值,并在预设时间后,返回执行所述获取预设时长内的电机运行速度,并将获取的所述电机的当前运行速度与预设运行速度进行匹配的步骤,直至所述电机的当前运行速度小于或等于所述预设运行速度;当所述电机的当前运行速度大于或等于所述预设运行速度时,则确定所述电机的当前运行速度与预设运行速度匹配成功,并控制电机以所述当前运行速度运转。
- 如权利要求4所述的步进电机的驱动方法,其特征在于,所述当所述电机的当前运行速度小于所述预设运行速度时,调节所述电机的输出电流值的步骤包括:当所述电机的当前运行速度小于所述预设运行速度时,在电机当前的输出电流值上增加第一预设电流值。
- 如权利要求4所述的步进电机的驱动方法,其特征在于,在所述当所述电机的当前运行速度大于或等于所述预设运行速度时,控制电机以当前运行速度的步骤之后还包括:获取电机的输出电流值,在电机的当前的输出电流值大于预设电流阈值时,输出报警信号。
- 如权利要求1所述的步进电机的驱动方法,其特征在于,在所述在所述电机的当前运行速度与预设运行速度不匹配时,调节电机的输出电流值,直至电机当前的运行速度达到预设运行速度的步骤之后还包括:在电机当前的运行速度达到预设运行速度时,将电机当前的输出电流值存储为电机的电流存储数据值。
- 一种步进电机的驱动器,其特征在于,所述步进电机的驱动器包括:速度传感器,用于采集电机的运行速度,并输出;存储器、处理器及存储在所述存储器上并可在所述处理器上运行的步进电机的驱动程序,所述处理器执行所述步进电机的驱动程序时实现如权利要求1-7任意一项所述的步进电机的驱动方法的步骤。
- 如权利要求8所述的步进电机的驱动器,其特征在于,所述步进电机的驱动器还包括驱动模块及电机接口,所述驱动模块的输入端与所述处理器连接,所述驱动模块的输出端经电机接口接入步进电机。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有步进电机的驱动程序,所述步进电机的驱动程序被处理器执行时实现如权利要求1至7中任一项所述的步进电机的驱动方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811432382.X | 2018-11-27 | ||
| CN201811432382.XA CN109510531A (zh) | 2018-11-27 | 2018-11-27 | 步进电机的驱动方法及其驱动器以及计算机可读存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020108468A1 true WO2020108468A1 (zh) | 2020-06-04 |
Family
ID=65750976
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/120861 Ceased WO2020108468A1 (zh) | 2018-11-27 | 2019-11-26 | 步进电机的驱动方法及其驱动器以及计算机可读存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109510531A (zh) |
| WO (1) | WO2020108468A1 (zh) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109510531A (zh) * | 2018-11-27 | 2019-03-22 | 歌尔股份有限公司 | 步进电机的驱动方法及其驱动器以及计算机可读存储介质 |
| CN110094780A (zh) * | 2019-05-09 | 2019-08-06 | 杭州德意电器股份有限公司 | 一种智能强排集成灶与运行方法 |
| CN111614292B (zh) * | 2020-06-17 | 2021-11-12 | 杭州海康威视数字技术股份有限公司 | 步进电机的驱动控制装置和驱动控制方法 |
| CN114326613B (zh) * | 2021-12-16 | 2024-05-28 | 深圳市汇川技术股份有限公司 | 安全门调试方法、装置、设备及介质 |
| CN114337453B (zh) * | 2021-12-29 | 2023-11-21 | 深圳市汇川技术股份有限公司 | 驱动器机型自动识别方法、装置及驱动器 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1858986A (zh) * | 2006-05-29 | 2006-11-08 | 北京兆维晓通科技有限公司 | 一种步进电机的控制方法及控制装置 |
| CN101388634A (zh) * | 2007-09-12 | 2009-03-18 | 东方马达株式会社 | 步进电机的控制装置 |
| CN102843083A (zh) * | 2012-09-18 | 2012-12-26 | 天津市亚安科技股份有限公司 | 一种步进电机电流的控制方法 |
| CN105577050A (zh) * | 2015-12-18 | 2016-05-11 | 浙江日发纺织机械股份有限公司 | 锭子驱动器电流自动调节系统 |
| US9461570B1 (en) * | 2013-04-05 | 2016-10-04 | Amazon Technologies, Inc. | Variable torque control of a stepper motor |
| CN109510531A (zh) * | 2018-11-27 | 2019-03-22 | 歌尔股份有限公司 | 步进电机的驱动方法及其驱动器以及计算机可读存储介质 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5384536B2 (ja) * | 2011-01-12 | 2014-01-08 | 日本電産サーボ株式会社 | ステッピングモータの駆動回路、ステッピングモータの駆動方法、チューブポンプ、及びチューブポンプの駆動方法 |
| JP2012222917A (ja) * | 2011-04-07 | 2012-11-12 | Ricoh Elemex Corp | ステッピングモータの制御装置およびステッピングモータの制御方法 |
| CN106877762B (zh) * | 2017-03-24 | 2023-03-28 | 陕西科技大学 | 一种步进电机驱动器电流标定装置及方法 |
| CN207074370U (zh) * | 2017-08-21 | 2018-03-06 | 广东百晟图电器实业有限公司 | 一种家用电器及其电机转速精调电路 |
| CN108667364A (zh) * | 2018-05-17 | 2018-10-16 | 黄云汉 | 一种步进电机的单步驱动方法及装置 |
-
2018
- 2018-11-27 CN CN201811432382.XA patent/CN109510531A/zh active Pending
-
2019
- 2019-11-26 WO PCT/CN2019/120861 patent/WO2020108468A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1858986A (zh) * | 2006-05-29 | 2006-11-08 | 北京兆维晓通科技有限公司 | 一种步进电机的控制方法及控制装置 |
| CN101388634A (zh) * | 2007-09-12 | 2009-03-18 | 东方马达株式会社 | 步进电机的控制装置 |
| CN102843083A (zh) * | 2012-09-18 | 2012-12-26 | 天津市亚安科技股份有限公司 | 一种步进电机电流的控制方法 |
| US9461570B1 (en) * | 2013-04-05 | 2016-10-04 | Amazon Technologies, Inc. | Variable torque control of a stepper motor |
| CN105577050A (zh) * | 2015-12-18 | 2016-05-11 | 浙江日发纺织机械股份有限公司 | 锭子驱动器电流自动调节系统 |
| CN109510531A (zh) * | 2018-11-27 | 2019-03-22 | 歌尔股份有限公司 | 步进电机的驱动方法及其驱动器以及计算机可读存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109510531A (zh) | 2019-03-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020108468A1 (zh) | 步进电机的驱动方法及其驱动器以及计算机可读存储介质 | |
| EP3652612B1 (en) | Method and electronic device for providing mode switching and storage medium thereof | |
| CN108119986B (zh) | 空调器控制方法、电子设备和计算机可读存储介质 | |
| KR102255130B1 (ko) | 배터리의 충전을 제어하는 전자 장치 및 방법 | |
| US9823676B2 (en) | Method and electronic device for controlling current | |
| US20130041486A1 (en) | System and method for controlling electrical devices | |
| EP3474517A1 (en) | Electronic device for controlling iot device to correspond to state of external electronic device and operation method thereof | |
| US9477302B2 (en) | System and method for programing devices within world space volumes | |
| CN108521814A (zh) | 云台的控制方法、控制器和云台 | |
| CN107676938A (zh) | 空调器控制方法、装置、电子设备及计算机可读存储介质 | |
| US20200278072A1 (en) | Gimbal control method, gimbal and machine-readable storage medium | |
| US20220252292A1 (en) | Wirelessly configuring climate control system controls | |
| US11347253B2 (en) | Electronic device to perform power management and operating method thereof | |
| CN107144056A (zh) | 空调器及电子膨胀阀的控制方法和计算机可读存储介质 | |
| CN113063442A (zh) | 扫地机器人陀螺仪标定方法、装置、计算机设备及存储器 | |
| CN107707955A (zh) | 一种显示器上的光标控制方法及智能设备 | |
| CN110617208A (zh) | 直流无刷水泵及其空载保护方法 | |
| CN117918107A (zh) | 一种割草机刀盘机构及其控制方法、装置和终端设备 | |
| CN108131794B (zh) | 空调器风机控制方法、电子设备和计算机可读存储介质 | |
| CN108317696B (zh) | 空调器的控制方法、装置和计算机可读存储介质 | |
| CN108119996B (zh) | 空调器风机控制方法、电子设备和计算机可读存储介质 | |
| CN107421066B (zh) | 空调系统的控制方法、装置、计算机存储介质及空调系统 | |
| CN108320491B (zh) | 全指向红外遥控设备和全指向红外遥控方法 | |
| CN105318505A (zh) | 基于调温器的变频空调控制装置、终端、系统及方法 | |
| WO2025097647A1 (zh) | 一种器械驱动方法、装置、计算机设备及存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19889180 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19889180 Country of ref document: EP Kind code of ref document: A1 |