Method, device, terminal equipment and storage medium for measuring air pressure using a speaker

By utilizing the closed sound cavity of the speaker and the induced electromotive force calculation method, the problem of adding hardware to the air pressure measurement of the mobile terminal device is solved, and the expansion of the air pressure measurement function and cost reduction are achieved.

CN113820064BActive Publication Date: 2024-09-06HUIZHOU TCL CLOUD INTERNET CORP TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110893209.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-04
Publication Date
2024-09-06
Estimated Expiration
2041-08-04

AI Technical Summary

Technical Problem

Existing mobile terminal devices need to add MEMS air pressure sensors when measuring air pressure, which takes up internal space and increases costs. How to achieve air pressure measurement without adding new hardware.

Method used

The closed sound cavity of the speaker is used to detect the induced electromotive force of the speaker's voice coil under the action of external pressure, and the air pressure value is calculated, replacing the MEMS air pressure sensor for air pressure measurement.

Benefits of technology

It realizes the air pressure measurement function of mobile terminal equipment without adding components, reduces product costs, and discovers new application scenarios for speakers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113820064B
    Figure CN113820064B
Patent Text Reader

Abstract

The present invention discloses a method, device, terminal equipment and storage medium for measuring air pressure using a speaker, which is used for a mobile terminal to measure air pressure, initialize the air pressure measurement state of the speaker of the mobile terminal, and the mobile terminal receives air pressure from the external environment through the speaker diaphragm. The speaker diaphragm drives the speaker voice coil to move in the magnetic field under the action of the air pressure of the external environment, and the mobile terminal obtains the induced electromotive force on the speaker voice coil to calculate the air pressure value of the external environment. The present invention uses existing components of electronic products and makes slight functional improvements, that is, it can be used to replace MEMS air pressure sensors to achieve the function of measuring air pressure, which has discovered a new application for commonly used components of electronic products and also reduces the cost of products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of measurement of mobile terminals, and in particular to a method, an apparatus, a terminal device and a storage medium for measuring air pressure using a loudspeaker. Background Art

[0002] In today's world where technology helps people live, people are always with various mobile terminal devices. They have long been surrounded by mobile terminal devices such as mobile phones and tablets, and mobile terminal devices have gradually penetrated into every corner of people's lives. The various functions on mobile terminal devices are constantly increasing. For example, you can use mobile phones to measure the length and height of objects, or measure the heart rate, blood pressure and other health indicators of the human body. In addition, with the improvement of the intelligence of mobile phones, the function of barometers has been more and more frequently applied to electronic products such as mobile terminal devices to meet the special needs of mobile terminal devices, especially mobile phone users for application scenarios such as the altitude and water depth of their geographical locations, in order to further improve the breadth of mobile phone functions. At present, mobile phones on the US market also need to use barometer functions on mobile phones to achieve the need for vertical positioning due to the implementation of FCCE911 regulations. It can be seen that with the gradual implementation of such regulations, domestic applications in this area will gradually spread. At present, the industry generally uses built-in MEMS (micro-electromechanical system) pressure sensors in mobile phones to achieve the above-mentioned mobile phone pressure measurement function. MEMS pressure sensors can assist mobile phones in tracking and obtaining the user's altitude and assist in tracking calculations.

[0003] Although MEMS pressure sensors can be easily integrated into mobile terminal devices, for mobile terminal devices such as mobile phones, although new functions are added, they also occupy internal space. So how to use the existing functions of the mobile phone to measure air pressure without adding new hardware, so as to improve the utilization space of the mobile phone.

[0004] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0005] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a method for measuring air pressure by utilizing a sealed sound cavity of a speaker is provided to realize dynamic air pressure measurement of a mobile terminal device, thereby solving the problem of having to use a MEMS air pressure sensor for air pressure measurement and meeting the application requirements of air pressure measurement scenarios in mobile terminal devices.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0007] In a first aspect, the present invention provides a method for measuring air pressure using a speaker, comprising the following steps:

[0008] Initializing the air pressure measurement state of the speaker of the mobile terminal;

[0009] The mobile terminal receives air pressure from the external environment through the speaker diaphragm;

[0010] The loudspeaker diaphragm drives the loudspeaker voice coil to move in the magnetic field under the action of the air pressure of the external environment;

[0011] The mobile terminal obtains the induced electromotive force on the speaker voice coil to calculate the air pressure value of the external environment.

[0012] As a further improved technical solution, the initialization of the air pressure measurement state of the speaker of the mobile terminal specifically includes the following steps:

[0013] The speaker of the mobile terminal is embedded in the cavity to form a closed sound cavity;

[0014] Putting the loudspeaker diaphragm in a static suspended state;

[0015] The initial air pressure value of the sealed sound cavity is obtained and set as P0.

[0016] As a further improved technical solution, the initialization of the air pressure measurement state of the speaker of the mobile terminal specifically further includes the following steps:

