CN109308114B - Apparatus and method for driving linear motor - Google Patents

Apparatus and method for driving linear motor Download PDF

Info

Publication number
CN109308114B
CN109308114B CN201710619451.7A CN201710619451A CN109308114B CN 109308114 B CN109308114 B CN 109308114B CN 201710619451 A CN201710619451 A CN 201710619451A CN 109308114 B CN109308114 B CN 109308114B
Authority
CN
China
Prior art keywords
audio
linear motor
processor
frequency point
vibration
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
CN201710619451.7A
Other languages
Chinese (zh)
Other versions
CN109308114A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710619451.7A priority Critical patent/CN109308114B/en
Priority to PCT/CN2018/081901 priority patent/WO2019019694A1/en
Publication of CN109308114A publication Critical patent/CN109308114A/en
Application granted granted Critical
Publication of CN109308114B publication Critical patent/CN109308114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/016Input arrangements with force or tactile feedback as computer generated output to the user
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Apparatuses For Generation Of Mechanical Vibrations (AREA)

Abstract

The application discloses a device and a method for driving a linear motor, and belongs to the technical field of motor driving. The device comprises a system processor and an audio processor, wherein the system processor is used for indicating a resonant frequency point of the linear motor to the audio processor, the audio processor is used for generating a first audio file with the frequency point being the resonant frequency point, and the first audio file is used for driving the linear motor to vibrate. That is, the first audio file is directly generated by the audio processor, rather than being issued from the system processor to the audio processor, so that a fast start-stop of the linear motor can be realized. And because the system processor and the audio processor are both the system processor and the audio processor inherent in the terminal where the device is located, that is, in the application, the hardware in the device for driving the linear motor is both the inherent hardware in the terminal, and hardware such as an FPGA, a driving chip and the like do not need to be separately deployed for realizing the rapid start and stop of the linear motor, so that the cost of the terminal can be reduced.

Description

