Method for measuring liquid level in container based on DTOF, DTOF module and container

The DTOF module solves the problem of inaccurate liquid level measurement in containers by emitting and receiving detection light and calculating the flight time and refractive index of the medium, thus achieving accurate and simple liquid level measurement.

CN116295717BActive Publication Date: 2026-03-20CHENGDU FUSHI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310126578.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-16
Publication Date
2026-03-20
Estimated Expiration
2043-02-16

AI Technical Summary

Technical Problem

Existing technologies for measuring container liquid levels are not very accurate and require the addition of a weighing sensor module, resulting in a complex structural design.

Method used

The DTOF measurement method is adopted. The DTOF module emits and receives detection light, calculates the flight time of the light and the refractive index of the medium, and determines the liquid level in the container, thus avoiding the need to add an additional weighing sensor module.

Benefits of technology

It improves the accuracy of liquid level measurement, simplifies the structural design, and avoids the influence of ambient temperature on the measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116295717B_ABST
    Figure CN116295717B_ABST
Patent Text Reader

Abstract

The application provides a method for measuring liquid level in a container based on DTOF, a DTOF module and the container. The container is provided with the DTOF module. The method for measuring liquid level in the container comprises the following steps: emitting detection light to the container; receiving reflected light reflected by the detection light; obtaining total flight time according to the emission time of the detection light and the receiving time of the reflected light; calculating target distance according to the total flight time, light speed and the refractive index of the medium through which the detection light is transmitted to the current liquid surface of the container; determining the liquid level in the container according to the target distance and notifying the user. In addition, the application also provides a device for measuring liquid level in a container based on DTOF and the container. The technical scheme of the application effectively solves the problem that the liquid level in the container cannot be accurately measured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of time-of-flight technology, in particular to a method for measuring liquid level in a container based on DTOF, a DTOF module and a container. BACKGROUND

[0002] In the prior art, with the popularization of electronic devices, various products in life are becoming more and more intelligent, which brings great convenience to our life. The liquid capacity measurement on the market at present is mainly through measuring the total weight of the container and the liquid, and then indirectly calculating the capacity of the liquid in the container by using the weight of the container itself and the density of the liquid. However, the accuracy of the liquid volume obtained by weight measurement is low, and a corresponding weighing induction module needs to be additionally added, which is complex in structure design. SUMMARY

[0003] The present application provides a method for measuring liquid level in a container based on DTOF and its device and container, to solve the problem of low accuracy of container liquid level measurement in the prior art.

[0004] In a first aspect, the present application provides a method for measuring liquid level in a container based on DTOF, the DTOF including a light emitter and a light receiver, the method for measuring liquid level in the container comprising: emitting detection light into the container; receiving reflected light reflected back by the detection light; obtaining total flight time according to the emission time of the detection light and the reception time of the reflected light; calculating a target distance according to the total flight time, the speed of light, and the refractive index of the medium through which the detection light is transmitted to the current liquid surface of the container; and determining the liquid level in the container according to the target distance and notifying the user.

[0005] Optionally, the medium includes a first medium and a second medium, the container includes a lid and a body, the body is provided with a container cavity for containing liquid, and the lid is provided on the body; the lid is provided with a light-transmitting part; the DTOF module is embedded in the lid; the light-transmitting part is made of the first medium, the second medium is air, the detection light is emitted into the container through the light-transmitting part, and the target distance is calculated according to the total flight time, the refractive index of the medium through which the detection light is transmitted to the current liquid surface of the container, and the speed of light, which includes: calculating by using a first formula, the first formula being:

[0006]

[0007] Wherein, t is the flight time, h is the initial liquid surface height, d is the thickness of the light-transmitting part, c is the speed of light, n2 is the refractive index of the light-transmitting part, and n0 is the refractive index of air.

[0008] Optionally, the medium includes a first medium and a second medium, the container includes a cover and a body, the body is provided with a liquid containing cavity, the DTOF module is arranged at the bottom of the body opposite to the cover, the bottom is provided with a light transmission part, the light transmission part is made of the first medium, the second medium is the liquid contained in the container, and the target distance is calculated according to the total flight time, the medium refractive index through which the detection light reaches the current liquid level in the container and the light speed.

[0009]

[0010] Wherein, t is the flight time, h is the initial liquid level height, d is the thickness of the light transmission part, c is the light speed, n2 is the refractive index of the light transmission part, and n1 is the refractive index of the liquid.

[0011] Optionally, the container includes a plurality of modes, the plurality of modes are used to select the type of liquid contained in the container, and the method for measuring the liquid level in the container based on the DTOF further includes:

[0012] According to the mode selected by the user, a corresponding preset refractive index is selected from a preset correlation table as the refractive index of the second medium, and the preset correlation table stores a one-to-one correspondence between a plurality of preset liquid types and a plurality of preset refractive indexes.

