Method for controlling vibration of electronic equipment, audio coding and decoding module and electronic equipment

文档序号:1941150 发布日期:2021-12-07 浏览:9次 中文

阅读说明:本技术 控制电子设备振动方法、音频编译解码模块及电子设备 (Method for controlling vibration of electronic equipment, audio coding and decoding module and electronic equipment ) 是由 马骋宇 王朝 马雷 张伟 马波 于 2020-05-28 设计创作,主要内容包括:本申请提供一种控制电子设备振动方法、音频编译解码模块及电子设备。该方法应用于包括有处理器、音频编译解码模块及转子马达的电子设备。该方法包括:处理器在接收到第一触发命令时,向音频编译解码模块发送第一音频信号。音频编译解码模块基于第一音频信号和基准信号,驱动转子马达振动,第一音频信号的有效幅值最小值大于基准信号的有效幅值。处理器在接收到第二触发命令时,向音频编译解码模块发送第二音频信号,第二音频信号的有效幅值大于基准信号的有效幅值。音频编译解码模块基于第二音频信号和基准信号,驱动转子马达停止振动。从而,实现转子马达的快速振动和快速停止振动。(The application provides a method for controlling vibration of electronic equipment, an audio coding and decoding module and the electronic equipment. The method is applied to the electronic equipment comprising a processor, an audio coding and decoding module and a rotor motor. The method comprises the following steps: the processor sends a first audio signal to the audio coding and decoding module when receiving a first trigger command. The audio coding and decoding module drives the rotor motor to vibrate based on the first audio signal and the reference signal, and the minimum value of the effective amplitude of the first audio signal is larger than the effective amplitude of the reference signal. And when receiving a second trigger command, the processor sends a second audio signal to the audio coding and decoding module, wherein the effective amplitude of the second audio signal is greater than that of the reference signal. And the audio coding and decoding module drives the rotor motor to stop vibrating based on the second audio signal and the reference signal. Thereby, rapid vibration and rapid stop vibration of the rotor motor are achieved.)

1. A method for controlling vibration of an electronic device is applied to the electronic device, and the electronic device comprises the following steps: the audio coding and decoding device comprises a processor, an audio coding and decoding module and a rotor motor, wherein the processor is electrically connected with the audio coding and decoding module, and the audio coding and decoding module is electrically connected with the rotor motor; the method comprises the following steps:

the processor sends a first audio signal to the audio coding and decoding module when receiving a first trigger command, wherein the first trigger command is used for indicating the rotor motor to vibrate through the first audio signal;

the audio coding and decoding module drives the rotor motor to vibrate based on the first audio signal and a reference signal, wherein the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal;

the processor sends a second audio signal to the audio coding and decoding module when receiving a second trigger command, wherein the second trigger command is used for indicating the rotor motor to stop vibrating through the second audio signal, and the effective amplitude of the second audio signal is larger than that of the reference signal;

the audio coding and decoding module drives the rotor motor to stop vibrating based on the second audio signal and the reference signal.

2. The method of claim 1,

the audio coding and decoding module drives the rotor motor to vibrate based on the first audio signal and a reference signal, and comprises:

the audio coding and decoding module is used for outputting a first Pulse Width Modulation (PWM) signal with the duty ratio within a first preset range by comparing the first audio signal with the reference signal;

the audio coding and decoding module is used for amplifying the amplitude of the first PWM signal to obtain a first amplified voltage;

the audio coding and decoding module carries out high-frequency noise interference removal processing on the first amplified voltage to obtain a direct-current first driving voltage;

the audio coding and decoding module drives the rotor motor to vibrate based on the first driving voltage;

the audio coding and decoding module drives the rotor motor to stop vibrating based on the second audio signal and the reference signal, and comprises:

the audio coding and decoding module outputs a second PWM signal with the duty ratio within a second preset range by comparing the second audio signal with the reference signal;

the audio coding and decoding module amplifies the amplitude of the second PWM signal to obtain a second amplified voltage;

the audio coding and decoding module carries out high-frequency noise interference removal processing on the second amplified voltage to obtain direct-current second driving voltage, and the phases of the first driving voltage and the second driving voltage are opposite;

the audio coding and decoding module drives the rotor motor to stop vibrating based on the second driving voltage.

3. The method according to claim 1 or 2,

the first audio signal comprises: a first sub-signal having an effective amplitude greater than an effective amplitude of the reference signal.

4. The method of claim 3,

the first sub-signal is of the same effective amplitude as the second audio signal.

5. The method according to claim 1 or 2,

the first audio signal comprises: and the effective amplitude of the second sub-signal is greater than that of the third sub-signal, and the effective amplitude of the third sub-signal is greater than that of the reference signal.

6. The method of claim 5,

the effective amplitude of the second sub-signal is the same as the effective amplitude of the second audio signal, and the effective amplitude of the third sub-signal is smaller than the effective amplitude of the second audio signal.

7. The method of claim 5 or 6, wherein the audio codec module drives the rotor motor to vibrate based on the first audio signal and a reference signal, and comprises:

when the vibration duration of the rotor motor is less than or equal to the duration of the second sub-signal, the audio coding and decoding module drives the rotor motor to vibrate based on the second sub-signal and the reference signal;

the audio coding and decoding module drives the rotor motor to vibrate based on the third sub-signal and the reference signal when the vibration duration of the rotor motor is greater than the duration of the second sub-signal;

wherein a vibration duration of the rotor motor is a duration from when the processor receives the first audio signal to when the processor receives the second audio signal.

8. The method of any of claims 1-7, wherein the electronic device further comprises: the processor is also electrically connected with the peripheral IC which is also electrically connected with the loudspeaker;

the processor drives the rotor motor to vibrate, comprising:

the processor drives the rotor motor to vibrate when the external IC controls the loudspeaker to play a ring;

the processor drives the rotor motor to stop vibrating, comprising:

and the processor drives the rotor motor to stop vibrating when the external IC controls the loudspeaker to stop playing the ring tone.

9. The method of any of claims 1-8, wherein the electronic device further comprises: a memory electrically connected to the processor;

when receiving a first trigger command, the processor sends a first audio signal to the audio coding and decoding module, and the method includes:

the processor recalls the first audio signal from the memory upon receiving the first trigger command;

the processor sends the first audio signal to the audio coding and decoding module;

when receiving a second trigger command, the processor sends a second audio signal to the audio coding and decoding module, and the method includes:

the processor recalls the second audio signal from the memory upon receiving the first trigger command;

the processor sends the second audio signal to the audio coding and decoding module.

10. The method of claim 9,

the audio signal is pre-saved in the memory by the electronic device; alternatively, the first and second electrodes may be,

the audio signal is stored in said memory by the user.

11. An electronic device, comprising: the audio coding and decoding device comprises a processor, an audio coding and decoding module and a rotor motor, wherein the processor is electrically connected with the audio coding and decoding module, and the audio coding and decoding module is electrically connected with the rotor motor;

the processor is used for sending a first audio signal to the audio coding and decoding module when a first trigger command is received, wherein the first trigger command is used for indicating the rotor motor to vibrate;

the audio coding and decoding module is used for driving the rotor motor to vibrate based on the first audio signal and a reference signal, and the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal;

the processor is further configured to send a second audio signal to the audio codec module when a second trigger command is received, where the second trigger command is used to instruct the rotor motor to stop vibrating, and an effective amplitude of the second audio signal is greater than an effective amplitude of the reference signal;

the audio coding and decoding module is further configured to drive the rotor motor to stop vibrating based on the second audio signal and the reference signal.

12. The electronic device of claim 11,

the audio coding and decoding module is specifically configured to output a first Pulse Width Modulation (PWM) signal with a duty ratio within a first preset range by comparing the first audio signal with the reference signal; amplifying the amplitude of the first PWM signal to obtain a first amplified voltage; carrying out high-frequency noise interference removal processing on the first amplified voltage to obtain a direct-current first driving voltage; driving the rotor motor to vibrate based on the first driving voltage;

the audio coding and decoding module is specifically configured to output a second PWM signal with a duty ratio within a second preset range by comparing the second audio signal with the reference signal; amplifying the amplitude of the second PWM signal to obtain a second amplified voltage; performing high-frequency noise interference removal processing on the second amplified voltage to obtain a direct-current second driving voltage, wherein the phases of the first driving voltage and the second driving voltage are opposite; driving the rotor motor to stop vibrating based on the second driving voltage.

13. The electronic device of claim 11 or 12,

the first audio signal comprises: a first sub-signal having an effective amplitude greater than an effective amplitude of the reference signal.

14. The electronic device of claim 13,

the first sub-signal is of the same effective amplitude as the second audio signal.

15. The electronic device of claim 11 or 12,

the first audio signal comprises: and the effective amplitude of the second sub-signal is greater than that of the third sub-signal, and the effective amplitude of the third sub-signal is greater than that of the reference signal.

16. The electronic device of claim 15,

the effective amplitude of the second sub-signal is the same as the effective amplitude of the second audio signal, and the effective amplitude of the third sub-signal is smaller than the effective amplitude of the second audio signal.

17. The electronic device of claim 15 or 16,

the audio coding and decoding module is specifically configured to drive the rotor motor to vibrate based on the second sub-signal and the reference signal when a vibration duration of the rotor motor is less than or equal to a duration of the second sub-signal; when the vibration duration of the rotor motor is greater than the duration of the second sub-signal, driving the rotor motor to vibrate based on the third sub-signal and the reference signal;

wherein a vibration duration of the rotor motor is a duration from when the processor receives the first audio signal to when the processor receives the second audio signal.

18. The electronic device of any of claims 11-17, further comprising: the processor is also electrically connected with the peripheral IC which is also electrically connected with the loudspeaker;

the processor is also used for driving the rotor motor to vibrate when the external IC controls the loudspeaker to play a ring tone;

the processor is further configured to drive the rotor motor to stop vibrating when the external IC controls the speaker to stop playing the ring tone.

19. The electronic device of any of claims 11-18, further comprising: a memory electrically connected to the processor;

the processor is specifically configured to, when the first trigger command is received, retrieve the first audio signal from the memory; transmitting the first audio signal to the audio coding and decoding module;

the processor is further specifically configured to call the second audio signal from the memory when the first trigger command is received; and sending the second audio signal to the audio coding and decoding module.

20. The electronic device of claim 19,

the audio signal is pre-stored in the memory by the electronic device; alternatively, the first and second electrodes may be,

the audio signal is stored in the memory by the user.

21. An audio codec module, comprising:

the input end of the audio coding and decoding module is electrically connected with the processor, and the output end of the audio coding and decoding module is electrically connected with the rotor motor;

the audio coding and decoding module is used for receiving a first audio signal from the processor, wherein the first audio signal is sent by the processor when a first trigger command is received, and the first trigger command is used for indicating the rotor motor to vibrate through the first audio signal;

the audio coding and decoding module is further configured to drive the rotor motor to vibrate based on the first audio signal and a reference signal, and a minimum value of an effective amplitude of the first audio signal is greater than an effective amplitude of the reference signal;

the audio coding and decoding module is further configured to receive a second audio signal from the processor, where the second audio signal is sent by the processor when receiving a second trigger command, where the second trigger command is used to instruct the rotor motor to stop vibrating through the second audio signal, and an effective amplitude of the second audio signal is greater than an effective amplitude of the reference signal;

the audio coding and decoding module is further configured to drive the rotor motor to stop vibrating based on the second audio signal and the reference signal.

22. An audio codec module, comprising: a signal generator, a comparator and a power amplifier;

the signal generator is used for outputting a reference signal; a first input end of the comparator is electrically connected with an output end of the signal generator, a second input end of the comparator is electrically connected with the processor, an output end of the comparator is electrically connected with an input end of the power amplifier, and an output end of the power amplifier is electrically connected with the rotor motor;

the comparator is configured to output a first PWM signal with a duty ratio within a first preset range by comparing the first audio signal with the reference signal, where the first audio signal is sent by the processor when receiving a first trigger command, the first trigger command is used to instruct the rotor motor to vibrate through the first audio signal, and a minimum effective amplitude value of the first audio signal is greater than an effective amplitude value of the reference signal;

the power amplifier is used for amplifying the amplitude of the first PWM signal and outputting a direct-current first driving voltage; transmitting the first direct current driving voltage to the rotor motor to vibrate the rotor motor;

the comparator is further configured to output a second PWM signal with a duty ratio within a second preset range by comparing the second audio signal with the reference signal, where the second audio signal is sent by the processor when receiving a second trigger command, the second trigger command is used to instruct the rotor motor to stop vibrating through the second audio signal, and an effective amplitude of the second audio signal is greater than an effective amplitude of the reference signal;

the power amplifier is further configured to amplify an amplitude of the second PWM signal and output a direct-current second driving voltage, where phases of the first driving voltage and the second driving voltage are in opposite phases; and transmitting the direct current second driving voltage to the rotor motor to stop the rotor motor from vibrating.

23. A power management unit, PMU, comprising: a power supply module and at least one audio codec module as claimed in claim 21 or 22; the power supply module is electrically connected with the power supply end of the audio coding and decoding module.

Technical Field

The present application relates to the field of electronic technologies, and in particular, to a method for controlling vibration of an electronic device, an audio codec module, and an electronic device.

Background

Electronic devices (e.g., cell phones, tablets, etc.) often employ mechanical vibration of a motor to provide vibratory feedback to a user. The motor is a device for converting electric energy into mechanical energy, and may generally include a rotary motion motor (an electric rotating machine) and a linear motion motor (an electric linear machine) (an ERM motor), the former is a direct current driven rotor motor, and the latter is an alternating current driven linear motor.

At present, how to realize the quick start vibration and quick stop vibration of the rotor motor is a problem which needs to be solved urgently.

Disclosure of Invention

The application provides a method for controlling vibration of electronic equipment, an audio coding and decoding module and the electronic equipment, so that quick start vibration and quick stop vibration of a rotor motor are realized, the service life of the rotor motor cannot be influenced by supply of direct current, and the use of the rotor motor is favorably prolonged.

In a first aspect, the present application provides a method for controlling vibration of an electronic device, which is applied to the electronic device, and the electronic device includes: the processor is electrically connected with the audio coding and decoding module, and the audio coding and decoding module is electrically connected with the rotor motor; the method comprises the following steps: the processor sends a first audio signal to the audio coding and decoding module when receiving a first trigger command, wherein the first trigger command is used for indicating the rotor motor to vibrate through the first audio signal; the audio coding and decoding module drives the rotor motor to vibrate based on the first audio signal and the reference signal, and the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal; when receiving a second trigger command, the processor sends a second audio signal to the audio coding and decoding module, wherein the second trigger command is used for indicating the rotor motor to stop vibrating through the second audio signal, and the effective amplitude of the second audio signal is greater than that of the reference signal; and the audio coding and decoding module drives the rotor motor to stop vibrating based on the second audio signal and the reference signal.