Apparatus and method for driving linear motor
Technical Field
The present disclosure relates to motor driving technologies, and in particular, to a device and a method for driving a linear motor.
Background
At present, in order to improve the user experience of a terminal, when a user performs some operations on the terminal, the terminal may prompt the user in a vibration manner, and particularly for a touch screen terminal that cancels a physical home key, the touch screen terminal vibrates when detecting that the user clicks a preset position of a touch screen, so that the user generates a tactile sensation similar to the physical home key. Wherein the vibration of the terminal is achieved by vibration of a linear motor installed in the terminal. In addition, for the terminal, it takes a certain time from the determination of the current vibration to the actual vibration, and in order to further improve the user experience, the time is generally as short as possible, that is, it is required that the linear motor in the terminal can be quickly started and stopped.
In the related art, in order to enable a linear motor in a terminal to be started and stopped quickly, a Field Programmable Gate Array (FPGA), a driving chip, and a frequency point tracking chip are deployed in the terminal. The frequency point tracking chip is used for determining the resonant frequency point of the linear motor through a back electromotive force method, a preset audio file is stored in the FPGA, and the preset audio file is an audio file determined in advance according to the resonant frequency point of the linear motor. When the system processor of the terminal determines that vibration is needed currently, the FPGA is informed to issue a preset audio file stored in the FPGA to a driving chip, and the driving chip outputs an audio signal of the preset audio file to the linear motor according to the preset audio file so as to drive the linear motor to vibrate.
The cost of the terminal with the hardware such as the FPGA and the driver chip is high, which is not favorable for the popularization and application of the linear motor in the terminal.
Disclosure of Invention
In order to solve the problem that the cost of a terminal is high due to the fact that the cost of hardware such as an FPGA and a driving chip is high in the related technology, the application provides a device and a method for driving a linear motor. The technical scheme is as follows:
in a first aspect, there is provided an apparatus for driving a linear motor, the apparatus comprising a system processor and an audio processor, the system processor being connected to the audio processor, the audio processor being connected to the linear motor;
the system processor is used for indicating the resonance frequency point of the linear motor to the audio processor;
the audio processor is used for generating a first audio file with the frequency point being the resonance frequency point, and the first audio file is used for driving the linear motor to vibrate.
In one possible example, the system processor is configured to run operating system software or application software in addition to indicating to the audio processor the resonant frequency point of the linear motor. In another possible example, the system processor may also be used to process communication signals, perform logic operations, or may also perform power consumption management, etc. That is, the system processor in the present application is a system processor for running an operating system or application software inherent in the terminal where the device is located.
In one possible example, the audio processor is used for processing at least one type of voice signals, such as telephone voice signals, song voice signals and the like, besides generating the first audio file with the frequency point being the resonance frequency point. That is, the audio processor in the present application is an audio processor for processing a voice signal inherent in the terminal where the device is located.
Therefore, in the application, hardware in the device for driving the linear motor is inherent hardware in the terminal, and hardware such as an FPGA and a driving chip does not need to be separately deployed for realizing quick start and stop of the linear motor, so that the cost of the terminal can be reduced.
Optionally, the apparatus further comprises a power amplifier, the audio processor being connected to the power amplifier, the power amplifier being connected to the linear motor;
the audio processor is further configured to perform digital-to-analog conversion on the first audio file to obtain a first audio signal, and send the first audio signal to the power amplifier;
the power amplifier is used for receiving the first audio signal, amplifying the first audio signal and outputting the amplified first audio signal to the linear motor so as to drive the linear motor to vibrate.
Since the signal for driving the linear motor to vibrate is an analog signal, the first audio file needs to be converted into the first audio signal by the audio processor. In addition, since the voltage for driving the linear motor to vibrate is usually large, the first audio signal needs to be amplified by the power amplifier to drive the linear motor to vibrate.
Optionally, the system processor is further configured to instruct the audio processor to generate a scan audio file;
the audio processor is further configured to generate the scanned audio file, where the scanned audio file includes audio segments of multiple frequency points, the multiple frequency points include resonance frequency points of the linear motor, and each frequency point is used to drive the linear motor to vibrate at a vibration acceleration corresponding to the frequency point;
the system processor is further configured to receive a plurality of vibration accelerations generated by the linear motor vibrating under the driving of the audio frequency segments of the plurality of frequency points from a gravity acceleration sensor, select a maximum vibration acceleration from the plurality of vibration accelerations, and determine the frequency point corresponding to the maximum vibration acceleration as the resonance frequency point.
In the application, the resonant frequency point of the linear motor is determined through the scanned audio file generated by the audio processor, the resonant frequency point of the linear motor does not need to be calculated through a back electromotive force method, and the process of determining the resonant frequency point of the linear motor is simplified.
Optionally, the apparatus further comprises the gravitational acceleration sensor;
the gravity acceleration sensor is used for respectively detecting the vibration acceleration generated by the vibration of the linear motor under the drive of the audio frequency segment of each frequency point and respectively reporting the vibration accelerations corresponding to the frequency points to the system processor.
The method comprises the steps that a resonance frequency point of a linear motor is determined by detecting vibration acceleration generated by the linear motor under the driving of audio frequency segments of different frequency points through a gravity acceleration sensor.
Optionally, the system processor is further configured to, when it is determined that the system processor is currently powered on and started, or when it is determined that the system processor is currently charged, or when it is determined that the resonant frequency point is not updated for more than a preset time period, execute an operation of instructing the audio processor to generate a scanned audio file.
In the application, the timing for determining the resonant frequency point of the linear motor can be when the linear motor is started, or when the linear motor is currently charged, or when the resonant frequency point exceeds a preset time length and is not updated.
Optionally, the system processor is further configured to determine whether short-time vibration or long-time vibration needs to be performed, execute an operation of indicating a resonant frequency point of the linear motor to the audio processor when it is determined that the short-time vibration needs to be performed, generate a second audio file when it is determined that the long-time vibration needs to be performed, and send the second audio file to the audio processor, where the second audio file is used to drive the linear motor to vibrate.
In addition, in order to avoid excessive data processing pressure on the audio processor due to the generation of the audio file, in the present application, the second audio file may be generated by the system processor when it is determined that long-time vibration is required.
Optionally, the audio processor is further configured to perform digital-to-analog conversion on the second audio file to obtain a second audio signal, and send the second audio signal to the power amplifier;
the power amplifier receives the second audio signal, amplifies the second audio signal, and outputs the amplified second audio signal to the linear motor to drive the linear motor to vibrate.
When the second audio file is generated by the system processor, it needs to be processed by the audio processor and power amplifier to drive the linear motor to vibrate.
In a second aspect, a method of driving a linear motor is provided, the method being used to implement the functions of the apparatus for driving a linear motor provided in the first aspect.
In a third aspect, there is provided an audio processor for driving a linear motor, the audio processor comprising a processor and a memory, the memory being configured to store a program for supporting the audio processor in performing a method of driving a linear motor to vibrate and optionally further to store data for implementing the audio processor in performing a method of driving a linear motor to vibrate. The processor is configured to execute programs stored in the memory. The audio processor may further comprise a communication bus for establishing a connection between the processor and the memory. The audio processor performs a method of driving a linear motor to vibrate comprising: receiving a resonance frequency point of a linear motor from a system processor, and generating a first audio file with the frequency point as the resonance frequency point, wherein the first audio file is used for driving the linear motor to vibrate.
Optionally, the audio processor performs the method of driving the linear motor to vibrate further comprising: performing digital-to-analog conversion on the first audio file to obtain a first audio signal; and sending the first audio signal to a power amplifier, and outputting the amplified first audio signal to the linear motor by the power amplifier so as to drive the linear motor to vibrate.
Optionally, the audio processor performs the method of driving the linear motor to vibrate further comprising: and generating a scanning audio file, wherein the scanning audio file comprises audio segments of a plurality of frequency points, the frequency points comprise resonance frequency points of the linear motor, and each frequency point is respectively used for driving the linear motor to vibrate at a vibration acceleration corresponding to the frequency point.
Optionally, the audio processor performs the method of driving the linear motor to vibrate further comprising: and receiving a second audio file from a system processor, performing digital-to-analog conversion on the second audio file to obtain a second audio signal, sending the second audio signal to the power amplifier, and outputting the amplified second audio signal to the linear motor by the power amplifier so as to drive the linear motor to vibrate.
In a fourth aspect, a computer-readable storage medium is provided, having stored therein instructions, which, when run on a computer or an audio processor according to the third aspect, cause the computer or the audio processor according to the third aspect to perform a corresponding method.
In a fifth aspect, a computer program product comprising instructions which, when run on a computer such as the audio processor of the third aspect, cause the computer such as the audio processor of the third aspect to perform a corresponding method is provided.
The beneficial effect that technical scheme that this application provided brought is: the device for driving the linear motor comprises a system processor and an audio processor, wherein the system processor is used for indicating the resonance frequency point of the linear motor to the audio processor, the audio processor is used for generating a first audio file with the frequency point being the resonance frequency point of the linear motor, and the first audio file is used for driving the linear motor to vibrate. That is, in the present application, the first audio file is directly generated by the audio processor, rather than being issued from the system processor to the audio processor, so that a fast start-stop of the linear motor can be realized. And because the system processor and the audio processor are both the system processor and the audio processor inherent in the terminal where the device is located, that is, in the application, the hardware in the device for driving the linear motor is both the inherent hardware in the terminal, and hardware such as an FPGA, a driving chip and the like do not need to be separately deployed for realizing the rapid start and stop of the linear motor, so that the cost of the terminal can be reduced.
Drawings
Fig. 1A is a schematic diagram of a terminal according to an embodiment of the present invention;
fig. 1B is a schematic diagram of an internal structure of a terminal according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an apparatus for driving a linear motor according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for updating resonant frequency points of a linear motor according to an embodiment of the present invention;
FIG. 4 is a flow chart of a method of driving a linear motor according to an embodiment of the present invention;
FIG. 5 is a flow chart of another method of driving a linear motor according to an embodiment of the present invention;
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. Before explaining the apparatus and method for driving a linear motor according to the embodiment of the present invention in detail, an application scenario of the embodiment of the present invention will be described.
At present, a terminal can prompt a user in a sound mode and can also prompt the user in a vibration mode so as to improve the user experience of the terminal. For example, for a conference scene, when a user performs some operations on a mobile phone, in order to avoid interference of a mobile phone prompt tone on other users in the conference scene, the mobile phone may prompt the user in a vibration manner. For another example, when the mobile phone receives an incoming call request, in order to prompt the user to respond to the incoming call request in time, the mobile phone may prompt the user in a manner of ringing and vibrating at the same time. In particular, when a user performs some operations in the terminal, in order to improve the user experience, the terminal may perform vibration feedback in time when the user's operations are detected. In some scenarios, the terminal may vibrate for a short time, i.e., the terminal may vibrate for a short time. At this time, the time for the terminal to vibrate should not be too long, so as to avoid affecting the user experience. That is, it is desirable that the linear motor in the terminal be capable of being started and stopped quickly. The embodiment of the invention is applied to the scene that the linear motor in the terminal can be started and stopped quickly.
Since the method for driving a linear motor according to the embodiment of the present invention is applied to an apparatus for driving a linear motor, the apparatus for driving a linear motor according to the embodiment of the present invention will be explained before the method for driving a linear motor is explained in detail. It should be noted that the apparatus for driving a linear motor according to the embodiment of the present invention is installed in any terminal that can vibrate by the vibration of the linear motor. For example, the terminal may be a mobile phone, a tablet computer, a game machine, a smart watch, or the like. Therefore, a terminal of the apparatus for driving a linear motor is described herein, and fig. 1A is a schematic diagram of a terminal 100 according to an embodiment of the present invention, as shown in fig. 1A, the terminal may be a touch-screen mobile phone.
Fig. 1B is a schematic diagram of an internal structure of a terminal 100 according to an embodiment of the present invention. Referring to fig. 1B, the terminal includes a processor assembly 101, a memory 102, an audio assembly 103, a sensor assembly 104, and a linear motor 105. Wherein the memory 102, the audio module 103 and the sensor module 104 are connected to the processor module 101, respectively, and the linear motor 105 is connected to the audio module 103.
The processor component 101 generally controls overall operation of the terminal 100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processor assembly 101 may include one or more processors 1011 to execute instructions to perform the method of driving a linear motor provided by the embodiments of the present invention. Further, the processor component 101 may also include one or more processing modules that facilitate interaction between the processor component 101 and other components. The one or more processing modules may be hardware accelerators, logic circuits, buses, or interfaces.
The Memory 102 may be a Read-Only Memory (ROM) or other types of static storage devices that can store static information and instructions, a Random Access Memory (RAM) or other types of dynamic storage devices that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile disks, blu-ray disks, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. In particular, the memory 102 may store instructions for the one or more processors 1011. The instructions are in the form of software code, including but not limited to operating system code instructions, application software code instructions, driver software code instructions, communication protocol software code instructions, video code instructions, audio code instructions, image compression code instructions, or open source software code instructions, among others. In addition, the memory 102 may also store data needed to be used or generated by the one or more processors 1011, including temporary data, permanent data, or configuration files, among others.
The audio component 103 is configured to output and/or input audio signals. For example, the audio component 101 includes a microphone configured to receive external audio signals when the terminal 100 is in a particular operating mode, such as a call mode, a recording mode, and a voice recognition mode. As another example, audio component 103 may include a speaker for outputting audio signals. As another example, audio component 103 may include a power amplifier for amplifying an audio signal, which may be a Class D (Class D) amplifier. For another example, the audio module 103 is a device for processing an audio signal, and may be integrated with the processor module 101, such as a semiconductor device, or may be a semiconductor device or a non-semiconductor device separate from the processor module 101.
The sensor assembly 104 includes one or more sensors for providing the terminal 100 with sensor data for state evaluation of various aspects. For example, the sensor assembly 104 can detect an open or closed state of the terminal 100; sensor assembly 104 may also detect a change in position of terminal 100 or a component of terminal 100, the presence or absence of user contact with terminal 100, orientation, acceleration or deceleration of terminal 100, or a change in temperature of the terminal.
Specifically, the sensor assembly 104 can include a gravitational acceleration sensor for detecting a vibration acceleration of the terminal 100 or a particular component in the terminal 100 during vibration, such as the linear motor 105, and the gravitational acceleration sensor for detecting a vibration acceleration of the linear motor 105 during vibration. The sensor assembly 104 may also include a light sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) image sensor or a Charge-coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor, or the like.
The linear motor 105 is used to provide vibration to the terminal 100, that is, the vibration of the terminal 100 is achieved by the vibration of the linear motor 105. Specifically, the implementation of the linear motor 105 to provide vibration to the terminal 100 will be explained in the following embodiments, which will not be described in detail herein.
In addition, the memory 102 is used for storing program codes for executing the method for driving the linear motor provided by the embodiment of the invention, and is executed by the processor assembly 101. The processor assembly 101 is used to execute program code stored in the memory 102. One or more software modules may be included in the program code. The terminal 100 shown in fig. 1A or 1B may drive the linear motor 105 through the processor assembly 101 and one or more software modules in the program code in the memory 102.
Next, a description will be given of an apparatus for driving a linear motor according to an embodiment of the present invention, which is applied to the terminal 100 shown in fig. 1A or 1B. Specifically, referring to fig. 2, the apparatus 200 includes a system processor 201 and an audio processor 202, and the system processor 201 and the audio processor 202 may be, for example, two processors in the processor assembly 101 shown in fig. 1B. The two processors may also be included within the processor 1011.
The system processor 201 is connected to the audio processor 202, and the audio processor 201 is connected to the linear motor 105 shown in fig. 1B. The system processor 201 is configured to indicate the resonant frequency point of the linear motor 105 to the audio processor 202, and the audio processor is configured to generate a first audio file having a frequency point corresponding to the resonant frequency point of the linear motor 105, and the first audio file is configured to drive the linear motor 105 to vibrate.
As described above, the system processor 201 and the audio processing 202 are the system processor and the audio processor inherent in the terminal.
In one example, since a typical terminal includes an audio processor such as a Codec (Codec) therein for processing a voice signal, the audio processor 202 may multiplex the audio processor within the terminal. The audio processor 202 may be further used for processing a Voice signal such as a telephone Voice signal, a Voice Over Internet Protocol (VOIP) signal, or other types of Voice signals, in addition to the function of driving the linear motor 105 to vibrate.
In one example, the system Processor 201 may be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), a microprocessor, an Application-Specific Integrated Circuit (ASIC), a Microcontroller (MCU), or an Integrated Circuit for implementing logical operations. For example, system processor 201 may include one or more central processors for running operating system software or application software. As another example, the system processor 201 may include a communication processor, such as a digital signal processor, for processing communication signals. As another example, system processor 201 may be a processor for power consumption management.
In addition, as shown in fig. 2, the apparatus further includes a power amplifier 203, and the power amplifier 203 is a power amplifier of the terminal 100. That is, the power amplifier 203 is the power amplifier in the audio component 103 shown in fig. 1B. The audio processor 202 is connected to the power amplifier 203, and the power amplifier 203 is connected to the linear motor 105.
Specifically, the audio processor 202 is further configured to perform digital-to-analog conversion on the first audio file to obtain a first audio signal, and send the first audio signal to the power amplifier 203. The power amplifier 203 is configured to receive the first audio signal, amplify the first audio signal, and output the amplified first audio signal to the linear motor 105 to drive the linear motor 105 to vibrate.
It should be noted that the power amplifier 203 is mainly used for performing an amplification process on the received first audio signal, so as to drive the linear motor 105 to vibrate through the amplified first audio signal. Therefore, if the requirement of the terminal 100 for the oscillating voltage changes, only the power amplifier 203 needs to be changed, and the driver chip does not need to be changed as in the related art, so that the related cost can be reduced.
It should be noted that, because the class-D power amplifier has higher operating efficiency, in the embodiment of the present invention, the power amplifier may be a class-D power amplifier. Of course, in practical applications, other types of power amplifiers may be selected according to the requirements of the terminal 100, and the embodiment of the present invention is not limited in this respect.
As shown in fig. 2, the apparatus 200 further includes a gravitational acceleration sensor 204, and the gravitational acceleration sensor 204 is a gravitational acceleration sensor of the terminal 100. That is, the gravitational acceleration sensor 204 is the gravitational acceleration sensor 204 in the sensor assembly 104 shown in fig. 1B. Wherein, the gravity acceleration sensor 204 is connected with the system processor 201.
The linear motor 105 itself has a resonance frequency point at which the linear motor 105 can resonate. The linear motor 105 can receive audio signals of different frequency points, and the linear motor 105 vibrates most strongly only when the frequency point of the received audio signal is near the resonance frequency point. In particular, when the frequency point of the audio signal received by the linear motor 105 is the resonance frequency point, the vibration intensity of the linear motor 105 reaches the maximum. The vibration intensity of the linear motor 105 can be represented by a vibration acceleration of the linear motor 105 in a vibration process, that is, when a frequency point of the audio signal received by the linear motor 105 is the resonance frequency point, the vibration acceleration of the linear motor 105 reaches a maximum.
Although the terminal 100 is usually shipped with the resonance frequency point corresponding to the linear motor 105, in actual use, the resonance frequency point of the linear motor 105 shifts as the number of times the linear motor 105 vibrates increases. At this time, if the linear motor 105 is continuously excited to vibrate by the resonance frequency point arranged at the time of shipment, the vibration intensity of the linear motor 105 is not maximized, and the vibration effect of the terminal 100 is affected. Therefore, in practical applications, the resonant frequency of the linear motor 105 generally needs to be updated.
Specifically, the system processor 201 is further configured to instruct the audio processor 202 to generate a scanned audio file, and the audio processor 202 is further configured to generate the scanned audio file, where the scanned audio file includes audio segments of multiple frequency points, the multiple frequency points include resonance frequency points of the linear motor 105, and each frequency point is respectively used to drive the linear motor 105 to vibrate at a vibration acceleration corresponding to the frequency point. An audio segment is a time segment in the time domain. That is, the linear motor 105 can generate vibration for each frequency point separately under the driving of the audio segments corresponding to the plurality of frequency points.
At this time, the system processor 201 is further configured to receive, from the gravitational acceleration sensor 204, a plurality of vibration accelerations generated by the linear motor 105 vibrating under the driving of the audio segment with a plurality of frequency points, select a maximum vibration acceleration from the plurality of vibration accelerations, and determine the frequency point corresponding to the maximum vibration acceleration as the resonant frequency point, so as to update the resonant frequency point of the linear motor.
The acceleration sensor 204 is configured to detect vibration accelerations generated by the linear motor 105 vibrating under the driving of the audio segment of each frequency point, and report the vibration accelerations corresponding to the frequency points to the system processor 201, respectively, and the system processor 201 updates the resonant frequency points of the linear motor 105 according to the above process.
That is, in the embodiment of the present invention, the gravitational acceleration sensor 204 inherent in the terminal 100 is directly utilized to determine the resonant frequency point of the linear motor 105, so that the resonant frequency point of the linear motor 105 is avoided being calculated by a back electromotive force method, and the process of determining the resonant frequency point of the linear motor 105 is simplified.
In addition, in the embodiment of the present invention, the system processor 201 is further configured to execute an operation of instructing the audio processor 202 to generate a scanned audio file when it is determined that the system processor is currently at power-on start, or when it is determined that the system processor is currently at charging, or when it is determined that the resonant frequency point is not updated for more than a preset time period. That is, in the embodiment of the present invention, the system processor 201 may update the resonant frequency point of the linear motor 105 at the above three occasions.
Further, in the embodiment of the present invention, in order to reduce the data processing pressure of the audio processor, the system processor 201 is further configured to determine whether short-time vibration or long-time vibration is required, and execute an operation of instructing the audio processor 202 of the resonant frequency point of the linear motor 105 when it is determined that short-time vibration is required, where the audio processor 202 generates a first audio file, and the first audio file is used for driving the linear motor to vibrate. A second audio file is generated when it is determined that long-time vibration is required and sent to the audio processor 202, the second audio file being used to drive the linear motor 105 to vibrate.
At this time, the audio processor 202 is further configured to perform digital-to-analog conversion on the second audio file to obtain a second audio signal, and send the second audio signal to the power amplifier 203, where the power amplifier 203 is configured to receive the second audio signal, amplify the second audio signal, and output the amplified second audio signal to the linear motor 105 to drive the linear motor 105 to vibrate.
In the embodiment of the present invention, when it is determined that the short-time vibration is required, the first audio file is directly generated by the audio processor 202, rather than being issued from the system processor 201 to the audio processor 202, so that the linear motor 105 can be rapidly started and stopped. Moreover, since the system processor 201 and the audio processor 202 are both the system processor and the audio processor inherent in the terminal 100 where the device is located, that is, in the embodiment of the present invention, the hardware in the device 200 for driving the linear motor is both the inherent hardware in the terminal 100, and it is not necessary to separately deploy the hardware such as the FPGA and the driving chip in order to realize the fast start and stop of the linear motor 105, so that the cost of the terminal 100 can be reduced.
Next, a method for driving a linear motor according to an embodiment of the present invention is explained, where it should be noted that the method for driving a linear motor according to an embodiment of the present invention mainly includes two aspects, that is, updating a resonant frequency point of a linear motor 105 according to an apparatus 200 for driving a linear motor shown in fig. 2; the other is to drive the linear motor 105 to vibrate according to the device 200 for driving the linear motor shown in fig. 2. Also, as for the content of the second aspect, since the vibration types of the terminal performing vibration include short-time vibration and long-time vibration, for the two vibration types, the linear motor 105 may be driven to vibrate according to the apparatus for driving a linear motor 200 shown in fig. 2 in the same manner; the linear motor 105 may also be driven to vibrate according to the linear motor driving apparatus 200 shown in fig. 2 in different ways according to different vibration types. The following examples will be used to explain the above various cases, respectively.
Fig. 3 is a flowchart of a method for updating a resonant frequency point of a linear motor according to an embodiment of the present invention, where the method is applied to the terminal 100 shown in fig. 1A or fig. 1B, and specifically is performed by the apparatus 200 for driving a linear motor shown in fig. 2. As shown in fig. 3, the method comprises the steps of:
step 301: the system processor 201 instructs the audio processor 202 to generate a scanned audio file.
Specifically, when the system processor 201 determines that the resonant frequency point of the linear motor 105 needs to be updated currently, the system processor 201 sends a frequency sweep request to the audio processor, where the frequency sweep request carries the resonant frequency point of the linear motor 105, so that the apparatus 200 for driving the linear motor shown in fig. 2 updates the resonant frequency point of the linear motor 105. In practical applications, since the resonant frequency of the linear motor 105 shifts after being used for a period of time, the resonant frequency of the linear motor 105 does not need to be updated in real time. In the embodiment of the present invention, the apparatus 200 for driving the linear motor updates the resonant frequency of the linear motor 105 mainly in the following three occasions.
On the first occasion, when the system processor 201 determines that it is currently at the power-on start, an operation of instructing the audio processor 202 to generate a scan audio file is performed. That is, when the system processor 201 determines that it is currently at power-on start, step 301 is executed. The system processor 201 may determine whether the terminal 100 is currently in a power-on state according to whether a system power or a power-on program in the terminal is started.
On the second occasion, when the system processor 201 determines that it is currently in the charging, an operation of instructing the audio processor 202 to generate a scan audio file is performed. Specifically, the system processor 201 may determine whether it is currently in charge according to whether the system power supply in the terminal 100 is charged.
At the third time, when the system processor 201 determines that the resonant frequency point is not updated after exceeding the preset time, the operation of instructing the audio processor 202 to generate the scanned audio file is executed. Specifically, the system processor 201 determines the time before the current time and when the resonant frequency point of the linear motor 105 is updated the last time from the current time, and if the difference between the determined time and the current time exceeds the preset time, determines that the resonant frequency point exceeds the preset time and is not updated. If the difference between the determined time and the current time does not exceed the preset time length, it indicates that the time between the current time and the latest time for updating the linear motor 105 is short, and it is not necessary to update the resonant frequency point of the linear motor 105 any more.
The preset time period is a preset time period, and the preset time period may be 24 hours (h), a week or a month, which is not specifically limited herein.
The three timings may be used individually or in combination. For example, when the system processor 201 determines that the current charging is performed and it is determined that the resonant frequency point is not updated after exceeding the preset time period, the operation of instructing the audio processor 202 to generate the scanned audio file is performed.
For example, the preset time is 24h, when the system processor 201 determines that the terminal 100 is currently in charging, the difference between the time of updating the resonant frequency point of the linear motor 105 for the last time and the current time is determined, if the difference exceeds 24h, step 301 is executed, and if the difference does not exceed 24h, no operation is executed.
In addition, the above resonance frequency point is also the resonance frequency point of the linear motor 105 that is updated last time, that is, in the embodiment of the present invention, when the apparatus 200 for driving the linear motor updates the resonance frequency point of the linear motor 105 every time, the updated resonance frequency point is stored for the next update. The frequency points may be stored in memory 102 of FIG. 1B or in an internal memory of system processor 201. For example, if the resonant frequency of the linear motor 105 that is updated last time is 175Hz, the resonant frequency of the stored linear motor is 175 Hz.
It should be noted that, in addition to the above three timings, the apparatus 200 for driving the linear motor may also update the resonant frequency point of the linear motor 105 at other timings, and the embodiment of the invention is not limited in this respect. For example, the apparatus 200 for driving a linear motor may update the resonant frequency of the linear motor 105 every first preset time period, where the first preset time period is a preset time period. For example, the first preset time period is 1 month, that is, the apparatus 200 for driving the linear motor may perform the step 301 every other month.
Step 302: the audio processor 202 generates a scanned audio file that includes audio segments for a plurality of frequency points that include resonant frequency points of the linear motor 105, and each frequency point is used to drive the linear motor 105 to vibrate at a vibration acceleration corresponding to the frequency point.
Since the determination of the resonant frequency point of the linear motor 105 requires that the linear motor 105 vibrates at a plurality of different frequency points, the resonant frequency point of the linear motor 105 is determined according to the vibration intensity. Therefore, the scanned audio file needs to include audio segments of multiple frequency points. In addition, the audio time length of the audio segment of each frequency point is a second preset time length.
Note that, even if the resonant frequency point of the linear motor 105 is shifted, the shifted resonant frequency point is near the resonant frequency point before the shift, and therefore the plurality of frequency points should include the previously stored resonant frequency point of the linear motor 105, and particularly, the center frequency point of the plurality of frequency points may be the resonant frequency point of the linear motor.
For example, if the stored resonant frequency point of the linear motor is 175Hz, the plurality of frequency points may range from 173Hz to 178Hz with an interval of 1 Hz. That is, the plurality of frequency points are respectively: 173Hz, 174Hz, 175Hz, 176Hz, 177Hz, 178 Hz. And, the audio duration of each frequency point is 150ms, that is, the total audio duration of all the audio segments included in the scanned audio file is 900 ms.
Specifically, as shown in fig. 2, the audio processor 202 performs digital-to-analog conversion on the scanned audio file to obtain an audio signal of the scanned audio file, and sends the audio signal of the scanned audio file to the power amplifier 203, and when the power amplifier 203 receives the audio signal of the scanned audio file, the audio signal of the scanned audio file is amplified, and the audio signals of the audio segments of the multiple frequency points are sequentially output according to a certain order, that is, the power amplifier 203 sequentially plays the audio segments of the multiple frequency points to the linear motor 105 according to a certain order. When the power amplifier 203 outputs the audio signal of the audio segment of each frequency point, the linear motor 105 vibrates according to the audio segment of the frequency point, and the vibration duration is the audio duration of the audio segment of the frequency point.
For example, the plurality of frequency points are respectively: 173Hz, 174Hz, 175Hz, 176Hz, 177Hz, 178 Hz. And, the audio duration of each frequency point is 150 ms. At this time, the power amplifier 203 sequentially outputs an audio signal of 173Hz, an audio signal of 174Hz, an audio signal of 175Hz, an audio signal of 176Hz, an audio signal of 177Hz, and an audio signal of 178Hz to the linear motor 105, with the duration of the audio segment at each frequency point being 150 ms. The linear motor 105 vibrates according to the audio frequency segment of each frequency point, and the vibration time under the audio frequency segment of each frequency point is 150 ms.
The power amplifier 203 outputs the audio signal of the scanned audio file to the linear motor 105 in a Pulse Width Modulation (PWM) form, although the audio signal of the scanned audio file may also be in other forms.
Step 303: the gravitational acceleration sensor 204 detects the vibration acceleration generated by the linear motor 105 vibrating under the driving of the audio frequency segment of each frequency point, and reports a plurality of vibration accelerations corresponding to the frequency points to the system processor 201.
Because the scanned audio file includes a plurality of frequency points, and the audio duration of the audio segment of each frequency point is the second preset duration, and the linear motor 105 has different vibration intensities, that is, different vibration accelerations of the linear motor 105, in the process of vibrating according to the audio segment of each frequency point. When the frequency point coincides with the resonance frequency point of the linear motor 105, the vibration acceleration of the linear motor 105 reaches the maximum. Therefore, in order to determine the resonant frequency point of the linear motor 105, the vibration acceleration generated by the linear motor 105 vibrating under the audio frequency segment driving of different frequency points needs to be detected by the gravitational acceleration sensor 204.
For example, the plurality of frequency points are respectively: 173Hz, 174Hz, 175Hz, 176Hz, 177Hz and 178Hz, and the acceleration sensor 204 determines the vibration acceleration corresponding to 173Hz, the vibration acceleration corresponding to 174Hz, the vibration acceleration corresponding to 175Hz, the vibration acceleration corresponding to 176Hz, the vibration acceleration corresponding to 177Hz and the vibration acceleration corresponding to 178Hz in turn during the process that the linear motor 105 vibrates according to the audio frequency segment of each frequency point.
In one example, the ODR of the acceleration sensor 204 is used to indicate the data sampling frequency of the acceleration sensor 204, and thus, when the acceleration sensor 204 determines the acceleration, the ODR of the acceleration sensor 204 may affect the accuracy of the acceleration sensor 204 in determining the acceleration. Also, in practical applications, the ODR of the terminal is usually set low, which is not favorable for the gravitational acceleration sensor 204 to determine the vibration acceleration of the linear motor 105 at this time. Therefore, in the embodiment of the present invention, the ODR may be set before the acceleration sensor 204 detects the vibration acceleration corresponding to each frequency point.
In addition, because the offset of the resonant frequency point of the linear motor may be small, for example, the resonant frequency point is only offset by 1Hz, at this time, in order to ensure that the acceleration sensor can accurately detect the vibration acceleration corresponding to different frequency points, the sampling frequency of the acceleration sensor should be increased, that is, the ODR of the acceleration sensor is also increased.
Specifically, the gravitational acceleration sensor 204 determines the maximum frequency point of all frequency points included in the preset ODR range, and determines the maximum frequency point as the ODR of the gravitational acceleration sensor 204. In order to ensure that the sampling frequency of the gravitational acceleration in the process of determining the vibration acceleration is high, the maximum frequency point is a frequency point with a preset multiplying factor which is greater than the stored resonance frequency point of the linear motor, and the preset multiplying factor can be 20, 25 or 30.
For example, the stored resonant frequency point of the linear motor is 175Hz, the preset multiplying factor is 25, and 25 times of the stored resonant frequency point of the linear motor is 4.375 khz. The preset ODR range is 100Hz to 10 khz, the maximum frequency point in the preset ODR range is 10 khz, and the 10 khz is greater than 4.375 khz, so the gravity acceleration sensor 204 sets the ODR to 10 khz before detecting the vibration acceleration corresponding to each frequency point.
In addition, since the determination of the resonant frequency point of the linear motor 105 according to the vibration accelerations corresponding to the multiple frequency points is performed by the system processor 201, after the vibration accelerations corresponding to the multiple frequency points are determined by the acceleration due to gravity sensor 204, the vibration accelerations corresponding to the multiple frequency points need to be reported to the system processor 201, and the system processor 201 determines the resonant frequency point of the linear motor 105 according to the following step 304.
The acceleration sensor 204 reports the vibration acceleration corresponding to the frequency points to the system processor 201, that is, the acceleration sensor 204 reports the corresponding relationship between each frequency point and the vibration acceleration to the system processor 201.
For example, table 1 shows a correspondence relationship between frequency points and vibration acceleration according to an embodiment of the present invention, where as shown in table 1, frequency points such as F1, F2, and F3 are the frequency points, vibration acceleration corresponding to F1 is g1, vibration acceleration corresponding to F2 is g2, and vibration acceleration corresponding to F3 is g 3.
TABLE 1
Frequency point Acceleration of vibration
F1 g1
F2 g2
F3 g3
Step 304: the system processor 201 receives a plurality of vibration accelerations generated by the linear motor 105 vibrating under the driving of the audio frequency segments of the plurality of frequency points from the gravitational acceleration sensor 204, selects the maximum vibration acceleration from the plurality of vibration accelerations, and determines the frequency point corresponding to the maximum vibration acceleration as the resonance frequency point.
The vibration acceleration corresponding to the multiple frequency points will have the maximum value, and therefore, the system processor 201 can update the resonant frequency point of the linear motor 105 according to the vibration acceleration corresponding to the multiple frequency points. That is, the system processor 201 determines the maximum vibration acceleration among the vibration accelerations corresponding to the multiple frequency points, and updates the stored resonance frequency point to the frequency point corresponding to the maximum vibration acceleration.
For example, if the vibration acceleration corresponding to 177Hz is the largest among the frequency points 173Hz to 178Hz, the stored resonance frequency point 175Hz is updated to 177Hz, that is, the resonance frequency point of the linear motor is determined to be 177 Hz.
In the embodiment of the present invention, the vibration acceleration of the linear motor 105 in the audio frequency segment of multiple frequency points is determined directly by using the gravitational acceleration sensor 204 inherent in the terminal 100, and the multiple vibration accelerations corresponding to the multiple frequency points are reported to the system processor 201, and the system processor 201 determines the resonance frequency point of the linear motor 105 according to the vibration acceleration corresponding to the multiple frequency points, so as to avoid calculating the resonance frequency point of the linear motor 105 by a back electromotive force method, and simplify the process of determining the resonance frequency point of the linear motor 105.
Fig. 4 is a flowchart of a method for driving a linear motor according to an embodiment of the present invention, which is applied to the terminal 100 shown in fig. 1A or 1B, and is specifically executed by the apparatus for driving a linear motor 200 shown in fig. 2, wherein the linear motor 105 is driven to vibrate according to the apparatus for driving a linear motor 200 shown in fig. 2 in the same manner for different vibration types. As shown in fig. 4, the method comprises the steps of:
step 401: the system processor 201 indicates the resonant frequency points of the linear motor to the audio processor 202.
Specifically, when the system processor 201 determines that vibration is currently required, a vibration request is sent to the audio processor 202, which carries the stored resonant frequency points of the linear motor 105.
It should be noted that, since the terminal 100 may need to vibrate in many scenarios, the system processor 201 may determine that vibration is needed currently in many implementations.
Specifically, in a possible implementation manner, the terminal 100 further includes a screen detection component, where the screen detection component is configured to detect whether there is a preset operation on the screen of the terminal 100 currently, and when the screen detection component determines that there is a preset operation on the screen of the terminal 100 currently, report a position of the preset operation in the screen of the terminal 100 to the system processor 201, the system processor 201 determines whether a vibration prompt needs to be performed on the preset operation according to the position of the preset operation in the screen of the terminal 100, and if the system processor 201 determines that the vibration prompt needs to be performed on the preset operation, performs an operation of sending a vibration request to the audio processor 202.
At least one screen position where a vibration prompt is required is pre-stored in the system processor 201, at this time, the system processor 201 determines whether the vibration prompt is required for the preset operation, that is, whether the position of the preset operation in the screen of the terminal 100 is the position of the at least one pre-stored screen position, if so, it is determined that the vibration prompt is required for the preset operation, and if not, no operation is required. In addition, a preset operation is triggered by the user, and the preset operation may be a click operation, a slide operation, or the like.
For example, for a touch screen terminal that cancels a physical home key, when a screen detection component included in the touch screen terminal determines that a click operation for a screen currently exists, the screen detection component determines a position where the click operation acts on the screen, and reports the position to the system processor 201. The system processor 201 determines whether the position is a pre-stored screen position, determines that a vibration prompt is currently required for the click operation if the position is the pre-stored screen position, and ignores the click operation if the position is not the pre-stored screen position.
In another possible implementation manner, the terminal 100 further includes a communication component, where the communication component is configured to receive a communication message sent by another external terminal or a server, and when the communication component receives the communication message, the communication message is reported to the system processor, and the system processor determines whether the communication message needs to be prompted by vibration according to the type of the communication message.
The system processor is stored with the type of the communication message needing vibration prompt in advance. At this time, when receiving the communication message reported by the communication component, the system processor 201 determines whether the type of the reported communication message is the type of the communication message that needs to be vibration-prompted and, if the type of the reported communication message is the type of the communication message that needs to be vibration-prompted and is stored in advance, determines that the communication message needs to be vibration-prompted. And if the type of the reported communication message is not the type of the prestored communication message needing vibration prompting, ignoring the communication message.
For example, the type of the communication message that needs to be prompted by vibration is stored in the system processor in advance includes: the system processor determines that vibration is currently required when determining that the type of the reported communication message is the incoming call request or the social application communication information, and executes an operation of sending a vibration request to the audio processor 202.
It should be noted again that, since the terminal 100 may need to vibrate in many scenarios, the implementation manner of determining that vibration is currently needed by the system processor 201 is not limited to the above two possible implementation manners, and the embodiment of the present invention is not specifically limited herein.
Step 402: the audio processor 202 generates a first audio file having a frequency point that is the resonant frequency point.
Specifically, when the audio processor 201 receives the vibration request, according to the resonance frequency point of the linear motor 105 carried in the vibration request, a first audio file with the frequency point being the resonance frequency point is generated, and the first audio file is used for driving the linear motor to vibrate.
In order to optimize the vibration effect of the linear motor 105, the frequency point of the audio segment included in the first audio file should be the resonance frequency point of the linear motor 105. In addition, the duration of the audio segment is a third preset duration, which is a preset duration, and the third preset duration may be 10ms, 20ms, or 30 ms.
Step 403: the audio processor 202 performs digital-to-analog conversion on the first audio file to obtain a first audio signal, and sends the first audio signal to the power amplifier 203.
Since the first audio file is usually a digital signal, and the signal for driving the linear motor 105 to vibrate is usually an analog signal, the audio processor 202 needs to obtain the first audio signal through step 403.
Step 404: the power amplifier 203 receives the first audio signal, amplifies the first audio signal, and outputs the amplified first audio signal to the linear motor 105 to drive the linear motor 105 to vibrate.
Further, to ensure that the first audio signal can drive the linear motor 105 to vibrate. The power amplifier 203 amplifies the first audio signal and outputs the amplified first audio signal to the linear motor 105 to drive the linear motor to vibrate.
The power amplifier 203 amplifies the first audio signal, that is, the power amplifier 203 amplifies the driving voltage of the first audio signal to a predetermined voltage.
Similarly, the power amplifier 203 outputs the amplified first audio signal to the linear motor 105 in the PWM format, but the amplified first audio signal may be in another format.
In the embodiment of the present invention, the first audio file is directly generated by the audio processor 202, rather than being issued from the system processor 201 to the audio processor 202, so that the fast start and stop of the linear motor 105 can be realized. Moreover, since the system processor 201 and the audio processor 201 are both the system processor and the audio processor inherent in the terminal where the apparatus shown in fig. 2 is located, that is, in the embodiment of the present invention, the hardware in the apparatus 200 for driving the linear motor is both the inherent hardware in the terminal 100, and it is not necessary to separately deploy hardware such as an FPGA and a driver chip in order to realize the fast start and stop of the linear motor 105, so that the cost of the terminal 100 can be reduced.
Since the terminal 100 may need to vibrate in many scenes, and may need to vibrate for a short time in some scenes and vibrate for a long time in other scenes. For short-time vibration, the influence of the quick start and stop of the linear motor on the use experience of the user is large, and for long-time vibration, the influence of the quick start and stop of the linear motor on the use experience of the user is small. Therefore, another flowchart of a method for driving a linear motor is also provided in the embodiment of the present invention, and the method is also applied to the terminal 100 shown in fig. 1A or fig. 1B, and is specifically executed by the apparatus for driving a linear motor 200 shown in fig. 2, in which the apparatus for driving a linear motor 200 drives the linear motor 105 to vibrate in different ways according to different vibration types, as shown in fig. 5, and the method includes the following steps:
step 501: the system processor 201 determines whether a short or long vibration is required.
As shown in step 401 in the embodiment shown in fig. 4, the terminal 100 may need to vibrate in many scenes, and therefore, the system processor 201 may determine that long-time vibration or short-time vibration is currently needed according to the current scene needing vibration. That is, the correspondence between different scenes and vibration types is stored in advance in the system processor 201. The vibration type includes a long-time vibration and a short-time vibration, among others.
For the scenes in the two possible implementations in step 401 in fig. 4, for convenience of subsequent description, the scene in one possible implementation is referred to as a touch screen scene, and the scene in another possible implementation is referred to as a prompt message scene. That is, the touch screen scene is a scene in which the terminal vibrates when the user performs a preset operation on the screen of the terminal; the prompting message scene is a scene in which the terminal prompts the communication message through vibration when receiving the communication message. The system processor 201 pre-stores the correspondence between the two scenes and the vibration types, that is, the vibration type corresponding to the touch screen scene is short-time vibration, and the vibration type corresponding to the prompt message scene is long-time vibration.
When the system processor 201 determines that vibration is currently required, it determines whether the scene is a touch screen scene or a prompt message scene according to the current scene that needs to be vibrated, and when the scene is the touch screen scene, the following step 502 is executed, and when the scene is the prompt message scene, the following step 503 is executed. Of course, if the terminal needs to vibrate in other scenes, it may be determined whether short-time vibration or long-time vibration is currently needed according to the above method.
Step 502: when the system processor 201 determines that short-time vibration is needed, the resonant frequency point of the linear motor is indicated to the audio processor 202, and the audio processor 202 generates a first audio file with the frequency point being the resonant frequency point of the linear motor, wherein the first audio file is used for driving the linear motor 105 to vibrate.
Since the first audio file is generated by the audio processor 202 in the embodiment shown in fig. 4, but not the audio file generated or issued by the system processor 201, the whole audio path in the apparatus shown in fig. 2 does not need to be opened, thereby realizing the fast start and stop of the linear motor. Therefore, when the system processor 201 determines that the short-time vibration is currently required, the first audio file generated by the audio processor 202 is used for driving the linear motor to vibrate so as to improve the user experience of the terminal 100 when the short-time vibration is performed.
Specifically, the implementation manner of step 502 may refer to the vibration manner of driving the linear motor in the embodiment shown in fig. 4, that is, when the system processor 201 determines that short-time vibration is currently required, the operations of steps 401 to 404 in the embodiment shown in fig. 4 are performed.
Step 503: a second audio file is generated when the system processor 201 determines that a long vibration is required and sent to the audio processor 202, which is used to drive the linear motor 105 to vibrate.
When the system processor 201 determines that a long vibration is currently required, the fast start and stop of the linear motor has little impact on the user experience. Also, the audio processor 202 is generally limited in data processing capability, and thus, in order to avoid excessive data processing pressure of the audio processor 202, when the system processor 201 determines that long-time vibration is currently required, the second audio file is generated by the system processor 201 and the linear motor is driven to vibrate by the second audio file.
Specifically, when the audio processor 202 receives the second audio file, it performs digital-to-analog conversion on the second audio file to obtain a second audio signal, and sends the second audio signal to the power amplifier 203. The power amplifier 203 receives the second audio signal, amplifies the second audio signal, and outputs the amplified second audio signal to the linear motor 105 to drive the linear motor 105 to vibrate. That is, the audio processor 202 and the power amplifier 203 process the second audio file to drive the linear motor 105 to vibrate.
The implementation manner of the audio processor 202 and the power amplifier 203 for processing the second audio file is the same as the implementation manner of the audio processor 202 and the power amplifier 203 for processing the first audio file in the embodiment shown in fig. 4, and will not be described in detail here.
In addition, in order to realize long-time vibration, the audio time length of the second audio file is longer than that of the first audio file.
In the embodiment of the present invention, when the system processor 201 determines that the short-time vibration is required, the audio processor 202 generates a first audio file, which is used to drive the linear motor 105 to vibrate, so as to realize the fast start and stop of the linear motor 105. If it is determined that long-time vibration is required, a second audio file for driving the linear motor to vibrate to relieve the data processing pressure of the audio processor 202 is generated by the system processor 201. In addition, since the system processor 201 and the audio processor 202 are both the system processor and the audio processor inherent in the terminal where the apparatus shown in fig. 2 is located, that is, in the embodiment of the present invention, the hardware in the apparatus 200 for driving the linear motor is both the inherent hardware in the terminal 100, and it is not necessary to separately deploy hardware such as an FPGA and a driver chip in order to realize the fast start and stop of the linear motor 105, so that the cost of the terminal 100 can be reduced.
In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. I.e., the system processor 201 and the audio processor 202 may be implemented by software, hardware, firmware, or any combination thereof. When implemented in software, the system processor 201 and the audio processor 202 may be implemented in whole or in part in the form of computer program products. The computer program product includes one or more computer instructions, including, for example, system processor instructions and audio processor instructions. When loaded and executed on a computer or processor, cause the flow or functions described in accordance with the embodiments of the invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The term "connected" in the embodiments of the present invention should be understood as a coupling relationship, which includes direct connection or indirect connection through a third party device.
The above-mentioned embodiments are provided not to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (13)