[0013] Optionally, the DTOF module includes a light emitter and a light receiver, the light receiver includes a reference receiver and a measurement receiver, the light emitter is used to emit the detection light, the measurement receiver is used to receive the reflected light, and the detection light emitted by the light emitter is directly incident into the reference receiver, and the emission time of the detection light is determined by the reference receiver.

[0014] Optionally, the method for measuring the liquid level in the container based on the DTOF further includes: acquiring the peak height ratio and the ranging error of the target distance by using the DTOF module; and correcting the ranging error according to the target distance, the ranging error and the peak height ratio.

[0015] Optionally, the target distance comprises a first interval, a second interval and a third interval in descending order of height, and correcting the ranging error according to the target distance, the ranging error and the peak height ratio comprises: determining whether the target distance is in one of the first interval, the second interval or the third interval; when the target distance is in the first interval, correcting the ranging error by using a piecewise method; when the target distance is in the second interval, correcting the ranging error by using a first fitting relationship curve, wherein the first fitting relationship curve comprises the target distance and the ranging error; and when the target distance is in the third interval, correcting the ranging error by using a second fitting relationship curve, wherein the second fitting relationship curve comprises the peak height ratio and the ranging error.

[0016] Optionally, the method for measuring the liquid level in the container based on DTOF further comprises: detecting the number of occurrences of crosstalk; determining whether the number of occurrences of crosstalk is greater than a preset threshold; and when the number of occurrences of crosstalk is greater than the preset threshold, amplifying the crosstalk calibration parameter by a preset multiple.

[0017] Optionally, the wavelength of the detection light is between 600 nm and 940 nm.

[0018] Optionally, the method for measuring the liquid level in the container based on DTOF further comprises: when the container is detected to be moving, starting the DTOF module to work; and after determining the liquid level in the container according to the target distance, controlling the DTOF module to stop working.

[0019] Optionally, after determining the liquid level in the container according to the target distance, the method for measuring the liquid level in the container based on DTOF further comprises: displaying the liquid level on the display screen according to the liquid level.

[0020] In a second aspect, an embodiment of the present application provides a DTOF module for measuring the liquid level in a container, which comprises a light emitter, a light receiver, a first calculation module, a second calculation module and a notification module. The light emitter is configured to emit detection light into the container. The light receiver is configured to receive reflected light reflected by the detection light. The first calculation module is configured to obtain a total flight time according to the emission time of the detection light and the reception time of the reflected light. The second calculation module is configured to calculate a target distance according to the total flight time, the speed of light and the refractive index of a medium through which the detection light is transmitted to the current liquid surface of the container. The notification module is configured to determine the liquid level in the container according to the target distance and notify a user.

[0021] In a third aspect, the embodiments of the present application provide a container, which is provided with the DTOF module as described above and is used to measure the liquid level in the container; the container comprises a lid and a body, the body is provided with a cavity for containing liquid, and the lid covers the body; the lid is provided with a light-transmitting part; the DTOF module is embedded in the lid; or the DTOF module is arranged at the bottom of the body opposite to the lid, and the bottom is provided with a light-transmitting part.

[0022] Optionally, the light receiver comprises a reference receiver and a measurement receiver, the measurement receiver is used to receive the reflected light; the detection light emitted by the light emitter directly enters the reference receiver, and the emission time of the detection light is determined by the reference receiver.

[0023] The embodiments of the present application provide a method for measuring the liquid level in a container based on DTOF, a DTOF module and a container, which utilize the transmission characteristics of detection light in a container containing liquid, and calculate the target distance according to the total flight time of detection light, the speed of light and the refractive index of the medium through which the detection light is transmitted to the current liquid surface, so that the finally measured liquid level is more accurate, and the DTOF module is used to measure the liquid level without additional weighing sensing module, the structure design is simple and easy to implement.

[0024] In addition, the detection light emitted by the light emitter in the DTOF module is partially directly irradiated to the reference receiver, and the time at which the reference receiver receives the detection light is taken as the emission time, which can also avoid the influence of environmental temperature on the emission time of the light emitter, and further improve the measurement accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from the structures shown in the drawings without creative labor.

[0026] Figure 1 The flowchart of the method for measuring the liquid level in the container provided by the embodiments of the present application.

[0027] Figure 2 The first sub-flowchart of the method for measuring the liquid level in the container provided by the embodiments of the present application.

[0028] Figure 3 The second sub-flowchart of the method for measuring the liquid level in the container provided by the embodiments of the present application.

[0029] Figure 4The third sub-flowchart of the method for measuring the liquid level in a container provided in the embodiments of this application.

[0030] Figure 5 The fourth sub-flowchart of the method for measuring the liquid level in a container provided in the embodiments of this application.

[0031] Figure 6 The fifth sub-flowchart of the method for measuring the liquid level in a container provided in the embodiments of this application.

[0032] Figure 7 The optical signal histogram provided in the embodiments of this application.

[0033] Figure 8 This is a schematic diagram of the structure of the DTOF module provided in the embodiments of this application.

