Device with ultrasonic distance measurement function and distance measurement method

文档序号:1353131 发布日期:2020-07-24 浏览:14次 中文

阅读说明:本技术 具有超声测距功能的装置及测距方法 (Device with ultrasonic distance measurement function and distance measurement method ) 是由 具子星 王友 赵志勇 于 2020-04-29 设计创作,主要内容包括:本发明提供一种具有超声测距功能的装置及测距方法,其中的装置包括控制单元、与控制单元连接的超声发射单元、主麦克风和辅助麦克风;其中,超声发射单元用于发射超声信号至外界物体;主麦克风用于拾取经外界物体反射后的超声信号,辅助麦克风用于拾取环境噪声信号;控制单元用于根据主麦克风拾取的超声信号以及环境噪声信号获取有效信号,并根据超声信号的发射时间以及主麦克风接收到有效信号的接收时间,确定装置与外界物体之间的有效距离;控制单元根据有效距离执行对应的控制指令。利用上述发明能够利用主麦克风和辅助麦克风提高距离探测的准确性。(The invention provides a device with an ultrasonic distance measuring function and a distance measuring method, wherein the device comprises a control unit, an ultrasonic transmitting unit connected with the control unit, a main microphone and an auxiliary microphone; the ultrasonic transmitting unit is used for transmitting an ultrasonic signal to an external object; the main microphone is used for picking up ultrasonic signals reflected by an external object, and the auxiliary microphone is used for picking up environmental noise signals; the control unit is used for acquiring an effective signal according to the ultrasonic signal picked up by the main microphone and the environmental noise signal, and determining the effective distance between the device and an external object according to the transmitting time of the ultrasonic signal and the receiving time of the effective signal received by the main microphone; and the control unit executes a corresponding control instruction according to the effective distance. The accuracy of distance detection can be improved by using the main microphone and the auxiliary microphone.)

1. A device with an ultrasonic distance measurement function is characterized by comprising a control unit, an ultrasonic transmitting unit connected with the control unit, a main microphone and an auxiliary microphone; wherein the content of the first and second substances,

the ultrasonic transmitting unit is used for transmitting an ultrasonic signal to an external object;

the main microphone is used for picking up ultrasonic signals reflected by the external object, and the auxiliary microphone is used for picking up environmental noise signals;

the control unit is used for acquiring an effective signal according to the ultrasonic signal picked up by the main microphone and the environmental noise signal, and determining an effective distance between the device and the external object according to the transmitting time of the ultrasonic signal and the receiving time of the effective signal received by the main microphone;

and the control unit executes a corresponding control instruction according to the effective distance.

2. The device with ultrasonic ranging function according to claim 1,

the effective signal is a difference between an ultrasonic signal picked up by the primary microphone and the ambient noise signal.

3. The device with ultrasonic ranging function according to claim 1, wherein the effective distance between the device and the external object is calculated by the formula:

L=v0t

wherein v is0Representing the speed of sound, ΔtRepresenting a time difference between the receive time and the transmit time.

4. The device with ultrasonic ranging function according to claim 1,

when the effective distance is larger than a preset value, the control unit controls a screen of the device to be started; otherwise, the control unit controls the screen of the device to be closed.

5. The device with ultrasonic ranging function according to claim 1,

when the distance is greater than a second preset value, the control unit controls the playing mode of the device to be a receiver playing mode; otherwise, the control unit controls the play mode of the device to be a loudspeaker play mode.

6. The device with ultrasonic ranging function according to claim 1,

the arrangement distance between the main microphone and the auxiliary microphone is not more than 2 mm.

7. The device with ultrasonic ranging function of claim 1, further comprising a shielding structure disposed outside the auxiliary microphone;

the shielding structure is used for shielding the auxiliary microphone from receiving the ultrasonic signals transmitted by the ultrasonic transmitting unit.

8. The device with ultrasonic ranging function according to claim 1,

the ambient noise signal comprises a first non-effective distance leakage through the ultrasound transmission unit to the auxiliary microphone.