1. An apparatus for driving a linear motor, the apparatus being installed in a terminal, the apparatus comprising a system processor and an audio processor, the system processor being connected to the audio processor, the audio processor being connected to the linear motor, and the system processor and the audio processor being both the system processor and the audio processor inherent in the terminal;
the system processor is used for indicating the resonance frequency point of the linear motor to the audio processor;
the audio processor is used for generating a first audio file with the frequency point being the resonance frequency point, and the first audio file is used for driving the linear motor to vibrate;
the system processor is further configured to instruct the audio processor to generate a scanned audio file;
the audio processor is further configured to generate the scanned audio file, where the scanned audio file includes audio segments of multiple frequency points, the multiple frequency points include resonance frequency points of the linear motor, and each frequency point is used to drive the linear motor to vibrate at a vibration acceleration corresponding to the frequency point;
the system processor is further configured to receive a plurality of vibration accelerations generated by the linear motor vibrating under the driving of the audio frequency segments of the plurality of frequency points from a gravity acceleration sensor, select a maximum vibration acceleration from the plurality of vibration accelerations, and determine the frequency point corresponding to the maximum vibration acceleration as the resonance frequency point.
2. The apparatus of claim 1, further comprising a power amplifier, the audio processor connected to the power amplifier, the power amplifier connected to the linear motor;
the audio processor is further configured to perform digital-to-analog conversion on the first audio file to obtain a first audio signal, and send the first audio signal to the power amplifier;
the power amplifier is used for receiving the first audio signal, amplifying the first audio signal and outputting the amplified first audio signal to the linear motor so as to drive the linear motor to vibrate.
3. The apparatus of claim 1, further comprising the gravitational acceleration sensor;
the gravity acceleration sensor is used for respectively detecting the vibration acceleration generated by the vibration of the linear motor under the drive of the audio frequency segment of each frequency point and respectively reporting the vibration accelerations corresponding to the frequency points to the system processor.
4. The apparatus of claim 1, wherein the system processor is further configured to instruct the audio processor to generate a scanned audio file when it is determined that the apparatus is currently at power-on start, or when it is determined that the apparatus is currently at charging, or when it is determined that the resonant frequency point is not updated for more than a preset time period.
5. The apparatus as claimed in any one of claims 1, 3 and 4, wherein the system processor is further configured to determine whether a short-time vibration or a long-time vibration is required, execute an operation of indicating a resonant frequency point of the linear motor to the audio processor when it is determined that the short-time vibration is required, generate a second audio file when it is determined that the long-time vibration is required, and transmit the second audio file to the audio processor, the second audio file being used for driving the linear motor to vibrate.
6. The apparatus of claim 5, further comprising a power amplifier, the audio processor connected to the power amplifier, the power amplifier connected to the linear motor;
the audio processor is further configured to perform digital-to-analog conversion on the second audio file to obtain a second audio signal, and send the second audio signal to the power amplifier;
the power amplifier is used for receiving the second audio signal, amplifying the second audio signal and outputting the amplified second audio signal to the linear motor so as to drive the linear motor to vibrate.
7. A method of driving a linear motor, for use in an apparatus for driving a linear motor, the method comprising:
a system processor indicates a resonance frequency point of a linear motor to an audio processor, wherein the system processor and the audio processor are both the system processor and the audio processor which are inherent in a terminal where the device is located;
the audio processor generates a first audio file with the frequency point being the resonance frequency point, and the first audio file is used for driving the linear motor to vibrate;
the method further comprises the following steps:
the system processor instructing the audio processor to generate a scanned audio file;
the audio processor generates a scanned audio file, the scanned audio file comprises audio segments of a plurality of frequency points, the plurality of frequency points comprise resonance frequency points of the linear motor, and each frequency point is used for driving the linear motor to vibrate at a vibration acceleration corresponding to the frequency point;
the system processor receives a plurality of vibration accelerations generated by the linear motor vibrating under the driving of the audio frequency segments of the frequency points from a gravity acceleration sensor;
and the system processor selects the maximum vibration acceleration from the plurality of vibration accelerations, and determines the frequency point corresponding to the maximum vibration acceleration as the resonance frequency point.
8. The method of claim 7, wherein after the audio processor generates the first audio file having the frequency point that is the resonant frequency point, further comprising:
the audio processor performs digital-to-analog conversion on the first audio file to obtain a first audio signal;
the audio processor sends the first audio signal to a power amplifier;
the power amplifier receives the first audio signal, amplifies the first audio signal, and outputs the amplified first audio signal to the linear motor to drive the linear motor to vibrate.
9. The method of claim 7, wherein the method further comprises:
the gravity acceleration sensor respectively detects the vibration acceleration generated by the vibration of the linear motor under the driving of the audio frequency segment of each frequency point;
and the gravity acceleration sensor reports a plurality of vibration accelerations corresponding to the frequency points to the system processor respectively.
10. The method of claim 7, wherein prior to the system processor instructing the audio processor to generate the scanned audio file, further comprising:
when the system processor determines that the system processor is currently in starting up, executing operation for instructing the audio processor to generate a scanning audio file; alternatively, the first and second electrodes may be,
when the system processor determines that the system processor is currently in charging, performing an operation of instructing the audio processor to generate a scan audio file; alternatively, the first and second electrodes may be,
and when the system processor determines that the resonant frequency point is not updated after exceeding the preset time, executing an operation of indicating the audio processor to generate a scanned audio file.
11. The method of any one of claims 7, 9 and 10, wherein prior to the system processor indicating to the audio processor the resonant frequency point of the linear motor, further comprising:
the system processor judges whether short-time vibration or long-time vibration is needed;
when the system processor determines that the short-time vibration is needed, executing operation of indicating a resonance frequency point of the linear motor to the audio processor;
and when the system processor determines that the long-time vibration is needed, generating a second audio file, and sending the second audio file to the audio processor, wherein the second audio file is used for driving the linear motor to vibrate.
12. The method of claim 11, wherein after the system processor sends the second audio file to the audio processor, further comprising:
the audio processor performs digital-to-analog conversion on the second audio file to obtain a second audio signal, and sends the second audio signal to the power amplifier;
the power amplifier receives the second audio signal, amplifies the second audio signal, and outputs the amplified second audio signal to the linear motor to drive the linear motor to vibrate.
13. A computer-readable storage medium having stored therein instructions which, when executed on a computer, cause the computer to perform the steps of the method according to any one of claims 7-12.
CN201710619451.7A 2017-07-26 2017-07-26 Apparatus and method for driving linear motor Active CN109308114B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710619451.7A CN109308114B (en) 2017-07-26 2017-07-26 Apparatus and method for driving linear motor
PCT/CN2018/081901 WO2019019694A1 (en) 2017-07-26 2018-04-04 Device and method for driving linear motor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710619451.7A CN109308114B (en) 2017-07-26 2017-07-26 Apparatus and method for driving linear motor