[0034] Figure 9 for Figure 8 A schematic diagram of the structure of the optical receiver.

[0035] Figure 10 This is a schematic diagram of the structure of the container provided in the first embodiment of this application.

[0036] Figure 11 This is a schematic diagram of the structure of the container provided in the second embodiment of this application.

[0037] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0039] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar planned objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data are interchangeable where appropriate; in other words, the described embodiments are implemented according to a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, may also include other content; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0040] It should be noted that the descriptions involving "first", "second" and the like in the present application are only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the technical features indicated or implicitly indicating the number of technical features. Therefore, the features defined as "first", "second" can explicitly or implicitly include one or more of the features. In addition, the technical solutions of various embodiments can be combined with each other, but it must be based on the realization of ordinary skilled in the art, when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, nor within the protection scope required by the present application.

[0041] Please refer to Figure 1 , which is a flow chart of the method for measuring the liquid level in the container provided by the embodiment of the present application. The method for measuring the liquid level in the container provided by the embodiment includes the following steps.

[0042] Step S101, emitting detection light into the container.

[0043] Specifically, the light emitter 101 emits detection light. The wavelength of the detection light is between 600nm and 940nm. That is, in the present embodiment, a wavelength between 600nm and 940nm is used to emit light source. Because the longer the wavelength, the weaker the penetration, and the wavelength of the commonly used VCSEL laser emission source can be as short as 600nm, light with a wavelength greater than 940nm has weak penetration and is not conducive to the reflection of the light band reflected by the liquid surface, effectively avoiding the influence of normal light on measurement, while ensuring the accuracy of measurement.

[0044] Step S102, receiving reflected light reflected by the detection light.

[0045] Specifically, in the first embodiment of the present application, the structure of the container is as shown in Figure 10 , the medium used includes a first medium and a second medium, the container 2 includes a cover 21 and a body 22, the body 22 is provided with a container cavity 3 for containing liquid, and the cover 21 is provided on the body 22. The cover 21 is provided with a light-transmitting part 4. The DTOF module 1 is embedded in the cover 21. The light-transmitting part 4 is made of a first medium, and the second medium is air. The detection light is emitted into the container 2 through the light-transmitting part 4. That is, the DTOF module 1 will penetrate the first medium and the air layer to reach the liquid surface, and the reflected light will be formed by the reflection of the liquid surface and then returned to the DTOF module 1.

[0046] Specifically, in the second embodiment of the present application, the structure of the container is as shown in Figure 11As shown, the medium includes a first medium and a second medium, the container 2 includes a cover 21 and a body 22, the body 22 is provided with a container cavity 3 for containing liquid, the DTOF module 1 is arranged at the bottom of the body 22 away from the cover 21, the bottom is provided with a light transmission part 4, the light transmission part 4 is made of the first medium, and the second medium is the liquid contained in the container 2. That is, the DTOF module 1 will pass through the first medium and the liquid layer to reach the liquid surface, form reflected light through the liquid surface reflection, and then return to the DTOF module 1. The DTOF module 1 is separated from the light transmission part 4 to avoid direct contact between the liquid and the DTOF module 1, and to avoid contamination of the lens.

[0047] In step S103, the total flight time is obtained according to the emission time of the detection light and the reception time of the reflected light.

[0048] Specifically, the DTOF module 1 includes a light emitter 101 and a light receiver 102. The light receiver 102 includes a reference receiver 1021 and a measurement receiver 1022, and the light emitter 101 is used to emit detection light. The measurement receiver 1022 is used to receive reflected light. Part of the detection light emitted by the light emitter 101 directly enters the reference receiver 1021, and the emission time of the detection light is determined by the reference receiver 1021.

[0049] Optionally, the light receiver 102 adopts a single-photon avalanche diode (SPAD). The single-photon avalanche diode is a photoelectric detection avalanche diode with single-photon detection capability, and has characteristics of high photon detection efficiency, wide spectral response range, extremely high sensitivity, and low power consumption. The system records the time when the light arrives as a time parameter.

[0050] Optionally, the light emitter 101 will be affected by temperature and produce different degrees of time delay effect. That is, if the timing starts from the emission of the light emitter 101 under different temperature conditions, there will be different time delays for the light emitter 101 to detect light, and the delay will have a relatively large drift with the change of temperature. The time delay multiplied by the speed of light will cause a large deviation in the calculation of the distance. Therefore, a reference receiver 1021 is arranged in the DTOF module 1, and the time when the light arrives at the reference receiver 1021 is taken as the emission time. As shown in the curve, the time corresponding to the peak of the curve is taken as the emission time, so that the influence of temperature or other external conditions on the accuracy can be avoided. Figure 7

[0051] In step S104, the target distance is calculated according to the total flight time, the speed of light, and the refractive index of the medium through which the detection light is transmitted to the current liquid surface of the container.