The method for controlling the vibration of the electronic device provided by the first aspect is applied to the electronic device, and the processor sends a first audio signal to the audio coding and decoding module when receiving a first trigger command, wherein the first trigger command is used for indicating the rotor motor to vibrate. Because the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal, the audio coding and decoding module can obtain the first PWM signal with the duty ratio close to 100% or equal to 100% by comparing the first audio signal with the reference signal, namely the waveform of the first PWM signal is a direct current voltage waveform, and then the first PWM signal is amplified, filtered and the like, so that the direct current first driving voltage can be obtained, and the direct current first driving voltage is provided for the rotor motor, so that the rotor motor can be driven to vibrate. The processor may send a second audio signal to the audio codec module when receiving a second trigger command, where the second trigger command is used to instruct the rotator motor to stop vibrating. The effective amplitude of the second audio signal is greater than that of the reference signal, so that the audio coding and decoding module can obtain a second PWM signal with a duty ratio close to 100% or equal to 100% by comparing the second audio signal with the reference signal, and then amplify, filter and the like the second PWM signal, namely the waveform of the second PWM signal is a DC voltage waveform, a DC second driving voltage can be obtained, the phase of the second driving voltage is opposite to that of the first driving voltage, and the DC second driving voltage is provided for the rotor motor, so that the rotor motor can be driven to stop vibrating. Therefore, the effect of quick vibration and quick stop vibration of the rotor motor is realized, the vibration starting time and the vibration stopping time of the rotor motor are shortened, the service life of the rotor motor cannot be influenced by the supply of direct current, the effect of protecting the rotor motor is achieved, and the use of the rotor motor is facilitated to be prolonged. And the waveform of the first PWM signal is consistent with that of the first audio signal, so that different vibration effects of the rotor motor are controlled through different settings of the first audio signal, the requirements of different use scenes of the electronic equipment are met, and abundant special-effect vibration experience is brought to a user.

In one possible design, the audio codec module drives the rotor motor to vibrate based on the first audio signal and the reference signal, and includes: the audio coding and decoding module outputs a first Pulse Width Modulation (PWM) signal with the duty ratio within a first preset range by comparing the first audio signal with a reference signal; the audio coding and decoding module amplifies the amplitude of the first PWM signal to obtain a first amplified voltage; the audio coding and decoding module carries out high-frequency noise interference removal processing on the first amplified voltage to obtain a direct-current first driving voltage; the audio coding and decoding module drives the rotor motor to vibrate based on the first driving voltage.

In one possible design, the audio codec module drives the rotor motor to stop vibrating based on the second audio signal and the reference signal, and includes: the audio coding and decoding module outputs a second PWM signal with the duty ratio within a second preset range by comparing the second audio signal with the reference signal; the audio coding and decoding module amplifies the amplitude of the second PWM signal to obtain a second amplified voltage; the audio coding and decoding module carries out high-frequency noise interference removal processing on the second amplified voltage to obtain direct-current second driving voltage, and the phases of the first driving voltage and the second driving voltage are opposite; the audio coding and decoding module drives the rotor motor to stop vibrating based on the second driving voltage.

In one possible design, the first audio signal includes: a first sub-signal, the effective amplitude of the first sub-signal being greater than the effective amplitude of the reference signal. Therefore, the audio coding and decoding module can provide direct-current first driving voltage for the rotor motor, the first driving voltage enables the rotation speed of the rotor motor to be rapidly increased, the rotor motor is driven to start vibrating, the rapid starting vibration is achieved, and poor experience brought to a user due to vibration dragging is avoided.

In one possible design, the effective amplitudes of the first sub-signal and the second audio signal are the same, so that the amplitude of the first driving voltage and the amplitude of the second driving voltage generated by the audio codec module are equal and are both greater than the amplitude of the rated voltage of the rotor motor. By doing so, the rapid vibration and the rapid stop vibration of the rotor motor are accelerated remarkably, and the vibration dragging is avoided to bring bad experience to users.

In one possible design, the first audio signal includes: and the effective amplitude of the second sub-signal is greater than that of the third sub-signal, and the effective amplitude of the third sub-signal is greater than that of the reference signal. Therefore, the audio coding and decoding module can generate direct-current first driving voltage based on the second sub-signal and the reference signal, and the first driving voltage enables the rotation speed of the rotor motor to be rapidly increased, so that the rotor motor is driven to start to vibrate, the rapid vibration starting of the rotor motor is realized, and the poor experience brought to a user due to vibration dragging is avoided. And the audio coding and decoding module can continuously generate a direct-current first driving voltage based on the third sub-signal and the reference signal, and the first driving voltage enables the rotor motor to continuously keep vibrating. Therefore, the amplitude of the first driving voltage generated by the audio coding and decoding module based on the second sub-signal is larger than the amplitude of the first driving voltage generated based on the third sub-signal, so that the rotor motor can vibrate quickly at high voltage and vibrate for a long time at low voltage, the driving consumption of the rotor motor is saved, and the use requirement of electronic equipment for long-time vibration of the rotor motor is met.

In a possible design, the effective amplitude of the second sub-signal is the same as that of the second audio signal, and the effective amplitude of the third sub-signal is smaller than that of the second audio signal, so that the amplitude of the first driving voltage generated by the audio codec module is equal to that of the second driving voltage and is larger than that of the rated voltage of the rotor motor. By doing so, the rapid vibration and the rapid stop vibration of the rotor motor are accelerated remarkably, and the vibration dragging is avoided to bring bad experience to users.

In one possible design, the audio codec module drives the rotor motor to vibrate based on the first audio signal and the reference signal, and includes: when the vibration duration of the rotor motor is less than or equal to the duration of the second sub-signal, the audio coding and decoding module drives the rotor motor to vibrate based on the second sub-signal and the reference signal; when the vibration duration of the rotor motor is greater than the duration of the second sub-signal, the audio coding and decoding module drives the rotor motor to vibrate based on the third sub-signal and the reference signal; the vibration time length of the rotor motor is the time length from the first audio signal received by the processor to the second audio signal received by the processor. Therefore, the editability of the first audio signal is strong, so that the effective amplitude (or gain) of each sub-signal in the first audio signal is set differently, the special-effect vibration of the rotor motor can be realized, the vibration effect of the electronic equipment is enriched, and the vibration requirements of different use scenes are met.

In one possible design, the electronic device further includes: the processor is also electrically connected with the peripheral IC which is also electrically connected with the loudspeaker; the processor drives the rotor motor to vibrate, comprising: the processor drives the rotor motor to vibrate when the external IC controls the loudspeaker to play the ring; the processor drives the rotor motor to stop vibrating, comprising: the processor drives the rotor motor to stop vibrating when the external IC controls the loudspeaker to stop playing the ring. Therefore, the effect that the ring of the electronic equipment vibrates along with vibration is achieved.

In one possible design, the electronic device further includes: the memory is electrically connected with the processor; when receiving a first trigger command, the processor sends a first audio signal to the audio coding and decoding module, and the method comprises the following steps: the processor calls the first audio signal from the memory when receiving the first trigger command; the processor sends a first audio signal to the audio coding and decoding module; when the processor receives a second trigger command, the processor sends a second audio signal to the audio coding and decoding module, and the method comprises the following steps: the processor calls the second audio signal from the memory when receiving the first trigger command; the processor sends the second audio signal to the audio codec module. Thus, when the electronic device needs the rotor motor to vibrate, the processor can call the first audio signal corresponding to the specific use scene from the memory, so that the rotor motor can have different vibration effects along with different first audio signals.

In one possible design, the audio signal is pre-stored in memory by the electronic device; alternatively, the audio signal is saved in memory by the user.

In a second aspect, the present application provides an electronic device comprising: the processor is electrically connected with the audio coding and decoding module, and the audio coding and decoding module is electrically connected with the rotor motor; the processor is used for sending a first audio signal to the audio coding and decoding module when receiving a first trigger command, and the first trigger command is used for indicating the rotor motor to vibrate; the audio coding and decoding module is used for driving the rotor motor to vibrate based on the first audio signal and the reference signal, and the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal; the processor is further used for sending a second audio signal to the audio coding and decoding module when a second trigger command is received, the second trigger command is used for indicating the rotor motor to stop vibrating, and the effective amplitude of the second audio signal is larger than that of the reference signal; and the audio coding and decoding module is also used for driving the rotor motor to stop vibrating based on the second audio signal and the reference signal.

In one possible design, the audio coding and decoding module is specifically configured to output a first PWM signal with a duty ratio within a first preset range by comparing the first audio signal with a reference signal; amplifying the amplitude of the first PWM signal to obtain a first amplified voltage; carrying out high-frequency noise interference removal processing on the first amplified voltage to obtain a direct-current first driving voltage; driving the rotor motor to vibrate based on the first driving voltage; the audio coding and decoding module is specifically used for outputting a second PWM signal with the duty ratio within a second preset range by comparing the second audio signal with the reference signal; amplifying the amplitude of the second PWM signal to obtain a second amplified voltage; carrying out high-frequency noise interference removal processing on the second amplified voltage to obtain a direct-current second driving voltage, wherein the phases of the first driving voltage and the second driving voltage are opposite; based on the second driving voltage, the driving rotor motor stops vibrating.

In one possible design, the first audio signal includes: a first sub-signal, the effective amplitude of the first sub-signal being greater than the effective amplitude of the reference signal.

In one possible design, the first sub-signal is of the same effective amplitude as the second audio signal.

In one possible design, the first audio signal includes: and the effective amplitude of the second sub-signal is greater than that of the third sub-signal, and the effective amplitude of the third sub-signal is greater than that of the reference signal.

In one possible design, the effective amplitude of the second sub-signal is the same as the effective amplitude of the second audio signal, and the effective amplitude of the third sub-signal is smaller than the effective amplitude of the second audio signal.

In one possible design, the audio coding and decoding module is specifically configured to drive the rotor motor to vibrate based on the second sub-signal and the reference signal when the vibration duration of the rotor motor is less than or equal to the duration of the second sub-signal; when the vibration duration of the rotor motor is greater than the duration of the second sub-signal, driving the rotor motor to vibrate based on the third sub-signal and the reference signal; the vibration time length of the rotor motor is the time length from the first audio signal received by the processor to the second audio signal received by the processor.

In one possible design, the electronic device further includes: the processor is electrically connected with the peripheral IC, and the peripheral IC is also electrically connected with the loudspeaker; the processor is also used for driving the rotor motor to vibrate when the external IC controls the loudspeaker to play the ring tone; and the processor is also used for driving the rotor motor to stop vibrating when the loudspeaker is controlled by the peripheral IC to stop playing the ring tone.

In one possible design, the electronic device further includes: the memory is electrically connected with the processor; the processor is specifically used for calling the first audio signal from the memory when receiving the first trigger command; sending a first audio signal to an audio coding and decoding module; the processor is further specifically used for calling the second audio signal from the memory when receiving the first trigger command; and sending the second audio signal to an audio coding and decoding module.

In one possible design, the audio signal is pre-stored in the memory by the electronic device; alternatively, the audio signal is stored in a memory by the user.

The beneficial effects of the electronic device provided in the second aspect and the possible designs of the second aspect may refer to the beneficial effects brought by the possible embodiments of the first aspect and the first aspect, and are not described herein again.

In a third aspect, the present application provides an audio coding and decoding module, comprising: the input end of the audio coding and decoding module is electrically connected with the processor, and the output end of the audio coding and decoding module is electrically connected with the rotor motor; the audio coding and decoding module is used for receiving a first audio signal from the processor, the first audio signal is sent when the processor receives a first trigger command, and the first trigger command is used for indicating the rotor motor to vibrate through the first audio signal; the audio coding and decoding module is further used for driving the rotor motor to vibrate based on the first audio signal and the reference signal, and the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal; the audio coding and decoding module is further used for receiving a second audio signal from the processor, the second audio signal is sent when the processor receives a second trigger command, the second trigger command is used for indicating the rotor motor to stop vibrating through the second audio signal, and the effective amplitude of the second audio signal is greater than that of the reference signal; and the audio coding and decoding module is also used for driving the rotor motor to stop vibrating based on the second audio signal and the reference signal.

With the audio codec module provided by the third aspect, the first audio signal is received from the processor by the audio codec module, and the reference signal is output. Because the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal, the audio coding and decoding module can obtain the first PWM signal with the duty ratio close to 100% or equal to 100% by comparing the first audio signal with the reference signal, namely the waveform of the first PWM signal is the DC voltage waveform. The audio coding and decoding module amplifies and filters the first PWM signal to obtain a direct-current first driving voltage, and transmits the direct-current first driving voltage to the rotor motor so as to drive the rotor motor to vibrate. The audio coding and decoding module receives the second audio signal from the processor and outputs a reference signal. Because the effective amplitude of the second audio signal is greater than that of the reference signal, the audio coding and decoding module can obtain the second PWM signal with the duty ratio close to 100% or equal to 100% by comparing the second audio signal with the reference signal, that is, the waveform of the second PWM signal is a dc voltage waveform. The audio coding and decoding module amplifies and filters the second PWM signal to obtain a direct-current second driving voltage, the phase of the second driving voltage is opposite to that of the first driving voltage, and the direct-current second driving voltage is transmitted to the rotor motor so that the rotor motor can be driven to vibrate. Therefore, the effect of quick vibration and quick stop vibration of the rotor motor is realized, the vibration starting time and the vibration stopping time of the rotor motor are shortened, the service life of the rotor motor cannot be influenced by the supply of direct current, the effect of protecting the rotor motor is achieved, and the use of the rotor motor is facilitated to be prolonged. And the waveform of the first PWM signal is consistent with that of the first audio signal, so that different vibration effects of the rotor motor are controlled through different settings of the first audio signal, the requirements of different use scenes of the electronic equipment are met, and abundant special-effect vibration experience is brought to a user.

In one possible design, the audio coding and decoding module is specifically configured to output a first PWM signal with a duty ratio within a first preset range by comparing the first audio signal with a reference signal; amplifying the amplitude of the first PWM signal to obtain a first amplified voltage; carrying out high-frequency noise interference removal processing on the first amplified voltage to obtain a direct-current first driving voltage; driving the rotor motor to vibrate based on the first driving voltage; the audio coding and decoding module is specifically used for outputting a second PWM signal with the duty ratio within a second preset range by comparing the second audio signal with the reference signal; amplifying the amplitude of the second PWM signal to obtain a second amplified voltage; carrying out high-frequency noise interference removal processing on the second amplified voltage to obtain a direct-current second driving voltage, wherein the phases of the first driving voltage and the second driving voltage are opposite; based on the second driving voltage, the driving rotor motor stops vibrating.