Publications (2)

Publication Number Publication Date
CN109308114A CN109308114A (en) 2019-02-05
CN109308114B true CN109308114B (en) 2021-01-05

Family

ID=65040972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710619451.7A Active CN109308114B (en) 2017-07-26 2017-07-26 Apparatus and method for driving linear motor

Country Status (2)

Country Link
CN (1) CN109308114B (en)
WO (1) WO2019019694A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110086403B (en) * 2019-04-18 2021-04-27 瑞声科技(新加坡)有限公司 Motor driving signal setting method, electronic device and storage medium
CN111076807B (en) * 2019-12-18 2022-03-04 瑞声科技(新加坡)有限公司 Method, device and equipment for processing vibration signal and readable medium
CN114125131B (en) * 2020-08-31 2022-12-30 华为技术有限公司 Channel configuration method and device of audio drive motor, electronic equipment and storage medium
CN114509156B (en) * 2020-11-16 2023-10-20 深圳市万普拉斯科技有限公司 Linear motor calibration method, electronic device and storage medium
CN115703007B (en) * 2021-08-12 2024-04-12 荣耀终端有限公司 Vibration output method and related device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729625A (en) * 2010-01-05 2010-06-09 青岛海信移动通信技术股份有限公司 Method for driving motor of mobile phone and mobile equipment
CN104520167A (en) * 2012-08-03 2015-04-15 株式会社电装 Device for controlling electrical power steering system and method for same
CN106877783A (en) * 2017-03-31 2017-06-20 珠海市魅族科技有限公司 A kind of motor drive circuit, method and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697470B (en) * 2009-10-30 2011-05-25 青岛海信移动通信技术股份有限公司 Method for controlling vibration of linear motor
KR101838633B1 (en) * 2011-07-22 2018-03-14 엘지전자 주식회사 Mobile terminal and vibration power control method thereof
US20130073295A1 (en) * 2011-09-21 2013-03-21 Apple Inc. Audio codec with vibrator support
CN106301137B (en) * 2016-08-31 2018-11-02 歌尔股份有限公司 Method, apparatus, system and the electronic equipment of active control linear motor vibration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729625A (en) * 2010-01-05 2010-06-09 青岛海信移动通信技术股份有限公司 Method for driving motor of mobile phone and mobile equipment
CN104520167A (en) * 2012-08-03 2015-04-15 株式会社电装 Device for controlling electrical power steering system and method for same
CN106877783A (en) * 2017-03-31 2017-06-20 珠海市魅族科技有限公司 A kind of motor drive circuit, method and electronic equipment