[0052] ​Optionally, in a specific implementation, the step S104 can be implemented by the first embodiment. In the first embodiment, the target distance is calculated according to the total flight time, the refractive index of the medium through which the detection light reaches the current liquid level in the container 2, and the speed of light. The target distance is calculated by using a first formula.

[0053]

[0054] In the first formula, t is the flight time, h is the initial liquid level height, d is the thickness of the light-transmitting part, c is the speed of light, n2 is the refractive index of the light-transmitting part, and n0 is the refractive index of air. That is, the target distance is obtained by subtracting the time used by the transparent layer from the flight time and multiplying the speed of light in air.

[0055] Optionally, in a specific implementation, the step S104 can also be implemented by the second embodiment. In the second embodiment, the target distance is calculated according to the total flight time, the refractive index of the medium through which the detection light reaches the current liquid level in the container 2, and the speed of light. The target distance is calculated by using a second formula.

[0056]

[0057] In the second formula, t is the flight time, h is the initial liquid level height, d is the thickness of the light-transmitting part, c is the speed of light, n2 is the refractive index of the light-transmitting part, and n1 is the refractive index of the liquid. That is, the target distance is obtained by subtracting the time used by the transparent layer from the flight time and multiplying the speed of light in the liquid.

[0058] In step S105, the liquid level in the container is determined according to the target distance.

[0059] Specifically, in the embodiments of the present application, the measured internal volume of the container 2 is divided into a certain height proportion, and the current liquid level in the container 2 can be obtained by multiplying the target distance by the corresponding percentage. The liquid level message is formed according to the liquid level and displayed on the display screen. The user can also be notified in various ways such as voice.

[0060] In summary, by arranging the DTOF module 1 at the bottom of the cover 21 or the body 22 of the container 2, the DTOF module 1 records the emission time of the light emitted to the reference receiver 1021. The light passes through the wall of the light-transmitting cup and reaches the liquid level, and is reflected back to the measurement receiver 1022. The flight time is calculated by the emission time and the receiving time. The target distance is calculated according to the light passing through the two media according to the corresponding formula. Finally, the liquid level is converted and displayed to the user. The method of using DTOF light irradiation technology to obtain flight time can effectively improve the accuracy and timeliness.

[0061] Please refer toFigure 2 which is a first sub-flowchart of the method for measuring the liquid level in the container provided by the embodiment of the present application. In some embodiments, the container 2 comprises several modes for selecting the type of liquid contained in the container 2. The method for measuring the liquid level in the container based on DTOF further comprises the following steps before step S101:

[0062] In step S202, the preset refractive index corresponding to the second medium is selected from the preset correlation table according to the mode selected by the user. The preset correlation table stores the one-to-one correspondence between the several preset liquid types and the several preset refractive indexes.

[0063] Specifically, in the second embodiment, the container 2 is provided with several different buttons, each of which is used to select the refractive index of different liquid. For example, the refractive index of milk is 1.35, and the refractive index of water is 1.3330. The refractive index of milk is greater than that of water, so the user selects different modes to calibrate the refractive index in the corresponding calculation formula. In this way, the problem of inaccurate liquid level detection results caused by different types of liquids contained is avoided, thereby improving the user experience.

[0064] Please refer to Figure 3 , Figure 3 which is a second sub-flowchart of the method for measuring the liquid level in the container provided by the embodiment of the present application. The method for measuring the liquid level in the container based on DTOF further comprises the following steps:

[0065] In step S302, when the movement of the container is detected, the DTOF module is started to work.

[0066] Specifically, by setting a gyroscope, an inductive switch, etc. on the container 2, it can be detected whether the container 2 is in a motion state, so as to determine whether the liquid level needs to be detected. The way of detecting whether the container 2 is in motion is not specifically limited here.

[0067] In step S304, after the liquid level in the container is determined according to the target distance, the DTOF module is controlled to stop working.

[0068] Specifically, the DTOF module 1 continuously obtains the height of the liquid surface, and when the variation amplitude of the last several groups of data is less than a certain threshold, it is determined that the current is not in a motion state. The current liquid level is displayed. In this way, the power consumption of the DTOF module 1 can be reduced, and the detection will only be started in the case of motion change.

[0069] In summary, the gyroscope, inductive switch and other motion sensing components are arranged in the container 2. That is, when the user picks up the cup or rotates the cup, the gyroscope, inductive switch and other motion sensing components are triggered, and then the DTOF module obtains the current liquid level and displays it on the display screen. At this time, the user can check the current water amount in the container and consider whether to add water. In another case, when the user drinks water, the cup is in a motion state, and the cap is unscrewed from the container, the gyroscope, inductive switch and other motion sensing components are not in a stable state, and the DTOF module is not controlled to work at this time. When the user finishes drinking water, the container 2 is stationary and the cap is closed. The gyroscope, inductive switch and other motion sensing components sense that the motion amplitude is less than a certain value, and the cup is stable. At this time, the DTOF module is controlled to work to obtain the current liquid level.