In a fourth aspect, the present application provides an audio coding and decoding module, comprising: a signal generator, a comparator and a power amplifier; the signal generator is used for outputting a reference signal; the first input end of the comparator is electrically connected with the output end of the signal generator, the second input end of the comparator is electrically connected with the processor, the output end of the comparator is electrically connected with the input end of the power amplifier, and the output end of the power amplifier is electrically connected with the rotor motor; the comparator is used for outputting a first PWM signal with the duty ratio within a first preset range by comparing a first audio signal with a reference signal, the first audio signal is sent by the processor when receiving a first trigger command, the first trigger command is used for indicating the rotor motor to vibrate through the first audio signal, and the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal; the power amplifier is used for amplifying the amplitude of the first PWM signal and outputting a direct-current first driving voltage; transmitting the first direct-current driving voltage to the rotor motor so as to enable the rotor motor to vibrate; the comparator is further used for outputting a second PWM signal with the duty ratio within a second preset range by comparing a second audio signal with the reference signal, the second audio signal is sent by the processor when receiving a second trigger command, the second trigger command is used for indicating the rotor motor to stop vibrating through the second audio signal, and the effective amplitude of the second audio signal is larger than that of the reference signal; the power amplifier is also used for amplifying the amplitude of the second PWM signal and outputting a direct-current second driving voltage, and the phases of the first driving voltage and the second driving voltage are opposite; and transmits the direct-current second driving voltage to the rotor motor to stop the vibration of the rotor motor.

With the audio codec module provided in the fourth aspect, the first audio signal is received from the processor through the comparator, and the comparator receives the reference signal from the signal generator. Since the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal, the comparator can obtain the first PWM signal with the duty ratio close to 100% or equal to 100% by comparing the first audio signal with the reference signal, that is, the waveform of the first PWM signal is a dc voltage waveform. The power amplifier amplifies the amplitude of the first PWM signal to obtain a direct-current first driving voltage, and the direct-current first driving voltage is transmitted to the rotor motor, so that the rotor motor can be driven to vibrate. The comparator receives the second audio signal from the processor and the comparator receives the reference signal from the signal generator. Since the effective amplitude of the second audio signal is greater than the effective amplitude of the reference signal, the comparator can obtain the second PWM signal with the duty ratio close to 100% or equal to 100% by comparing the second audio signal with the reference signal, that is, the waveform of the second PWM signal is a dc voltage waveform. The power amplifier amplifies the amplitude of the second PWM signal to obtain a direct-current second driving voltage, the phase of the second driving voltage is opposite to that of the first driving voltage, and the direct-current second driving voltage is transmitted to the rotor motor so that the rotor motor can be driven to vibrate. Therefore, the effect of quick vibration and quick stop vibration of the rotor motor is realized, the vibration starting time and the vibration stopping time of the rotor motor are shortened, the service life of the rotor motor cannot be influenced by the supply of direct current, the effect of protecting the rotor motor is achieved, and the use of the rotor motor is facilitated to be prolonged. And the waveform of the first PWM signal is consistent with that of the first audio signal, so that different vibration effects of the rotor motor are controlled through different settings of the first audio signal, the requirements of different use scenes of the electronic equipment are met, and abundant special-effect vibration experience is brought to a user.

In one possible design, the audio coding and decoding module further includes: and the input end of the filter is electrically connected with the output end of the power amplifier, and the output end of the filter is electrically connected with the rotor motor.

The low-pass filter is used for carrying out high-frequency noise interference removal processing on the first driving voltage to obtain a processed first driving voltage; transmitting the processed first driving voltage to the rotor motor to vibrate the rotor motor;

the low-pass filter is also used for carrying out high-frequency noise interference removal processing on the second driving voltage to obtain the processed second driving voltage; and transmitting the processed second driving voltage to the rotor motor to stop the vibration of the rotor motor.

In one possible design, the filter is a low pass filter or a band pass filter.

In one possible design, the audio coding and decoding module further includes: and the switch bridge is electrically connected between the filter and the rotor motor and is used for adjusting the phases of the first driving voltage and the second driving voltage to be opposite.

In a fifth aspect, the present application provides a power management unit PMU, comprising: a power supply module and at least one audio coding and decoding module in any one of the possible designs of the third aspect and the third aspect; or, the power supply module and at least one audio coding and decoding module in any one of the possible designs of the fourth aspect and the fourth aspect; the power supply module is used for supplying power to the audio coding and decoding module.

The beneficial effects of the electronic device provided in the fifth aspect and each possible design of the fifth aspect may refer to the beneficial effects brought by each possible implementation manner of the third aspect and the third aspect, or the beneficial effects of the electronic device provided in each possible implementation manner of the fourth aspect and the fourth aspect, and are not described herein again.

Drawings

FIG. 1 is a pictorial view of a rotor motor;

FIG. 2a is a schematic diagram of a motor and LDO connection in a related art;

FIG. 2b is a schematic diagram of the LDO of FIG. 2a outputting a driving signal to the motor;

FIG. 3a is a schematic diagram of a motor and a PWM driver according to the related art;

FIG. 3b is a schematic diagram of the driving signal output by the PWM driver of FIG. 3a to the motor;

fig. 4a is a schematic structural diagram of an electronic device according to an embodiment of the present application;

fig. 4b is a schematic structural diagram of an electronic device according to another embodiment of the present application;

FIG. 5a is a schematic structural diagram of an audio codec module according to an embodiment of the present application;

FIG. 5b is a schematic structural diagram of an audio codec module according to another embodiment of the present application;

FIG. 6a is a schematic diagram of a PWM signal generated by a comparator in an audio codec module according to an embodiment of the present application;

FIG. 6b is a schematic diagram of a PWM signal generated by a comparator in an audio codec module according to another embodiment of the present application;

fig. 7a is a schematic flowchart of a method for controlling vibration of an electronic device according to an embodiment of the present application;

FIG. 7b is a graph comparing the effects of the related art rotor motor of FIGS. 2a and 2b on achieving vibration and stopping vibration with the rotor motor of the present application;

fig. 8a is a schematic view of a scene in which an electronic device learns and configures a vibration effect in a method for controlling vibration of the electronic device according to an embodiment of the present application;

fig. 8b is a schematic view of a scene of electronic device vibration in a method for controlling electronic device vibration according to another embodiment of the present application;

FIG. 9a is a schematic diagram of a DC driving voltage generated by an audio codec module according to an embodiment of the present disclosure;

FIG. 9b is a schematic diagram of a DC driving voltage generated by an audio codec module according to another embodiment of the present application;

FIG. 9c is a schematic diagram of a DC driving voltage generated by an audio codec module according to another embodiment of the present application;

fig. 10 is a schematic structural diagram of an electronic device according to another embodiment of the present application;

fig. 11a is a schematic view of a ring tone of an electronic device vibrating with the vibration in a method for controlling the vibration of the electronic device according to an embodiment of the present application;

fig. 11b is a schematic view of a scenario that a ring tone of an electronic device vibrates along with the vibration in a method for controlling the vibration of the electronic device according to another embodiment of the present application;

fig. 12 is a schematic structural diagram of an electronic device according to yet another embodiment of the present application.

Description of reference numerals:

1-an electronic device;

10-a processor; 20-audio coding and decoding module; 30-a rotor motor; 41-peripheral IC; 42-a loudspeaker; 50-a memory;

201 — a signal generator; 202-a comparator; 203-a power amplifier; 204-a filter; 205 — switching bridge.

Detailed Description

In the following embodiments of the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a alone, b alone, or c alone, may represent: a alone, b alone, c alone, a and b in combination, a and c in combination, b and c in combination, or a, b and c in combination, wherein a, b and c may be single or multiple. Furthermore, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.

Currently, as shown in fig. 1, the rotor motor includes various types, such as a cylindrical motor and a brushless motor, and their internal structures are different, but the internal structures all have three types: coil, magnet steel and eccentric oscillator. The magnetic steel is used for providing a magnetic field, when the coil is electrified with direct current, a current-carrying conductor of the coil can be acted by electromagnetic force in the magnetic field, the moment formed by the electromagnetic force can enable the eccentric vibrator to rotate around the rotor, the eccentric vibrator can generate centripetal force at the moment, and the motor is slightly displaced by the centripetal force, so that the vibration effect is generated.

Based on the foregoing description, the motor is rotated by the magnetic force in the magnetic field generated by the coil. Formula based on driving force F: F-BIL, the magnetic field B and the coil L are both constant. When the voltage supplied to the motor is larger, the current I is larger, the driving force F is larger, the rotating speed of the eccentric vibrator is higher, and the vibration acceleration provided by the motor is larger.

Next, based on the above-described motor vibration principle, an example of realizing vibration and stopping vibration of a conventional rotor motor will be described.

In the related art 1, a low dropout regulator (LDO) built in a Power Management Unit (PMU) is used to supply power to the rotor motor, so as to realize vibration and stop vibration of the rotor motor. As shown in fig. 2a, the positive pole of the rotor motor (indicated by the "+" symbol in fig. 2 a) is electrically connected to the output terminal OUT of the LDO, and the negative pole of the rotor motor (indicated by the "-" symbol in fig. 2 a) and the ground terminal of the LDO are both electrically connected to the common ground of the power management unit PMU. As shown in fig. 2b, when the LDO outputs a dc voltage to the rotor motor (illustrated by 3V in fig. 2b as an example), the rotor motor starts to oscillate. Wherein, 3V is the rated voltage of the rotor motor, namely, the rotor motor can start oscillation when being supplied with 3V. When the LDO output to the rotor motor is off (illustrated in fig. 2b with 0V as an example), the rotor motor is stopped by its own damping.

Based on this, the vibration starting time period T1 and the vibration stopping time period T2 of the rotor motor are dragged by the vibration sensation, and the effects of rapid vibration and rapid vibration stopping cannot be achieved. Generally, the term ERM for a single cell is about 180 milliseconds (ms) and about 180 ms. For example, if vibration of the main page key of the mobile phone needs to be realized by using the related art 1, the vibration starting time T1 of the rotor motor is about 60ms, and the vibration stopping time T2 of the rotor motor is about 130ms, so that the total vibration time of the rotor motor is about 190ms, fast vibration and fast stop vibration cannot be realized, and the user experience is poor.

In addition, for the scene that the pressing vibration needs to be realized on the electronic device, the LDO needs to output a sufficiently long dc voltage to the rotor motor, so that a user can only give a comfortable vibration amount, and at this time, the start-up time and the stop time of the rotor motor are longer, which is more disadvantageous to the realization of the rapid vibration and the rapid stop vibration of the rotor motor.

In the related art 2, a Pulse Width Modulation (PWM) driver built in a power management unit PMU is used to supply a high frequency PWM signal to the rotor motor to realize rapid vibration and rapid stop vibration of the rotor motor.

As shown in fig. 3a, the positive pole of the rotor motor (indicated by the "+" sign in fig. 3 a) is electrically connected to the positive output terminal OUT1 of the PWM driver, and the negative pole of the rotor motor (indicated by the "-" sign in fig. 3 a) is electrically connected to the negative output terminal OUT2 of the PWM driver.

Based on the connection relationship of fig. 3a, as shown in fig. 3b, when the PWM driver outputs the first PWM signal to the rotor motor (the first PWM signal is illustrated by 5V with a duty ratio of 100% in fig. 2 b), since the amplitude of the driving voltage (i.e. 5V) is much higher than the amplitude of the rated voltage of the rotor motor (i.e. 3V), the rotor motor can start to vibrate at a faster speed, and a fast vibration starting effect can be achieved. After a period of time, for example, 50ms, when the PWM driver outputs the second PWM signal to the rotor motor (the second PWM signal in fig. 3b is illustrated as 5V with a duty ratio of 60%), the actual voltage received by the rotor motor becomes 5V × 60% — 3V, so that the rotor motor continues to vibrate, and the rotor motor is guaranteed to vibrate for a long time. When the PWM driver outputs the third PWM signal to the rotor motor (illustrated in fig. 3b by taking-5V with a duty ratio of 100%) as an example), since the driving voltage (i.e., 5V) is smaller than the rated voltage (i.e., 3V) of the rotor motor and the amplitude of the driving voltage (i.e., 5V) is much higher than the amplitude of the rated voltage (i.e., 3V) of the rotor motor, the rotor motor stops vibrating, so that the effect of stopping vibrating rapidly can be achieved. The duty ratio of the third PWM signal may also adopt other values than 100%, and it is only necessary that the phases of the third PWM signal and the first PWM signal are in opposite phase. It should be noted that, in addition to the above manner, the rotor motor may stop vibrating quickly after vibrating quickly, and the rotor motor does not need to vibrate for a long time.

Based on this, in order to ensure that the voltage received by the rotor motor at the time of starting and stopping vibration is 3V or more, the PWM driver needs to equate the high voltage to the low voltage, i.e., from 5V to 3V, by controlling the duty ratio. Thus, there are special requirements on the frequency of the PWM driver. The reason is that: if the PWM driver frequency is low, the rotor motor will have a surge sound. If the frequency of the PWM driver is high, the vibration sound of the rotor motor is normal, but the requirement for the PWM driver is too high at the moment, and the frequency of the PWM driver is generally required to be more than 20 kHz. In addition, the PWM driver switches the voltage back and forth, and the rotor motor is directly electrically connected to the PWM driver, which may adversely affect the life of the rotor motor.

In order to solve the above problems, the present application provides a method for controlling vibration of an electronic device, an Audio Codec (Audio Codec) and an Audio Codec, which can generate a PWM signal with a duty ratio close to 100% or equal to 100% by using an Audio signal, that is, a waveform of the PWM signal is a dc voltage waveform, and further, a dc driving voltage can be obtained by amplifying and filtering the PWM signal, and then the rotor motor is driven by the dc driving voltage, so that not only is fast start-up and fast stop of the rotor motor realized, but also the life of the rotor motor is not affected by supply of dc power, and the rotor motor is protected. In addition, the waveform of the PWM signal is consistent with that of the audio signal, different vibration effects of the rotor motor can be realized through different settings of the audio signal, and the requirements of different use scenes, such as key vibration, reminding vibration and the like, of the electronic equipment can be met.

The electronic device may include, but is not limited to, a mobile phone, a tablet computer, an electronic reader, a remote controller, a Personal Computer (PC), a notebook computer, a Personal Digital Assistant (PDA), a vehicle-mounted device, a web tv, a wearable device, a television, a smart watch, a smart bracelet, and other devices that need to implement vibration.

The method for controlling the vibration of the electronic equipment is suitable for reminding a user of using scenes, such as new messages (short messages, multimedia messages or instant messaging messages and the like), new calls, alarm reminding, memorandum reminding and the like received by a mobile phone, can also be suitable for using scenes of keys, such as vibration of a rotor motor when the user touches a main page key of the mobile phone or vibration of the rotor motor when the user keys the mobile phone, and can also be suitable for vibration in entertainment applications such as games and the like.