9. The apparatus having ultrasonic ranging function according to claim 8,

the primary microphone is also used for picking up second non-effective distance leakage sound from the ultrasonic transmitting unit to the primary microphone; and the number of the first and second electrodes,

the effective signal is an ultrasonic signal picked up by the main microphone and a difference value between the second non-effective distance leakage and the first non-effective distance leakage.

10. An ultrasonic distance measuring method, characterized in that the ultrasonic distance measuring is carried out by using the device with the ultrasonic distance measuring function according to any one of claims 1 to 9; wherein the method comprises the following steps:

controlling an ultrasonic generating unit to transmit an ultrasonic signal to an external object;

picking up ultrasonic signals reflected by the external object through a main microphone, and picking up environmental noise signals in the environment through an auxiliary microphone;

acquiring a corresponding effective signal according to the ultrasonic signal picked up by the main microphone and the environmental noise signal;

and determining the effective distance between the device and the external object according to the transmitting time of the ultrasonic signal and the receiving time of the main microphone receiving the effective signal.

Technical Field

The invention relates to the technical field of acoustics, in particular to a device with an ultrasonic distance measuring function and a distance measuring method.

Background

In the existing terminal equipment, a proximity sensor is usually adopted for ranging, the sensor is low in detection precision, the power consumption of the terminal equipment is large, and the user experience is influenced.

Therefore, in view of the characteristics of ultrasonic waves such as strong directivity, low energy consumption, and reflection when encountering an obstacle, distance detection is often performed by ultrasonic waves. However, since the ultrasonic waves are affected by objects in the environment or environmental noise in the propagation process, the distance measurement accuracy is affected by using the ultrasonic waves and the microphone for receiving signals, and the requirement for high-accuracy distance measurement cannot be met.

Disclosure of Invention

In view of the foregoing problems, an object of the present invention is to provide an apparatus with an ultrasonic ranging function and a ranging method, so as to solve the problems of low detection accuracy, high energy consumption, poor user experience effect, and the like in the current terminal ranging method.

The device with the ultrasonic ranging function comprises a control unit, an ultrasonic transmitting unit connected with the control unit, a main microphone and an auxiliary microphone, wherein the main microphone is connected with the ultrasonic transmitting unit; the ultrasonic transmitting unit is used for transmitting an ultrasonic signal to an external object; the main microphone is used for picking up ultrasonic signals reflected by an external object, and the auxiliary microphone is used for picking up environmental noise signals; the control unit is used for acquiring an effective signal according to the ultrasonic signal picked up by the main microphone and the environmental noise signal, and determining the effective distance between the device and an external object according to the transmitting time of the ultrasonic signal and the receiving time of the effective signal received by the main microphone; and the control unit executes a corresponding control instruction according to the effective distance.

In addition, the preferred technical scheme is that the effective signal is the difference between the ultrasonic signal picked up by the main microphone and the environmental noise signal.

In addition, the preferable technical scheme is that the calculation formula of the effective distance between the device and the external object is as follows:

L=v0t

wherein v is0Representing the speed of sound, ΔtRepresenting the time difference between the time of reception and the time of transmission.

In addition, the preferable technical scheme is that when the effective distance is larger than a preset value, the control unit controls the screen of the device to start; otherwise, the control unit controls the screen of the device to close.

In addition, the preferable technical scheme is that when the distance is greater than the second preset value, the control unit controls the playing mode of the device to be a receiver playing mode; otherwise, the control unit controls the play mode of the device to be a speaker play mode.

In addition, the preferable technical scheme is that the arrangement distance between the main microphone and the auxiliary microphone is not more than 2 mm.

In addition, the preferable technical proposal is that the microphone also comprises a shielding structure arranged outside the auxiliary microphone; the shielding structure is used for shielding the auxiliary microphone from receiving the ultrasonic signals transmitted by the ultrasonic transmitting unit.

Furthermore, it is preferred that the ambient noise signal comprises a first non-effective distance leakage via the ultrasound transmission unit to the auxiliary microphone.