[0070] Please refer to Figure 4 which is a third sub-flowchart of the method for measuring the liquid level in the container provided by the embodiments of the present application. In some embodiments, the container 2 includes a calibration mode. The method for measuring the liquid level in the container based on the DTOF further includes the following steps.

[0071] In step S402, the DTOF module is used to obtain the peak height ratio of the target distance and the ranging error.

[0072] In step S404, the ranging error is corrected according to the target distance, the ranging error and the peak height ratio.

[0073] Specifically, the target distance includes a first interval, a second interval and a third interval with descending heights in turn, and step S402 specifically includes the following steps:

[0074] Please refer to Figure 5 which is a fourth sub-flowchart of the method for measuring the liquid level in the container provided by the embodiments of the present application. In step S502, it is judged whether the target distance is in one of the first interval, the second interval or the third interval. When the target distance is in the first interval, step S504 is performed; when the target distance is in the second interval, step S506 is performed; and when the target distance is in the third interval, step S508 is performed.

[0075] In step S504, the ranging error is corrected by using a piecewise method.

[0076] In step S506, the ranging error is corrected by using a first fitting relationship curve.

[0077] In step S508, the ranging error is corrected by using a second fitting relationship curve.

[0078] Specifically, different materials of the container 2 will generate different signal interference under different liquid levels. It is detected through experiments that the signal interference is serious when the liquid level is 0-250 ml. Specifically, the ranging result does not change basically in the 0-100 ml interval. The ranging error is large in the 100-250 ml interval, but it presents a monotone decreasing relationship. In the 0-150 ml interval, there is an obvious change rule between the peak height ratio and the water quantity, where the peak height ratio is the ratio of the current signal peak height to the signal peak height when the cup is empty. Different water levels also require different calibration algorithms.

[0079] For example, for the case of less water, the liquid level in the 200 ml-250 ml interval (first interval) is corrected by segmenting the ranging error, i.e., the liquid level of 250 ml is segmented into 100 ml and 150 ml for correction. In the 150 mm-200 ml interval (second interval), the ranging error is corrected by a first fitting relationship curve, where the first fitting relationship curve includes the target distance and the ranging error, and the specific values are obtained through experimental tests and the adjustment parameters are set. In the 100 ml to 150 ml interval (third interval), the ranging error is corrected by a second fitting relationship curve, where the second fitting relationship curve includes the peak height ratio and the ranging error, and the specific values are obtained through experimental tests and the adjustment parameters are set.

[0080] Please refer to Figure 6 which is a fifth sub-flowchart of the method for measuring the liquid level in the container provided by the embodiment of the application. In addition, in some other embodiments, the following steps are also included.

[0081] In step S602, the number of occurrences of crosstalk is detected.

[0082] In step S604, it is judged whether the number of occurrences of crosstalk is greater than a preset threshold. When the number of occurrences of crosstalk is greater than the preset threshold, step S606 is executed.

[0083] In step S606, the crosstalk calibration parameter is amplified by a preset multiple.

[0084] Specifically, when the DTOF module 1 is installed on the cover or the top of the container 2 and the container 2 contains hot water or other liquids with large evaporation, the liquid will form mist near the DTOF module 1, which greatly increases the cover crosstalk and causes interference to the ranging. For example, in the actual use process, the DTOF module 1 will detect the number of occurrences of crosstalk points. When the number of occurrences reaches a certain number, the crosstalk calibration parameter is amplified by two or four times, and then the ranging is performed after the crosstalk interference is eliminated, so as to improve the measurement accuracy.

[0085] Based on the same inventive concept, the embodiment of the application also provides a DTOF module for measuring the liquid level in a container, as shown in Figure 8As shown, the DTOF module 1 comprises a light emitter 101, a light receiver 102, a first calculation module 103, a second calculation module 104, and a notification module 105.

[0086] Specifically, the light emitter 101 is configured to emit detection light into the container.

[0087] Optionally, the detection light has a wavelength in a range of 450 nm to 2000 nm, and preferably in a range of 600 nm to 950 nm. That is, the light source in the present application emits light in a wavelength range of 600 nm to 940 nm. Since the longer the wavelength, the weaker the penetration, and the wavelength of the commonly used VCSEL laser emission source can be as short as 600 nm, light with a wavelength greater than 940 nm has weak penetration and is not conducive to the reflection of the band light reflected by the liquid surface. Normal light is effectively avoided from affecting the measurement, while the accuracy of the measurement is ensured.

[0088] The light receiver 102 is configured to receive reflected light reflected by the detection light.