The technical solution of the present application will be described in detail with reference to specific examples.

Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic device 1 of the present application may include: a processor 10, an audio codec module 20, and a rotator motor 30.

In an embodiment of the present application, an output end of the processor 10 is electrically connected to a control end of the audio codec module 20, so that the processor 10, as an audio signal source of the audio codec module 20, can send an audio signal to the audio codec module 20, where the audio signal is used to drive the rotator motor 30 to vibrate rapidly and stop vibrating rapidly.

The processor 10 may be an integrated chip, such as a system on chip (SoC), or may be formed by combining a plurality of components, or may be formed by combining an integrated chip and a peripheral circuit, which is not limited in the following embodiments of the present application.

In addition, the present application does not limit parameters such as the number of audio signals, waveforms, or periods. In some embodiments, the audio signal may be at least one of a triangular wave, a saw-tooth wave, a rectangular wave, or a sine wave. The audio signal may be pre-stored in the electronic device 1, may also be stored in the electronic device 1 by a user, and may also be stored in the electronic device 1 by combining the foregoing two manners, which is not limited in this application.

In the present application, the output end of the audio codec module 20 is electrically connected to the rotor motor 30, so that the audio codec module 20 serves as a power supply source of the rotor motor 30, and based on the reference signal and the audio signal, and an effective amplitude (RMS) of the reference signal is smaller than an effective amplitude of the audio signal, the audio codec module can supply a direct current to the rotor motor 30 to drive the rotor motor 30 to vibrate rapidly or stop vibrating rapidly. It should be noted that the effective amplitude of the signal can also be understood as the gain of the signal.

Among them, the audio codec module 20 may generate a reference signal for the audio codec module 20 to compare the audio signal with the reference signal and drive the rotator motor 30 to vibrate fast and stop vibrating fast using the compared signal. The present application does not limit parameters such as the waveform and the period of the reference signal. In some embodiments, the reference signal may be at least one of a triangular wave, a sawtooth wave, a rectangular wave, or a sine wave. And the number or type of the rotor motors 30 and the like are not limited in the present application. In addition, the audio codec module 20 may also supply power to the processor 10 so that the processor 10 can operate normally.

The audio codec module 20 may adopt software and/or hardware to implement the fast vibration and fast stop of the rotor motor 30, and the specific implementation structure of the audio codec module 20 is not limited in this application. For example, the audio codec module 20 may be formed by a single chip, a plurality of chips electrically connected to each other, a combination of chips and components, or a plurality of components connected to each other. In addition, the audio codec module 20 may be separately provided, or may be built in a power management unit PMU of the electronic device 1 (as shown in fig. 4 b), and the power management unit PMU supplies power to the audio codec module 20 through a battery in the electronic device 1, which is not limited in this application.

Audio codec module 20 in some embodiments, as shown in fig. 5a, the audio codec module 20 of the present application may include: a signal generator 201, a comparator 202 and a power amplifier 203.

The signal generator 201 is configured to output the reference signal. A first input terminal of the comparator 202 is electrically connected to the output terminal of the signal generator 201, a second input terminal of the comparator 202 is electrically connected to the output terminal of the processor 10, the comparator 202 is configured to receive the audio signal from the processor 10, an output terminal of the comparator 202 is electrically connected to an input terminal of the power amplifier 203, and an output terminal of the power amplifier 203 is electrically connected to the rotator motor 30.

Based on the electrical connection relationship, the signal generator 201 performs PWM sampling on the audio signal through the comparator 202. Since the effective amplitude of the reference signal is smaller than the effective amplitude of the audio signal, the comparator 202 can output the PWM signal with a duty ratio close to 100% or equal to 100%, that is, the waveform of the PWM signal is a dc voltage waveform, and the waveform of the PWM signal is consistent with the waveform of the audio signal. Since the amplitude of the PWM signal generally cannot satisfy the amplitude of the rated voltage of the rotor motor 30 and cannot satisfy the driving capability of the rotor motor 30, the PWM signal needs to pass through the power amplifier 203 and then becomes a direct current driving voltage, the amplitude of the driving voltage is greater than the amplitude of the rated voltage of the rotor motor 30, and the phase of the driving voltage may be in-phase or in-phase with the phase of the rated voltage of the rotor motor 30, that is, the phase of the vibration voltage driving the rotor motor 30 and the phase of the driving voltage driving the rotor motor 30 to stop vibrating are in-phase. Accordingly, not only the magnitude of the driving voltage but also the driving current transmitted to the rotor motor 30 are enhanced to enhance the driving capability of the rotor motor 30, thereby supplying the driving voltage of the direct current to the rotor motor 30, so that the rotor motor 30 vibrates or stops vibrating.

The present application does not limit the specific types or numbers of the signal generator 201, the comparator 202, and the power amplifier 203. For example, the signal generator 201, the comparator 202, and the power amplifier 203 may be implemented by a single chip, may be implemented by connecting a plurality of components, or may be implemented by combining a chip and a component, which is not limited in this application. In addition, at least two of the signal generator 201, the comparator 202, and the power amplifier 203 may be provided using an integrated chip. For example, the signal generator 201 and the comparator 202 may be integrally provided as separate chips. Generally, the power amplifier 203 may be selected from the class D power amplifier 203 or the class K power amplifier 203. In addition, for the PWM signal whose duty ratio mentioned in the present application is close to 100% or equal to 100%, a preset range of the duty ratio of the PWM signal may be set between 90% or more and 100% or less, and the preset range may be a first preset range or a second preset range mentioned later.

In addition, as shown in fig. 5b, the audio coding and decoding module 20 may further include: and a filter 204, wherein an input end of the filter 204 is electrically connected to an output end of the power amplifier 203, and an output end of the filter 204 is electrically connected to the rotor motor 30. The present application does not limit the specific type or number of the filters 204. For example, the filter 204 may be a low pass filter or a band pass filter.

Since the driving voltage inevitably introduces high-frequency noise interference, the driving voltage may be changed into a direct-current driving voltage with less noise interference or no noise after passing through the filter 204, so as to supply the direct-current driving voltage to the rotor motor 30, so that the rotor motor 30 vibrates or stops vibrating, and the effect of the rotor motor 30 vibrating or stopping vibrating is improved.

With continued reference to fig. 5b, the audio codec module 20 may further include a switch bridge 205, the switch bridge 205 is electrically connected between the filter 204 and the rotator motor 30, and the switch bridge 205 is used to adjust the phase of the driving voltage for driving the rotator motor 30 and the driving voltage for driving the rotator motor 30 to stop vibrating to be opposite. The present application does not limit the specific type or number of the switch bridge 205.

When the audio codec module 20 includes the switch bridge 205, since the switch bridge 205 can change the phase of the voltage, the phases of the audio signal corresponding to the vibration of the driving rotor motor 30 and the audio signal for stopping the vibration of the driving rotor motor 30 can be in the same phase or in opposite phases, and it is only necessary to ensure that the phase of the driving voltage for driving the vibration of the rotor motor 30 and the phase of the start-up voltage or the rated voltage of the rotor motor 30 are in the same phase, and the phase of the driving voltage for stopping the vibration of the rotor motor 30 and the phase of the start-up voltage or the rated voltage of the rotor motor 30 are in opposite phases.

For convenience of illustration, a specific implementation process of the comparator 202 in the audio codec module 20 generating the PWM signal by comparing the reference signal and the audio signal is illustrated in conjunction with fig. 6 a. In fig. 6a, the abscissa is time t and the ordinate is voltage U. The reference signal is a triangular wave and is illustrated by curve 1 as an example. The audio signal is a sine wave with a period T and is illustrated by taking curve 2 as an example. The PWM signal generated on the basis of the audio signal and the reference signal is illustrated by way of example in curve 3.

As shown in fig. 6a, the comparator 202 in the audio codec module 20 may generate the PWM signal by comparing the audio signal with the reference signal, and the maximum amplitude of the PWM signal is U and the minimum amplitude is 0V. On the one hand, the duty ratio of the PWM signal is close to 100% as a whole, that is, the waveform of the PWM signal is a dc voltage waveform. On the other hand, when the audio signal is in the positive half axis of one period T, the amplitude U in the PWM signal occupies a large portion. When the audio signal is at the negative half-axis of one period T, the amplitude of the PWM signal is 0V for the most part. It can be seen that the waveform of the PWM signal is consistent with the waveform of the audio signal.

Based on the operation principle of the comparator 202 in the audio codec module 20, as shown in fig. 6b, the minimum value of the effective amplitude of the audio signal is set to be greater than the effective amplitude of the reference signal, so that the comparator 202 in the audio codec module 20 can output the PWM signal with a duty ratio close to 100% or equal to 100%.

The amplitude of the PWM signal may increase with the increase of the gain of the power amplifier 203 in the audio codec module 20, and the amplitude of the PWM signal may also increase with the increase of the effective amplitude of the audio signal.

Next, referring to fig. 6b, when the minimum value of the effective amplitude of the audio signal is greater than the effective amplitude of the reference signal, a specific implementation process of the comparator 202 in the audio codec module 20 generating the PWM signal by comparing the reference signal and the audio signal will be illustrated.

In fig. 6b, the abscissa is time t and the ordinate is voltage U. The reference signal is a triangular wave and is illustrated by curve 1 as an example. The audio signal comprises an audio signal 1 and an audio signal 2, and the effective amplitude of the audio signal 1 is larger than that of the audio signal 2. The audio signal 1 is a sine wave with a period T and is illustrated by way of example by the curve 21. The audio signal 2 is a sine wave with a period T' and is illustrated by way of example by the curve 22.

As shown in fig. 6b, the comparator 202 may generate a PWM signal 1 based on the audio signal 1 and the reference signal, which is illustrated by the curve 31 as an example. The comparator 202 may generate a PWM signal 2 based on the audio signal 2 and the reference signal, which is illustrated by the curve 32. And it is easy to see that the PWM signal 1 and the PWM signal 2 are both direct current voltages, and the amplitude of the PWM signal 1 is greater than the amplitude of the PWM signal 2.

Based on the electronic device 1 shown in fig. 4-6 b, a detailed description is given to a specific implementation process of the method for controlling the vibration of the electronic device 1 according to the present application, in conjunction with the following embodiments.

Fig. 7a is a flowchart illustrating a method for controlling vibration of an electronic device according to an embodiment of the present application. As shown in fig. 7a, the method for controlling the vibration of the electronic device 1 of the present application may include:

s101, when receiving a first trigger command, the processor sends a first audio signal to the audio coding and decoding module, wherein the first trigger command is used for indicating the rotor motor to vibrate through the first audio signal.

In the present application, the upper application of the electronic device 1 may respond to an operation entered by the user, where the operation is used to trigger the electronic device 1/the rotor motor 30 to vibrate, and the operation includes, but is not limited to, clicking, double clicking, long pressing, screenshot, etc., and may also respond to an event built in the electronic device 1, where the event is used to trigger the electronic device 1/the rotor motor 30 to vibrate, and the event may be a triggered event such as a timer or a timer in the electronic device 1, so as to generate the first trigger command and issue the first trigger command to the processor 10.

The first trigger command may be a digital signal or an analog signal, which is not limited in this application. The specific representation form of the first trigger command is not limited in the present application. For example a vibranteon command for instructing the electronic device 1/rotor motor 30 to vibrate.

In response to a first trigger command of the electronic device 1, based on the electrical connection relationship between the processor 10 and the audio codec module 20, the processor 10 may send a first audio signal to the audio codec module 20, where the first audio signal is used for the audio codec module 20 to supply direct current to the rotator motor 30.

The present application does not limit parameters such as the number, waveform, or period of the first audio signal. In some embodiments, the first audio signal may be at least one of a triangle wave, a sawtooth wave, a rectangular wave, or a sine wave. The first audio signal may be stored in the electronic device 1 in advance, may also be stored in the electronic device 1 by a user, and may also be stored by combining the foregoing two manners, which is not limited in this application.

S102, the audio coding and decoding module drives the rotor motor to vibrate based on the first audio signal and the reference signal, wherein the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal.

Since the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal, the audio codec module 20 may output the first PWM signal having a duty ratio within a first preset range (i.e., close to 100% or equal to 100%) by comparing the first audio signal with the reference signal, that is, the waveform of the first PWM signal is a dc voltage waveform, and the waveform of the first PWM signal is consistent with the waveform of the first audio signal. Thus, the audio codec module 20 may control whether the rotator motor 30 vibrates and the vibration condition by the processor 10 adjusting the first audio signal.

Therefore, the audio codec module 20 may amplify and filter the first PWM signal to obtain a dc first driving voltage, where the amplitude of the first driving voltage is greater than or equal to the amplitude of the rated voltage of the rotor motor 30, and the phases of the first driving voltage and the rated voltage of the rotor motor 30 are in the same phase. Based on the electrical connection relationship between the audio codec module 20 and the rotor motor 30, the audio codec module 20 may provide a first dc driving voltage to the rotor motor 30, so that the rotation speed of the rotor motor 30 is rapidly increased, and the rotor motor 30 is driven to start vibrating, thereby achieving the effect of rapidly starting vibrating the rotor motor 30 and shortening the vibration starting time of the rotor motor 30.

S103, when receiving a second trigger command, the processor sends a second audio signal to the audio coding and decoding module, wherein the second trigger command is used for indicating the rotor motor to stop vibrating, and the effective amplitude of the second audio signal is larger than that of the reference signal.

In other embodiments, the upper application of the electronic device 1 may respond to the user's key input operation, which is used to trigger the electronic device 1/rotator motor 30 to stop vibrating, and the operation includes but is not limited to clicking, double clicking, long pressing, screenshot, etc., and may also respond to an event built in the electronic device 1, which is used to trigger the electronic device 1/rotator motor 30 to stop vibrating, and the event may be a triggered event such as a timer or timer in the electronic device 1, to generate the second trigger command, and issue the second trigger command to the processor 10.

The second trigger command may be a digital signal or an analog signal, which is not limited in this application. And the specific representation form of the second trigger command is not limited in the application. For example a vibranteoff command for instructing the electronic device 1/rotor motor 30 to stop vibrating.

In response to a second trigger command of the electronic device 1, based on the electrical connection relationship between the processor 10 and the audio codec module 20, the processor 10 may send a second audio signal to the audio codec module 20, where the second audio signal is used for the audio codec module 20 to stop supplying power to the rotator motor 30.

The present application does not limit parameters such as the waveform or the period of the second audio signal. In some embodiments, the second audio signal may be at least one of a triangular wave, a sawtooth wave, a rectangular wave, or a sine wave. The second audio signal may be stored in the electronic device 1 in advance, may also be stored in the electronic device 1 by a user, and may also be stored by combining the foregoing two manners, which is not limited in this application.

It should be noted that the present application does not limit the effective amplitude and phase of the first audio signal and the second audio signal.