[0017] Obtaining the magnetic field strength B of the loudspeaker magnet;

[0018] Obtaining the length L and resistance R of the speaker voice coil;

[0019] Get the area S of the speaker diaphragm.

[0020] As a further improved technical solution, the speaker diaphragm drives the speaker voice coil to move in the magnetic field under the action of pressure, specifically comprising the following steps:

[0021] The two ends of the speaker voice coil are electrically connected;

[0022] The speaker diaphragm drives the speaker voice coil to move in the magnetic field generated by the speaker magnet, and obtains the electromagnetic force Fb generated by the speaker voice coil cutting the magnetic field.

[0023] As a further improved technical solution, the mobile terminal obtains the induced electromotive force on the speaker voice coil to calculate the air pressure value of the external environment, specifically including the following steps:

[0024] When the speaker diaphragm drives the speaker voice coil to move in the magnetic field generated by the magnetic steel, an induced electromotive force U generated by the speaker voice coil cutting the magnetic field is obtained;

[0025] The mobile terminal calculates the air pressure value P of the external environment according to the formula P0+(B×U×L) / (R×S).

[0026] As a further improved technical solution, the induced electromotive force generated by the cutting magnetic field of the loudspeaker voice coil is obtained by performing ADC sampling on the voltages at the positive and negative poles of the loudspeaker.

[0027] In a second aspect, an embodiment of the present invention further provides a device for measuring air pressure using a speaker, wherein the device comprises:

[0028] An air pressure measurement state initialization module, used to initialize the air pressure measurement state of the speaker of the mobile terminal;

[0029] The speaker voice coil induced electromotive force sampling module is used to drive the speaker voice coil to move in the magnetic field under the action of the air pressure of the external environment on the speaker diaphragm, so as to obtain the induced electromotive force generated by the speaker voice coil cutting the magnetic field;

[0030] The air pressure value calculation module calculates the air pressure value of the external environment according to the magnetic field strength of the loudspeaker magnet, the length and resistance of the loudspeaker voice coil, the area of ​​the loudspeaker diaphragm, and the induced electromotive force.

[0031] As a further improved technical solution, the device also includes:

[0032] The voltage sampling module is used to perform ADC sampling on the voltage at the positive and negative poles of the loudspeaker, that is, the induced electromotive force of the loudspeaker voice coil.

[0033] In a third aspect, an embodiment of the present invention further provides a terminal device, comprising a memory, a processor, and a program for measuring air pressure using a speaker, which is stored in the memory and can be run on the processor. When the processor executes the program for measuring air pressure using a speaker, the steps of the method for measuring air pressure using a speaker as in any one of the above-mentioned schemes are implemented.

[0034] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which is stored a program for measuring air pressure using a speaker. When a processor executes the program for measuring air pressure using a speaker, the steps of any one of the methods for measuring air pressure using a speaker in the above-mentioned schemes are implemented.

[0035] Beneficial effects: Compared with the prior art electronic products that need to measure air pressure by using an external MEMS barometer, the present invention provides a technical solution that uses the closed sound cavity of the speaker to detect the induced electromotive force generated by the speaker diaphragm cutting in the magnetic field under the action of external pressure to calculate the pressure value of the electronic product, and then measure the air pressure. The speaker is an indispensable component of many electronic products. By using existing components of electronic products and making slight functional improvements, it can be used to replace MEMS air pressure sensors to achieve the function of measuring air pressure, which has discovered a new application for commonly used components of electronic products and also reduces the cost of the product. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A flowchart of a specific implementation of a method for measuring air pressure using a speaker provided in an embodiment of the present invention.

[0037] Figure 2 A schematic cross-sectional view of the closed cavity structure of a loudspeaker in a method for measuring air pressure using a loudspeaker provided in an embodiment of the present invention.

[0038] Figure 3 A schematic diagram of a circuit for detecting induced electromotive force in a method for measuring air pressure using a speaker provided in an embodiment of the present invention.

[0039] Figure 4 It is a principle block diagram of a device for measuring air pressure using a speaker provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0041] In today's world where technology helps people live, people are always with various terminal devices. People's lives have long been surrounded by mobile terminal devices such as mobile phones and tablets. Mobile terminal devices have gradually penetrated into every corner of people's lives. Among them, mobile terminal devices headed by mobile phones have become a must-have in people's lives. With the advancement of technology, mobile terminal devices are no longer just portable phones or text message displays as in the past. They have become important tools that people carry with them, integrating communication equipment, information centers, storage, navigators, clocks, perpetual calendars, cameras, etc. In order to continuously develop various application scenarios of mobile terminal devices, mobile terminal devices also need to continuously accumulate functional devices to meet the needs of continuously developing application scenarios. For example, taking the mobile phone of a mobile terminal device as an example, when a mobile phone user needs to measure the altitude, water depth, etc. of the geographical location, or when playing games on the mobile phone, different functional devices need to be accumulated to realize various functions. In addition, with the implementation of FCCE911 regulations in the US market, the vertical positioning needs of mobile phones need to be achieved using the barometer function. I believe that such applications will be promoted in China in the near future. Therefore, the function of providing air pressure measurement on mobile phones will also become a necessary function for such devices.