[0089] Optionally, in the first embodiment of the present application, the medium comprises a first medium and a second medium, the container 2 comprises a cover 21 and a body 22, the body 22 is provided with a container cavity 3 for containing liquid, and the cover 21 is provided on the body 22. The cover 21 is provided with a light-transmitting portion 4. The DTOF module 1 is embedded in the cover 21. The light-transmitting portion 4 is made of the first medium, the second medium is air, and the detection light is emitted into the container 2 through the light-transmitting portion 4. That is, the DTOF module 1 will penetrate the first medium and the air layer to reach the liquid surface, form reflected light by reflection of the liquid surface, and then return to the DTOF module 1. The DTOF module 1 is separated from the container 2 by the light-transmitting portion 4, so as to avoid direct contact between the liquid and the DTOF module 1 and contamination of the lens.

[0090] Optionally, in the second embodiment of the present application, the medium comprises a first medium and a second medium, the container 2 comprises a cover 21 and a body 22, the body 22 is provided with a container cavity 3 for containing liquid, and the DTOF module 1 is arranged at the bottom of the body 22 opposite to the cover 21. The bottom is provided with a light-transmitting portion 4 made of the first medium, and the second medium is the liquid contained in the container 2. That is, the DTOF module 1 will penetrate the first medium and the liquid layer to reach the liquid surface, form reflected light by reflection of the liquid surface, and then return to the DTOF module 1.

[0091] The first calculation module 103 is configured to obtain a total flight time according to the emission time of the detection light and the reception time of the reflected light.

[0092] Specifically, the DTOF module 1 comprises a light emitter 101 and a light receiver 102. As shown in FIG. 1, the DTOF module 1 is arranged on the cover 21 of the container 2. Figure 9As shown, the light receiver 102 includes a reference receiver 1021 and a measurement receiver 1022, and the light transmitter 101 is used to transmit detection light. The measurement receiver 1022 is used to receive the reflected light. Part of the detection light transmitted by the light transmitter 101 directly enters the reference receiver 1021, and the transmission time of the detection light is determined by the reference receiver 1021.

[0093] Optionally, the light receiver 102 adopts a single photon avalanche diode (SPAD), which is a photoelectric detection avalanche diode with single photon detection capability, and has high photon detection efficiency, wide spectral response range, extremely high sensitivity, and low power consumption. The system uses the single photon avalanche diode to record the time when the light arrives as a time parameter.

[0094] Optionally, because the light transmitter 101 will be affected by temperature and produce different degrees of time delay effect. That is, if the timing starts from the light transmitter 101 transmitting driving under different temperature conditions, there will be different time delays to the light transmitter 101 detecting light, and this delay will have a relatively large drift with temperature change, and this time delay multiplied by the speed of light will cause a large deviation in the calculated distance. Therefore, a reference receiver 1021 is arranged at the light transmitter 101, and the time when the light arrives at the reference receiver 1021 is taken as the transmission time. That is, the peak of the two curves is taken as the transmission time. In this way, the influence of temperature or other external conditions on accuracy can be avoided. Figure 7

[0095] The second calculation module 104 is used to calculate the target distance according to the total flight time, the speed of light, and the refractive index of the medium through which the detection light is transmitted to the current liquid level of the container.

[0096] Specifically, in the first embodiment, the target distance is calculated according to the total flight time, the refractive index of the medium through which the detection light is transmitted to the current liquid level of the container 2, and the speed of light, which includes being calculated by using a first formula. The first formula is:

[0097]

[0098] Wherein, t is the flight time, h is the initial liquid level height, d is the thickness of the light-transmitting part, c is the speed of light, n2 is the refractive index of the light-transmitting part, and n0 is the refractive index of air. That is, the target distance is obtained by subtracting the time used by the transparent layer from the flight time, and then multiplying the speed of light in air. The target distance is the distance from the current liquid level to the height of the liquid filled.

[0099] Specifically, in the second embodiment, the target distance is calculated according to the total flight time, the refractive index of the medium through which the detection light is transmitted to the current liquid level of the container 2, and the speed of light, which includes being calculated by using a second formula.

[0100] ​The second formula is as follows.

[0101]

[0102] wherein t is the flight time, h is the initial liquid level, d is the thickness of the light-transmitting part, c is the speed of light, n2 is the refractive index of the light-transmitting part, and n1 is the refractive index of the liquid. That is, the target distance is obtained by subtracting the time used by the transparent layer from the flight time and multiplying the speed of light in the liquid.

[0103] The notification module 105 is configured to determine the liquid level in the container according to the target distance and notify the user.

[0104] Specifically, in the embodiment of the present application, the measured internal volume of the container 2 is divided into a plurality of portions according to certain heights, and the liquid level in the container 2 can be obtained by multiplying the target distance by the corresponding percentage. The liquid level message is displayed on the display screen, and the user can also be notified by voice or other ways.

[0105] Based on the same inventive concept, refer to Figure 10 or Figure 11 The embodiment of the present application also provides a container 2, which is provided with the DTOF module 1 as described above, and the DTOF module 1 is used to measure the liquid level in the container.