When the phases of the first and second audio signals are in phase, the phase of the first driving voltage generated based on the first audio signal is adjusted by the switching bridge 215 in the audio codec module 20 such that the phase of the first driving voltage is in phase with the phase of the start-up voltage or the rated voltage of the rotor motor 30, and the phase of the second driving voltage generated based on the second audio signal is adjusted by the switching bridge 215 in the audio codec module 20 such that the phase of the second driving voltage is in anti-phase with the phase of the start-up voltage or the rated voltage of the rotor motor 30.

When the phases of the first and second audio signals are inverted, the phase of the first driving voltage generated based on the first audio signal is adjusted by the switching bridge 215 in the audio codec module 20 such that the phase of the first driving voltage is in phase with the phase of the start-up voltage or the rated voltage of the rotor motor 30, and the phase of the second driving voltage generated based on the second audio signal is adjusted by the switching bridge 215 in the audio codec module 20 such that the phase of the second driving voltage is inverted with respect to the phase of the start-up voltage or the rated voltage of the rotor motor 30. And S104, the audio coding and decoding module drives the rotor motor to stop vibrating based on the second audio signal and the reference signal.

Since the effective amplitude of the second audio signal is greater than the effective amplitude of the reference signal, the audio codec module 20 may output the second PWM signal having a duty ratio within a second preset range (i.e., close to 100% or equal to 100%) by comparing the second audio signal with the reference signal, that is, the waveform of the second PWM signal is a dc voltage waveform.

Accordingly, the audio codec module 20 may amplify and filter the second PWM signal to obtain the second driving voltage of the direct current, and the phase of the second driving voltage and the rated voltage of the rotor motor 30 is opposite, that is, the phase of the first driving voltage and the second driving voltage is opposite. Based on the electrical connection relationship between the audio codec module 20 and the rotor motor 30, the audio codec module 20 may provide a dc second driving voltage to the rotor motor 30, so that the rotation speed of the rotor motor 30 is rapidly decreased, the rotor motor 30 is driven to stop vibrating, the effect of rapidly stopping vibrating of the rotor motor 30 is achieved, and the vibration stopping time of the rotor motor 30 is shortened.

The specific magnitude of the amplitude of the second driving voltage is not limited in the present application. In some embodiments, to cause the gerotor motor 30 to stop vibrating quickly, the effective amplitude of the second audio signal is at a maximum of the effective amplitude of the first audio signal, such that the amplitude of the second drive voltage is equal to the maximum of the amplitude of the first drive voltage.

It should be noted that, based on the descriptions of S101-S102, the audio codec module 20 may drive the rotor motor 30 to vibrate based on the first audio signal. In the vibration process of the rotator motor 30, if the processor 10 does not receive the second trigger command, the audio codec module 20 cannot receive the new first audio signal, and therefore, the audio codec module 20 may drive the rotator motor 30 to continue driving based on part or all of the received first audio signal until the processor 10 receives the second trigger command, where specific content of the second trigger command may be referred to in the foregoing description, and is not described herein again.

In contrast to the related art 1, the present application does not rely on the self-damping of the rotor motor 30 to stop the vibration, and does not directly supply the continuous dc voltage to the rotor motor 30.

Next, the effects of the rotor motor in the related art 1 and the rotor motor 30 in the present application of achieving vibration and stopping vibration will be described with reference to fig. 7 b. In fig. 7b, the abscissa represents time t, and the ordinate represents the rotational speed v of the rotor motor 30.

As shown in fig. 7b, the solid line corresponds to the rotor motor 30 in the present application achieving vibration and stopping vibration, and the broken line corresponds to the rotor motor in the related art 1 achieving vibration and stopping vibration. The rotary motor may vibrate assuming that the rotational speed of the rotary motor reaches v 1. In the present application, the rotational speed of the rotor motor 30 can reach v1 after the time period T1 ', that is, the vibration starting time period of the rotor motor 30 is T1'. In the related art 1, the rotation speed of the rotor motor reaches v1 after the time period T1 elapses, that is, the oscillation starting time period of the rotor motor 30 is T1. As can be seen by FIG. 7b, T1' is less than T1. In general, if vibration of the main keys of the mobile phone is to be realized in the related art 1, the start-up time period T1 of the rotator motor is about 60ms, and the start-up time period T1' of the rotator motor 30 of the present application is about 40 ms.

It is understood by those skilled in the art that the rotor motor stops vibrating when the rotational speed of the rotor motor is 0. In the present application, the rotation speed of the rotor motor 30 may be changed from v1 to 0 after the elapse of the time period T2 ', that is, the vibration stop time period of the rotor motor 30 is T2'. In the related art 1, the rotation speed of the rotor motor can be changed from v1 to 0 after the elapse of the time period T2, that is, the vibration stop time period of the rotor motor 30 is T2. As can be seen by FIG. 7b, T2' is less than T2. In general, if vibration of the main keys of the mobile phone is to be realized by the related art 1, the vibration stop time period T2 of the rotor motor is about 130ms, and the vibration stop time period T2' of the rotor motor 30 of the present application is about 20 ms.

In contrast to the related art 2, the rotor motor 30 of the present application is not limited by the frequency of the PWM driver, and the life of the rotor motor 30 is not affected by the PWM driver. In the present application, the effective amplitude of the audio signal is greater than the effective amplitude of the reference signal, so that it can be ensured that the duty ratio of the PWM signal is close to 100% or equal to 100%, that is, the audio codec module 20 can output the dc driving voltage to the rotor motor 30, thereby realizing the rapid vibration and rapid stop vibration of the rotor motor 30, and the supply of the dc power is beneficial to prolonging the service life of the rotor motor 30, and playing a role in protecting the rotor motor 30. And the waveform of the driving voltage is consistent with the waveform of the audio signal, so that the waveform of the audio signal is adjusted by the processor 10, and the audio codec module 20 can control whether the rotator motor 30 vibrates and the vibration condition, so that the rotator motor 30 has different vibration effects, and the electronic device 1 is favorably applied to different use scenes to bring different special effect vibration experiences to users. In a specific embodiment, for convenience of description, in the following, the electronic device 1 takes a mobile phone as an example, and with reference to fig. 8a to 8b, a configuration process of performing a vibration effect on a use scene in which the mobile phone vibrates when a new incoming call is received and a specific implementation process of vibrating the mobile phone when the new incoming call is received are described.

As shown in fig. 8a, the display screen of the mobile phone includes an icon of the text "none", an icon of the text "vibration effect 1", an icon of the text "vibration effect 2", an icon of the text "vibration effect 3", and an icon of the text "vibration effect 4".

Wherein the icon of the word "none" does not correspond to any vibration effect. Taking the starting vibration voltage of the rotor motor 30 as 1V and the rated voltage of the rotor motor 30 as 3V as an example, the icon of the character "vibration effect 1" corresponds to the vibration effects generated by the audio 1 and the audio 5, and the vibration effect corresponding to the audio 1 is: the vibration was carried out for 30ms at a driving voltage of 5V and for 20ms at a driving voltage of 3V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. The icon for the word "vibration effect 2" corresponds to the vibration effect produced by audio 2 and audio 5, with audio 2 corresponding to the vibration effect: vibrate for 30ms at a driving voltage of 5V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. The icon for the word "vibration effect 3" corresponds to the vibration effect produced by audio 3 and audio 5, with audio 3 corresponding to the vibration effect: the vibration was carried out for 20ms at a driving voltage of 5V and for 30ms at a driving voltage of 2V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. The icon for the word "vibration effect 4" corresponds to the vibration effect produced by audio 4 and audio 5, with audio 4 corresponding to the vibration effect: the vibration was carried out for 20ms at a driving voltage of 5V, for 30ms at a driving voltage of 2V, and for 10ms at a driving voltage of 4V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V.

Audio 1, audio 2 and audio 5 are pre-stored in the factory. The audio 3 and the audio 4 are stored in the mobile phone by the user in a network downloading or Bluetooth transmission mode. And audio 1, audio 2, audio 3 and audio 4 are all first audio signals for driving the rotor motor 30 to vibrate. Tone 5 is a second tone signal for driving the rotor motor 30 to stop vibrating.

When a new incoming call is made, the vibration effect is not configured in the use scene of the mobile phone in which vibration occurs, at the moment, the opposite hook image is displayed at the position corresponding to the image of the character 'none', and the vibration icon 71 is stopped being displayed on the upper right corner of the mobile phone. If the user wants to configure the vibration effect 1 for the usage scenario in which the mobile phone vibrates when there is a new incoming call, as shown in fig. 8a, the user may enter an operation for triggering the rotor motor 30 to vibrate on the mobile phone, for example, click the position corresponding to the icon of the word "vibration effect 1" on the mobile phone, at this time, the position corresponding to the icon of the word "vibration effect 1" displays the opposite-hook icon, the position corresponding to the image of the word "none" disappears, and the display stop vibration icon 71 on the upper right corner of the mobile phone is changed to display the vibration icon 72.

Thus, based on the description of S101-S104, the cellular phone may respond to the click operation, so that the cellular phone drives the rotator motor 30 to vibrate rapidly based on the audio 1, so that the user can perceive the vibration effect 1. If the user has an operation of typing in to stop the rotator motor 30 from vibrating within 50ms from the start of the vibration of the rotator motor 30, the cellular phone drives the rotator motor 30 to rapidly stop the vibration based on the audio 6. On the contrary, after the rotor motor 30 vibrates for 50ms, the cellular phone drives the rotor motor 30 to rapidly stop vibrating based on the audio 6.

In summary, the user can set the vibration effect 1 as the vibration effect corresponding to the usage scenario in which the mobile phone vibrates when there is a new incoming call. It should be noted that the user may also configure other vibration effects for the usage scenario in which the mobile phone vibrates when there is a new incoming call, and the specific implementation process is the same as the implementation process for configuring the vibration effect 1, which can be referred to the above description, and is not described herein again. Therefore, the personalized setting of the user is facilitated, the user can select the corresponding vibration effect based on different use scenes, for example, the user can select the vibration effect applied to the outdoor mode to have stronger vibration sense or longer vibration duration, or the user can select the vibration effect applied to the office mode to have weaker vibration or shorter vibration duration.

As shown in fig. 8b, based on the above-mentioned setup process of fig. 8a, the mobile phone has configured the vibration effect 1 in the usage scenario where vibration occurs when there is a new incoming call, and at this time, a vibration icon 72 is displayed on the mobile phone. When a new incoming call is received by the mobile phone (fig. 8b shows the text "new incoming call", an icon for receiving a call, and an icon for hanging up a call as examples), an event built in the mobile phone for triggering the rotor motor 30 to vibrate wakes up (fig. 8b does not show).

Accordingly, based on the descriptions of S101-S104, the mobile phone can drive the rotator motor 30 to vibrate rapidly based on audio 1 in response to the trigger event, so as to remind the user of a new incoming call through vibration effect 1. If the user has received a new incoming call or has typed an operation for stopping the rotator motor 30 from vibrating within 50ms from the start of the vibration of the rotator motor 30, the mobile phone drives the rotator motor 30 to rapidly stop the vibration based on the audio 6. On the contrary, after the rotator motor 30 vibrates for 50ms, the mobile phone continues to drive the rotator motor to vibrate rapidly based on the audio 1 until the user receives a new incoming call or enters an operation for stopping the rotator motor 30 from vibrating, and the mobile phone drives the rotator motor 30 to stop vibrating rapidly based on the audio 6.

In conclusion, the user can know that the mobile phone has a new call through the vibration effect 1, so that the user can be reminded conveniently.

It should be noted that the above embodiments can be applied to various usage scenarios in which the electronic device 1 needs to vibrate. The above embodiment is only one possible implementation manner, and the present application is not limited to the above implementation manner.

The method for controlling the vibration of the electronic equipment is applied to the electronic equipment, and the processor sends a first audio signal to the audio coding and decoding module when receiving a first trigger command, wherein the first trigger command is used for indicating the rotor motor to vibrate. Because the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal, the audio coding and decoding module can obtain the first PWM signal with the duty ratio close to 100% or equal to 100% by comparing the first audio signal with the reference signal, namely the waveform of the first PWM signal is a direct current voltage waveform, and then the first PWM signal is amplified, filtered and the like, so that the direct current first driving voltage can be obtained, and the direct current first driving voltage is provided for the rotor motor, so that the rotor motor can be driven to vibrate. The processor may send a second audio signal to the audio codec module when receiving a second trigger command, where the second trigger command is used to instruct the rotator motor to stop vibrating. The effective amplitude of the second audio signal is greater than that of the reference signal, so that the audio coding and decoding module can obtain a second PWM signal with a duty ratio close to 100% or equal to 100% by comparing the second audio signal with the reference signal, and then amplify, filter and the like the second PWM signal, namely the waveform of the second PWM signal is a DC voltage waveform, a DC second driving voltage can be obtained, the phase of the second driving voltage is opposite to that of the first driving voltage, and the DC second driving voltage is provided for the rotor motor, so that the rotor motor can be driven to stop vibrating. Therefore, the effect of quick vibration and quick stop vibration of the rotor motor is realized, the vibration starting time and the vibration stopping time of the rotor motor are shortened, the service life of the rotor motor cannot be influenced by the supply of direct current, the effect of protecting the rotor motor is achieved, and the use of the rotor motor is facilitated to be prolonged. And the waveform of the first PWM signal is consistent with that of the first audio signal, so that different vibration effects of the rotor motor are controlled through different settings of the first audio signal, the requirements of different use scenes of the electronic equipment are met, and abundant special-effect vibration experience is brought to a user.

On the basis of the above embodiments, in other embodiments, the first audio signal may include at least one sub-signal. In the following, the specific content of the first audio signal is exemplified in connection with two possible representations.

In a possible representation, the first audio signal may comprise the first sub-signal, i.e. the effective amplitude of the first sub-signal is constant and the effective amplitude of the first sub-signal is larger than the effective amplitude of the reference signal. In this application, the waveform or period of the first sub-signal is not limited.

Since the effective amplitude of the first sub-signal is larger than the effective amplitude of the reference signal. Therefore, based on the description in S102, the audio codec module 20 may generate the first driving voltage of the direct current based on the first sub-signal and the reference signal. Therefore, the audio codec module 20 may provide the first driving voltage of the direct current to the rotor motor 30, and the first driving voltage rapidly increases the rotation speed of the rotor motor 30, so as to drive the rotor motor 30 to start vibrating, thereby realizing rapid vibration starting of the rotor motor 30, and avoiding poor experience brought to the user due to vibration dragging.

In order to further accelerate the rapid vibration and the rapid stop vibration of the rotor motor 30, in the present application, the effective amplitudes of the first sub-signal and the second audio signal are the same, so that the amplitude of the first driving voltage and the amplitude of the second driving voltage generated by the audio codec module 20 are equal to each other and are both greater than the amplitude of the rated voltage of the rotor motor 30. By doing so, the rapid vibration and the rapid stop of the vibration of the rotor motor 30 are remarkably accelerated, and the vibration dragging is prevented from bringing a bad experience to the user.