[0042] Currently, the industry generally adopts the built-in MEMS (micro-electromechanical system) air pressure sensor in the mobile phone to achieve the above-mentioned mobile phone air pressure measurement function. Although the MEMS air pressure sensor can be easily integrated into mobile terminal devices such as mobile phones, it requires additional installation space and also increases the cost of the mobile phone.

[0043] In order to solve the problems in the prior art, this embodiment provides a method for realizing the function of measuring air pressure on a mobile terminal device such as a mobile phone without adding any additional components.

[0044] Speakers are commonly used electroacoustic sensors that can convert electrical signals into sound patterns. They are widely used in various electronic products. When the speaker is working, the electrical signal flows through the speaker voice coil. In the magnetic field generated by the speaker magnet, the speaker voice coil is acted upon by the Ampere force. The Ampere force refers to the force exerted on the current-carrying wire in the magnetic field. The Ampere force Fa = B × I × L, where B is the magnetic field intensity, I is the current on the wire, and L is the length of the wire. Since the speaker diaphragm is connected to the speaker voice coil as a whole and is suspended in the magnetic field generated by the speaker magnet, when the electrical signal passes through the speaker voice coil, the speaker diaphragm will vibrate up and down under the action of the Ampere force, thereby driving the air to vibrate and generate sound wave signals. The sound waves above the speaker diaphragm and the sound waves below are directional signals to each other, with a phase difference of 180°. In order to avoid the mutual cancellation of the sound wave signals above the speaker diaphragm and the sound wave signals below, resulting in sound attenuation, a closed sound cavity is required to isolate the upper and lower sound wave signals of the speaker diaphragm, so as to accurately reflect the Ampere force of the speaker diaphragm driving the speaker voice coil to vibrate in the magnetic field generated by the speaker magnet. Therefore, the present invention adopts the method of sealing the loudspeaker to form a closed cavity, such as Figure 2 As shown, Figure 2 A schematic cross-sectional diagram of the structure of a closed cavity of a speaker in a method for measuring air pressure using a speaker provided in an embodiment of the present invention is shown, wherein a speaker 10 is encapsulated in a cavity 108, that is, the speaker 10 is placed at the opening of the cavity 108, and the periphery of the speaker 10 is connected and sealed to the periphery of the opening of the cavity 108. After the speaker 10 is embedded in the cavity, the back of the speaker 10 forms a closed sound cavity 109 together with the cavity 108. As a closed cavity, the speaker diaphragm 101 will vibrate up and down under the pressure of the external environment. Since the speaker 10 is a closed cavity, the sound wave signal above the speaker diaphragm 101 propagates outward, while the sound wave signal below is confined in the closed sound cavity 109 and cannot propagate outward, thereby avoiding the cancellation of sound wave signals. Because the sound wave signals in the upper and lower directions of the speaker diaphragm 101 are avoided from canceling each other out, the speaker diaphragm 101 drives the speaker voice coil 102 to accurately reflect the force exerted on the speaker voice coil 102 during the cutting movement in the magnetic field of the speaker magnet 103. At this time, when the speaker diaphragm 101 is subjected to the air pressure of the external environment and drives the speaker voice coil 102 to vibrate, by detecting the induced electromotive force on the speaker voice coil 102, that is, detecting the voltage between the positive and negative poles of the speaker 10, the external air pressure value of the mobile terminal device can be calculated based on the induced electromotive force on the speaker voice coil 102, and it can be used in various application scenarios where the mobile terminal device needs to use the air pressure value.

[0045] Figure 3 FIG. 4 shows a circuit schematic diagram of detecting induced electromotive force in a method for measuring air pressure using a speaker provided in an embodiment of the present invention. Figure 3It can be seen that the positive and negative ends of the speaker 10 with a sealed cavity are electrically connected to the amplifier 20, the amplifier 20 is electrically connected to the ADC analog-to-digital converter 30, and the ADC analog-to-digital converter 30 is electrically connected to the processor 40. Among them, the amplifier 20 is a device that can amplify the voltage or power of the input signal to increase the signal amplitude or power; the ADC analog-to-digital converter 30 (ADC) is an electronic component that converts an analog signal into a digital signal, and is a component that converts an input voltage signal into an output digital signal. The processor 40 refers to the central processing unit (CPU) on the mobile terminal device, which is the calculation and control core of the mobile terminal device and the final execution unit for information processing and program running. The above-mentioned amplifier 20, ADC analog-to-digital converter 30, and processor 40 are all existing technologies on the mobile terminal device, and their specific working principles are not repeated. After the voltage at the positive and negative ends of the above-mentioned speaker is amplified by the amplifier 20, it is converted into a digital signal by the ADC analog-to-digital conversion module 30 and input into the processor 40 of the mobile terminal. The processor 40 of the mobile terminal calculates the external air pressure value based on the relationship between the induced electromotive force and the external environmental pressure, and then feeds back to the user of the mobile terminal device, thereby realizing the function of using the speaker to measure the air pressure. From the working principle of the above-mentioned air pressure measurement, the accuracy of the air pressure measurement mainly depends on the measurement accuracy of the induced electromotive force. Therefore, in the circuit for detecting the induced electromotive force, the signal gain of the amplifier and the sampling accuracy of the ADC analog-to-digital conversion module determine the accuracy of the air pressure measurement. It can be seen that to improve the accuracy of air pressure measurement, choosing a suitable amplifier and ADC analog-to-digital conversion module is the key.

