CN109981009B - Control method of stepping motor and mobile terminal - Google Patents

Control method of stepping motor and mobile terminal Download PDF

Info

Publication number
CN109981009B
CN109981009B CN201910348649.5A CN201910348649A CN109981009B CN 109981009 B CN109981009 B CN 109981009B CN 201910348649 A CN201910348649 A CN 201910348649A CN 109981009 B CN109981009 B CN 109981009B
Authority
CN
China
Prior art keywords
current
stepping motor
limit
rotating speed
slider
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910348649.5A
Other languages
Chinese (zh)
Other versions
CN109981009A (en
Inventor
张潮红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910348649.5A priority Critical patent/CN109981009B/en
Publication of CN109981009A publication Critical patent/CN109981009A/en
Priority to PCT/CN2020/085669 priority patent/WO2020221044A1/en
Application granted granted Critical
Publication of CN109981009B publication Critical patent/CN109981009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P8/00Arrangements for controlling dynamo-electric motors rotating step by step
    • H02P8/12Control or stabilisation of current
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P2207/00Indexing scheme relating to controlling arrangements characterised by the type of motor

Landscapes

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

Abstract

The embodiment of the invention discloses a control method of a stepping motor and a mobile terminal, wherein the method comprises the following steps: determining the current position of the sliding block in the process that the stepping motor pushes the sliding block to move from the first limit to the second limit; if the distance between the current position and the second limit is larger than a preset threshold value, driving the stepping motor according to the first current; and if the distance is smaller than the preset threshold value, driving the stepping motor according to a second current, wherein the second current is smaller than the first current. By adopting the embodiment of the invention, the noise generated between the screw rod and the sliding block can be reduced or prevented, the service life and the running precision of the stepping motor are ensured, and the user experience is improved.

Description

Control method of stepping motor and mobile terminal
Technical Field
The invention relates to the field of mobile terminals, in particular to a control method of a stepping motor and a mobile terminal.
Background
At present, a stepping motor is widely used, the range is large to mechanical engineering, the range is small to intelligent terminal equipment, especially the intelligent terminal equipment with higher requirements on precision, low power consumption, cost and the like, such as a telescopic camera of the intelligent terminal equipment, and the mode of driving a metal lead screw and a plastic sliding block by the stepping motor is adopted to realize the extension and the contraction of the camera. The plastics slider removes the restriction position on the lead screw and blocks the back specifically, because motor output torque is great, probably drives the lead screw and still is rotating, causes to have smooth silk vibrations between lead screw and the slider, produces the noise, also can produce the noise simultaneously under the unusual condition of working of step motor, so not only can influence user experience, still can influence the precision of step motor operation to reduce step motor's life.
Therefore, there is a need for an effective stepper motor control scheme to address the noise problem caused by idle rotation after the stepper motor driven slider is moved into position and seized.
Disclosure of Invention
The embodiment of the invention provides a control method of a stepping motor and a mobile terminal, which are used for solving the problem of noise caused by idling after a sliding block driven by the stepping motor moves in place and is clamped, ensuring the service life and the running precision of the stepping motor and improving the user experience.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, a method for controlling a stepping motor is provided, the method comprising:
determining the current position of the sliding block in the process that the stepping motor pushes the sliding block to move from a first limit position to a second limit position;
if the distance between the current position and the second limit is larger than a preset threshold value, driving the stepping motor according to a first current;
and if the distance is smaller than the preset threshold value, driving the stepping motor according to a second current, wherein the second current is smaller than the first current.
In a second aspect, a mobile terminal is provided, which includes:
the determining module is used for determining the current position of the sliding block in the process that the stepping motor pushes the sliding block to move from the first limit to the second limit;
the control module is used for driving the stepping motor according to a first current under the condition that the distance between the current position and the second limit is larger than a preset threshold value;
the control module is further configured to: and driving the stepping motor according to a second current under the condition that the distance is smaller than the preset threshold, wherein the second current is smaller than the first current.
In a third aspect, a mobile terminal is provided, comprising a processor, a memory and a computer program stored on the memory and being executable on the processor, the computer program, when executed by the processor, implementing the steps of the method according to the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to the first aspect.
In the embodiment of the invention, the slider is pushed to move telescopically between the first limit and the second limit through the stepping motor, and in the process of pushing the slider to move from the first limit to the second limit through the stepping motor, the current for driving the stepping motor is adjusted according to the current position of the slider, specifically, when the slider is far away from the second limit, namely the distance between the slider and the second limit is greater than a preset threshold value, the stepping motor is driven to operate according to a larger first current to push the slider, and when the slider is close to the second limit, namely the distance between the slider and the second limit is less than the distance threshold value, the stepping motor is driven to operate according to a smaller second current to push the slider. So, through the mode that reduces the electric current that is used for driving step motor, reduce step motor's output torque to when the slider moves to the second spacing soon, guarantee that the lead screw can normally rotate with less output torque, and when the slider moved to the second spacing, output torque can't drive the lead screw and continue to rotate, can reduce or eliminate the rotation vibrations noise between lead screw and the slider, with guarantee step motor's life and operation precision, promote user experience simultaneously.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart illustrating a control method of a stepping motor according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a control system for a stepper motor in an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a mobile terminal in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a mobile terminal in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the solution of the related art that the stepping motor drives the lead screw and the slider, it is commonly used to detect whether the slider is moved in place by an optoelectronic device, so as to stop the operation of the motor after the slider is moved in place, thereby shortening the time for generating idle running noise as much as possible. For example, the magnet is additionally arranged on the slider, and the strength of the magnet on the slider is detected through the Hall sensor, so that whether the slider moves in place or not is judged according to the detection value and the stability of the Hall sensor. However, the vibration of the sliding block in the moving process can affect the stability of the detection value of the hall sensor, so that whether the sliding block moves in place can not be accurately judged, that is, the hall sensor detects that the sliding block moves in place and is clamped, delay can occur, the motor can not be stopped in time, the situation that the output torque of the motor is large, the lead screw is driven to rotate continuously, the wire sliding vibration exists between the lead screw and the sliding block, noise is generated, and the noise generated by the wire sliding vibration can disappear after the noise lasts for a long time before the motor stops running.
Therefore, an effective control scheme for the stepping motor is needed to solve the problem of noise caused by idling after the slider driven by the stepping motor moves in place and is clamped, and improve user experience.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a control method for a stepping motor, which is executed by a mobile terminal. The method may specifically comprise:
step 101: and determining the current position of the sliding block in the process that the stepping motor pushes the sliding block to move from the first limit to the second limit.
Step 103: and if the distance between the current position and the second limit is greater than a preset threshold, driving the stepping motor according to the first current.
Step 105: and if the distance is smaller than the preset threshold value, driving the stepping motor according to a second current, wherein the second current is smaller than the first current.
Optionally, the stepping motor may push the slider to move from the first limit to the second limit on the lead screw, and determine a corresponding current to drive the stepping motor to push the slider to move according to the current position of the slider on the lead screw.
In the embodiment of the invention, the slider is pushed to move telescopically between the first limit and the second limit through the stepping motor, and in the process of pushing the slider to move from the first limit to the second limit through the stepping motor, the current for driving the stepping motor is adjusted according to the current position of the slider, specifically, when the slider is far away from the second limit, namely the distance between the slider and the second limit is greater than a preset threshold value, the stepping motor is driven to operate according to a larger first current to push the slider, and when the slider is close to the second limit, namely the distance between the slider and the second limit is less than the distance threshold value, the stepping motor is driven to operate according to a smaller second current to push the slider. So, through the mode that reduces the electric current that is used for driving step motor, reduce step motor's output torque to when the slider moves to the second is spacing fast, when guaranteeing that the lead screw can normally rotate with less output torque promptly, can reduce or eliminate the smooth silk vibrations between lead screw and the slider, thereby reduce or prevent the noise that produces between lead screw and the slider, with guarantee step motor's life and running accuracy, promote user experience simultaneously.
The value of the distance threshold may be limited according to an actual situation, for example, to 1 mm.
For example, as shown in fig. 2, the system controller controls the power supply of the stepping motor by performing motor power supply control on the power module, and controls the operation precision, the operation speed and direction and the operation current of the driver of the stepping motor to drive the stepping motor, as shown in fig. 2, the stepping motor drives the lead screw to rotate by outputting torque based on the operation parameters, so as to push the sliding block to move telescopically between the limit 1 and the limit 2 of the lead screw. Specifically, based on the characteristic that the output torque of the stepping motor is related to the phase current, that is, the phase current is larger, and the output torque is larger, according to the control method of the stepping motor of the embodiment of the present invention, the phase current for driving the stepping motor can be controlled according to the specific position of the slider on the lead screw, so that before the slider moves to the limit position (limit 1 or limit 2), the purpose of reducing the output torque of the stepping motor is achieved by reducing the current, and when the lead screw cannot be rotated after the slider is clamped, noise caused by the fact that the lead screw still idles to generate thread sliding vibration after the slider is in place can be eliminated, so that user experience is improved.
It should be noted that when the stepping motor pushes the slider to move from the limit 1 to the limit 2 of the lead screw, the limit 1 is a first limit, and the limit 2 is a second limit; when the stepping motor pushes the sliding block to move from the limit 2 of the lead screw to the limit 1, the limit 1 is the second limit, and the limit 2 is the first limit.
Optionally, in the control method of the stepping motor according to the embodiment of the present invention, the second current is a limit minimum current required for the stepping motor to push the slider to move.
It can be understood that the second current is a limit current required by the stepping motor to push the slider to move, that is, after the current for driving the stepping motor reaches the second current, the stepping motor just can push the motor load, that is, the lead screw and the slider to move, that is, the second current is a minimum critical current capable of pushing the motor load to move.
The second current can be a value calibrated before the mobile terminal leaves a factory, serves as a system preset parameter, and is applied to the control process of the operation of the stepping motor; the specific current calibration determination process may include: the system is calibrated by thrust, the current of a driver of the configured stepping motor is changed from small to large, the stepping motor is enabled to run at a certain speed, for example, the rotating speed is kept low, the position of the slide block is detected by using the Hall sensor, the stepping motor can be normally driven to run after the driving current reaches Ic (namely, the second current), namely, when the Hall sensor can detect that the position of the slide block just changes, the current Ic is considered to just push the motor load to move at the moment. Further, in order to ensure the stability and accuracy of the second current after the mobile terminal leaves the factory, the second current may be calibrated periodically or each time the operation time of the stepping motor reaches a certain value.
Optionally, in the method for controlling a stepping motor according to the embodiment of the present invention, after the step motor is driven to operate by the first current with a larger value and is switched to be driven to operate by the second current with a smaller value, the method may further include the following steps:
and if the sliding block is detected to move to the second limit or the duration of continuously driving the stepping motor according to the second current reaches a duration threshold, controlling the stepping motor to stop running.
It can be understood that after the current for driving the stepping motor is reduced from the first current to the second current, in order to further reduce or eliminate the noise generated by the vibration of the sliding wire between the screw rod and the slide block due to the idle rotation, the stepping motor can be directly controlled to stop running when the slide block is detected to move to the second limit or the duration of the continuous running of the stepping motor according to the second current reaches the duration threshold.
The value of the time length threshold value can be limited according to the actual situation.
Optionally, in the control method of the stepping motor according to the embodiment of the present invention, in order to ensure a pushing effect of the stepping motor on the slider, that is, to ensure the efficiency of the telescopic motion of the slider, the rotation speed of the stepping motor may be the first rotation speed while the stepping motor is driven according to the first current and the second current.
Further, in the method for controlling a stepping motor according to the embodiment of the present invention, after the stepping motor receives a start command and starts to operate, in order to ensure smoothness and a mute effect of the operation of the stepping motor, before the step of determining the current position of the slider is performed, the following process steps may be performed:
driving the stepping motor according to the second rotating speed and the third current from the starting time of the stepping motor;
and when the stepping motor is driven for the first time according to the second rotating speed and the third current, the stepping motor is driven according to the third rotating speed and the third current, wherein the second rotating speed is less than the third rotating speed, the third rotating speed is greater than the first rotating speed, and the third current is greater than the second current.
It can be understood that after the stepping motor is started to operate, the stepping motor is driven to operate for a first time according to low rotating speed and large current, and then the stepping motor is driven according to high rotating speed and large current.
The value of the first duration can be selected and set according to specific conditions.
Meanwhile, considering that the output torque of the stepping motor is inversely proportional to the rotating speed, namely the rotating speed is higher and the torque is smaller, the stepping motor is driven to operate at a low rotating speed firstly, so that the output torque of the stepping motor can be increased to a value capable of pushing the sliding block to move as soon as possible, and further, when the sliding block moves to a position close to the second limit position subsequently, noise generated by vibration of a sliding wire between the lead screw and the sliding block can be reduced or eliminated better, the rotating speed can be increased while large current is kept, and the stepping motor operates at a high rotating speed.
Further specifically, in the process of starting the stepping motor to push the sliding block to move from the first limit to the second limit, after the stepping motor completes the operation step of converting the low-rotation-speed and high-current drive into the high-rotation-speed and high-current drive, the step of determining the current position of the sliding block is executed, so that the purpose of reducing power consumption can be achieved. That is, the step of determining the current position of the slider in step 101 of the control method of the stepping motor according to the embodiment of the present invention may be specifically performed as follows:
and determining the current position after driving the stepping motor for a second time period according to the third rotating speed and the third current.
The value of the second duration can be selected and set according to specific conditions.
In summary, in the control method of the stepping motor according to the embodiment of the present invention, the operation stage of low rotation speed and large current, the operation stage of high rotation speed and large current, the operation stage of low rotation speed and large current, and the operation stage of low rotation speed and small current are sequentially realized.
Optionally, in the control method of the stepping motor according to the embodiment of the present invention, the current position of the slider may be determined through a combination of the magnet and the hall sensor, that is, in a case where the magnet is disposed on the slider, the current position of the slider may be determined specifically through the following steps:
acquiring a first detection value of a first Hall sensor to a magnet, wherein the first Hall sensor is arranged close to a first limit;
acquiring a second detection value of the second Hall sensor to the magnet, wherein the second Hall sensor is arranged close to a second limit;
and determining the current position according to the first detection value and the second detection value.
It can be understood that in the process that the stepping motor pushes the sliding block to move from the first limit to the second limit, the first hall sensor and the second hall sensor are used for detecting the magnet at the same time, so that the current position of the sliding block is determined based on the obtained first detection value and the second detection value; wherein the first detection value and the second detection value may be magnetic field strength values.
In consideration of the fact that when the position of the sliding block is detected through the Hall sensor, if the Hall sensor is closer to the sliding block, the detection value of the Hall sensor is larger, and when the Hall sensor is farther from the sliding block, the detection value of the Hall sensor is smaller, so that the real-time position of the sliding block on the lead screw can be preliminarily and accurately judged through the detection value of the Hall sensor.
Specifically, when the first detection value detected by the first hall sensor is smaller than the first interval and the second detection value detected by the second hall sensor is larger than the second interval, it indicates that the slider is farther from the first hall sensor and closer to the second hall sensor, that is, the slider has moved to a position close to or reaching the position where the driving current of the stepping motor needs to be reduced.
In addition, as shown in fig. 2, when the stepping motor pushes the slider to move from the limit 1 to the limit 2 on the lead screw, the hall sensor 1 is the first hall sensor, and the hall sensor 2 is the second hall sensor; when the stepping motor pushes the sliding block to move from the limit 2 on the lead screw to the limit 1, the Hall sensor 1 is the second Hall sensor, and the Hall sensor 2 is the first Hall sensor.
As can be seen from the above, in the control method of the stepping motor according to the embodiment of the present invention, on the basis that the hall sensor detects the position change of the slider pushed by the stepping motor to perform the telescopic motion, the phase current of the stepping motor is reduced at an appropriate time, and when the stepping motor is locked, it is ensured that the torque for rotating the lead screw cannot be transmitted to the rear stage of the slider, so as to reduce or eliminate the noise generated by the vibration of the sliding wire between the lead screw and the slider, thereby being capable of well solving the noise problem of the telescopic motor on the current mobile terminal.
Referring to fig. 3, an embodiment of the present invention further provides a mobile terminal 200, where the mobile terminal 200 may specifically include:
the determining module 201 is configured to determine a current position of the slider in a process that the stepping motor pushes the slider to move from the first limit to the second limit;
the control module 203 is used for driving the stepping motor according to the first current under the condition that the distance between the current position and the second limit is greater than a preset threshold value;
the control module 203 is further configured to: and under the condition that the distance is smaller than the preset threshold value, driving the stepping motor according to a second current, wherein the second current is smaller than the first current.
Preferably, in the mobile terminal 200 according to the embodiment of the present invention, the second current is a limit minimum current required for the stepping motor to push the slider to move.
Preferably, in the mobile terminal 200 according to the embodiment of the present invention, the control module 203 may be further configured to:
and controlling the stepping motor to stop running under the condition that the time length for continuously driving the stepping motor according to the second current reaches a time length threshold value when the sliding block is detected to move to the second limit.
Preferably, in the mobile terminal 200 provided in the embodiment of the present invention, the rotation speed of the stepping motor when operating according to the first current and the second current is a first rotation speed;
before determining the current position of the slider, the control module 203 may further be configured to:
driving the stepping motor according to the second rotating speed and the third current from the starting time of the stepping motor;
when the stepping motor is driven according to a second rotating speed and a third current for a first time, the stepping motor is driven according to the third rotating speed and the third current, wherein the second rotating speed is less than the third rotating speed, the third rotating speed is greater than the first rotating speed, and the third current is greater than the second current;
the determining module 201 may be specifically configured to:
and determining the current position after driving the stepping motor for a second time period according to the third rotating speed and the third current.
Preferably, in the mobile terminal 200 provided in the embodiment of the present invention, the slider is provided with a magnet;
the determining module 201 may specifically include:
the first acquisition submodule is used for acquiring a first detection value of the first Hall sensor on the magnet, and the first Hall sensor is arranged close to the first limit;
the second acquisition submodule is used for acquiring a second detection value of the second Hall sensor on the magnet, and the second Hall sensor is close to the second limit;
and the determining submodule is used for determining the current position according to the first detection value and the second detection value.
It can be understood that the mobile terminal 200 provided in the embodiment of the present invention can implement the foregoing processes of the control method of the stepping motor executed by the mobile terminal 200, and the related descriptions about the control method of the stepping motor are applicable to the mobile terminal 200, and are not described herein again.
In the embodiment of the invention, the slider is pushed to move telescopically between the first limit and the second limit through the stepping motor, and in the process of pushing the slider to move from the first limit to the second limit through the stepping motor, the current for driving the stepping motor is adjusted according to the current position of the slider, specifically, when the slider is far away from the second limit, namely the distance between the slider and the second limit is greater than a preset threshold value, the stepping motor is driven to operate according to a larger first current to push the slider, and when the slider is close to the second limit, namely the distance between the slider and the second limit is less than the distance threshold value, the stepping motor is driven to operate according to a smaller second current to push the slider. So, through the mode that reduces the electric current that is used for driving step motor, reduce step motor's output torque to when the slider moves to the second is spacing fast, when guaranteeing that the lead screw can normally rotate with less output torque promptly, can reduce or eliminate the smooth silk vibrations between lead screw and the slider, thereby reduce or prevent the noise that produces between lead screw and the slider, with guarantee step motor's life and running accuracy, promote user experience simultaneously.
Fig. 4 is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, where the mobile terminal 300 includes but is not limited to: radio frequency unit 301, network module 302, audio output unit 303, input unit 304, sensor 305, display unit 306, user input unit 307, interface unit 308, memory 309, processor 310, and power supply 311. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
Wherein, the processor 310 is configured to perform the following processes:
determining the current position of the sliding block in the process that the stepping motor pushes the sliding block to move from the first limit to the second limit;
if the distance between the current position and the second limit is larger than a preset threshold value, driving the stepping motor according to the first current;
and if the distance is smaller than the preset threshold value, driving the stepping motor according to a second current, wherein the second current is smaller than the first current.
In the embodiment of the invention, the slider is pushed to move telescopically between the first limit and the second limit through the stepping motor, and in the process of pushing the slider to move from the first limit to the second limit through the stepping motor, the current for driving the stepping motor is adjusted according to the current position of the slider, specifically, when the slider is far away from the second limit, namely the distance between the slider and the second limit is greater than a preset threshold value, the stepping motor is driven to operate according to a larger first current to push the slider, and when the slider is close to the second limit, namely the distance between the slider and the second limit is less than the distance threshold value, the stepping motor is driven to operate according to a smaller second current to push the slider. So, through the mode that reduces the electric current that is used for driving step motor, reduce step motor's output torque to when the slider moves to the second is spacing fast, when guaranteeing that the lead screw can normally rotate with less output torque promptly, can reduce or eliminate the smooth silk vibrations between lead screw and the slider, thereby reduce or prevent the noise that produces between lead screw and the slider, with guarantee step motor's life and running accuracy, promote user experience simultaneously.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 301 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 310; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 301 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 301 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 302, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 303 may convert audio data received by the radio frequency unit 301 or the network module 302 or stored in the memory 309 into an audio signal and output as sound. Also, the audio output unit 303 may also provide audio output related to a specific function performed by the mobile terminal 300 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 303 includes a speaker, a buzzer, a receiver, and the like.
The input unit 304 is used to receive audio or video signals. The input Unit 304 may include a Graphics Processing Unit (GPU) 3041 and a microphone 3042, and the Graphics processor 3041 processes image data of a still picture or video obtained by an image capturing apparatus (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 306. The image frames processed by the graphic processor 3041 may be stored in the memory 309 (or other storage medium) or transmitted via the radio frequency unit 301 or the network module 302. The microphone 3042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 301 in case of the phone call mode.
The mobile terminal 300 also includes at least one sensor 305, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 3061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 3061 and/or a backlight when the mobile terminal 300 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 305 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 306 is used to display information input by the user or information provided to the user. The Display unit 306 may include a Display panel 3061, and the Display panel 3061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 307 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 307 includes a touch panel 3071 and other input devices 3072. The touch panel 3071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 3071 (e.g., operations by a user on or near the touch panel 3071 using a finger, a stylus, or any suitable object or attachment). The touch panel 3071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 310, and receives and executes commands sent by the processor 310. In addition, the touch panel 3071 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 307 may include other input devices 3072 in addition to the touch panel 3071. Specifically, the other input devices 3072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein.
Further, the touch panel 3071 may be overlaid on the display panel 3061, and when the touch panel 3071 detects a touch operation on or near the touch panel, the touch operation is transmitted to the processor 310 to determine the type of the touch event, and then the processor 310 provides a corresponding visual output on the display panel 3061 according to the type of the touch event. Although the touch panel 3071 and the display panel 3061 are shown as two separate components in fig. 4 to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 3071 and the display panel 3061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 308 is an interface through which an external device is connected to the mobile terminal 300. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 308 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 300 or may be used to transmit data between the mobile terminal 300 and external devices.
The memory 309 may be used to store software programs as well as various data. The memory 309 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 309 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 310 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 309 and calling data stored in the memory 309, thereby performing overall monitoring of the mobile terminal. Processor 310 may include one or more processing units; preferably, the processor 310 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 310.
The mobile terminal 300 may further include a power supply 311 (such as a battery) for supplying power to various components, and preferably, the power supply 311 may be logically connected to the processor 310 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 300 includes some functional modules that are not shown, and thus, the detailed description thereof is omitted.
Preferably, an embodiment of the present invention further provides a mobile terminal, including a processor 310, a memory 309, and a computer program stored in the memory 309 and capable of running on the processor 310, where the computer program, when executed by the processor 310, implements each process of the above step motor control method embodiment, and can achieve the same technical effect, and is not described herein again to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned step motor control method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A method of controlling a stepper motor, the method comprising:
determining the current position of the sliding block in the process that the stepping motor pushes the sliding block to move from a first limit to a second limit, wherein the stepping motor outputs torque to drive a lead screw to rotate so as to push the sliding block to move from the first limit to the second limit;
if the distance between the current position and the second limit is larger than a preset threshold value, driving the stepping motor according to a first current;
if the distance is smaller than the preset threshold value, driving the stepping motor according to a second current, wherein the second current is smaller than the first current, and the output torque of the stepping motor corresponding to the second current is smaller than the output torque of the stepping motor corresponding to the first current;
the rotating speed of the stepping motor when the stepping motor operates according to the first current and the second current is a first rotating speed;
wherein prior to the determining the current position of the slider, the method further comprises:
driving the stepping motor according to a second rotating speed and a third current from the starting time of the stepping motor;
when the stepping motor is driven according to the second rotating speed and the third current for a first time, the stepping motor is driven according to the third rotating speed and the third current, wherein the second rotating speed is less than the third rotating speed, the third rotating speed is greater than the first rotating speed, and the third current is greater than the second current;
the determining the current position of the slider comprises:
and determining the current position after driving the stepping motor for a second time period according to the third rotating speed and the third current.
2. The method of claim 1, wherein the second current is a limit minimum current required for the stepper motor to move the slider.
3. The method of claim 2, further comprising:
and if the sliding block is detected to move to the second limit or the duration of continuously driving the stepping motor according to the second current reaches a duration threshold, controlling the stepping motor to stop running.
4. The method according to any one of claims 1 to 3, wherein a magnet is provided on the slider;
wherein the determining the current position of the slider comprises:
acquiring a first detection value of a first Hall sensor to the magnet, wherein the first Hall sensor is arranged close to the first limit;
acquiring a second detection value of a second Hall sensor to the magnet, wherein the second Hall sensor is arranged close to the second limit;
and determining the current position according to the first detection value and the second detection value.
5. A mobile terminal, characterized in that the mobile terminal comprises:
the determining module is used for determining the current position of the sliding block in the process that the stepping motor pushes the sliding block to move from a first limit to a second limit, wherein the stepping motor outputs torque to drive a lead screw to rotate so as to push the sliding block to move from the first limit to the second limit;
the control module is used for driving the stepping motor according to a first current under the condition that the distance between the current position and the second limit is larger than a preset threshold value;
the control module is further configured to: under the condition that the distance is smaller than the preset threshold value, driving the stepping motor according to a second current, wherein the second current is smaller than the first current, and the output torque of the stepping motor corresponding to the second current is smaller than the output torque of the stepping motor corresponding to the first current;
the rotating speed of the stepping motor when the stepping motor operates according to the first current and the second current is a first rotating speed;
wherein the control module, prior to the determining the current position of the slider, is further to:
driving the stepping motor according to a second rotating speed and a third current from the starting time of the stepping motor;
when the stepping motor is driven according to the second rotating speed and the third current for a first time, the stepping motor is driven according to the third rotating speed and the third current, wherein the second rotating speed is less than the third rotating speed, the third rotating speed is greater than the first rotating speed, and the third current is greater than the second current;
the determining module is specifically configured to:
and determining the current position after driving the stepping motor for a second time period according to the third rotating speed and the third current.
6. The mobile terminal of claim 5, wherein the second current is a limit minimum current required for the stepper motor to move the slider.
7. The mobile terminal of claim 6, wherein the control module is further configured to:
and controlling the stepping motor to stop running under the condition that the time for the slider to move to the second limit or continuously driving the stepping motor according to the second current reaches a time threshold.
8. The mobile terminal according to any of claims 5 to 7, wherein a magnet is disposed on the slider;
wherein the determining module comprises:
the first acquisition submodule is used for acquiring a first detection value of a first Hall sensor on the magnet, and the first Hall sensor is arranged close to the first limit;
the second acquisition submodule is used for acquiring a second detection value of a second Hall sensor on the magnet, and the second Hall sensor is arranged close to the second limit;
a determination submodule configured to determine the current position based on the first detection value and the second detection value.
9. A mobile terminal, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN201910348649.5A 2019-04-28 2019-04-28 Control method of stepping motor and mobile terminal Active CN109981009B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910348649.5A CN109981009B (en) 2019-04-28 2019-04-28 Control method of stepping motor and mobile terminal
PCT/CN2020/085669 WO2020221044A1 (en) 2019-04-28 2020-04-20 Control method for step motor and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910348649.5A CN109981009B (en) 2019-04-28 2019-04-28 Control method of stepping motor and mobile terminal

Publications (2)

Publication Number Publication Date
CN109981009A CN109981009A (en) 2019-07-05
CN109981009B true CN109981009B (en) 2021-12-07

Family

ID=67086716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910348649.5A Active CN109981009B (en) 2019-04-28 2019-04-28 Control method of stepping motor and mobile terminal

Country Status (2)

Country Link
CN (1) CN109981009B (en)
WO (1) WO2020221044A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981009B (en) * 2019-04-28 2021-12-07 维沃移动通信有限公司 Control method of stepping motor and mobile terminal
CN110410955B (en) * 2019-07-22 2021-03-19 广东美的制冷设备有限公司 Control method and device of stepping motor, air conditioner and storage medium
CN112492127B (en) * 2019-09-12 2022-06-17 北京小米移动软件有限公司 Camera positioning method and device, electronic equipment and readable storage medium
CN110581952A (en) * 2019-09-17 2019-12-17 深圳市万普拉斯科技有限公司 Camera lifting control method and device and mobile terminal
CN110602399A (en) * 2019-09-17 2019-12-20 深圳市万普拉斯科技有限公司 Processing method and device for lifting obstacle of camera and mobile terminal
CN111243481B (en) * 2020-01-21 2024-04-26 维沃移动通信有限公司 Electronic equipment and driving method
CN113471805A (en) * 2020-03-31 2021-10-01 北京科益虹源光电技术有限公司 Control method and device for improving wavelength stability of laser
CN112558525B (en) * 2020-12-14 2022-03-18 广州极飞科技股份有限公司 Motion control method, motion control device, electronic equipment and storage medium
CN114719799B (en) * 2022-03-04 2024-04-26 武汉海微科技股份有限公司 Soft material boundary detection method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118128A (en) * 2009-12-31 2011-07-06 北大方正集团有限公司 Control method and device for accurate positioning on stepping motor
CN106849786A (en) * 2016-12-28 2017-06-13 江苏博权医疗科技有限公司 A kind of medical stepper motor acceleration and deceleration travel control device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2766019B2 (en) * 1990-01-24 1998-06-18 株式会社日立製作所 Video camera autofocus device
CN105657258B (en) * 2015-12-30 2019-01-04 青岛海信移动通信技术股份有限公司 A kind of control method and device of motor in zoom camera mould group
CN107499375B (en) * 2017-07-12 2020-01-17 北京汽车股份有限公司 Electric power steering system, control method and automobile
CN109639185B (en) * 2018-12-05 2020-08-07 维沃移动通信有限公司 Motor control method and terminal equipment
CN109981009B (en) * 2019-04-28 2021-12-07 维沃移动通信有限公司 Control method of stepping motor and mobile terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118128A (en) * 2009-12-31 2011-07-06 北大方正集团有限公司 Control method and device for accurate positioning on stepping motor
CN106849786A (en) * 2016-12-28 2017-06-13 江苏博权医疗科技有限公司 A kind of medical stepper motor acceleration and deceleration travel control device

Also Published As

Publication number Publication date
WO2020221044A1 (en) 2020-11-05
CN109981009A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN109981009B (en) Control method of stepping motor and mobile terminal
CN107819907B (en) Camera control method and mobile terminal
CN110112984B (en) Vibration control method of linear motor and mobile terminal
CN108111730B (en) Camera module, control method and mobile terminal
CN107196363B (en) Method for adjusting charging current, terminal and computer readable storage medium
CN108279948B (en) Application program starting method and mobile terminal
CN107832689B (en) Fingerprint identification method and mobile terminal
CN110049192B (en) Detection method and mobile terminal
CN108415642B (en) Display method and mobile terminal
CN109831585B (en) Operation parameter adjusting method and mobile terminal
CN109905812B (en) Input power control method and device and terminal equipment
CN108391008B (en) Message reminding method and mobile terminal
CN108196753B (en) Interface switching method and mobile terminal
CN110139018B (en) Camera control module, camera movement control method and terminal
CN109683768B (en) Application operation method and mobile terminal
CN108521501B (en) Voice input method, mobile terminal and computer readable storage medium
CN108055392B (en) Display area adjusting method, mobile terminal and computer readable storage medium
CN109542321B (en) Control method and device for screen display content
CN107800869B (en) Split screen display method, mobile terminal and storage medium
CN109005297B (en) Display method of navigation application and mobile terminal
CN107769324B (en) Charging method, charger, mobile terminal and server
CN108021315B (en) Control method and mobile terminal
CN109194793B (en) Screen adjusting method and mobile terminal
CN108924319B (en) Proximity detection method and mobile terminal
CN108089799B (en) Control method of screen edge control and mobile terminal

Legal Events

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