It should be noted that the phase of the first sub-signal and the phase of the second audio signal may be in-phase or in anti-phase. When the phase of the first sub-signal is in phase with the phase of the second audio signal, the phase of the first driving voltage or the phase of the second driving voltage is changed by the switch bridge 215 in the audio codec module 20 to ensure that the phase of the first driving voltage and the phase of the second driving voltage are in anti-phase. When the phase of the first sub-signal and the phase of the second audio signal are inverted, the phase of the first driving voltage and the phase of the second driving voltage are simultaneously changed or not changed through the switch bridge 215 in the audio codec module 20 to ensure that the phase of the first driving voltage and the phase of the second driving voltage are inverted.

For convenience of description, referring to fig. 9a, taking the oscillation starting voltage of the rotor motor 30 as 1V and the rated voltage of the rotor motor 30 as 3V as an example, when the processor 10 transmits the first sub-signal and the second audio signal to the audio codec module 20, respectively, a specific case of the driving voltage of the direct current is exemplified. For convenience of explanation, in fig. 9a, the abscissa represents time and the ordinate represents voltage. The duration corresponding to the first sub-signal is illustrated by taking the number 1 as an example, and the duration corresponding to the second audio signal is illustrated by taking the number 2 as an example.

As shown in fig. 9a, when the rotor motor 30 does not vibrate, the magnitude of the driving voltage is 0V. The audio codec module 20 may generate a first driving voltage of 5V based on the first sub-signal and the reference signal, and the rotor motor 30 vibrates rapidly since the first driving voltage 5V is greater than a rated voltage 3V of the rotor motor 30. After the duration corresponding to the first sub-signal, the audio codec module 20 may generate a second driving voltage of-5V based on the second audio signal and the reference signal, and since the absolute value of the amplitude of the second driving voltage is greater than the amplitude of the rated voltage of the rotor motor 30 by 3V and the phases are opposite, the rotor motor 30 may stop vibrating quickly.

It should be noted that, since the audio codec module 20 needs to implement the fast vibration of the rotator motor 30 based on the first sub-signal, the effective amplitude of the first sub-signal is generally large, so that the rotator motor 30 vibrates fast. In order to prolong the service life of the rotor motor 30, the present application may shorten a time duration corresponding to the first sub-signal, so as to apply the first audio signal containing the first sub-signal to a usage scenario requiring a short-time vibration of the rotor motor 30, so as to protect the rotor motor 30.

The vibration duration in the usage scenario of the rotor motor 30 vibrating for a short time here may be set according to the software and hardware conditions of the electronic device 1 and the actual usage situation of the user, and may be set to be generally equal to or less than 100 ms. The corresponding use scene may be a scene in which the mobile phone receives a new message (a short message, a multimedia message, an instant messaging message, or the like), a scene in which the rotor motor 30 vibrates when the user touches a main page key of the mobile phone, a scene in which the rotor motor vibrates when the user types in the mobile phone, or a scene in which the rotor motor vibrates when an arrow is shot in a game, which is not limited in the present application.

In another possible representation, the first audio signal comprises a plurality of sub-signals. The processor 10 may transmit each sub-signal to the audio codec module 20 one by one, or may transmit each sub-signal to the audio codec module 20 together, which is not limited in this application. In addition, the present application does not limit the storage mode, waveform, or period of each sub-signal. For example, the respective sub-signals may be stored separately to facilitate formation of different first audio signals, or may be stored together to facilitate easy calling to improve operation efficiency.

In addition, the number of the sub-signals is not limited in the application. Taking two sub-signals as an example, the first audio signal may comprise a second sub-signal and a third sub-signal which are consecutively connected.

Because the effective amplitude of the second sub-signal is greater than the effective amplitude of the reference signal, the effective amplitude of the third sub-signal is greater than the effective amplitude of the reference signal, and the second sub-signal and the third sub-signal are continuously connected, based on the description in S102, when the vibration duration of the rotor motor 30 is less than or equal to the duration of the second sub-signal, the audio codec module 20 may generate a direct-current first driving voltage based on the second sub-signal and the reference signal, and the first driving voltage rapidly increases the rotation speed of the rotor motor 30, so as to drive the rotor motor 30 to start vibrating, thereby implementing rapid vibration initiation of the rotor motor 30, and avoiding vibration dragging to bring bad experience to users.

After a period of time, when the vibration duration of the rotor motor 30 is greater than the duration of the second sub-signal, the audio codec module 20 may continuously generate the dc first driving voltage based on the third sub-signal and the reference signal, and the first driving voltage may enable the rotor motor 30 to continuously keep vibrating. That is, when the vibration time period of the rotor motor 30 is less than or equal to the sum of the time periods of the second sub-signal and the third sub-signal, the audio codec module 20 may drive the rotor motor 30 to vibrate based on the third sub-signal. When the vibration duration of the rotor motor 30 is greater than the sum of the durations of the second sub-signal and the third sub-signal, since the audio codec module 20 does not receive the new sub-signal and the audio codec module 20 has received the third sub-signal from the processor 10, the audio codec module 20 may continue to drive the rotor motor to vibrate based on the third sub-signal until the processor 10 sends the new sub-signal to the audio codec module 20.

Wherein the vibration period of the rotor motor 30 is set to a period from the reception of the first audio signal from the processor 10 to the reception of the second audio signal by the processor 10.

It should be noted that, when the vibration duration of the rotor motor 30 is greater than the sum of the durations of the second sub-signal and the third sub-signal, since the audio codec module 20 does not receive the new sub-signal and the audio codec module 20 has received the second sub-signal from the processor 10, the audio codec module 20 may continue to drive the rotor motor to vibrate based on the third sub-signal until the processor 10 sends the new sub-signal to the audio codec module 20.

The amplitude of the second sub-signal and the amplitude and phase of the third sub-signal are not limited in the present application. In some embodiments, the effective amplitude of the second sub-signal may be greater than the effective amplitude of the third sub-signal, so that the amplitude of the first driving voltage generated by the audio codec module 20 based on the second sub-signal is greater than the amplitude of the first driving voltage generated based on the third sub-signal, which not only enables the rotor motor 30 to vibrate rapidly at high voltage, but also enables the rotor motor 30 to vibrate for a long time at low voltage, thereby being beneficial to meeting the use scenario of the rotor motor 30 vibrating for a long time, saving the driving consumption of the rotor motor 30, and meeting the use requirement of the electronic device 1 that the rotor motor 30 needs to vibrate for a long time.

The vibration duration in the usage scenario of the rotor motor 30 vibrating for a long time here can be set according to the software and hardware conditions of the electronic device 1 and the actual usage situation of the user, and can be set to be greater than 100ms in general. The corresponding use scene may be a scene in which the mobile phone receives a new incoming call, a scene in which an alarm is prompted or a memo is prompted, or a scene in which the rotor motor vibrates while the user types the mobile phone, which is not limited in the present application.

In addition, the low voltage here may be understood as that when the effective amplitude of the second sub-signal may be greater than that of the third sub-signal, the driving voltage obtained based on the third sub-signal may become smaller than the driving voltage obtained based on the second sub-signal. That is, the driving voltage obtained based on the second sub-signal is high voltage, and the driving voltage obtained based on the third sub-signal is low voltage. The magnitude of the low voltage and the high voltage may be set based on the starting voltage and the rated voltage of the rotor motor 30. For example, when the starting voltage of the rotor motor 30 is 1V and the rated voltage of the rotor motor 30 is 3V, the amplitude of the high voltage may be greater than 3V, and the amplitude of the low voltage may be greater than or equal to 1V and less than or equal to 3V. It should be noted that the example is only illustrative.

In order to further accelerate the rapid vibration and the rapid stop vibration of the rotor motor 30, in the present application, the effective amplitudes of the second sub-signal and the second audio signal are the same, so that the amplitudes of the first driving voltage and the second driving voltage generated by the audio codec module 20 are equal to each other and are both greater than the amplitude of the rated voltage of the rotor motor 30. By doing so, the rapid vibration and the rapid stop of the vibration of the rotor motor 30 are remarkably accelerated, and the vibration dragging is prevented from bringing a bad experience to the user.

It should be noted that the phase of the second sub-signal and the phase of the second audio signal may be in-phase or in anti-phase. When the phase of the second sub-signal is in phase with the phase of the second audio signal, the phase of the first driving voltage or the phase of the second driving voltage is changed by the switch bridge 215 in the audio codec module 20 to ensure that the phase of the first driving voltage and the phase of the second driving voltage are in opposite phase. When the phase of the second sub-signal is opposite to the phase of the second audio signal, the phase of the first driving voltage and the phase of the second driving voltage are simultaneously changed or not changed by the switching bridge 215 in the audio codec module 20 to ensure that the phase of the first driving voltage and the phase of the second driving voltage are opposite.

For convenience of description, referring to fig. 9b, taking the oscillation starting voltage of the rotor motor 30 as 1V and the rated voltage of the rotor motor 30 as 3V as an example, when the processor 10 transmits the first audio signal and the second audio signal to the audio codec module 20 respectively, where the first audio signal includes the second sub-signal and the third sub-signal that are connected in series, a specific case of the driving voltage of the direct current is exemplified. For convenience of explanation, in fig. 9b, the abscissa represents time and the ordinate represents voltage. The duration corresponding to the second sub-signal is illustrated by taking the number 1 as an example, the duration corresponding to the third sub-signal is illustrated by taking the number 2 as an example, and the duration corresponding to the second audio signal is illustrated by taking the number 3 as an example.

As shown in fig. 9b, when the rotor motor 30 does not vibrate, the magnitude of the driving voltage is 0V. The audio codec module 20 may generate a first driving voltage of 5V based on the second sub-signal and the reference signal, and the rotor motor 30 vibrates rapidly since the first driving voltage 5V is greater than a rated voltage 3V of the rotor motor 30. In order to save driving power consumption, the audio codec module 20 may generate a first driving voltage of 3V based on the third sub-signal and the reference signal, through a time period corresponding to the second sub-signal, the first driving voltage 3V causing the rotator motor 30 to continue to keep vibrating. After the duration corresponding to the third sub-signal, the audio codec module 20 may generate a second driving voltage of-5V based on the second audio signal and the reference signal, and the rotor motor 30 may stop vibrating quickly because the absolute value of the amplitude of the second driving voltage is greater than the amplitude of the rated voltage of the rotor motor 30 and the phases of the second driving voltage are opposite.

In addition, because the audio signal is very editable, the effective amplitude (or gain) of each sub-signal in the first audio signal can be set differently, so that the special-effect vibration of the rotor motor 30 can be realized, the vibration effect of the electronic device 1 can be enriched, and the vibration requirements of different use scenes can be met.

For example, the electronic device 1 is a mobile phone, and in the mobile phone, each sub-signal in the first audio signal may include: audio 1, audio 2, audio 3, audio 4, audio 5, and audio 6.

The effective amplitudes of audio 1, audio 2 and audio 3 are equal, and the respective corresponding durations of audio 1, audio 2 and audio 3 are different. The effective amplitudes of the audio 4 and the audio 5 are different from those of the audio 1, the audio 2 and the audio 3 respectively, and the corresponding time durations of the audio 4 and the audio 5 are the same. And the phases of tone 1, tone 2, tone 3, tone 4, and tone 5 are in phase, the gerotor motor 30 can be independently driven to start oscillation. Tone 6 is opposite in phase to tone 1, tone 2, tone 3, tone 4, and tone 5, and tone 6 is able to independently drive the gerotor motor 30 to stop vibrating.

In order to realize the vibration requirements of different scenes, the processor 10 in the mobile phone may continue the audio 6 to at least one of the audio 1, the audio 2, the audio 3, the audio 4, and the audio 5, and after the comparison, amplification, filtering, and the like of the audio codec module 20, different direct current driving voltages may be provided to the rotator motor 30, so as to realize different vibration effects of the rotator motor 30.

For convenience of description, referring to fig. 9c, taking the oscillation starting voltage of the rotator motor 30 as 1V and the rated voltage of the rotator motor 30 as 3V as an example, when the processor 10 transmits a first audio signal and a second audio signal to the audio codec module 20, respectively, where the first audio signal includes audio 4, audio 1, audio 2, audio 5, and audio 3 that are connected in series, and the second audio signal is audio 6, a specific case of the driving voltage of the direct current is exemplified. For convenience of explanation, in fig. 9c, the abscissa represents time and the ordinate represents voltage. The duration corresponding to the audio 1 is illustrated by taking the numeral 1 as an example, the duration corresponding to the audio 2 is illustrated by taking the numeral 2 as an example, the duration corresponding to the audio 3 is illustrated by taking the numeral 3 as an example, the duration corresponding to the audio 4 is illustrated by taking the numeral 4 as an example, the audio 5 is illustrated by taking the duration corresponding to the numeral 5 as an example, and the duration corresponding to the audio 6 is illustrated by taking the numeral 6 as an example.

As shown in fig. 9c, when the rotor motor 30 does not vibrate, the magnitude of the driving voltage is 0V. The audio codec module 20 may generate a first driving voltage of 5V based on the audio 4 and the reference signal, so that the rotor motor 30 vibrates rapidly since the first driving voltage 5V is greater than a rated voltage 3V of the rotor motor 30. In order to save driving power consumption, the audio codec module 20 may generate a first driving voltage of 3V, which is 3V such that the rotator motor 30 continues to maintain vibration, based on the audio 1 and the reference signal for a duration corresponding to the audio 4. After the duration corresponding to the audio 1, the audio codec module 20 may generate a first driving voltage of 3V based on the audio 2 and the reference signal, and the first driving voltage of 3V may make the rotator motor 30 continuously maintain the vibration. After the duration corresponding to the audio 2, the audio codec module 20 may generate a 2V first driving voltage based on the audio 5 and the reference signal, and the first driving voltage 2V may make the rotor motor 30 continuously maintain the vibration. After the duration corresponding to the audio 5, the audio codec module 20 may generate a 3V first driving voltage based on the audio 3 and the reference signal, and the first driving voltage 3V may make the rotator motor 30 continuously maintain the vibration. After the duration corresponding to the audio 3, the audio codec module 20 may generate a second driving voltage of-5V based on the audio 6 and the reference signal, where the absolute value of 5V of the amplitude of the second driving voltage is greater than the amplitude of 3V of the rated voltage of the rotor motor 30 and the phases of the second driving voltage are opposite, so that the rotor motor 30 stops vibrating quickly.

It should be noted that, in the vibration process of the rotor motor 30, the amplitude of the driving voltage may be smaller than the amplitude of the rated voltage of the rotor motor 30, and it is only required that the amplitude of the driving voltage is greater than or equal to the amplitude of the starting voltage of the rotor motor 30 so that the rotor motor 30 keeps vibrating.