[0046] The following describes the implementation method in detail based on the working principle of the mobile terminal device using a speaker to measure air pressure.

[0047] Exemplary Methods

[0048] The method of measuring air pressure using a speaker in this embodiment can be applied to mobile terminal devices, such as mobile phones, tablet computers, and other mobile terminal devices. As long as various mobile terminal devices with speakers are provided, the method of the present invention can be implemented. Figure 1 As shown in the steps, the method for measuring air pressure using a speaker includes the following steps S100-S400:

[0049] Step S100, initializing the air pressure measurement state of the speaker of the mobile terminal.

[0050] The purpose of initialization is to obtain known parameters related to measuring air pressure when the speaker in the mobile terminal is not working and is in a static state.

[0051] The initialization of the air pressure measurement state of the speaker of the mobile terminal specifically includes the following steps S101-S103:

[0052] Step S101, embed the speaker of the mobile terminal into the cavity to form a closed sound cavity. As described in the working principle of the front speaker to measure air pressure, the mobile terminal uses the speaker to measure the air pressure. It is necessary to prevent the mutual cancellation of the sound wave signal above the speaker diaphragm and the sound wave signal below the speaker diaphragm when the speaker diaphragm is vibrated. As a result, the induced electromotive force of the vibration of the speaker voice coil connected to the speaker diaphragm cannot be obtained. Therefore, the speaker needs to be enclosed in a closed cavity so that the sound wave signal above the speaker diaphragm and the sound wave signal below the speaker diaphragm cannot cancel each other, so as to measure the induced electromotive force of the speaker voice coil after vibration. The above-mentioned sound wave signal above the speaker diaphragm and the sound wave signal below the speaker diaphragm refer to Figure 2 When the speaker is shown to be placed horizontally, the sound wave signal of the speaker diaphragm is vertically upward or vertically downward, that is, the upper sound wave signal is the sound wave signal of the speaker toward the outside of the closed sound cavity, and the lower sound wave signal is the sound wave signal of the speaker toward the inside of the closed sound cavity. Here, the upper sound wave signal and the lower sound wave signal do not limit the direction of the sound wave signal transmitted by the speaker, but are only used to indicate the different propagation directions of the speaker sound wave signal. According to the sound wave signal relative to the closed cavity, the upper sound wave signal can also be called an outward sound wave signal, and the lower sound wave signal can also be called an inward sound wave signal.

[0053] Step S102, the speaker diaphragm is placed in a static suspension state. Placing the speaker diaphragm in a static suspension state means placing the speaker diaphragm above the speaker magnet, and the speaker is not working. The speaker diaphragm is connected to the speaker voice coil. The speaker voice coil is a coil through which current passes. It is an important part of the mechanical wave system of the electrodynamic speaker and can be said to be the heart of the speaker. The performance of the voice coil will affect the sound intensity characteristics of the speaker. The speaker voice coil is generally made of light-weight and highly sensible materials to improve the measurement accuracy when the speaker is used to measure air pressure.

[0054] Step S103, obtaining the initial air pressure value of the sealed sound cavity and setting it as P0. When the speaker is not working, that is, when the speaker diaphragm is in a static state, measure the initial air pressure value of the sealed sound cavity in this state and record it as P0. The initial air pressure value of the sealed sound cavity when the speaker diaphragm is in a static state is recorded for the purpose of accurately calculating the pressure of the external environment on the speaker by the difference between the air pressure when the speaker diaphragm is subjected to the external environment pressure and the air pressure when the speaker diaphragm is in a static state, thereby obtaining the pressure of the external environment on the mobile terminal.

[0055] In addition, the initialization of the air pressure measurement state of the speaker of the mobile terminal specifically includes the following steps:

[0056] Obtaining the magnetic field strength B of the loudspeaker magnet;

[0057] Obtaining the length L and resistance R of the speaker voice coil;

[0058] Get the area S of the speaker diaphragm.