In addition, the preferred technical scheme is that the main microphone is also used for picking up second non-effective distance leakage sound from the ultrasonic emission unit to the main microphone; and the effective signal is an ultrasonic signal picked up by the main microphone and the difference value between the second non-effective distance leakage and the first non-effective distance leakage.

The invention also provides an ultrasonic distance measurement method, which utilizes the device with the ultrasonic distance measurement function to carry out ultrasonic distance measurement; the ultrasonic distance measurement method comprises the following steps: controlling an ultrasonic generating unit to transmit an ultrasonic signal to an external object; picking up ultrasonic signals reflected by an external object through a main microphone, and picking up environmental noise signals in the environment through an auxiliary microphone; acquiring a corresponding effective signal according to an ultrasonic signal picked up by a main microphone and an environmental noise signal; and determining the effective distance between the device and the external object according to the transmitting time of the ultrasonic signal and the receiving time of the effective signal received by the main microphone.

By utilizing the device with the ultrasonic ranging function and the ranging method, the auxiliary microphone is arranged to pick up the environmental noise signal in the environment, and then the effective signal is obtained according to the ultrasonic signal picked up by the main microphone and the environmental noise signal, so that the signal receiving precision of the main microphone can be improved, the accurate distance between the device and an object is determined according to the effective signal, the ranging precision is high, and the power consumption of the device is low.

To the accomplishment of the foregoing and related ends, one or more aspects of the invention comprise the features hereinafter fully described. The following description and the annexed drawings set forth in detail certain illustrative aspects of the invention. These aspects are indicative, however, of but a few of the various ways in which the principles of the invention may be employed. Further, the present invention is intended to include all such aspects and their equivalents.

Drawings

Other objects and results of the present invention will become more apparent and more readily appreciated as the same becomes better understood by reference to the following description taken in conjunction with the accompanying drawings. In the drawings:

FIG. 1 is a schematic diagram of an apparatus having an ultrasonic ranging function according to an embodiment of the present invention;

fig. 2 is a flowchart of a ranging method according to an embodiment of the present invention.

The same reference numbers in all figures indicate similar or corresponding features or functions.

Detailed Description

In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of one or more embodiments. It may be evident, however, that such embodiment(s) may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to facilitate describing one or more embodiments.

To describe the principle of the device having an ultrasonic ranging function of the present invention in detail, specific embodiments of the present invention will be described below in detail with reference to the accompanying drawings.

Fig. 1 illustrates the principle of a device having an ultrasonic ranging function according to an embodiment of the present invention.

As shown in fig. 1, the apparatus with an ultrasonic ranging function according to an embodiment of the present invention includes a control unit, an ultrasonic transmitting unit connected to the control unit, a main microphone, and an auxiliary microphone; the ultrasonic transmitting unit is used for transmitting an ultrasonic signal to an external object, wherein the ultrasonic signal can be a sound signal; the main microphone is used for picking up ultrasonic signals reflected by an external object, and the auxiliary microphone is used for picking up environmental noise signals; the control unit is used for acquiring effective signals according to the ultrasonic signals picked up by the main microphone and the environmental noise signals, determining the effective distance between a device (a device with an ultrasonic distance measuring function, the same below) and an external object according to the transmitting time of the ultrasonic signals and the receiving time of the effective signals received by the main microphone, and then the control unit can execute corresponding control instructions according to the effective distance.

The difference value between the ultrasonic signal picked up by the main microphone and the environmental noise signal can be used as an effective signal, the setting of the auxiliary microphone can effectively improve the precision of the ultrasonic signal received by the main microphone, and in addition, the precise distance between an ultrasonic transmitting unit (which can also be understood as a whole device with an ultrasonic distance measuring function) and an external object can be determined according to the time of the effective signal received by the main microphone and the transmitting time of the ultrasonic signal.

Specifically, the effective distance between the device and the external object is calculated by the formula:

L=v0t

wherein v is0Representing the speed of sound, ΔtRepresenting the time difference between the reception time of the main microphone receiving the valid signal and the transmission time of the ultrasonic signal.