Also Published As

Publication number Publication date
WO2019019694A1 (en) 2019-01-31
CN109308114A (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN109308114B (en) Apparatus and method for driving linear motor
JP6564058B2 (en) Voice recognition method, voice wakeup device, voice recognition device, and terminal
CN107393548B (en) Method and device for processing voice information collected by multiple voice assistant devices
CN108922537B (en) Audio recognition method, device, terminal, earphone and readable storage medium
CN113452835B (en) Method and device for controlling vibration of terminal
JP2022514994A (en) Electronic devices and their control methods, devices, readable storage media
CN107295591B (en) Call method, device, computer storage medium and mobile terminal
CN105468236A (en) Message prompting method and apparatus and terminal
CN112492095B (en) System, terminal, method, apparatus and storage medium for controlling terminal
CN107393528B (en) Voice control method and device
JP2019204112A (en) Voice recognition method, voice wakeup device, voice recognition device, and terminal
CN103379205A (en) Device and method for driving communication prompt
US9681005B2 (en) Mobile communication device and prompting method thereof
CN112565494A (en) Electronic equipment and damping method for electronic equipment
CN107484233B (en) Terminal vibration method, terminal and computer readable storage medium
CN112565976A (en) Speaker driving circuit, temperature protection method, terminal device, and storage medium
CN105120082A (en) State notification method and device
CN105100410A (en) Method and device for aggregating third-party telephone application
EP3435641B1 (en) Elecronic device, method of operation and computer program
CN111866226B (en) Terminal and sound production method
JP3076174B2 (en) Calling method of mobile phone with charger
CN113489840B (en) Event reminding method and device, storage medium and electronic equipment
CN117135266B (en) Information processing method, device and computer readable storage medium
CN111263003B (en) Signal control method, device, circuit, storage medium and electronic equipment
JP5263943B2 (en) Information terminal, sound output processing method, vibration processing method, light emission processing method, and program

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