[0059] Specifically, different mobile terminals may use speakers of different sizes. The sizes of the speakers are different, and the index parameters of the speaker diaphragm, speaker magnet, and speaker voice coil are all different. Because the sizes of the speakers are different, the pressure on the speaker diaphragm is also different. During the initialization process, it is also necessary to obtain the magnetic field strength B of the above-mentioned speaker magnet. The magnitude of the magnetic field strength B determines the magnitude of the cutting force of the speaker voice coil in the magnetic field generated by the speaker magnet. The length L and resistance R of the speaker voice coil determine the magnitude of the induced electromotive force when the speaker voice coil passes current. The area S of the speaker diaphragm determines the magnitude of the force on the speaker. Therefore, the initialization process also needs to obtain the relevant technical parameter values ​​of the above-mentioned speaker components, so as to accurately calculate the pressure value of the external environment to which the speaker is subjected.

[0060] Step S200: the mobile terminal receives air pressure from the external environment through a speaker diaphragm.

[0061] Specifically, after the above-mentioned speaker air pressure measurement state is initialized, the air pressure from the external environment can be received through the mobile terminal speaker, and then the measurement work can be started. As mentioned above, the speaker diaphragm moves in the magnetic field generated by the speaker magnet, thereby driving the speaker voice coil to perform cutting movement in the magnetic field generated by the speaker magnet. The mobile terminal receiving the air pressure from the external environment through the speaker diaphragm in this step means that when the mobile terminal starts to measure the external environment air pressure, it serves as the entrance for receiving the external environment pressure, and the speaker diaphragm serves as the sensing device of the mobile terminal device.

[0062] In step S300, the speaker diaphragm drives the speaker voice coil to move in the magnetic field under the action of the air pressure of the external environment.

[0063] As mentioned above, the speaker diaphragm is connected to the speaker voice coil. The mobile terminal device is subjected to the pressure of the external environment, which causes the speaker diaphragm to drive the speaker voice coil to move up and down, and perform cutting motion in the magnetic field generated by the speaker magnet. When the speaker voice coil cuts the magnetic flux lines at a certain speed in the magnetic field, an induced voltage, i.e., an induced electromotive force, is generated inside the speaker voice coil, and its direction conforms to the right-hand rule. At this time, the speaker voice coil is the initiator of damping and the bearer of damping.

[0064] Specifically, the speaker diaphragm drives the speaker voice coil to move in the magnetic field under the action of pressure, which specifically includes the following steps S301-S302:

[0065] Step S301, the two ends of the speaker voice coil are electrically connected; the speaker diaphragm drives the speaker voice coil to move in the magnetic field, and the induced voltage generated by the speaker voice coil needs to be obtained. Therefore, the two ends of the speaker voice coil, that is, the positive and negative electrodes, need to be electrically connected. The principle of the two ends of the speaker voice coil being electrically connected in this step can be found in the above description of Figure 3 The circuit schematic diagram of detecting induced electromotive force in the method of measuring air pressure using a speaker provided in an embodiment of the present invention is shown. In the method of the embodiment of the present invention, the positive and negative poles of the speaker in the closed cavity are connected to the two ends of the speaker voice coil, which is used to measure the induced electromotive force generated by the speaker voice coil, that is, the induced voltage of the speaker voice coil.

[0066] Step S302: the speaker diaphragm drives the speaker voice coil to move in the magnetic field generated by the speaker magnet, and obtains the electromagnetic force Fb generated by the speaker voice coil cutting the magnetic field.

[0067] Specifically, the electromagnetic force Fb generated by the speaker voice coil cutting the magnetic field refers to the force exerted on the speaker voice coil in the magnetic field generated by the speaker magnet, that is, as described in the aforementioned speaker working principle, the speaker voice coil is subjected to the Ampere force, and the Ampere force refers to the force exerted on a current-carrying conductor in a magnetic field, and the current-carrying conductor is also the speaker voice coil in the speaker. According to the above Ampere force formula Fa=B×I×L, the electromagnetic force Fb generated by the speaker voice coil cutting the magnetic field in this step is Fb=B×(U / R)×L, wherein B is the magnetic field strength of the magnetic field generated by the speaker magnet, U is the induced voltage of the speaker voice coil, that is, the induced electromotive force of the speaker voice coil, R is the resistance of the speaker, and L is the length of the speaker voice coil.

[0068] Step S400: the mobile terminal obtains the induced electromotive force on the voice coil of the speaker to calculate the air pressure value of the external environment.

[0069] The mobile terminal obtains the induced electromotive force on the speaker voice coil to calculate the air pressure value of the external environment, specifically comprising the following steps:

[0070] When the speaker diaphragm drives the speaker voice coil to move in the magnetic field generated by the magnetic steel, an induced electromotive force U generated by the speaker voice coil cutting the magnetic field is obtained;

[0071] The mobile terminal calculates the air pressure value P of the external environment according to the formula P0+(B×U×L) / (R×S).