In addition, in the case of the driving voltage of the rotor motor 30 shown in fig. 9a to 9c and fig. 2b, respectively, when the rotor motor 30 stops vibrating, the present application can generate a driving voltage of-5V to drive the rotor motor 30 to stop vibrating, whereas the related art 1 needs to stop vibrating by means of self-damping of the rotor motor.

In the case of the driving voltage of the rotor motor 30 shown in fig. 9a to 9c and fig. 3b, the driving voltage that can be generated by the present application can be 5V, 3V, 2V, etc. in the time period between the rapid vibration and the rapid stop vibration of the rotor motor 30, and the driving voltage is greater than the starting vibration voltage of the rotor motor 30 to maintain the vibration of the rotor motor 30, and the supply of the direct current does not affect the life of the rotor motor, thereby protecting the rotor motor. Whereas the PWM driver in the related art 2 needs a large frequency to generate a PWM signal with a duty ratio of, for example, 5V 60%, which easily causes the PWM driver to switch the voltage back and forth, resulting in an influence on the life of the rotor motor electrically connected to the PWM driver.

In the present application, the usage scenario of the electronic device 1 may be a scenario in which only vibration occurs, or a scenario in which a ringtone and vibration are combined. In a combined scenario of ring tone and vibration, on the basis of the embodiment shown in fig. 4, as shown in fig. 10, the electronic device 1 of the present application may further include: an Integrated Circuit (IC) 41 and a speaker 42, the processor 10 is further electrically connected to the IC 41, and the IC 41 is further electrically connected to the speaker 42.

The specific implementation form of the peripheral IC 41 is not limited in the present application, and it is only necessary that the peripheral IC 41 can control the speaker 41 to play the ring tone or stop playing the ring tone. And the number or type of the speakers 42 is not limited in this application. It should be noted that, in the present application, the function of playing the ring tone by the speaker 42 may be implemented by using the audio codec module instead of controlling the speaker 42 by the peripheral IC 41, which is not limited in the present application.

In the present application, the processor 10 may drive the rotator motor 30 to start vibrating while controlling the speaker 42 to play a bell sound through the peripheral IC 41, so that the rotator motor 30 may vibrate as the bell sound of the speaker 42 is played. And the processor may drive the rotator motor 30 to stop vibrating while controlling the speaker 42 to stop playing the bell sound through the peripheral IC 41, so that the rotator motor 30 may stop vibrating as the bell sound of the speaker 42 stops playing. Thereby, the effect of ringing the electronic device 1 is achieved.

The present application does not limit the parameters such as the type or number of the ring tones. The ring tone may be stored in the electronic device 1 in advance, may also be stored in the electronic device 1 by the user, and may also be stored by combining the foregoing two manners, which is not limited in this application. And generally, the audio signal corresponding to the ring tone is usually different from the first audio signal. Of course, the audio signal corresponding to the ring tone may also be the same as the first audio signal. The audio signal corresponding to the ring tone may be obtained based on at least one parameter of a beat, a drum point, or a beat of the ring tone.

It should be noted that the processor 10 does not control the speaker 42 and the rotor motor 30 sequentially, and the setting is specifically performed according to the actual requirement, the delay time period of the speaker 42, and the delay time period of the rotor motor 30. For example, to ensure the consistency of the ring tone playing and the vibration effect, the processor may drive the rotator motor 30 to start vibrating, and control the speaker 42 to play the ring tone after the delay time of the rotator motor 30.

Based on the foregoing description, since the rotator motor 30 can realize different vibration effects, in the present application, each ring tone can be associated with one or more vibration effects, and the first audio signal corresponding to each vibration effect is different, so as to select a personalized vibration effect for the user, thereby improving the user experience.

The vibration effect associated with each ringtone may be set when the electronic device 1 leaves a factory, or may not be set when the electronic device 1 leaves a factory and may be changed or newly created by a user, which is not limited in the present application. In addition, the vibration effects associated with the respective ringtones may be the same or different, which is not limited in this application.

Next, referring to fig. 11a, taking the electronic device 1 as a mobile phone as an example, a specific implementation process of the electronic device 1 for ringing with ringing is illustrated. For convenience of explanation, fig. 11a illustrates that the audio signal corresponding to the ringtone 1 is different from the first audio signal.

As shown in fig. 11a, it is assumed that ring 1 has 4 vibration effects associated with each other, and the text "ring 1+ no vibration", the text "ring 1+ vibration effect 1", the text "ring 1+ vibration effect 2", the text "ring 1+ vibration effect 3", and the text "ring 1+ vibration effect 4" are displayed on the display screen of the mobile phone.

Wherein the no-vibration effect does not correspond to the first audio signal. The first audio signals corresponding to the 4 vibration effects are audio 1, audio 2, audio 3 and audio 4 on the display screen of the mobile phone. Taking the starting vibration voltage of the rotor motor 30 as 1V and the rated voltage of the rotor motor 30 as 3V as an example, the icon of the character "vibration effect 1" corresponds to the vibration effect generated by the audio 1, and the vibration effect corresponding to the audio 1 is: the vibration was carried out for 30ms at a driving voltage of 5V and for 20ms at a driving voltage of 3V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. The icon for the word "vibration effect 2" corresponds to the vibration effect produced by audio 2 and audio 5, with audio 2 corresponding to the vibration effect: vibrate for 30ms at a driving voltage of 5V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. The icon for the word "vibration effect 3" corresponds to the vibration effect produced by audio 3 and audio 5, with audio 3 corresponding to the vibration effect: the vibration was carried out for 20ms at a driving voltage of 5V and for 30ms at a driving voltage of 2V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. The icon for the word "vibration effect 4" corresponds to the vibration effect produced by audio 4 and audio 5, with audio 4 corresponding to the vibration effect: the vibration was carried out for 20ms at a driving voltage of 5V, for 30ms at a driving voltage of 2V, and for 10ms at a driving voltage of 4V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. A new incoming call in the phone has ring 1 set up and no vibration effect (illustrated in fig. 11a by showing ring icon 101 and stop vibration icon 102 as an example). If the user wants to set that the mobile phone has the vibration effect while playing the ring 1, the user may enter an operation for changing the vibration effect 1 associated with the ring 1 on the mobile phone, for example, click a position corresponding to the text "ring 1+ vibration effect 1" on the mobile phone (in fig. 11a, an opposite hook icon is displayed at a position corresponding to the text "ring 1+ vibration effect 1" after the dotted line circle is clicked, and the opposite hook icon at a position corresponding to the text "ring 1+ no vibration" disappears as an example), so that the ring 1 is associated with the vibration effect 1 corresponding to the audio 1.

Thus, when a new incoming call comes from the mobile phone (fig. 11a shows the text "new incoming call", the icon for answering the call, and the icon for hanging up the call), the mobile phone can vibrate with the vibration effect 1 corresponding to the audio 1 while playing the ring 1 (fig. 11a shows the ring icon 101 and the vibration icon 103 as an example).

Based on the foregoing description, since the rotor motor 30 can achieve different vibration effects, in the present application, the electronic device 1 may set different audio signals corresponding to different ringtones, and each audio signal corresponds to a different vibration effect, so that the rotor motor 30 is driven to vibrate by the audio signal corresponding to each ringtone, so as to select an individualized vibration effect for a user, and improve the user experience of the user.

Next, referring to fig. 11b, taking the electronic device 1 as a mobile phone as an example, a specific implementation process of the electronic device 1 for ringing with ringing is illustrated. For convenience of explanation, fig. 11b illustrates an example in which the audio signal corresponding to the ringtone 1 is the same as the first audio signal.

As shown in fig. 11b, assume that the mobile phone stores ring 1, ring 2, ring 3, and ring 4. Ring 1, ring 2, ring 3 and ring 4 correspond to different vibration effects, respectively. Taking the starting vibration voltage of the rotor motor 30 as 1V and the rated voltage of the rotor motor 30 as 3V as an example, the icon of the text "vibration effect 1" corresponds to the vibration effects generated by the audio 1 and the audio 5 corresponding to the ring 1, and the vibration effect corresponding to the audio 1 is: the vibration was carried out for 30ms at a driving voltage of 5V and for 20ms at a driving voltage of 3V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. The icon of the word "vibration effect 2" corresponds to the vibration effect produced by audio 2 and audio 5 corresponding to ring tone 2, and the vibration effect corresponding to audio 2 is: vibrate for 30ms at a driving voltage of 5V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. The icon of the word "vibration effect 3" corresponds to the vibration effect produced by the audio 3 and the audio 5 corresponding to the ring tone 3, and the vibration effect corresponding to the audio 3 is: the vibration was carried out for 20ms at a driving voltage of 5V and for 30ms at a driving voltage of 2V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V. The icon of the word "vibration effect 4" corresponds to the vibration effects generated by the audio 4 and the audio 5 corresponding to the ring tone 4, and the vibration effect corresponding to the audio 4 is: the vibration was carried out for 20ms at a driving voltage of 5V, for 30ms at a driving voltage of 2V, and for 10ms at a driving voltage of 4V. The vibration effect corresponding to audio 5 is: the vibration was stopped at a driving voltage of-5V.

The phone is in silent mode and has no vibration effect (fig. 11b illustrates the stop ring icon 104 and stop vibration icon 102 as examples). If the user wants to set the mobile phone to have a vibration effect along with the playing of the ring tone 1, the user may enter an operation for changing the mobile phone mode on the mobile phone, such as clicking a position corresponding to the ring tone 1 on the mobile phone (in fig. 11b, it is illustrated that an opposite hook icon showing an opposite hook icon and a position corresponding to no text disappears after the dotted line circle is clicked) and clicking a position corresponding to the right side of the vibration button 105 located in the upper right corner of the mobile phone (in fig. 11b, it is illustrated that the vibration button 105 is changed from an off state located on the left side of the vibration button 105 to an on state located on the right side of the vibration button 105), so that the ring tone 1 is associated with the vibration effect generated by the audio signal corresponding to the ring tone 1.

Thus, when a new incoming call comes from the mobile phone (fig. 11b shows the text "new incoming call", the icon for answering the call, and the icon for hanging up the call), the mobile phone can vibrate with the vibration effect corresponding to ring 1 while playing ring 1 (fig. 11b shows ring icon 101 and vibration icon 103 as an example). With continued reference to fig. 10, the electronic device 1 of the present application may further include: a memory 50, the processor 10 being further electrically connected to the memory 50. The memory 50 stores a first audio signal and a second audio signal, and the first audio signal or the second audio signal may be pre-stored in the memory 50 by the electronic device 1, may also be stored in the memory 50 by a user, or may also be a combination of the foregoing two ways, which is not limited in this application. In addition, the memory 50 may also store audio signals corresponding to ring tones, and the like.

The present application does not limit the parameters such as the number and the type of the memory 50. For example, a Double Data Rate SDRAM (DDR SDRAM), a Flash Memory (UFS), or a Static Random Access Memory (SRAM) in a processor, etc. are used.

Based on the foregoing, in one possible implementation manner of S101, the processor 10 may call the first audio signal from the memory 50 based on the electrical connection relationship between the memory 50 and the processor 10 when receiving the first trigger command. Thus, the processor 10 may transmit the first audio signal to the audio codec module 20.

In an alternative implementation manner of S103, when receiving the second trigger command, the processor 10 may call the second audio signal from the memory 50 based on the electrical connection relationship between the memory 50 and the processor 10. Accordingly, the processor 10 may transmit the second audio signal to the audio codec module 20.

It should be noted that the first audio signal and the second audio signal may be stored in different locations of the same memory 50, may also be stored in the same location of the same memory 50, and may also be stored in different memories 50, which is not limited in this application.

The memory 50 may store the first audio signal including one sub-signal, may store the first audio signal including a plurality of sub-signals, or may store the first audio signal of the above two modes, which is not limited in the present application. When the electronic device 1 requires the rotor motor 30 to vibrate, the processor 10 may recall the first audio signal corresponding to a specific usage scenario from the memory 50, so that the rotor motor 30 may have different vibration effects with different first audio signals.

Illustratively, the application also provides an electronic device 1. The electronic device 1 of the present application may include: the audio encoding and decoding device comprises a processor 10, an audio encoding and decoding module 20 and a rotor motor 30, wherein the processor 10 is electrically connected with the audio encoding and decoding module 20, and the audio encoding and decoding module 20 is electrically connected with the rotor motor 30. A processor 10, configured to send a first audio signal to the audio codec module 20 when receiving a first trigger command, where the first trigger command is used to instruct the rotor motor 30 to vibrate; the audio coding and decoding module 20 is configured to drive the rotor motor 30 to vibrate based on a first audio signal and a reference signal, where a minimum value of an effective amplitude of the first audio signal is greater than an effective amplitude of the reference signal; the processor 10 is further configured to send a second audio signal to the audio codec module 20 when receiving a second trigger command, where the second trigger command is used to instruct the rotator motor 30 to stop vibrating, and an effective amplitude of the second audio signal is greater than an effective amplitude of the reference signal; and the audio coding and decoding module 20 is further configured to drive the rotor motor 30 to stop vibrating based on the second audio signal and the reference signal.

In some embodiments, the audio codec module 20 is specifically configured to output a first PWM signal with a duty ratio within a first preset range by comparing the first audio signal with a reference signal; amplifying the amplitude of the first PWM signal to obtain a first amplified voltage; carrying out high-frequency noise interference removal processing on the first amplified voltage to obtain a direct-current first driving voltage; based on the first driving voltage, the rotor motor 30 is driven to vibrate.

In some embodiments, the audio codec module 20 is specifically configured to output the second PWM signal with a duty ratio within a second preset range by comparing the second audio signal with the reference signal; amplifying the amplitude of the second PWM signal to obtain a second amplified voltage; carrying out high-frequency noise interference removal processing on the second amplified voltage to obtain a direct-current second driving voltage, wherein the phases of the first driving voltage and the second driving voltage are opposite; based on the second drive voltage, the rotor motor 30 is driven to stop vibrating.

In some embodiments, the first audio signal comprises: a first sub-signal, the effective amplitude of the first sub-signal being greater than the effective amplitude of the reference signal.

In some embodiments, the effective amplitude of the first sub-signal is the same as the effective amplitude of the second audio signal.

In some embodiments, the first audio signal comprises: and the effective amplitude of the second sub-signal is greater than that of the third sub-signal, and the effective amplitude of the third sub-signal is greater than that of the reference signal.

In some embodiments, the second sub-signal has the same effective amplitude as the second audio signal, and the third sub-signal has an effective amplitude that is less than the effective amplitude of the second audio signal.

In some embodiments, the audio codec module 20 is specifically configured to drive the rotor motor 30 to vibrate based on the second sub-signal and the reference signal when the vibration duration of the rotor motor 30 is less than or equal to the duration of the second sub-signal; when the vibration duration of the rotor motor 30 is greater than the duration of the second sub-signal, driving the rotor motor 30 to vibrate based on the third sub-signal and the reference signal; here, the vibration time period of the rotor motor 30 is a time period from the reception of the first audio signal from the processor 10 to the reception of the second audio signal by the processor 10.