Further, after the effective distance is obtained, the control unit may execute the corresponding control instruction according to the effective distance. For example, when the effective distance is greater than a preset value, the control unit may control the screen of the device to start; otherwise, the control unit may control the screen of the device to close. For another example, when the distance is greater than the second preset value, the control unit may control the playing mode of the device to be the headphone playing mode; otherwise, the control unit may control the playback mode of the device to be a speaker playback mode or the like.

It should be noted that the first preset value and the second preset value can be set according to the requirements of the client or the device structure and the specific application scenario.

In one embodiment of the invention, the ambient noise signal comprises a first non-effective distance leakage via the ultrasound transmission unit to the auxiliary microphone; in addition, the main microphone is also used for picking up second non-effective distance leakage sound from the ultrasonic emission unit to the main microphone; and the effective signal is an ultrasonic signal picked up by the main microphone and the difference value between the second non-effective distance leakage and the first non-effective distance leakage.

As a specific example, as shown in fig. 1, SPK is an ultrasonic transmitting unit, MIC1 is an auxiliary microphone, MIC2 is a main microphone, signal one is a first non-effective distance leakage sound received by the auxiliary microphone, signal two is an ultrasonic signal received by the main microphone and reflected by an external object, and the sum of time t1 and time t2 is the time when the ultrasonic signal is received by the main microphone, and an effective distance between the device and the object can be obtained according to the time.

In order to improve the precision of the auxiliary microphone for picking up the environmental noise signal and the detection precision of the effective distance, the auxiliary microphone and the main microphone are arranged as close as possible, and in the device with the ultrasonic distance measuring function, the arrangement distance between the main microphone and the auxiliary microphone is not more than 2 mm.

In addition, a shielding structure which is partially covered on the outer side of the auxiliary microphone is arranged in the shell of the device, the shielding structure can shield the auxiliary microphone from receiving ultrasonic signals transmitted by the ultrasonic transmitting unit, the first non-effective distance sound leakage signal can be effectively picked up, and the extraction precision of the main microphone to the ultrasonic signals is improved in an auxiliary mode.

In another embodiment of the present invention, the device with the ultrasonic distance measurement function may be a mobile terminal such as a mobile phone, and when the mobile phone detects that the distance between the skin of the face of the user and the mobile phone is greater than or less than a set value, the mobile phone may control the screen of the mobile phone to be opened or turned off.

Corresponding to the device with the ultrasonic distance measuring function, the invention also provides a distance measuring method. Fig. 2 shows a flow of a ranging method according to an embodiment of the present invention.

As shown in fig. 2, the ranging method of the embodiment of the present invention specifically includes the following steps:

s110: controlling an ultrasonic generating unit to transmit an ultrasonic signal to an external object;

s120: picking up ultrasonic signals reflected by an external object through a main microphone, and picking up environmental noise signals in the environment through an auxiliary microphone;

s130: acquiring a corresponding effective signal according to an ultrasonic signal picked up by a main microphone and an environmental noise signal;

s140: and determining the effective distance between the device and the external object according to the transmitting time of the ultrasonic signal and the receiving time of the effective signal received by the main microphone.

After the effective distance between the device and the external object is obtained, the control unit in the device can execute corresponding control instructions according to other structural components in the effective distance control device.

In addition, the embodiments of the ranging method can refer to the descriptions in the device embodiments, and are not repeated here.

By using the device with the ultrasonic ranging function and the ranging method provided by the invention, the signal extraction precision of the main microphone can be improved through the auxiliary microphone, so that the accurate signal transmission time can be obtained, and the distance measurement precision of the device and the overall user experience can be improved.

The apparatus having an ultrasonic ranging function and the ranging method according to the present invention are described above by way of example with reference to fig. 1 and 2. However, it should be understood by those skilled in the art that various modifications can be made to the device with ultrasonic ranging function and the ranging method of the present invention without departing from the scope of the present invention. Therefore, the scope of the present invention should be determined by the contents of the appended claims.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于声光联合传感的海洋遥感测深方法及装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!