[0072] Specifically, the speaker diaphragm is under the action of the air pressure P of the external environment. At this time, the speaker diaphragm will be subjected to pressure F, F = (P-P0) × S. Under the action of pressure F, the speaker diaphragm will drive the speaker voice coil to make cutting motion in the magnetic field generated by the speaker magnet. When the electromagnetic force Fb generated by the speaker voice coil cutting the magnetic field is equal to the pressure F, the speaker diaphragm regains balance.

[0073] Therefore, according to the aforementioned Ampere force formula Fa=B×I×L=B×(U / R)×L, and F=Fa, we can get P=P0+(B×U×L) / (R×S), where P0 is the initial air pressure of the speaker's sealed voice coil, B is the magnetic field strength of the magnetic field generated by the speaker's magnet, L is the length of the speaker's voice coil, R is the resistance value of the speaker's voice coil, and S is the area of ​​the speaker's diaphragm, all of which are known physical quantities. By detecting the induced electromotive force U of the speaker's voice coil, the air pressure value P of the external environment can be calculated according to the above formula.

[0074] The induced electromotive force generated by the cutting magnetic field of the speaker voice coil is obtained by ADC sampling the voltage at the positive and negative poles of the speaker. The specific working principle is the same as the above. Figure 3 The circuit principle for detecting the induced electromotive force of the speaker voice coil is the same and will not be repeated here.

[0075] Exemplary Devices

[0076] like Figure 4 As shown in , an embodiment of the present invention provides a device for measuring air pressure using a speaker, and the device for measuring air pressure using a speaker includes:

[0077] The air pressure measurement state initialization module 50 is used to initialize the air pressure measurement state of the speaker of the mobile terminal.

[0078] The purpose of initialization is to obtain the known parameters related to the measurement of air pressure of the speaker in the mobile terminal when it is not working and in a static state. Specifically, the speaker of the mobile terminal is embedded in the cavity to form a closed sound cavity. As described in the working principle of the front speaker to measure air pressure, the mobile terminal uses the speaker to measure the air pressure. It is necessary to prevent the mutual cancellation of the sound wave signal above the speaker diaphragm and the sound wave signal below the speaker diaphragm when the speaker diaphragm is vibrated. As a result, the induced electromotive force of the vibration of the speaker voice coil connected to the speaker diaphragm cannot be obtained. Therefore, the speaker needs to be enclosed in a closed cavity so that the sound wave signal above the speaker diaphragm and the sound wave signal below the speaker diaphragm cannot cancel each other, so as to measure the induced electromotive force of the speaker voice coil after vibration. The above-mentioned sound wave signal above the speaker diaphragm and the sound wave signal below the speaker diaphragm refer to the sound wave signal below the speaker diaphragm. Figure 2When the speaker is shown to be placed horizontally, the sound wave signal of the speaker diaphragm is vertically upward or vertically downward, that is, the upper sound wave signal is the sound wave signal of the speaker toward the outside of the closed sound cavity, and the lower sound wave signal is the sound wave signal of the speaker toward the inside of the closed sound cavity. Here, the upper sound wave signal and the lower sound wave signal do not limit the direction of the sound wave signal transmitted by the speaker, but are only used to indicate the different propagation directions of the speaker sound wave signal. According to the sound wave signal relative to the closed cavity, the upper sound wave signal can also be called an outward sound wave signal, and the lower sound wave signal can also be called an inward sound wave signal.

[0079] The speaker diaphragm is placed in a static suspension state. Placing the speaker diaphragm in a static suspension state means placing the speaker diaphragm above the speaker magnet and placing the speaker in a non-working state. The speaker diaphragm is connected to the speaker voice coil, which is a coil through which current passes. It is an important component of the mechanical wave system of the electrodynamic speaker and can be said to be the heart of the speaker. The performance of the voice coil will affect the sound intensity characteristics of the speaker. The speaker voice coil is generally made of light-weight, highly sensible materials to improve the measurement accuracy when the speaker is used to measure air pressure.

[0080] The initial air pressure value of the sealed sound cavity is obtained and set as P0. When the speaker is not working, that is, when the speaker diaphragm is in a static state, the initial air pressure value of the sealed sound cavity in this state is measured and recorded as P0. The initial air pressure value of the sealed sound cavity when the speaker diaphragm is in a static state is recorded for the purpose of accurately calculating the pressure of the external environment on the speaker by the difference between the air pressure when the speaker diaphragm is subjected to external environmental pressure and the air pressure when the speaker diaphragm is in a static state, thereby obtaining the pressure of the external environment on the mobile terminal.

[0081] In addition, the air pressure measurement state initialization module 50 also needs to obtain the magnetic field strength B of the speaker magnet, the length L and resistance R of the speaker voice coil, and the area S of the speaker diaphragm. Different mobile terminals may use speakers of different sizes. The sizes of the speakers are different, and the index parameters of the speaker diaphragm, speaker magnet, and speaker voice coil are all different. Because the sizes of the speakers are different, the pressures on the speaker diaphragms are also different. During the initialization process, it is also necessary to obtain the magnetic field strength B of the speaker magnet. The magnitude of the magnetic field strength B determines the magnitude of the cutting force of the speaker voice coil in the magnetic field generated by the speaker magnet. The length L and resistance R of the speaker voice coil determine the magnitude of the induced electromotive force when the speaker voice coil passes current. The area S of the speaker diaphragm determines the magnitude of the force on the speaker. Therefore, the initialization process also needs to obtain the relevant technical parameter values ​​of the above speaker components, so as to accurately calculate the pressure value of the external environment to which the speaker is subjected.