In some embodiments, the audio signal or the reference signal is at least one of a triangular wave, a sawtooth wave, a rectangular wave, or a sine wave.

In some embodiments, the electronic device 1 further comprises: a peripheral IC 41 and a speaker 42, the processor 10 is further electrically connected to the peripheral IC 41, and the peripheral IC 41 is further electrically connected to the speaker 42; a processor 10 for driving the rotor motor 30 to vibrate when the speaker 42 is controlled to play a bell sound by the peripheral IC 41; the processor 10 is further configured to drive the rotator motor 30 to stop vibrating when the speaker 42 is controlled by the peripheral IC 41 to stop playing the ring tone.

In some embodiments, the electronic device 1 further comprises: a memory 50, the memory 50 being electrically connected to the processor 10; the processor 10 is specifically configured to call up the first audio signal from the memory 50 when receiving the first trigger command; transmitting the first audio signal to the audio codec module 20; the processor 10 is further specifically configured to call up the second audio signal from the memory 50 when receiving the first trigger command; the second audio signal is transmitted to the audio codec module 20.

In some embodiments, the audio signal is pre-saved in the memory 50 by the electronic device 1; and/or the audio signal is stored in the memory 50 by the user.

The specific structure of the electronic device 1 of the present application may refer to the technical solutions in the embodiments shown in fig. 4a to 5b and 10, and may be used to execute the technical solutions in the embodiments shown in fig. 6a to 9c and 11a to 11b, which have similar implementation principles and technical effects, and the implementation operations of each component may further refer to the relevant descriptions of the embodiments, which are not described herein again.

In some embodiments, the audio codec module 20 is specifically configured to output a first PWM signal with a duty ratio within a first preset range by comparing the first audio signal with a reference signal; amplifying the amplitude of the first PWM signal to obtain a first amplified voltage; carrying out high-frequency noise interference removal processing on the first amplified voltage to obtain a direct-current first driving voltage; based on the first driving voltage, the rotor motor 30 is driven to vibrate.

In some embodiments, the audio codec module 20 is specifically configured to output the second PWM signal with a duty ratio within a second preset range by comparing the second audio signal with the reference signal; amplifying the amplitude of the second PWM signal to obtain a second amplified voltage; carrying out high-frequency noise interference removal processing on the second amplified voltage to obtain a direct-current second driving voltage, wherein the phases of the first driving voltage and the second driving voltage are opposite; based on the second drive voltage, the rotor motor 30 is driven to stop vibrating.

Fig. 12 is a schematic structural diagram of an electronic device 1 provided in the present application.

The electronic device 1 may include a processor 10, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 100, an antenna 200, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like.

The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 1. In other embodiments of the present application, the electronic device 1 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

Processor 10 may include one or more processing units, such as: the processor 10 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.

The controller may be a neural center and a command center of the electronic device 1. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.

A memory may also be provided in the processor 10 for storing instructions and data. In some embodiments, the memory in the processor 10 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 10. If the processor 10 needs to use the instruction or data again, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 10 and thus increases the efficiency of the system.

In some embodiments, the processor 10 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.

The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 10 may include multiple sets of I2C buses. The processor 10 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc. via different I2C bus interfaces. For example: the processor 10 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 10 and the touch sensor 180K communicate through an I2C bus interface to implement the touch function of the electronic device 1.

The I2S interface may be used for audio communication. In some embodiments, processor 10 may include multiple sets of I2S buses. Processor 10 may be coupled to audio module 170 via an I2S bus to enable communication between processor 10 and audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.

The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.

The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 10 with the wireless communication module 160. For example: the processor 10 communicates with the bluetooth module in the wireless communication module 160 through the UART interface to implement the bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.

The MIPI interface may be used to connect the processor 10 with peripheral devices such as the display screen 194, the camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, the processor 10 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 1. The processor 10 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 1.

The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 10 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.

The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 1, and may also be used to transmit data between the electronic device 1 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.

It should be understood that the connection relationship between the modules according to the embodiment of the present invention is merely an illustration, and is not a structural limitation of the electronic device 1. In other embodiments of the present application, the electronic device 1 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.

The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 1. The charging management module 140 may also supply power to the electronic device 1 through the power management module 141 while charging the battery 142.

The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 10. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 10, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 10. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.

The wireless communication function of the electronic device 1 may be implemented by the antenna 100, the antenna 200, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.

The antenna 100 and the antenna 200 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 1 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 100 may be multiplexed as a diversity antenna for a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.

The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the electronic device 1. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive electromagnetic waves from the antenna 100, filter, amplify, etc. the received electromagnetic waves, and transmit the electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 100 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the processor 10. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 10.

The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 10.

The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 1, including Wireless Local Area Networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite Systems (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 200, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 10. The wireless communication module 160 may also receive a signal to be transmitted from the processor 10, frequency modulate it, amplify it, and convert it into electromagnetic waves via the antenna 200 to radiate it.

In some embodiments, the antenna 100 and the mobile communication module 150 of the electronic device 1 are coupled and the antenna 200 and the wireless communication module 160 are coupled so that the electronic device 1 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).

The electronic device 1 implements a display function by the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 10 may include one or more GPUs that execute program instructions to generate or alter display information.

The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 1 may include 1 or N display screens 194, N being a positive integer greater than 1.

The electronic device 1 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like.

The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.

The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 1 may include 1 or N cameras 193, N being a positive integer greater than 1.

The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 1 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.

Video codecs are used to compress or decompress digital video. The electronic device 1 may support one or more video codecs. In this way, the electronic device 1 can play or record video in a plurality of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.

The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can realize applications such as intelligent recognition of the electronic device 1, for example: image recognition, face recognition, speech recognition, text understanding, and the like.

The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the electronic device 1. The external memory card communicates with the processor 10 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.

The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 10 executes various functional applications of the electronic device 1 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, a phone book, etc.) created during use of the electronic device 1, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.

It should be noted that the aforementioned memory 50 may be an internal memory 121, or may be an external memory card connected through an external memory interface 120, which is not limited in the present application.

The electronic device 1 may implement the respective corresponding functions through the audio module 170, the motor 191, the receiver 170B (optionally), the microphone 170C, the earphone interface 170D, and the application processor, etc. Such as sound recordings, etc.

The audio module 170 is used for converting digital audio information into analog audio signal output and converting analog audio input into digital audio signal, i.e. the aforementioned audio codec module 20. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 10, or some functional modules of the audio module 170 may be disposed in the processor 10, or the audio module 170 may be disposed in the power management module 141 (as shown in fig. 12), or may be disposed separately.

The electronic device may implement the respective corresponding functions through the peripheral IC 171, the speaker 170A, the receiver 170B (optionally), and the application processor, etc. Such as music playing, etc.

The peripheral IC 171 is used for converting digital audio information into an analog audio signal output and also for converting an analog audio input into a digital audio signal, i.e., the aforementioned peripheral IC 41. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, peripheral IC 171 may be provided separately.

The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic device 1 can listen to music through the speaker 170A or listen to a hands-free conversation, i.e., the aforementioned speaker 42.

The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic device 1 receives a call or voice information, it can receive the voice by placing the receiver 170B close to the ear of the person.

The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 1 may be provided with at least one microphone 170C. In other embodiments, the electronic device 1 may be provided with two microphones 170C, which may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 1 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.

The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.

The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 1 determines the intensity of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 1 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 1 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.

The gyro sensor 180B may be used to determine the motion attitude of the electronic device 1. In some embodiments, the angular velocity of the electronic device 1 about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 1, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 1 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.

The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 1 calculates altitude, aiding positioning and navigation, from the barometric pressure value measured by the barometric pressure sensor 180C.

The magnetic sensor 180D includes a hall sensor. The electronic device 1 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 1 is a flip, the electronic device 1 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.

The acceleration sensor 180E can detect the magnitude of acceleration of the electronic apparatus 1 in various directions (generally, three axes). The magnitude and direction of gravity can be detected when the electronic device 1 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.

A distance sensor 180F for measuring a distance. The electronic device 1 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 1 may utilize range sensor 180F to range for fast focus.

The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic apparatus 1 emits infrared light to the outside through the light emitting diode. The electronic apparatus 1 detects infrared reflected light from a nearby object using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic apparatus 1. When insufficient reflected light is detected, the electronic apparatus 1 can determine that there is no object near the electronic apparatus 1. The electronic device 1 can detect that the user holds the electronic device 1 close to the ear by using the proximity light sensor 180G, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.

The ambient light sensor 180L is used to sense the ambient light level. The electronic device 1 may adaptively adjust the brightness of the display screen 194 according to the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 1 is in a pocket to prevent accidental touches.

The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 1 can utilize the collected fingerprint characteristics to realize fingerprint unlocking, access to an application lock, fingerprint photographing, fingerprint incoming call answering and the like.

The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 1 executes a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 1 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 1 heats the battery 142 when the temperature is below another threshold value to avoid the low temperature causing the electronic device 1 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic apparatus 1 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.

The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the electronic device 1 at a different position than the display screen 194.

The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.

The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 1 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 1.

The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.

Among them, the motor 191 may include the aforementioned rotor motor 30 so that the vibration of the rotor motor 30 and the stop of the vibration may be achieved using the control electronics vibration method of the present application. The number of the rotor motors is not limited in the present application. And the motor 191 may further include a linear motor, which is not limited in this application.

Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.

The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 1 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 1 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 1 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 1 employs esims, namely: an embedded SIM card. The eSIM card may be embedded in the electronic device 1 and cannot be separated from the electronic device 1.

Illustratively, the present application also provides an audio codec module 20. The audio coding/decoding module 20 of the present application may include: the input end of the audio coding and decoding module 20 is electrically connected with the processor 10, and the output end of the audio coding and decoding module 20 is electrically connected with the rotor motor 30; an audio codec module 20, configured to receive a first audio signal from the processor 10, where the first audio signal is sent by the processor 10 when receiving a first trigger command, and the first trigger command is used to instruct the rotor motor 30 to vibrate; the audio coding and decoding module 20 is further configured to drive the rotor motor 30 to vibrate based on a first audio signal and a reference signal, where a minimum value of an effective amplitude of the first audio signal is greater than an effective amplitude of the reference signal; the audio coding and decoding module 20 is further configured to receive a second audio signal from the processor 10, where the second audio signal is sent by the processor 10 when receiving a second trigger command, the second trigger command is used to instruct the rotator motor 30 to stop vibrating, and an effective amplitude of the second audio signal is greater than an effective amplitude of the reference signal; and the audio coding and decoding module 20 is further configured to drive the rotor motor 30 to stop vibrating based on the second audio signal and the reference signal.

In some embodiments, the audio codec module 20 is specifically configured to output a first PWM signal with a duty ratio within a first preset range by comparing the first audio signal with a reference signal; amplifying the amplitude of the first PWM signal to obtain a first amplified voltage; carrying out high-frequency noise interference removal processing on the first amplified voltage to obtain a direct-current first driving voltage; based on the first driving voltage, the rotor motor 30 is driven to vibrate.

In some embodiments, the audio codec module 20 is specifically configured to output the second PWM signal with a duty ratio within a second preset range by comparing the second audio signal with the reference signal; amplifying the amplitude of the second PWM signal to obtain a second amplified voltage; carrying out high-frequency noise interference removal processing on the second amplified voltage to obtain a direct-current second driving voltage, wherein the phases of the first driving voltage and the second driving voltage are opposite; based on the second drive voltage, the rotor motor 30 is driven to stop vibrating.

The specific structure of the audio coding and decoding module 20 of the present application may refer to the technical solutions in the embodiments shown in fig. 4a to 5b and 10, and may be used to execute the technical solutions in the embodiments shown in fig. 6a to 9c and 11a to 11b, which have similar implementation principles and technical effects, and the implementation operations of each component may further refer to the relevant descriptions of the embodiments, and are not described again here.

Illustratively, the present application also provides an audio codec module 20. The audio coding/decoding module 20 of the present application includes: a signal generator 201, a comparator 202, a power amplifier 203 and a 204 filter 204; the signal generator 201 is used for outputting a reference signal; a first input end of the comparator 202 is electrically connected with an output end of the signal generator 201, a second input end of the comparator 202 is electrically connected with the processor 10, an output end of the comparator 202 is electrically connected with an input end of the power amplifier 203, an output end of the power amplifier 203 is electrically connected with an input end of the filter 204, an output end of the filter 204 is electrically connected with the rotor motor 30, a first audio signal is sent by the processor 10 when receiving a first trigger command, the first trigger command is used for indicating the rotor motor 30 to vibrate through the first audio signal, and the minimum value of the effective amplitude of the first audio signal is greater than the effective amplitude of the reference signal; a comparator 202 for outputting a first PWM signal having a duty ratio within a first preset range by comparing the first audio signal with a reference signal; the power amplifier 203 is configured to amplify an amplitude of the first PWM signal and output a dc first driving voltage; and transmits the first driving voltage of the direct current to the rotor motor 30 to vibrate the rotor motor 30; the comparator 202 is further configured to output a second PWM signal with a duty ratio within a second preset range by comparing a second audio signal and the reference signal, where the second audio signal is sent by the processor 10 when receiving a second trigger command, the second trigger command is used to instruct the rotor motor 30 to stop vibrating through the second audio signal, and an effective amplitude of the second audio signal is greater than an effective amplitude of the reference signal; the power amplifier 203 is further configured to amplify the amplitude of the second PWM signal and output a direct-current second driving voltage, where the phases of the first driving voltage and the second driving voltage are reversed; and transmits the direct-current second driving voltage to the rotor motor 30 to stop the vibration of the rotor motor 30.

The specific structure of the audio coding and decoding module 20 of the present application may refer to the technical solutions in the embodiments shown in fig. 4a to 5b and 10, and may be used to execute the technical solutions in the embodiments shown in fig. 6a to 9c and 11a to 11b, which have similar implementation principles and technical effects, and the implementation operations of each component may further refer to the relevant descriptions of the embodiments, and are not described again here.

Illustratively, the present application also provides a power management unit PMU. The power management unit PMU of the present application may include: the power supply module and the audio coding and decoding module. The power supply module is electrically connected with the power supply end of the audio coding and decoding module.

The specific structure of the power management unit PMU of the present application may refer to the technical solutions in the embodiments shown in fig. 4a to 5b and 10, and may be used to execute the technical solutions in the embodiments shown in fig. 6a to 9c and 11a to 11b, where the implementation principle and the technical effect are similar, and the implementation operation of each module may further refer to the relevant description of the embodiments, and is not described herein again.

48页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于调相机过电压保护的压频比限制整定方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!