[0106] Specifically, as shown in Figure 10 , the container 2 includes a lid 21 and a body 22, the body 22 is provided with a container cavity 3 for containing liquid, and the lid 21 is provided on the body 22; the lid 21 is provided with a light-transmitting part 4; and the DTOF module 1 is embedded in the lid 21. That is, when the container 2 is placed horizontally, the DTOF module 1 emits detection light from top to bottom.

[0107] Specifically, as shown in Figure 11 , in another embodiment, the DTOF module 1 is arranged on the bottom of the body 22 opposite to the lid 21, and the bottom is provided with a light-transmitting part 4. That is, when the container 2 is placed horizontally, the DTOF module 1 emits detection light from bottom to top.

[0108] For example, the container 2 is a cylindrical vacuum cup, the light-transmitting part 4 is a transparent material layer, and the light-transmitting part 4 is used for light irradiation of the DTOF module 1 and prevents liquid or vapor from damaging the DTOF module 1. A transparent material such as a glass sheet is arranged on the lid of the vacuum cup or the bottom of the vacuum cup, the DTOF module 1 is arranged below the glass sheet, and the liquid or vapor is prevented from damaging the DTOF module 1. In some embodiments, the vacuum cup does not have a lid, and the glass sheet and the DTOF module 1 are arranged on the inner top of the vacuum cup.

[0109] In some embodiments, the glass flakes and the DTOF module 1 can also be integrated into the mug lid of the mug. Specifically, a display screen and a speaker are installed on the outside of the mug lid or the mug wall, the display screen is used to display the numerical value of the liquid level and remind the user to add water or drink water at a certain time when the liquid level is below a threshold, and the speaker is used to emit voice prompts. In other embodiments, the installation position of the display screen and the speaker can also be the top or the outside of the top of the mug lid.

[0110] In some embodiments, the light receiver 102 includes a reference receiver 1021 and a measurement receiver 1022, the measurement receiver 1022 is used to receive reflected light; the detection light emitted by the light emitter 101 directly enters the reference receiver 1021, and the emission time of the detection light is determined by the reference receiver 1021.

[0111] In the above embodiments, the target distance is calculated according to the transmission characteristics of the speed of light in the cup and the refractive index of the medium through which the detection light is transmitted to the current liquid level of the container, so that the final obtained liquid level is more accurate. By emitting detection light from the light emitter in the DTOF module, part of the detection light directly shines on the reference receiver, and the time at which the reference receiver receives the detection light is taken as the emission time, which can also avoid the influence of environmental temperature on the emission time of the light emitter, further improving the accuracy of measurement.

[0112] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.

[0113] The above only lists the preferred embodiments of the present application, of course, cannot limit the scope of the rights of the present application, therefore, the equivalent changes made according to the claims of the present application, still belong to the scope covered by the present application.

Claims

1. A method for measuring liquid level in a container based on DTOF, wherein the container is equipped with a DTOF module, characterized in that, The method for measuring the liquid level inside the container includes: Emit detection light into the container; Receive the reflected light returned by the detection light; The total flight time is obtained based on the emission time of the detected light and the reception time of the reflected light; The target distance is calculated based on the total flight time, the speed of light, and the refractive index of the medium through which the detection light travels to the current liquid surface of the container; and The liquid level inside the container is determined based on the target distance; The method for measuring liquid level in a container based on DTOF also includes: The peak-to-height ratio and ranging error of the target distance are obtained using the DTOF module; and The ranging error is corrected based on the target distance, the ranging error, and the peak height ratio; The target distance includes a first interval, a second interval, and a third interval with sequentially decreasing heights. Correcting the ranging error based on the target distance, the ranging error, and the peak-to-height ratio includes: Determine whether the target distance falls within one of the first interval, the second interval, or the third interval; When the target distance is within the first interval, the ranging error is corrected using a segmented method; When the target distance is within the second interval, the ranging error is corrected using a first fitting relationship curve, wherein the first fitting relationship curve includes the target distance and the ranging error; and When the target distance is in the third interval, the ranging error is corrected by a second fitting relationship curve, wherein the second fitting relationship curve includes the peak height ratio and the ranging error.

2. The method for measuring liquid level in a container based on DTOF as described in claim 1, characterized in that, The medium includes a first medium and a second medium. The container includes a lid and a body. The body has a cavity for holding liquid, and the lid is placed over the body. The lid has a light-transmitting portion. The DTOF module is embedded in the lid. The light-transmitting portion is made of the first medium, and the second medium is air. The detection light enters the container through the light-transmitting portion. The target distance is calculated based on the total flight time, the refractive index of the medium through which the detection light passes to the current liquid surface in the container, and the speed of light. The calculation is performed using the first formula, which is: Where t is the flight time, h is the initial liquid level height, d is the thickness of the light-transmitting part, c is the speed of light, n2 is the refractive index of the light-transmitting part, and n0 is the refractive index of air.