[0082] The speaker voice coil induced electromotive force sampling module 60 is used to drive the speaker voice coil to move in the magnetic field under the action of the speaker diaphragm on the speaker voice coil under the air pressure of the external environment, so as to obtain the induced electromotive force generated by the speaker voice coil cutting the magnetic field.

[0083] Specifically, when the above-mentioned speaker air pressure measurement state is initialized, the air pressure from the external environment can be received through the mobile terminal speaker, and then the measurement work can be started. As mentioned above, the speaker diaphragm moves in the magnetic field generated by the speaker magnet, thereby driving the speaker voice coil to perform cutting movement in the magnetic field generated by the speaker magnet. The mobile terminal receives the air pressure from the external environment through the speaker diaphragm means that when the mobile terminal starts to measure the external environment air pressure, it serves as the entrance for receiving the external environment pressure, and the speaker diaphragm serves as the sensing device of the mobile terminal device.

[0084] As mentioned above, the speaker diaphragm is connected to the speaker voice coil. The mobile terminal device is subjected to the pressure of the external environment, which causes the speaker diaphragm to drive the speaker voice coil to move up and down, and perform cutting motion in the magnetic field generated by the speaker magnet. When the speaker voice coil cuts the magnetic flux lines at a certain speed in the magnetic field, an induced voltage, i.e., an induced electromotive force, is generated inside the speaker voice coil, and its direction conforms to the right-hand rule. At this time, the speaker voice coil is the initiator of damping and the bearer of damping.

[0085] The speaker diaphragm drives the speaker voice coil to move in the magnetic field. It is necessary to obtain the induced voltage generated by the speaker voice coil. Therefore, it is necessary to connect the two ends of the speaker voice coil, that is, the positive and negative electrodes. The principle of connecting the two ends of the speaker voice coil is shown in the above description. Figure 3 The circuit schematic diagram for detecting induced electromotive force in the method of measuring air pressure using a speaker provided by an embodiment of the present invention is shown, in which the positive and negative poles of the speaker in a closed cavity are connected to the two ends of the speaker voice coil, which is used to measure the induced electromotive force generated by the speaker voice coil, that is, the induced voltage of the speaker voice coil.

[0086] The electromagnetic force Fb generated by the speaker voice coil cutting the magnetic field refers to the force exerted on the speaker voice coil in the magnetic field generated by the speaker magnet, that is, as described in the aforementioned speaker working principle, the speaker voice coil is subjected to the Ampere force, which refers to the force exerted on a current-carrying wire in a magnetic field, and the current-carrying wire is also the speaker voice coil in the speaker. According to the above Ampere force formula Fa=B×I×L, the electromagnetic force Fb generated by the speaker voice coil cutting the magnetic field in this step is Fb=B×(U / R)×L, wherein B is the magnetic field strength of the magnetic field generated by the speaker magnet, U is the induced voltage of the speaker voice coil, that is, the induced electromotive force of the speaker voice coil, R is the resistance of the speaker, and L is the length of the speaker voice coil.

[0087] The air pressure value calculation module 70 calculates the air pressure value of the external environment according to the magnetic field strength of the speaker magnet, the length and resistance of the speaker voice coil, the area of ​​the speaker diaphragm, and the induced electromotive force.

[0088] Specifically, the speaker diaphragm is under the action of the air pressure P of the external environment. At this time, the speaker diaphragm will be subjected to pressure F, F = (P-P0) × S. Under the action of pressure F, the speaker diaphragm will drive the speaker voice coil to make cutting motion in the magnetic field generated by the speaker magnet. When the electromagnetic force Fb generated by the speaker voice coil cutting the magnetic field is equal to the pressure F, the speaker diaphragm regains balance.

[0089] Therefore, according to the aforementioned Ampere force formula Fa=B×I×L=B×(U / R)×L, and F=Fa, we can get P=P0+(B×U×L) / (R×S), where P0 is the initial air pressure of the speaker's sealed voice coil, B is the magnetic field strength of the magnetic field generated by the speaker's magnet, L is the length of the speaker's voice coil, R is the resistance value of the speaker's voice coil, and S is the area of ​​the speaker's diaphragm, all of which are known physical quantities. By detecting the induced electromotive force U of the speaker's voice coil, the air pressure value P of the external environment can be calculated according to the above formula.

[0090] The device also includes:

[0091] The voltage sampling module 80 is used to perform ADC sampling on the voltages at the positive and negative poles of the speaker, that is, the induced electromotive force of the speaker voice coil.

[0092] Specifically, the specific working principle of the voltage sampling module 80 is combined with the above Figure 3 The circuit principle for detecting the induced electromotive force of the speaker voice coil is the same and will not be repeated here.

[0093] In addition, the present invention also provides a terminal device, which includes a memory, a processor, and a program for measuring air pressure using a speaker stored in the memory and runnable on the processor. When the processor executes the program for measuring air pressure using a speaker, the steps of the method for measuring air pressure using a speaker as described above are implemented.

[0094] In addition, the present invention also provides a computer-readable storage medium, which stores a program for measuring air pressure using a speaker. When the program for measuring air pressure using a speaker is executed by a processor, the steps of the method for measuring air pressure using a speaker as described above are implemented.

[0095] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for measuring air pressure using a speaker, used for a mobile terminal to measure air pressure, It is characterized in that The steps include: Initializing the air pressure measurement state of the speaker of the mobile terminal; Obtaining the magnetic field strength B of the loudspeaker magnet; Obtaining the length L and resistance R of the speaker voice coil; Obtaining the area S of the speaker diaphragm; The speaker of the mobile terminal is embedded in the cavity to form a closed sound cavity, so that the sound wave signal above the speaker diaphragm and the sound wave signal below cannot cancel each other, so that the induced electromotive force of the speaker voice coil after being vibrated can be measured; The speaker diaphragm is placed in a static suspension state, wherein the speaker diaphragm is placed above the speaker magnet and the speaker is not in operation; The initial air pressure value of the sealed sound cavity is obtained and set as P0, which is the difference between the air pressure when the speaker diaphragm is subsequently subjected to external environmental pressure and the air pressure when the speaker diaphragm is in a static state, so as to accurately calculate the external environmental pressure to which the speaker is subjected; The mobile terminal receives air pressure from the external environment through the speaker diaphragm; The loudspeaker diaphragm drives the loudspeaker voice coil to move in the magnetic field under the action of the air pressure of the external environment; The two ends of the speaker voice coil are electrically connected; The speaker diaphragm drives the speaker voice coil to move in the magnetic field generated by the speaker magnet, and obtains the electromagnetic force Fb generated by the speaker voice coil cutting the magnetic field; The mobile terminal obtains the induced electromotive force on the voice coil of the speaker by performing ADC sampling on the voltages at the positive and negative poles of the speaker, so as to calculate the air pressure value of the external environment; When the speaker diaphragm drives the speaker voice coil to move in the magnetic field generated by the magnetic steel, an induced electromotive force U generated by the speaker voice coil cutting the magnetic field is obtained; The mobile terminal calculates the air pressure value P of the external environment according to the formula P0+(B×U×L) / (R×S); The positive and negative ends of the loudspeaker with a sealed cavity are electrically connected to the amplifier, the amplifier is electrically connected to the ADC analog-to-digital converter, and the ADC analog-to-digital converter is electrically connected to the processor; the voltage at the positive and negative ends of the loudspeaker is amplified by the amplifier, converted into a digital signal by the ADC analog-to-digital conversion module, and then input into the processor of the mobile terminal. The processor of the mobile terminal calculates the external air pressure value based on the relationship between the induced electromotive force and the external environmental pressure, and then feeds it back to the user of the mobile terminal device, thereby realizing air pressure measurement using the speaker.

2. A device for measuring air pressure using a speaker, using the method for measuring air pressure using a speaker as claimed in claim 1, It is characterized in that The device comprises: An air pressure measurement state initialization module, used to initialize the air pressure measurement state of the speaker of the mobile terminal; The speaker voice coil induced electromotive force sampling module is used to drive the speaker voice coil to move in the magnetic field under the action of the air pressure of the external environment on the speaker diaphragm, so as to obtain the induced electromotive force generated by the speaker voice coil cutting the magnetic field; The air pressure value calculation module calculates the air pressure value of the external environment according to the magnetic field strength of the loudspeaker magnet, the length and resistance of the loudspeaker voice coil, the area of ​​the loudspeaker diaphragm, and the induced electromotive force.

3. The device for measuring air pressure using a speaker according to claim 2, It is characterized in that The device also includes: The voltage sampling module is used to perform ADC sampling on the voltage at the positive and negative poles of the loudspeaker, that is, the induced electromotive force of the loudspeaker voice coil.

4. A terminal device, It is characterized in that The terminal device includes a memory, a processor, and a program for measuring air pressure using a speaker stored in the memory and executable on the processor. When the processor executes the program for measuring air pressure using a speaker, the steps of the method for measuring air pressure using a speaker as described in claim 1 are implemented.

5. A computer-readable storage medium, It is characterized in that A program for measuring air pressure using a speaker is stored thereon, and when the program for measuring air pressure using a speaker is executed by a processor, the steps of the method for measuring air pressure using a speaker as claimed in claim 1 are implemented.