3. The method for measuring liquid level in a container based on DTOF as described in claim 1, characterized in that, The medium includes a first medium and a second medium. The container includes a lid and a body. The body has a cavity for holding liquid. The DTOF module is disposed at the bottom of the body opposite to the lid. The bottom has a light-transmitting part made of the first medium. The second medium is the liquid contained in the container. The target distance is calculated based on the total flight time, the refractive index of the medium through which the detection light passes to the current liquid surface in the container, and the speed of light, including: The calculation is performed using the second formula, which is: Wherein, t is the flight time, h is the initial liquid level height, d is the thickness of the light-transmitting part, c is the speed of light, n2 is the refractive index of the light-transmitting part, and n1 is the refractive index of the liquid.

4. The method for measuring liquid level in a container based on DTOF as described in claim 3, characterized in that, The container includes several modes; the several modes are used to select the type of liquid contained in the container; the method for measuring the liquid level in the container based on DTOF further includes: According to the mode selected by the user, the corresponding preset refractive index is selected from the preset association form as the refractive index of the second medium; wherein, the preset association form stores a one-to-one correspondence between several preset liquid types and several preset refractive indices.

5. The method for measuring liquid level in a container based on DTOF as described in claim 1, characterized in that, The DTOF module includes a light emitter and a light receiver; the light receiver includes a reference receiver and a measurement receiver, the light emitter is used to emit the detection light; the measurement receiver is used to receive the reflected light; The detection light emitted by the light emitter is directly incident on the reference receiver, and the emission time of the detection light is determined by the reference receiver.

6. The method for measuring liquid level in a container based on DTOF as described in claim 2, characterized in that, The method for measuring liquid level in a container based on DTOF also includes: Detect the number of crosstalk occurrences; Determine whether the number of crosstalk occurrences exceeds a preset threshold; When the number of crosstalk occurrences exceeds a preset threshold, the crosstalk calibration parameters are amplified by a preset factor.

7. The method for measuring liquid level in a container based on DTOF as described in claim 1, characterized in that, The wavelength of the detection light is between 600nm and 940nm.

8. The method for measuring liquid level in a container based on DTOF as described in claim 1, characterized in that, The method for measuring liquid level in a container based on DTOF also includes: When the movement of the container is detected, the DTOF module is activated. Once the liquid level in the container is determined based on the target distance, the DTOF module is controlled to stop working.

9. The method for measuring liquid level in a container based on DTOF as described in claim 1, characterized in that, The container also includes a display screen. After determining the liquid level inside the container based on the target distance, the method for measuring the liquid level inside the container based on DTOF further includes: The liquid level information is generated based on the liquid level and displayed on the display screen.

10. A DTOF module for measuring liquid level in a container, characterized in that, The DTOF module for measuring the liquid level inside the container includes: A light emitter is used to emit detection light into the container; A light receiver, used to receive the reflected light returned by the detection light; The first calculation module is used to obtain the total flight time based on the emission time of the detection light and the reception time of the reflected light; The second calculation module is used to calculate the target distance based on the total flight time, the speed of light, and the refractive index of the medium through which the detection light passes to the current liquid surface of the container. The notification module is used to determine the liquid level in the container based on the target distance and notify the user. The DTOF module for measuring the liquid level in the container is further used to execute a method for measuring the liquid level in the container based on DTOF, the method including: The peak-to-height ratio and ranging error of the target distance are obtained using the DTOF module; and The ranging error is corrected based on the target distance, the ranging error, and the peak height ratio; The target distance includes a first interval, a second interval, and a third interval with sequentially decreasing heights. Correcting the ranging error based on the target distance, the ranging error, and the peak-to-height ratio includes: Determine whether the target distance falls within one of the first interval, the second interval, or the third interval; When the target distance is within the first interval, the ranging error is corrected using a segmented method; When the target distance is within the second interval, the ranging error is corrected using a first fitting relationship curve, wherein the first fitting relationship curve includes the target distance and the ranging error; and When the target distance is in the third interval, the ranging error is corrected by a second fitting relationship curve, wherein the second fitting relationship curve includes the peak height ratio and the ranging error.

11. A container, characterized in that, The container is equipped with a DTOF module as described in claim 10; the DTOF module is used to measure the liquid level inside the container; The container includes a lid and a body. The body has a cavity for holding liquid, and the lid is placed on the body. The lid has a light-transmitting part. The DTOF module is embedded in the lid. Alternatively, the DTOF module is located at the bottom of the body opposite to the lid, and the bottom has a light-transmitting part.

12. The container as claimed in claim 11, characterized in that, The optical receiver includes a reference receiver and a measurement receiver, the measurement receiver being used to receive the reflected light; The detection light emitted by the light emitter is directly incident on the reference receiver, and the emission time of the detection light is determined by the reference receiver.

Citation Information

Patent Citations

  • Laser liquid level measurement device and method

    CN106092271A

  • Transparent liquid level and refractive index measuring device and method based on laser ranging

    CN111189512A

  • Laser ranging method and device and medium

    CN115469320A